m5op_alpha.S revision 5951
1278SN/A/*
22188SN/A * Copyright (c) 2003-2006 The Regents of The University of Michigan
3278SN/A * All rights reserved.
4278SN/A *
5278SN/A * Redistribution and use in source and binary forms, with or without
6278SN/A * modification, are permitted provided that the following conditions are
7278SN/A * met: redistributions of source code must retain the above copyright
8278SN/A * notice, this list of conditions and the following disclaimer;
9278SN/A * redistributions in binary form must reproduce the above copyright
10278SN/A * notice, this list of conditions and the following disclaimer in the
11278SN/A * documentation and/or other materials provided with the distribution;
12278SN/A * neither the name of the copyright holders nor the names of its
13278SN/A * contributors may be used to endorse or promote products derived from
14278SN/A * this software without specific prior written permission.
15278SN/A *
16278SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17278SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18278SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19278SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20278SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21278SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22278SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23278SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24278SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25278SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26278SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665SN/A *
282665SN/A * Authors: Nathan Binkert
292665SN/A *          Ali Saidi
30278SN/A */
31278SN/A
32275SN/A#define m5_op 0x01
33287SN/A
344090Ssaidi@eecs.umich.edu#include "m5ops.h"
352188SN/A
36275SN/A#define INST(op, ra, rb, func) \
372188SN/A        .long (((op) << 26) | ((ra) << 21) | ((rb) << 16) | (func))
382188SN/A
392188SN/A#define LEAF(func)    \
402188SN/A        .align 3;     \
412188SN/A        .globl  func; \
422188SN/A        .ent    func; \
432188SN/Afunc:
442188SN/A
452188SN/A#define RET           \
462188SN/A        ret     ($26)
472188SN/A
482188SN/A#define END(func)     \
492188SN/A        .end func
502188SN/A
515543Ssaidi@eecs.umich.edu#define SIMPLE_OP(_f, _o)       \
525543Ssaidi@eecs.umich.edu        LEAF(_f)                \
535543Ssaidi@eecs.umich.edu                _o;             \
545543Ssaidi@eecs.umich.edu                RET;            \
555505Snate@binkert.org        END(_f)
565505Snate@binkert.org
575543Ssaidi@eecs.umich.edu#define ARM(reg) INST(m5_op, reg, 0, arm_func)
582188SN/A#define QUIESCE INST(m5_op, 0, 0, quiesce_func)
592188SN/A#define QUIESCENS(r1) INST(m5_op, r1, 0, quiescens_func)
602188SN/A#define QUIESCECYC(r1) INST(m5_op, r1, 0, quiescecycle_func)
612188SN/A#define QUIESCETIME INST(m5_op, 0, 0, quiescetime_func)
625741Snate@binkert.org#define RPNS INST(m5_op, 0, 0, rpns_func)
635808Snate@binkert.org#define WAKE_CPU(r1) INST(m5_op, r1, 0, wakecpu_func)
64287SN/A#define M5EXIT(reg) INST(m5_op, reg, 0, exit_func)
65275SN/A#define INITPARAM(reg) INST(m5_op, reg, 0, initparam_func)
662358SN/A#define LOADSYMBOL(reg) INST(m5_op, reg, 0, loadsymbol_func)
67287SN/A#define RESET_STATS(r1, r2) INST(m5_op, r1, r2, resetstats_func)
68287SN/A#define DUMP_STATS(r1, r2) INST(m5_op, r1, r2, dumpstats_func)
69287SN/A#define DUMPRST_STATS(r1, r2) INST(m5_op, r1, r2, dumprststats_func)
70287SN/A#define CHECKPOINT(r1, r2) INST(m5_op, r1, r2, ckpt_func)
712188SN/A#define READFILE INST(m5_op, 0, 0, readfile_func)
722188SN/A#define DEBUGBREAK INST(m5_op, 0, 0, debugbreak_func)
732188SN/A#define SWITCHCPU INST(m5_op, 0, 0, switchcpu_func)
742188SN/A#define ADDSYMBOL(r1,r2) INST(m5_op, r1, r2, addsymbol_func)
752188SN/A#define PANIC INST(m5_op, 0, 0, panic_func)
76275SN/A
775951Ssaidi@eecs.umich.edu#define AN_BSM INST(m5_op, an_bsm, 0, annotate_func)
785951Ssaidi@eecs.umich.edu#define AN_ESM INST(m5_op, an_esm, 0, annotate_func)
795951Ssaidi@eecs.umich.edu#define AN_BEGIN INST(m5_op, an_begin, 0, annotate_func)
805951Ssaidi@eecs.umich.edu#define AN_END INST(m5_op, an_end, 0, annotate_func)
815951Ssaidi@eecs.umich.edu#define AN_Q INST(m5_op, an_q, 0, annotate_func)
825951Ssaidi@eecs.umich.edu#define AN_RQ INST(m5_op, an_rq, 0, annotate_func)
835951Ssaidi@eecs.umich.edu#define AN_DQ INST(m5_op, an_dq, 0, annotate_func)
845951Ssaidi@eecs.umich.edu#define AN_WF INST(m5_op, an_wf, 0, annotate_func)
855951Ssaidi@eecs.umich.edu#define AN_WE INST(m5_op, an_we, 0, annotate_func)
865951Ssaidi@eecs.umich.edu#define AN_WS INST(m5_op, an_ws, 0, annotate_func)
875951Ssaidi@eecs.umich.edu#define AN_SQ INST(m5_op, an_sq, 0, annotate_func)
885951Ssaidi@eecs.umich.edu#define AN_AQ INST(m5_op, an_aq, 0, annotate_func)
895951Ssaidi@eecs.umich.edu#define AN_PQ INST(m5_op, an_pq, 0, annotate_func)
905951Ssaidi@eecs.umich.edu#define AN_L INST(m5_op, an_l, 0, annotate_func)
915951Ssaidi@eecs.umich.edu#define AN_IDENTIFY INST(m5_op, an_identify, 0, annotate_func)
925951Ssaidi@eecs.umich.edu#define AN_GETID INST(m5_op, an_getid, 0, annotate_func)
935951Ssaidi@eecs.umich.edu
945951Ssaidi@eecs.umich.edu
952188SN/A        .set noreorder
96275SN/A
975505Snate@binkert.orgSIMPLE_OP(arm, ARM(16))
985505Snate@binkert.orgSIMPLE_OP(quiesce, QUIESCE)
995505Snate@binkert.orgSIMPLE_OP(quiesceNs, QUIESCENS(16))
1005505Snate@binkert.orgSIMPLE_OP(quiesceCycle, QUIESCECYC(16))
1015505Snate@binkert.orgSIMPLE_OP(quiesceTime, QUIESCETIME)
1025741Snate@binkert.orgSIMPLE_OP(rpns, RPNS)
1035808Snate@binkert.orgSIMPLE_OP(wakeCPU, WAKE_CPU(16))
1045505Snate@binkert.orgSIMPLE_OP(m5_exit, M5EXIT(16))
1055505Snate@binkert.orgSIMPLE_OP(m5_initparam, INITPARAM(0))
1065505Snate@binkert.orgSIMPLE_OP(m5_loadsymbol, LOADSYMBOL(0))
1075505Snate@binkert.orgSIMPLE_OP(m5_reset_stats, RESET_STATS(16, 17))
1085505Snate@binkert.orgSIMPLE_OP(m5_dump_stats, DUMP_STATS(16, 17))
1095505Snate@binkert.orgSIMPLE_OP(m5_dumpreset_stats, DUMPRST_STATS(16, 17))
1105505Snate@binkert.orgSIMPLE_OP(m5_checkpoint, CHECKPOINT(16, 17))
1115505Snate@binkert.orgSIMPLE_OP(m5_readfile, READFILE)
1125505Snate@binkert.orgSIMPLE_OP(m5_debugbreak, DEBUGBREAK)
1135505Snate@binkert.orgSIMPLE_OP(m5_switchcpu, SWITCHCPU)
1145505Snate@binkert.orgSIMPLE_OP(m5_addsymbol, ADDSYMBOL(16, 17))
1155505Snate@binkert.orgSIMPLE_OP(m5_panic, PANIC)
116275SN/A
1175951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_bsm, AN_BSM)
1185951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_esm, AN_ESM)
1195951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_begin, AN_BEGIN)
1205951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_end, AN_END)
1215951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_q, AN_Q)
1225951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_rq, AN_RQ)
1235951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_dq, AN_DQ)
1245951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_wf, AN_WF)
1255951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_we, AN_WE)
1265951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_ws, AN_WS)
1275951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_sq, AN_SQ)
1285951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_aq, AN_AQ)
1295951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_pq, AN_PQ)
1305951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_l, AN_L)
1315951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_identify, AN_IDENTIFY)
1325951Ssaidi@eecs.umich.eduSIMPLE_OP(m5a_getid, AN_GETID)
1335951Ssaidi@eecs.umich.edu
134