m5op_alpha.S revision 287
12686Sksewell@umich.edu/* 22686Sksewell@umich.edu * Copyright (c) 2003 The Regents of The University of Michigan 35268Sksewell@umich.edu * All rights reserved. 45268Sksewell@umich.edu * 55268Sksewell@umich.edu * Redistribution and use in source and binary forms, with or without 65268Sksewell@umich.edu * modification, are permitted provided that the following conditions are 75268Sksewell@umich.edu * met: redistributions of source code must retain the above copyright 85268Sksewell@umich.edu * notice, this list of conditions and the following disclaimer; 95268Sksewell@umich.edu * redistributions in binary form must reproduce the above copyright 105268Sksewell@umich.edu * notice, this list of conditions and the following disclaimer in the 115268Sksewell@umich.edu * documentation and/or other materials provided with the distribution; 125268Sksewell@umich.edu * neither the name of the copyright holders nor the names of its 135268Sksewell@umich.edu * contributors may be used to endorse or promote products derived from 145268Sksewell@umich.edu * this software without specific prior written permission. 155268Sksewell@umich.edu * 165268Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 175268Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 185268Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 195268Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 205268Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 215268Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 225268Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 235268Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 245268Sksewell@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 255268Sksewell@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 265268Sksewell@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 275268Sksewell@umich.edu */ 285268Sksewell@umich.edu 295268Sksewell@umich.edu#include <machine/asm.h> 305268Sksewell@umich.edu#include <regdef.h> 312706Sksewell@umich.edu 322022SN/A#define m5_op 0x01 332022SN/A 342022SN/A#define arm_func 0x00 352022SN/A#define quiesce_func 0x01 362022SN/A#define ivlb_func 0x10 372022SN/A#define ivle_func 0x11 382022SN/A#define exit_old_func 0x20 // deprectated! 392022SN/A#define exit_func 0x21 402022SN/A#define initparam_func 0x30 412028SN/A#define resetstats_func 0x40 422022SN/A#define dumpstats_func 0x41 432022SN/A#define dumprststats_func 0x42 442022SN/A#define ckpt_func 0x43 452022SN/A 462028SN/A#define INST(op, ra, rb, func) \ 472022SN/A .long (((op) << 26) | ((ra) << 21) | ((rb) << 16) | (func)) 482022SN/A 492022SN/A#define ARM(reg) INST(m5_op, reg, 0, arm_func) 502022SN/A#define QUIESCE() INST(m5_op, 0, 0, quiesce_func) 512022SN/A#define IVLB(reg) INST(m5_op, reg, 0, ivlb_func) 525222Sksewell@umich.edu#define IVLE(reg) INST(m5_op, reg, 0, ivle_func) 535222Sksewell@umich.edu#define M5EXIT(reg) INST(m5_op, reg, 0, exit_func) 545222Sksewell@umich.edu#define INITPARAM(reg) INST(m5_op, reg, 0, initparam_func) 555222Sksewell@umich.edu#define RESET_STATS(r1, r2) INST(m5_op, r1, r2, resetstats_func) 565222Sksewell@umich.edu#define DUMP_STATS(r1, r2) INST(m5_op, r1, r2, dumpstats_func) 575222Sksewell@umich.edu#define DUMPRST_STATS(r1, r2) INST(m5_op, r1, r2, dumprststats_func) 585222Sksewell@umich.edu#define CHECKPOINT(r1, r2) INST(m5_op, r1, r2, ckpt_func) 595222Sksewell@umich.edu 605222Sksewell@umich.edu .set noreorder 615222Sksewell@umich.edu 625222Sksewell@umich.edu .align 4 635222Sksewell@umich.eduLEAF(arm) 645222Sksewell@umich.edu ARM(16) 655222Sksewell@umich.edu RET 665222Sksewell@umich.eduEND(arm) 675222Sksewell@umich.edu 685222Sksewell@umich.edu .align 4 692022SN/ALEAF(quiesce) 702022SN/A QUIESCE() 712022SN/A RET 722022SN/AEND(quiesce) 732022SN/A 742686Sksewell@umich.edu .align 4 752022SN/ALEAF(ivlb) 765222Sksewell@umich.edu IVLB(16) 775222Sksewell@umich.edu RET 785222Sksewell@umich.eduEND(ivlb) 795222Sksewell@umich.edu 802022SN/A .align 4 812022SN/ALEAF(ivle) 822022SN/A IVLE(16) 832686Sksewell@umich.edu RET 8410196SCurtis.Dunham@arm.comEND(ivle) 852022SN/A 862022SN/A .align 4 872022SN/ALEAF(m5exit) 882022SN/A M5EXIT(16) 892686Sksewell@umich.edu RET 902022SN/AEND(m5exit) 912022SN/A 922022SN/A .align 4 935222Sksewell@umich.eduLEAF(initparam) 942022SN/A INITPARAM(0) 955222Sksewell@umich.edu RET 965222Sksewell@umich.eduEND(initparam) 975222Sksewell@umich.edu 985222Sksewell@umich.edu .align 4 993951Sgblack@eecs.umich.eduLEAF(reset_stats) 1002022SN/A RESET_STATS(16, 17) 1012022SN/A RET 1022239SN/AEND(reset_stats) 1032239SN/A 1042022SN/A .align 4 1055222Sksewell@umich.eduLEAF(dump_stats) 1065222Sksewell@umich.edu DUMP_STATS(16, 17) 1075222Sksewell@umich.edu RET 1085222Sksewell@umich.eduEND(dump_stats) 1095222Sksewell@umich.edu 1105222Sksewell@umich.edu .align 4 1115222Sksewell@umich.eduLEAF(dumpreset_stats) 1125222Sksewell@umich.edu DUMPRST_STATS(16, 17) 1135222Sksewell@umich.edu RET 1145222Sksewell@umich.eduEND(dumpreset_stats) 1155222Sksewell@umich.edu 116 .align 4 117LEAF(checkpoint) 118 CHECKPOINT(16, 17) 119 RET 120END(checkpoint) 121 122