osfpal.cc revision 2665:a124942bacb8
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] = {
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    };
297}
298
299const char *
300PAL::name(int index)
301{
302    if (index > NumCodes || index < 0)
303        return 0;
304
305    return strings[index];
306}
307