Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:09

0001 /*
0002  * Copyright (c) 2003-2006 The Regents of The University of Michigan
0003  * All rights reserved.
0004  *
0005  * Redistribution and use in source and binary forms, with or without
0006  * modification, are permitted provided that the following conditions are
0007  * met: redistributions of source code must retain the above copyright
0008  * notice, this list of conditions and the following disclaimer;
0009  * redistributions in binary form must reproduce the above copyright
0010  * notice, this list of conditions and the following disclaimer in the
0011  * documentation and/or other materials provided with the distribution;
0012  * neither the name of the copyright holders nor the names of its
0013  * contributors may be used to endorse or promote products derived from
0014  * this software without specific prior written permission.
0015  *
0016  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0017  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0018  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0019  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0020  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0021  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0022  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0023  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0024  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0026  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0027  *
0028  * Authors: Nathan Binkert
0029  *          Ali Saidi
0030  */
0031 
0032 #define m5_op 0x2
0033 #define m5_op3 0x37
0034 
0035 #include "m5ops.h"
0036 
0037 #define INST(func, rs1, rs2, rd) \
0038         .long (m5_op) << 30 | (rd) << 25 | (m5_op3) << 19 | (func) << 7 |  \
0039               (rs1) << 14 | (rs2) << 0;
0040 
0041 
0042 #define LEAF(func)                \
0043         .section ".text";         \
0044         .align   4;               \
0045         .global  func;            \
0046         .type    func, #function; \
0047 func:
0048 
0049 #define END(func)         \
0050         .size    func, (.-func)
0051 
0052 #define DEBUGBREAK INST(debugbreak_func, 0, 0, 0)
0053 #define M5EXIT INST(exit_func, 0, 0, 0)
0054 #define PANIC INST(panic_func, 0, 0, 0)
0055 #define READFILE INST(readfile_func, 0, 0, 0)
0056 
0057 LEAF(m5_exit)
0058     retl
0059     M5EXIT
0060 END(m5_exit)
0061 
0062 LEAF(m5_panic)
0063     retl
0064     PANIC
0065 END(m5_panic)
0066 
0067 LEAF(m5_readfile)
0068     retl
0069     READFILE
0070 END(m5_readfile)
0071 
0072 LEAF(m5_debugbreak)
0073     retl
0074     DEBUGBREAK
0075 END(m5_debugbreak)
0076 
0077 /* !!!!!! All code below here just panics !!!!!! */
0078 LEAF(arm)
0079     retl
0080     PANIC
0081 END(arm)
0082 
0083 LEAF(quiesce)
0084     retl
0085     PANIC
0086 END(quiesce)
0087 
0088 LEAF(quiesceNs)
0089     retl
0090     PANIC
0091 END(quiesceNs)
0092 
0093 LEAF(quiesceCycle)
0094     retl
0095     PANIC
0096 END(quiesceCycle)
0097 
0098 LEAF(quiesceTime)
0099     retl
0100     PANIC
0101 END(quiesceTime)
0102 
0103 LEAF(m5_initparam)
0104     retl
0105     PANIC
0106 END(m5_initparam)
0107 
0108 LEAF(m5_loadsymbol)
0109     retl
0110     PANIC
0111 END(m5_loadsymbol)
0112 
0113 LEAF(m5_reset_stats)
0114     retl
0115     PANIC
0116 END(m5_reset_stats)
0117 
0118 LEAF(m5_dump_stats)
0119     retl
0120     PANIC
0121 END(m5_dump_stats)
0122 
0123 LEAF(m5_dumpreset_stats)
0124     retl
0125     PANIC
0126 END(m5_dumpreset_stats)
0127 
0128 LEAF(m5_checkpoint)
0129     retl
0130     PANIC
0131 END(m5_checkpoint)
0132 
0133 LEAF(m5_switchcpu)
0134     retl
0135     PANIC
0136 END(m5_switchcpu)
0137 
0138 LEAF(m5_addsymbol)
0139     retl
0140     PANIC
0141 END(m5_addsymbol)
0142 
0143 LEAF(m5_anbegin)
0144     retl
0145     PANIC
0146 END(m5_anbegin)
0147 
0148 LEAF(m5_anwait)
0149     retl
0150     PANIC
0151 END(m5_anwait)
0152 
0153