osfpal.cc revision 5569
11689SN/A/*
22329SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
31689SN/A * All rights reserved.
41689SN/A *
51689SN/A * Redistribution and use in source and binary forms, with or without
61689SN/A * modification, are permitted provided that the following conditions are
71689SN/A * met: redistributions of source code must retain the above copyright
81689SN/A * notice, this list of conditions and the following disclaimer;
91689SN/A * redistributions in binary form must reproduce the above copyright
101689SN/A * notice, this list of conditions and the following disclaimer in the
111689SN/A * documentation and/or other materials provided with the distribution;
121689SN/A * neither the name of the copyright holders nor the names of its
131689SN/A * contributors may be used to endorse or promote products derived from
141689SN/A * this software without specific prior written permission.
151689SN/A *
161689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
181689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
191689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
201689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
211689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
221689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
261689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Nathan Binkert
291689SN/A */
301689SN/A
312292SN/A#include "arch/alpha/osfpal.hh"
322292SN/A
331060SN/Aconst char *
341061SN/APAL::name(int index)
351684SN/A{
367720Sgblack@eecs.umich.edu    static const char *strings[PAL::NumCodes] = {
376216Snate@binkert.org        // Priviledged PAL instructions
386216Snate@binkert.org        "halt",         // 0x00
392980Sgblack@eecs.umich.edu        "cflush",       // 0x01
401060SN/A        "draina",       // 0x02
412292SN/A        0,              // 0x03
422292SN/A        0,              // 0x04
432292SN/A        0,              // 0x05
441060SN/A        0,              // 0x06
451060SN/A        0,              // 0x07
462348SN/A        0,              // 0x08
471060SN/A        "cserve",       // 0x09
482292SN/A        "swppal",       // 0x0a
492292SN/A        0,              // 0x0b
502292SN/A        0,              // 0x0c
512292SN/A        "wripir",       // 0x0d
522292SN/A        0,              // 0x0e
532292SN/A        0,              // 0x0f
542292SN/A        "rdmces",       // 0x10
552292SN/A        "wrmces",       // 0x11
562292SN/A        0,              // 0x12
572292SN/A        0,              // 0x13
582292SN/A        0,              // 0x14
592348SN/A        0,              // 0x15
602292SN/A        0,              // 0x16
612292SN/A        0,              // 0x17
621061SN/A        0,              // 0x18
631061SN/A        0,              // 0x19
641061SN/A        0,              // 0x1a
651061SN/A        0,              // 0x1b
661461SN/A        0,              // 0x1c
671060SN/A        0,              // 0x1d
681060SN/A        0,              // 0x1e
692348SN/A        0,              // 0x1f
701060SN/A        0,              // 0x20
712292SN/A        0,              // 0x21
721061SN/A        0,              // 0x22
731061SN/A        0,              // 0x23
741061SN/A        0,              // 0x24
751061SN/A        0,              // 0x25
761461SN/A        0,              // 0x26
771060SN/A        0,              // 0x27
781060SN/A        0,              // 0x28
792348SN/A        0,              // 0x29
801060SN/A        0,              // 0x2a
812292SN/A        "wrfen",        // 0x2b
821061SN/A        0,              // 0x2c
831061SN/A        "wrvptptr",     // 0x2d
841061SN/A        0,              // 0x2e
851061SN/A        0,              // 0x2f
861461SN/A        "swpctx",       // 0x30
871062SN/A        "wrval",        // 0x31
882292SN/A        "rdval",        // 0x32
892292SN/A        "tbi",          // 0x33
907851SMatt.Horsnell@arm.com        "wrent",        // 0x34
912292SN/A        "swpipl",       // 0x35
924636Sgblack@eecs.umich.edu        "rdps",         // 0x36
937720Sgblack@eecs.umich.edu        "wrkgp",        // 0x37
942292SN/A        "wrusp",        // 0x38
952292SN/A        "wrperfmon",    // 0x39
962292SN/A        "rdusp",        // 0x3a
971060SN/A        0,              // 0x3b
981060SN/A        "whami",        // 0x3c
991060SN/A        "retsys",       // 0x3d
1001060SN/A        "wtint",        // 0x3e
1011061SN/A        "rti",          // 0x3f
1021061SN/A        0,              // 0x40
1031061SN/A        0,              // 0x41
1041061SN/A        0,              // 0x42
1051461SN/A        0,              // 0x43
1061060SN/A        0,              // 0x44
1071060SN/A        0,              // 0x45
1082348SN/A        0,              // 0x46
1092292SN/A        0,              // 0x47
1101060SN/A        0,              // 0x48
1117851SMatt.Horsnell@arm.com        0,              // 0x49
1121060SN/A        0,              // 0x4a
1131060SN/A        0,              // 0x4b
1141060SN/A        0,              // 0x4c
1151060SN/A        0,              // 0x4d
1161060SN/A        0,              // 0x4e
1171062SN/A        0,              // 0x4f
1181062SN/A        0,              // 0x50
1192292SN/A        0,              // 0x51
1201062SN/A        0,              // 0x52
1211061SN/A        0,              // 0x53
1227851SMatt.Horsnell@arm.com        0,              // 0x54
1231061SN/A        0,              // 0x55
1244636Sgblack@eecs.umich.edu        0,              // 0x56
1257720Sgblack@eecs.umich.edu        0,              // 0x57
1262292SN/A        0,              // 0x58
1272292SN/A        0,              // 0x59
1281060SN/A        0,              // 0x5a
1291060SN/A        0,              // 0x5b
1302292SN/A        0,              // 0x5c
1311060SN/A        0,              // 0x5d
1321060SN/A        0,              // 0x5e
1331060SN/A        0,              // 0x5f
1341060SN/A        0,              // 0x60
1352292SN/A        0,              // 0x61
1361060SN/A        0,              // 0x62
1371060SN/A        0,              // 0x63
1382292SN/A        0,              // 0x64
1392292SN/A        0,              // 0x65
1402292SN/A        0,              // 0x66
1412292SN/A        0,              // 0x67
1422292SN/A        0,              // 0x68
1431060SN/A        0,              // 0x69
1442292SN/A        0,              // 0x6a
1452292SN/A        0,              // 0x6b
1462292SN/A        0,              // 0x6c
1472292SN/A        0,              // 0x6d
1482292SN/A        0,              // 0x6e
1491060SN/A        0,              // 0x6f
1501060SN/A        0,              // 0x70
1512292SN/A        0,              // 0x71
1521060SN/A        0,              // 0x72
1531060SN/A        0,              // 0x73
1542292SN/A        0,              // 0x74
1552292SN/A        0,              // 0x75
1562292SN/A        0,              // 0x76
1572292SN/A        0,              // 0x77
1581060SN/A        0,              // 0x78
1592292SN/A        0,              // 0x79
1601060SN/A        0,              // 0x7a
1611061SN/A        0,              // 0x7b
1627851SMatt.Horsnell@arm.com        0,              // 0x7c
1631061SN/A        0,              // 0x7d
1644636Sgblack@eecs.umich.edu        0,              // 0x7e
1657720Sgblack@eecs.umich.edu        0,              // 0x7f
1661060SN/A
1671060SN/A        // Unpriviledged PAL instructions
1681060SN/A        "bpt",          // 0x80
1691060SN/A        "bugchk",       // 0x81
1701060SN/A        0,              // 0x82
1711061SN/A        "callsys",      // 0x83
1722292SN/A        0,              // 0x84
1732292SN/A        0,              // 0x85
1742292SN/A        "imb",          // 0x86
1752292SN/A        0,              // 0x87
1761061SN/A        0,              // 0x88
1771061SN/A        0,              // 0x89
1781061SN/A        0,              // 0x8a
1791061SN/A        0,              // 0x8b
1802292SN/A        0,              // 0x8c
1812292SN/A        0,              // 0x8d
1822292SN/A        0,              // 0x8e
1832292SN/A        0,              // 0x8f
1842292SN/A        0,              // 0x90
1852292SN/A        0,              // 0x91
1862292SN/A        "urti",         // 0x92
1871060SN/A        0,              // 0x93
1881060SN/A        0,              // 0x94
1892292SN/A        0,              // 0x95
1902292SN/A        0,              // 0x96
1912292SN/A        0,              // 0x97
1922292SN/A        0,              // 0x98
1932292SN/A        0,              // 0x99
1942292SN/A        0,              // 0x9a
1952292SN/A        0,              // 0x9b
1962292SN/A        0,              // 0x9c
1972292SN/A        0,              // 0x9d
1982292SN/A        "rdunique",     // 0x9e
1991060SN/A        "wrunique",     // 0x9f
2001060SN/A        0,              // 0xa0
2012292SN/A        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    };
299
300    if (index > NumCodes || index < 0)
301        return 0;
302
303    return strings[index];
304}
305