m5op_sparc.S revision 4098:9b57d3d6af2a
1/*
2 * Copyright (c) 2003-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Nathan Binkert
29 *          Ali Saidi
30 */
31
32#define m5_op 0x2
33#define m5_op3 0x37
34
35#include "m5ops.h"
36
37#define INST(func, rs1, rs2, rd) \
38        .long (m5_op) << 30 | (rd) << 25 | (m5_op3) << 19 | (func) << 7 |  \
39              (rs1) << 14 | (rs2) << 0;
40
41
42#define LEAF(func)                \
43        .section ".text";         \
44        .align   4;               \
45        .global  func;            \
46        .type    func, #function; \
47func:
48
49#define END(func)         \
50        .size    func, (.-func)
51
52#define DEBUGBREAK INST(debugbreak_func, 0, 0, 0)
53#define M5EXIT INST(exit_func, 0, 0, 0)
54#define PANIC INST(panic_func, 0, 0, 0)
55#define READFILE INST(readfile_func, 0, 0, 0)
56
57LEAF(m5_exit)
58    retl
59    M5EXIT
60END(m5_exit)
61
62LEAF(m5_panic)
63    retl
64    PANIC
65END(m5_panic)
66
67LEAF(m5_readfile)
68    retl
69    READFILE
70END(m5_readfile)
71
72LEAF(m5_debugbreak)
73    retl
74    DEBUGBREAK
75END(m5_debugbreak)
76
77/* !!!!!! All code below here just panics !!!!!! */
78LEAF(arm)
79    retl
80    PANIC
81END(arm)
82
83LEAF(quiesce)
84    retl
85    PANIC
86END(quiesce)
87
88LEAF(quiesceNs)
89    retl
90    PANIC
91END(quiesceNs)
92
93LEAF(quiesceCycle)
94    retl
95    PANIC
96END(quiesceCycle)
97
98LEAF(quiesceTime)
99    retl
100    PANIC
101END(quiesceTime)
102
103LEAF(m5_initparam)
104    retl
105    PANIC
106END(m5_initparam)
107
108LEAF(m5_loadsymbol)
109    retl
110    PANIC
111END(m5_loadsymbol)
112
113LEAF(m5_reset_stats)
114    retl
115    PANIC
116END(m5_reset_stats)
117
118LEAF(m5_dump_stats)
119    retl
120    PANIC
121END(m5_dump_stats)
122
123LEAF(m5_dumpreset_stats)
124    retl
125    PANIC
126END(m5_dumpreset_stats)
127
128LEAF(m5_checkpoint)
129    retl
130    PANIC
131END(m5_checkpoint)
132
133LEAF(m5_switchcpu)
134    retl
135    PANIC
136END(m5_switchcpu)
137
138LEAF(m5_addsymbol)
139    retl
140    PANIC
141END(m5_addsymbol)
142
143LEAF(m5_anbegin)
144    retl
145    PANIC
146END(m5_anbegin)
147
148LEAF(m5_anwait)
149    retl
150    PANIC
151END(m5_anwait)
152
153
154