m5op_alpha.S revision 4090
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
51275SN/A#define	ARM(reg) INST(m5_op, reg, 0, arm_func)
522188SN/A#define QUIESCE INST(m5_op, 0, 0, quiesce_func)
532188SN/A#define QUIESCENS(r1) INST(m5_op, r1, 0, quiescens_func)
542188SN/A#define QUIESCECYC(r1) INST(m5_op, r1, 0, quiescecycle_func)
552188SN/A#define QUIESCETIME INST(m5_op, 0, 0, quiescetime_func)
56287SN/A#define M5EXIT(reg) INST(m5_op, reg, 0, exit_func)
57275SN/A#define INITPARAM(reg) INST(m5_op, reg, 0, initparam_func)
582358SN/A#define LOADSYMBOL(reg) INST(m5_op, reg, 0, loadsymbol_func)
59287SN/A#define RESET_STATS(r1, r2) INST(m5_op, r1, r2, resetstats_func)
60287SN/A#define DUMP_STATS(r1, r2) INST(m5_op, r1, r2, dumpstats_func)
61287SN/A#define DUMPRST_STATS(r1, r2) INST(m5_op, r1, r2, dumprststats_func)
62287SN/A#define CHECKPOINT(r1, r2) INST(m5_op, r1, r2, ckpt_func)
632188SN/A#define READFILE INST(m5_op, 0, 0, readfile_func)
642188SN/A#define DEBUGBREAK INST(m5_op, 0, 0, debugbreak_func)
652188SN/A#define SWITCHCPU INST(m5_op, 0, 0, switchcpu_func)
662188SN/A#define ADDSYMBOL(r1,r2) INST(m5_op, r1, r2, addsymbol_func)
672188SN/A#define PANIC INST(m5_op, 0, 0, panic_func)
683089SN/A#define AN_BEGIN(r1) INST(m5_op, r1, 0, anbegin_func)
693089SN/A#define AN_WAIT(r1,r2) INST(m5_op, r1, r2, anwait_func)
70275SN/A
712188SN/A        .set noreorder
72275SN/A
732188SN/A        .align 4
74275SN/ALEAF(arm)
752188SN/A        ARM(16)
762188SN/A        RET
77275SN/AEND(arm)
78275SN/A
792188SN/A        .align 4
80275SN/ALEAF(quiesce)
812188SN/A        QUIESCE
822188SN/A        RET
83275SN/AEND(quiesce)
84275SN/A
852188SN/A        .align 4
862188SN/ALEAF(quiesceNs)
872188SN/A        QUIESCENS(16)
882188SN/A        RET
892188SN/AEND(quiesceNs)
90275SN/A
912188SN/A        .align 4
922188SN/ALEAF(quiesceCycle)
932188SN/A        QUIESCECYC(16)
942188SN/A        RET
952188SN/AEND(quiesceCycle)
96275SN/A
972188SN/A        .align 4
982188SN/ALEAF(quiesceTime)
992188SN/A        QUIESCETIME
1002188SN/A        RET
1012188SN/AEND(quiesceTime)
102275SN/A
1032188SN/A        .align 4
1042188SN/ALEAF(m5_exit)
1052188SN/A        M5EXIT(16)
1062188SN/A        RET
1072188SN/AEND(m5_exit)
108287SN/A
1092188SN/A        .align 4
1102188SN/ALEAF(m5_initparam)
1112188SN/A        INITPARAM(0)
1122188SN/A        RET
1132188SN/AEND(m5_initparam)
114287SN/A
1152188SN/A        .align 4
1162358SN/ALEAF(m5_loadsymbol)
1172358SN/A        LOADSYMBOL(0)
1182358SN/A        RET
1192358SN/AEND(m5_loadsymbol)
1202358SN/A
1212358SN/A        .align 4
1222188SN/ALEAF(m5_reset_stats)
1232188SN/A        RESET_STATS(16, 17)
1242188SN/A        RET
1252188SN/AEND(m5_reset_stats)
1262188SN/A
1272188SN/A        .align 4
1282188SN/ALEAF(m5_dump_stats)
1292188SN/A        DUMP_STATS(16, 17)
1302188SN/A        RET
1312188SN/AEND(m5_dump_stats)
1322188SN/A
1332188SN/A        .align 4
1342188SN/ALEAF(m5_dumpreset_stats)
1352188SN/A        DUMPRST_STATS(16, 17)
1362188SN/A        RET
1372188SN/AEND(m5_dumpreset_stats)
1382188SN/A
1392188SN/A        .align 4
1402188SN/ALEAF(m5_checkpoint)
1412188SN/A        CHECKPOINT(16, 17)
1422188SN/A        RET
1432188SN/AEND(m5_checkpoint)
1442188SN/A
1452188SN/A        .align 4
1462188SN/ALEAF(m5_readfile)
1472188SN/A        READFILE
1482188SN/A        RET
1492188SN/AEND(m5_readfile)
1502188SN/A
1512188SN/A        .align 4
1522188SN/ALEAF(m5_debugbreak)
1532188SN/A        DEBUGBREAK
1542188SN/A        RET
1552188SN/AEND(m5_debugbreak)
1562188SN/A
1572188SN/A        .align 4
1582188SN/ALEAF(m5_switchcpu)
1592188SN/A        SWITCHCPU
1602188SN/A        RET
1612188SN/AEND(m5_switchcpu)
1622188SN/A
1632188SN/A        .align 4
1642188SN/ALEAF(m5_addsymbol)
1652188SN/A        ADDSYMBOL(16, 17)
1662188SN/A        RET
1672188SN/AEND(m5_addsymbol)
1682188SN/A
1692188SN/A        .align 4
1702188SN/ALEAF(m5_panic)
1712188SN/A        PANIC
1722188SN/A        RET
1732188SN/AEND(m5_panic)
1742188SN/A
1752188SN/A
1763089SN/A        .align 4
1773089SN/ALEAF(m5_anbegin)
1783089SN/A        AN_BEGIN(16)
1793089SN/A        RET
1803089SN/AEND(m5_anbegin)
1813089SN/A
1823089SN/A
1833089SN/A        .align 4
1843089SN/ALEAF(m5_anwait)
1853089SN/A        AN_WAIT(16,17)
1863089SN/A        RET
1873089SN/AEND(m5_anwait)
1883089SN/A
1893089SN/A
190