m5op_sparc.S revision 4090:08bd6439b907
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 M5EXIT INST(exit_func, 0, 0, 0)
53#define PANIC INST(panic_func, 0, 0, 0)
54
55LEAF(m5_exit)
56    retl
57    M5EXIT
58END(m5_exit)
59
60LEAF(m5_panic)
61    retl
62    PANIC
63END(m5_panic)
64
65
66/* !!!!!! All code below here just panics !!!!!! */
67LEAF(arm)
68    retl
69    PANIC
70END(arm)
71
72LEAF(quiesce)
73    retl
74    PANIC
75END(quiesce)
76
77LEAF(quiesceNs)
78    retl
79    PANIC
80END(quiesceNs)
81
82LEAF(quiesceCycle)
83    retl
84    PANIC
85END(quiesceCycle)
86
87LEAF(quiesceTime)
88    retl
89    PANIC
90END(quiesceTime)
91
92LEAF(m5_initparam)
93    retl
94    PANIC
95END(m5_initparam)
96
97LEAF(m5_loadsymbol)
98    retl
99    PANIC
100END(m5_loadsymbol)
101
102LEAF(m5_reset_stats)
103    retl
104    PANIC
105END(m5_reset_stats)
106
107LEAF(m5_dump_stats)
108    retl
109    PANIC
110END(m5_dump_stats)
111
112LEAF(m5_dumpreset_stats)
113    retl
114    PANIC
115END(m5_dumpreset_stats)
116
117LEAF(m5_checkpoint)
118    retl
119    PANIC
120END(m5_checkpoint)
121
122LEAF(m5_readfile)
123    retl
124    PANIC
125END(m5_readfile)
126
127LEAF(m5_debugbreak)
128    retl
129    PANIC
130END(m5_debugbreak)
131
132LEAF(m5_switchcpu)
133    retl
134    PANIC
135END(m5_switchcpu)
136
137LEAF(m5_addsymbol)
138    retl
139    PANIC
140END(m5_addsymbol)
141
142LEAF(m5_anbegin)
143    retl
144    PANIC
145END(m5_anbegin)
146
147LEAF(m5_anwait)
148    retl
149    PANIC
150END(m5_anwait)
151
152
153