osfpal.cc (5543:3af77710f397) osfpal.cc (5569:baeee670d4ce)
1/*
2 * Copyright (c) 2003-2005 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 */
30
31#include "arch/alpha/osfpal.hh"
32
1/*
2 * Copyright (c) 2003-2005 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 */
30
31#include "arch/alpha/osfpal.hh"
32
33namespace {
34 const char *strings[PAL::NumCodes] = {
33const char *
34PAL::name(int index)
35{
36 static const char *strings[PAL::NumCodes] = {
35 // Priviledged PAL instructions
36 "halt", // 0x00
37 "cflush", // 0x01
38 "draina", // 0x02
39 0, // 0x03
40 0, // 0x04
41 0, // 0x05
42 0, // 0x06
43 0, // 0x07
44 0, // 0x08
45 "cserve", // 0x09
46 "swppal", // 0x0a
47 0, // 0x0b
48 0, // 0x0c
49 "wripir", // 0x0d
50 0, // 0x0e
51 0, // 0x0f
52 "rdmces", // 0x10
53 "wrmces", // 0x11
54 0, // 0x12
55 0, // 0x13
56 0, // 0x14
57 0, // 0x15
58 0, // 0x16
59 0, // 0x17
60 0, // 0x18
61 0, // 0x19
62 0, // 0x1a
63 0, // 0x1b
64 0, // 0x1c
65 0, // 0x1d
66 0, // 0x1e
67 0, // 0x1f
68 0, // 0x20
69 0, // 0x21
70 0, // 0x22
71 0, // 0x23
72 0, // 0x24
73 0, // 0x25
74 0, // 0x26
75 0, // 0x27
76 0, // 0x28
77 0, // 0x29
78 0, // 0x2a
79 "wrfen", // 0x2b
80 0, // 0x2c
81 "wrvptptr", // 0x2d
82 0, // 0x2e
83 0, // 0x2f
84 "swpctx", // 0x30
85 "wrval", // 0x31
86 "rdval", // 0x32
87 "tbi", // 0x33
88 "wrent", // 0x34
89 "swpipl", // 0x35
90 "rdps", // 0x36
91 "wrkgp", // 0x37
92 "wrusp", // 0x38
93 "wrperfmon", // 0x39
94 "rdusp", // 0x3a
95 0, // 0x3b
96 "whami", // 0x3c
97 "retsys", // 0x3d
98 "wtint", // 0x3e
99 "rti", // 0x3f
100 0, // 0x40
101 0, // 0x41
102 0, // 0x42
103 0, // 0x43
104 0, // 0x44
105 0, // 0x45
106 0, // 0x46
107 0, // 0x47
108 0, // 0x48
109 0, // 0x49
110 0, // 0x4a
111 0, // 0x4b
112 0, // 0x4c
113 0, // 0x4d
114 0, // 0x4e
115 0, // 0x4f
116 0, // 0x50
117 0, // 0x51
118 0, // 0x52
119 0, // 0x53
120 0, // 0x54
121 0, // 0x55
122 0, // 0x56
123 0, // 0x57
124 0, // 0x58
125 0, // 0x59
126 0, // 0x5a
127 0, // 0x5b
128 0, // 0x5c
129 0, // 0x5d
130 0, // 0x5e
131 0, // 0x5f
132 0, // 0x60
133 0, // 0x61
134 0, // 0x62
135 0, // 0x63
136 0, // 0x64
137 0, // 0x65
138 0, // 0x66
139 0, // 0x67
140 0, // 0x68
141 0, // 0x69
142 0, // 0x6a
143 0, // 0x6b
144 0, // 0x6c
145 0, // 0x6d
146 0, // 0x6e
147 0, // 0x6f
148 0, // 0x70
149 0, // 0x71
150 0, // 0x72
151 0, // 0x73
152 0, // 0x74
153 0, // 0x75
154 0, // 0x76
155 0, // 0x77
156 0, // 0x78
157 0, // 0x79
158 0, // 0x7a
159 0, // 0x7b
160 0, // 0x7c
161 0, // 0x7d
162 0, // 0x7e
163 0, // 0x7f
164
165 // Unpriviledged PAL instructions
166 "bpt", // 0x80
167 "bugchk", // 0x81
168 0, // 0x82
169 "callsys", // 0x83
170 0, // 0x84
171 0, // 0x85
172 "imb", // 0x86
173 0, // 0x87
174 0, // 0x88
175 0, // 0x89
176 0, // 0x8a
177 0, // 0x8b
178 0, // 0x8c
179 0, // 0x8d
180 0, // 0x8e
181 0, // 0x8f
182 0, // 0x90
183 0, // 0x91
184 "urti", // 0x92
185 0, // 0x93
186 0, // 0x94
187 0, // 0x95
188 0, // 0x96
189 0, // 0x97
190 0, // 0x98
191 0, // 0x99
192 0, // 0x9a
193 0, // 0x9b
194 0, // 0x9c
195 0, // 0x9d
196 "rdunique", // 0x9e
197 "wrunique", // 0x9f
198 0, // 0xa0
199 0, // 0xa1
200 0, // 0xa2
201 0, // 0xa3
202 0, // 0xa4
203 0, // 0xa5
204 0, // 0xa6
205 0, // 0xa7
206 0, // 0xa8
207 0, // 0xa9
208 "gentrap", // 0xaa
209 0, // 0xab
210 0, // 0xac
211 0, // 0xad
212 "clrfen", // 0xae
213 0, // 0xaf
214 0, // 0xb0
215 0, // 0xb1
216 0, // 0xb2
217 0, // 0xb3
218 0, // 0xb4
219 0, // 0xb5
220 0, // 0xb6
221 0, // 0xb7
222 0, // 0xb8
223 0, // 0xb9
224 0, // 0xba
225 0, // 0xbb
226 0, // 0xbc
227 0, // 0xbd
228 "nphalt", // 0xbe
229 "copypal", // 0xbf
230#if 0
231 0, // 0xc0
232 0, // 0xc1
233 0, // 0xc2
234 0, // 0xc3
235 0, // 0xc4
236 0, // 0xc5
237 0, // 0xc6
238 0, // 0xc7
239 0, // 0xc8
240 0, // 0xc9
241 0, // 0xca
242 0, // 0xcb
243 0, // 0xcc
244 0, // 0xcd
245 0, // 0xce
246 0, // 0xcf
247 0, // 0xd0
248 0, // 0xd1
249 0, // 0xd2
250 0, // 0xd3
251 0, // 0xd4
252 0, // 0xd5
253 0, // 0xd6
254 0, // 0xd7
255 0, // 0xd8
256 0, // 0xd9
257 0, // 0xda
258 0, // 0xdb
259 0, // 0xdc
260 0, // 0xdd
261 0, // 0xde
262 0, // 0xdf
263 0, // 0xe0
264 0, // 0xe1
265 0, // 0xe2
266 0, // 0xe3
267 0, // 0xe4
268 0, // 0xe5
269 0, // 0xe6
270 0, // 0xe7
271 0, // 0xe8
272 0, // 0xe9
273 0, // 0xea
274 0, // 0xeb
275 0, // 0xec
276 0, // 0xed
277 0, // 0xee
278 0, // 0xef
279 0, // 0xf0
280 0, // 0xf1
281 0, // 0xf2
282 0, // 0xf3
283 0, // 0xf4
284 0, // 0xf5
285 0, // 0xf6
286 0, // 0xf7
287 0, // 0xf8
288 0, // 0xf9
289 0, // 0xfa
290 0, // 0xfb
291 0, // 0xfc
292 0, // 0xfd
293 0, // 0xfe
294 0 // 0xff
295#endif
296 };
37 // Priviledged PAL instructions
38 "halt", // 0x00
39 "cflush", // 0x01
40 "draina", // 0x02
41 0, // 0x03
42 0, // 0x04
43 0, // 0x05
44 0, // 0x06
45 0, // 0x07
46 0, // 0x08
47 "cserve", // 0x09
48 "swppal", // 0x0a
49 0, // 0x0b
50 0, // 0x0c
51 "wripir", // 0x0d
52 0, // 0x0e
53 0, // 0x0f
54 "rdmces", // 0x10
55 "wrmces", // 0x11
56 0, // 0x12
57 0, // 0x13
58 0, // 0x14
59 0, // 0x15
60 0, // 0x16
61 0, // 0x17
62 0, // 0x18
63 0, // 0x19
64 0, // 0x1a
65 0, // 0x1b
66 0, // 0x1c
67 0, // 0x1d
68 0, // 0x1e
69 0, // 0x1f
70 0, // 0x20
71 0, // 0x21
72 0, // 0x22
73 0, // 0x23
74 0, // 0x24
75 0, // 0x25
76 0, // 0x26
77 0, // 0x27
78 0, // 0x28
79 0, // 0x29
80 0, // 0x2a
81 "wrfen", // 0x2b
82 0, // 0x2c
83 "wrvptptr", // 0x2d
84 0, // 0x2e
85 0, // 0x2f
86 "swpctx", // 0x30
87 "wrval", // 0x31
88 "rdval", // 0x32
89 "tbi", // 0x33
90 "wrent", // 0x34
91 "swpipl", // 0x35
92 "rdps", // 0x36
93 "wrkgp", // 0x37
94 "wrusp", // 0x38
95 "wrperfmon", // 0x39
96 "rdusp", // 0x3a
97 0, // 0x3b
98 "whami", // 0x3c
99 "retsys", // 0x3d
100 "wtint", // 0x3e
101 "rti", // 0x3f
102 0, // 0x40
103 0, // 0x41
104 0, // 0x42
105 0, // 0x43
106 0, // 0x44
107 0, // 0x45
108 0, // 0x46
109 0, // 0x47
110 0, // 0x48
111 0, // 0x49
112 0, // 0x4a
113 0, // 0x4b
114 0, // 0x4c
115 0, // 0x4d
116 0, // 0x4e
117 0, // 0x4f
118 0, // 0x50
119 0, // 0x51
120 0, // 0x52
121 0, // 0x53
122 0, // 0x54
123 0, // 0x55
124 0, // 0x56
125 0, // 0x57
126 0, // 0x58
127 0, // 0x59
128 0, // 0x5a
129 0, // 0x5b
130 0, // 0x5c
131 0, // 0x5d
132 0, // 0x5e
133 0, // 0x5f
134 0, // 0x60
135 0, // 0x61
136 0, // 0x62
137 0, // 0x63
138 0, // 0x64
139 0, // 0x65
140 0, // 0x66
141 0, // 0x67
142 0, // 0x68
143 0, // 0x69
144 0, // 0x6a
145 0, // 0x6b
146 0, // 0x6c
147 0, // 0x6d
148 0, // 0x6e
149 0, // 0x6f
150 0, // 0x70
151 0, // 0x71
152 0, // 0x72
153 0, // 0x73
154 0, // 0x74
155 0, // 0x75
156 0, // 0x76
157 0, // 0x77
158 0, // 0x78
159 0, // 0x79
160 0, // 0x7a
161 0, // 0x7b
162 0, // 0x7c
163 0, // 0x7d
164 0, // 0x7e
165 0, // 0x7f
166
167 // Unpriviledged PAL instructions
168 "bpt", // 0x80
169 "bugchk", // 0x81
170 0, // 0x82
171 "callsys", // 0x83
172 0, // 0x84
173 0, // 0x85
174 "imb", // 0x86
175 0, // 0x87
176 0, // 0x88
177 0, // 0x89
178 0, // 0x8a
179 0, // 0x8b
180 0, // 0x8c
181 0, // 0x8d
182 0, // 0x8e
183 0, // 0x8f
184 0, // 0x90
185 0, // 0x91
186 "urti", // 0x92
187 0, // 0x93
188 0, // 0x94
189 0, // 0x95
190 0, // 0x96
191 0, // 0x97
192 0, // 0x98
193 0, // 0x99
194 0, // 0x9a
195 0, // 0x9b
196 0, // 0x9c
197 0, // 0x9d
198 "rdunique", // 0x9e
199 "wrunique", // 0x9f
200 0, // 0xa0
201 0, // 0xa1
202 0, // 0xa2
203 0, // 0xa3
204 0, // 0xa4
205 0, // 0xa5
206 0, // 0xa6
207 0, // 0xa7
208 0, // 0xa8
209 0, // 0xa9
210 "gentrap", // 0xaa
211 0, // 0xab
212 0, // 0xac
213 0, // 0xad
214 "clrfen", // 0xae
215 0, // 0xaf
216 0, // 0xb0
217 0, // 0xb1
218 0, // 0xb2
219 0, // 0xb3
220 0, // 0xb4
221 0, // 0xb5
222 0, // 0xb6
223 0, // 0xb7
224 0, // 0xb8
225 0, // 0xb9
226 0, // 0xba
227 0, // 0xbb
228 0, // 0xbc
229 0, // 0xbd
230 "nphalt", // 0xbe
231 "copypal", // 0xbf
232#if 0
233 0, // 0xc0
234 0, // 0xc1
235 0, // 0xc2
236 0, // 0xc3
237 0, // 0xc4
238 0, // 0xc5
239 0, // 0xc6
240 0, // 0xc7
241 0, // 0xc8
242 0, // 0xc9
243 0, // 0xca
244 0, // 0xcb
245 0, // 0xcc
246 0, // 0xcd
247 0, // 0xce
248 0, // 0xcf
249 0, // 0xd0
250 0, // 0xd1
251 0, // 0xd2
252 0, // 0xd3
253 0, // 0xd4
254 0, // 0xd5
255 0, // 0xd6
256 0, // 0xd7
257 0, // 0xd8
258 0, // 0xd9
259 0, // 0xda
260 0, // 0xdb
261 0, // 0xdc
262 0, // 0xdd
263 0, // 0xde
264 0, // 0xdf
265 0, // 0xe0
266 0, // 0xe1
267 0, // 0xe2
268 0, // 0xe3
269 0, // 0xe4
270 0, // 0xe5
271 0, // 0xe6
272 0, // 0xe7
273 0, // 0xe8
274 0, // 0xe9
275 0, // 0xea
276 0, // 0xeb
277 0, // 0xec
278 0, // 0xed
279 0, // 0xee
280 0, // 0xef
281 0, // 0xf0
282 0, // 0xf1
283 0, // 0xf2
284 0, // 0xf3
285 0, // 0xf4
286 0, // 0xf5
287 0, // 0xf6
288 0, // 0xf7
289 0, // 0xf8
290 0, // 0xf9
291 0, // 0xfa
292 0, // 0xfb
293 0, // 0xfc
294 0, // 0xfd
295 0, // 0xfe
296 0 // 0xff
297#endif
298 };
297}
298
299
299const char *
300PAL::name(int index)
301{
302 if (index > NumCodes || index < 0)
303 return 0;
304
305 return strings[index];
306}
300 if (index > NumCodes || index < 0)
301 return 0;
302
303 return strings[index];
304}