2
0

alpha-dis.c 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916
  1. /* alpha-dis.c -- Disassemble Alpha AXP instructions
  2. Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  3. Contributed by Richard Henderson <rth@tamu.edu>,
  4. patterned after the PPC opcode handling written by Ian Lance Taylor.
  5. This file is part of GDB, GAS, and the GNU binutils.
  6. GDB, GAS, and the GNU binutils are free software; you can redistribute
  7. them and/or modify them under the terms of the GNU General Public
  8. License as published by the Free Software Foundation; either version
  9. 2, or (at your option) any later version.
  10. GDB, GAS, and the GNU binutils are distributed in the hope that they
  11. will be useful, but WITHOUT ANY WARRANTY; without even the implied
  12. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
  13. the GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this file; see the file COPYING. If not, see
  16. <http://www.gnu.org/licenses/>. */
  17. #include <stdio.h>
  18. #include "dis-asm.h"
  19. /* MAX is redefined below, so remove any previous definition. */
  20. #undef MAX
  21. /* The opcode table is an array of struct alpha_opcode. */
  22. struct alpha_opcode
  23. {
  24. /* The opcode name. */
  25. const char *name;
  26. /* The opcode itself. Those bits which will be filled in with
  27. operands are zeroes. */
  28. unsigned opcode;
  29. /* The opcode mask. This is used by the disassembler. This is a
  30. mask containing ones indicating those bits which must match the
  31. opcode field, and zeroes indicating those bits which need not
  32. match (and are presumably filled in by operands). */
  33. unsigned mask;
  34. /* One bit flags for the opcode. These are primarily used to
  35. indicate specific processors and environments support the
  36. instructions. The defined values are listed below. */
  37. unsigned flags;
  38. /* An array of operand codes. Each code is an index into the
  39. operand table. They appear in the order which the operands must
  40. appear in assembly code, and are terminated by a zero. */
  41. unsigned char operands[4];
  42. };
  43. /* The table itself is sorted by major opcode number, and is otherwise
  44. in the order in which the disassembler should consider
  45. instructions. */
  46. extern const struct alpha_opcode alpha_opcodes[];
  47. extern const unsigned alpha_num_opcodes;
  48. /* Values defined for the flags field of a struct alpha_opcode. */
  49. /* CPU Availability */
  50. #define AXP_OPCODE_BASE 0x0001 /* Base architecture -- all cpus. */
  51. #define AXP_OPCODE_EV4 0x0002 /* EV4 specific PALcode insns. */
  52. #define AXP_OPCODE_EV5 0x0004 /* EV5 specific PALcode insns. */
  53. #define AXP_OPCODE_EV6 0x0008 /* EV6 specific PALcode insns. */
  54. #define AXP_OPCODE_BWX 0x0100 /* Byte/word extension (amask bit 0). */
  55. #define AXP_OPCODE_CIX 0x0200 /* "Count" extension (amask bit 1). */
  56. #define AXP_OPCODE_MAX 0x0400 /* Multimedia extension (amask bit 8). */
  57. #define AXP_OPCODE_NOPAL (~(AXP_OPCODE_EV4|AXP_OPCODE_EV5|AXP_OPCODE_EV6))
  58. /* A macro to extract the major opcode from an instruction. */
  59. #define AXP_OP(i) (((i) >> 26) & 0x3F)
  60. /* The total number of major opcodes. */
  61. #define AXP_NOPS 0x40
  62. /* The operands table is an array of struct alpha_operand. */
  63. struct alpha_operand
  64. {
  65. /* The number of bits in the operand. */
  66. unsigned int bits : 5;
  67. /* How far the operand is left shifted in the instruction. */
  68. unsigned int shift : 5;
  69. /* The default relocation type for this operand. */
  70. signed int default_reloc : 16;
  71. /* One bit syntax flags. */
  72. unsigned int flags : 16;
  73. /* Insertion function. This is used by the assembler. To insert an
  74. operand value into an instruction, check this field.
  75. If it is NULL, execute
  76. i |= (op & ((1 << o->bits) - 1)) << o->shift;
  77. (i is the instruction which we are filling in, o is a pointer to
  78. this structure, and op is the opcode value; this assumes twos
  79. complement arithmetic).
  80. If this field is not NULL, then simply call it with the
  81. instruction and the operand value. It will return the new value
  82. of the instruction. If the ERRMSG argument is not NULL, then if
  83. the operand value is illegal, *ERRMSG will be set to a warning
  84. string (the operand will be inserted in any case). If the
  85. operand value is legal, *ERRMSG will be unchanged (most operands
  86. can accept any value). */
  87. unsigned (*insert) (unsigned instruction, int op,
  88. const char **errmsg);
  89. /* Extraction function. This is used by the disassembler. To
  90. extract this operand type from an instruction, check this field.
  91. If it is NULL, compute
  92. op = ((i) >> o->shift) & ((1 << o->bits) - 1);
  93. if ((o->flags & AXP_OPERAND_SIGNED) != 0
  94. && (op & (1 << (o->bits - 1))) != 0)
  95. op -= 1 << o->bits;
  96. (i is the instruction, o is a pointer to this structure, and op
  97. is the result; this assumes twos complement arithmetic).
  98. If this field is not NULL, then simply call it with the
  99. instruction value. It will return the value of the operand. If
  100. the INVALID argument is not NULL, *INVALID will be set to
  101. non-zero if this operand type can not actually be extracted from
  102. this operand (i.e., the instruction does not match). If the
  103. operand is valid, *INVALID will not be changed. */
  104. int (*extract) (unsigned instruction, int *invalid);
  105. };
  106. /* Elements in the table are retrieved by indexing with values from
  107. the operands field of the alpha_opcodes table. */
  108. extern const struct alpha_operand alpha_operands[];
  109. extern const unsigned alpha_num_operands;
  110. /* Values defined for the flags field of a struct alpha_operand. */
  111. /* Mask for selecting the type for typecheck purposes */
  112. #define AXP_OPERAND_TYPECHECK_MASK \
  113. (AXP_OPERAND_PARENS | AXP_OPERAND_COMMA | AXP_OPERAND_IR | \
  114. AXP_OPERAND_FPR | AXP_OPERAND_RELATIVE | AXP_OPERAND_SIGNED | \
  115. AXP_OPERAND_UNSIGNED)
  116. /* This operand does not actually exist in the assembler input. This
  117. is used to support extended mnemonics, for which two operands fields
  118. are identical. The assembler should call the insert function with
  119. any op value. The disassembler should call the extract function,
  120. ignore the return value, and check the value placed in the invalid
  121. argument. */
  122. #define AXP_OPERAND_FAKE 01
  123. /* The operand should be wrapped in parentheses rather than separated
  124. from the previous by a comma. This is used for the load and store
  125. instructions which want their operands to look like "Ra,disp(Rb)". */
  126. #define AXP_OPERAND_PARENS 02
  127. /* Used in combination with PARENS, this suppresses the suppression of
  128. the comma. This is used for "jmp Ra,(Rb),hint". */
  129. #define AXP_OPERAND_COMMA 04
  130. /* This operand names an integer register. */
  131. #define AXP_OPERAND_IR 010
  132. /* This operand names a floating point register. */
  133. #define AXP_OPERAND_FPR 020
  134. /* This operand is a relative branch displacement. The disassembler
  135. prints these symbolically if possible. */
  136. #define AXP_OPERAND_RELATIVE 040
  137. /* This operand takes signed values. */
  138. #define AXP_OPERAND_SIGNED 0100
  139. /* This operand takes unsigned values. This exists primarily so that
  140. a flags value of 0 can be treated as end-of-arguments. */
  141. #define AXP_OPERAND_UNSIGNED 0200
  142. /* Suppress overflow detection on this field. This is used for hints. */
  143. #define AXP_OPERAND_NOOVERFLOW 0400
  144. /* Mask for optional argument default value. */
  145. #define AXP_OPERAND_OPTIONAL_MASK 07000
  146. /* This operand defaults to zero. This is used for jump hints. */
  147. #define AXP_OPERAND_DEFAULT_ZERO 01000
  148. /* This operand should default to the first (real) operand and is used
  149. in conjunction with AXP_OPERAND_OPTIONAL. This allows
  150. "and $0,3,$0" to be written as "and $0,3", etc. I don't like
  151. it, but it's what DEC does. */
  152. #define AXP_OPERAND_DEFAULT_FIRST 02000
  153. /* Similarly, this operand should default to the second (real) operand.
  154. This allows "negl $0" instead of "negl $0,$0". */
  155. #define AXP_OPERAND_DEFAULT_SECOND 04000
  156. /* Register common names */
  157. #define AXP_REG_V0 0
  158. #define AXP_REG_T0 1
  159. #define AXP_REG_T1 2
  160. #define AXP_REG_T2 3
  161. #define AXP_REG_T3 4
  162. #define AXP_REG_T4 5
  163. #define AXP_REG_T5 6
  164. #define AXP_REG_T6 7
  165. #define AXP_REG_T7 8
  166. #define AXP_REG_S0 9
  167. #define AXP_REG_S1 10
  168. #define AXP_REG_S2 11
  169. #define AXP_REG_S3 12
  170. #define AXP_REG_S4 13
  171. #define AXP_REG_S5 14
  172. #define AXP_REG_FP 15
  173. #define AXP_REG_A0 16
  174. #define AXP_REG_A1 17
  175. #define AXP_REG_A2 18
  176. #define AXP_REG_A3 19
  177. #define AXP_REG_A4 20
  178. #define AXP_REG_A5 21
  179. #define AXP_REG_T8 22
  180. #define AXP_REG_T9 23
  181. #define AXP_REG_T10 24
  182. #define AXP_REG_T11 25
  183. #define AXP_REG_RA 26
  184. #define AXP_REG_PV 27
  185. #define AXP_REG_T12 27
  186. #define AXP_REG_AT 28
  187. #define AXP_REG_GP 29
  188. #define AXP_REG_SP 30
  189. #define AXP_REG_ZERO 31
  190. enum bfd_reloc_code_real {
  191. BFD_RELOC_23_PCREL_S2,
  192. BFD_RELOC_ALPHA_HINT
  193. };
  194. /* This file holds the Alpha AXP opcode table. The opcode table includes
  195. almost all of the extended instruction mnemonics. This permits the
  196. disassembler to use them, and simplifies the assembler logic, at the
  197. cost of increasing the table size. The table is strictly constant
  198. data, so the compiler should be able to put it in the text segment.
  199. This file also holds the operand table. All knowledge about inserting
  200. and extracting operands from instructions is kept in this file.
  201. The information for the base instruction set was compiled from the
  202. _Alpha Architecture Handbook_, Digital Order Number EC-QD2KB-TE,
  203. version 2.
  204. The information for the post-ev5 architecture extensions BWX, CIX and
  205. MAX came from version 3 of this same document, which is also available
  206. on-line at http://ftp.digital.com/pub/Digital/info/semiconductor
  207. /literature/alphahb2.pdf
  208. The information for the EV4 PALcode instructions was compiled from
  209. _DECchip 21064 and DECchip 21064A Alpha AXP Microprocessors Hardware
  210. Reference Manual_, Digital Order Number EC-Q9ZUA-TE, preliminary
  211. revision dated June 1994.
  212. The information for the EV5 PALcode instructions was compiled from
  213. _Alpha 21164 Microprocessor Hardware Reference Manual_, Digital
  214. Order Number EC-QAEQB-TE, preliminary revision dated April 1995. */
  215. /* Local insertion and extraction functions */
  216. static unsigned insert_rba (unsigned, int, const char **);
  217. static unsigned insert_rca (unsigned, int, const char **);
  218. static unsigned insert_za (unsigned, int, const char **);
  219. static unsigned insert_zb (unsigned, int, const char **);
  220. static unsigned insert_zc (unsigned, int, const char **);
  221. static unsigned insert_bdisp (unsigned, int, const char **);
  222. static unsigned insert_jhint (unsigned, int, const char **);
  223. static unsigned insert_ev6hwjhint (unsigned, int, const char **);
  224. static int extract_rba (unsigned, int *);
  225. static int extract_rca (unsigned, int *);
  226. static int extract_za (unsigned, int *);
  227. static int extract_zb (unsigned, int *);
  228. static int extract_zc (unsigned, int *);
  229. static int extract_bdisp (unsigned, int *);
  230. static int extract_jhint (unsigned, int *);
  231. static int extract_ev6hwjhint (unsigned, int *);
  232. /* The operands table */
  233. const struct alpha_operand alpha_operands[] =
  234. {
  235. /* The fields are bits, shift, insert, extract, flags */
  236. /* The zero index is used to indicate end-of-list */
  237. #define UNUSED 0
  238. { 0, 0, 0, 0, 0, 0 },
  239. /* The plain integer register fields */
  240. #define RA (UNUSED + 1)
  241. { 5, 21, 0, AXP_OPERAND_IR, 0, 0 },
  242. #define RB (RA + 1)
  243. { 5, 16, 0, AXP_OPERAND_IR, 0, 0 },
  244. #define RC (RB + 1)
  245. { 5, 0, 0, AXP_OPERAND_IR, 0, 0 },
  246. /* The plain fp register fields */
  247. #define FA (RC + 1)
  248. { 5, 21, 0, AXP_OPERAND_FPR, 0, 0 },
  249. #define FB (FA + 1)
  250. { 5, 16, 0, AXP_OPERAND_FPR, 0, 0 },
  251. #define FC (FB + 1)
  252. { 5, 0, 0, AXP_OPERAND_FPR, 0, 0 },
  253. /* The integer registers when they are ZERO */
  254. #define ZA (FC + 1)
  255. { 5, 21, 0, AXP_OPERAND_FAKE, insert_za, extract_za },
  256. #define ZB (ZA + 1)
  257. { 5, 16, 0, AXP_OPERAND_FAKE, insert_zb, extract_zb },
  258. #define ZC (ZB + 1)
  259. { 5, 0, 0, AXP_OPERAND_FAKE, insert_zc, extract_zc },
  260. /* The RB field when it needs parentheses */
  261. #define PRB (ZC + 1)
  262. { 5, 16, 0, AXP_OPERAND_IR|AXP_OPERAND_PARENS, 0, 0 },
  263. /* The RB field when it needs parentheses _and_ a preceding comma */
  264. #define CPRB (PRB + 1)
  265. { 5, 16, 0,
  266. AXP_OPERAND_IR|AXP_OPERAND_PARENS|AXP_OPERAND_COMMA, 0, 0 },
  267. /* The RB field when it must be the same as the RA field */
  268. #define RBA (CPRB + 1)
  269. { 5, 16, 0, AXP_OPERAND_FAKE, insert_rba, extract_rba },
  270. /* The RC field when it must be the same as the RB field */
  271. #define RCA (RBA + 1)
  272. { 5, 0, 0, AXP_OPERAND_FAKE, insert_rca, extract_rca },
  273. /* The RC field when it can *default* to RA */
  274. #define DRC1 (RCA + 1)
  275. { 5, 0, 0,
  276. AXP_OPERAND_IR|AXP_OPERAND_DEFAULT_FIRST, 0, 0 },
  277. /* The RC field when it can *default* to RB */
  278. #define DRC2 (DRC1 + 1)
  279. { 5, 0, 0,
  280. AXP_OPERAND_IR|AXP_OPERAND_DEFAULT_SECOND, 0, 0 },
  281. /* The FC field when it can *default* to RA */
  282. #define DFC1 (DRC2 + 1)
  283. { 5, 0, 0,
  284. AXP_OPERAND_FPR|AXP_OPERAND_DEFAULT_FIRST, 0, 0 },
  285. /* The FC field when it can *default* to RB */
  286. #define DFC2 (DFC1 + 1)
  287. { 5, 0, 0,
  288. AXP_OPERAND_FPR|AXP_OPERAND_DEFAULT_SECOND, 0, 0 },
  289. /* The unsigned 8-bit literal of Operate format insns */
  290. #define LIT (DFC2 + 1)
  291. { 8, 13, -LIT, AXP_OPERAND_UNSIGNED, 0, 0 },
  292. /* The signed 16-bit displacement of Memory format insns. From here
  293. we can't tell what relocation should be used, so don't use a default. */
  294. #define MDISP (LIT + 1)
  295. { 16, 0, -MDISP, AXP_OPERAND_SIGNED, 0, 0 },
  296. /* The signed "23-bit" aligned displacement of Branch format insns */
  297. #define BDISP (MDISP + 1)
  298. { 21, 0, BFD_RELOC_23_PCREL_S2,
  299. AXP_OPERAND_RELATIVE, insert_bdisp, extract_bdisp },
  300. /* The 26-bit PALcode function */
  301. #define PALFN (BDISP + 1)
  302. { 26, 0, -PALFN, AXP_OPERAND_UNSIGNED, 0, 0 },
  303. /* The optional signed "16-bit" aligned displacement of the JMP/JSR hint */
  304. #define JMPHINT (PALFN + 1)
  305. { 14, 0, BFD_RELOC_ALPHA_HINT,
  306. AXP_OPERAND_RELATIVE|AXP_OPERAND_DEFAULT_ZERO|AXP_OPERAND_NOOVERFLOW,
  307. insert_jhint, extract_jhint },
  308. /* The optional hint to RET/JSR_COROUTINE */
  309. #define RETHINT (JMPHINT + 1)
  310. { 14, 0, -RETHINT,
  311. AXP_OPERAND_UNSIGNED|AXP_OPERAND_DEFAULT_ZERO, 0, 0 },
  312. /* The 12-bit displacement for the ev[46] hw_{ld,st} (pal1b/pal1f) insns */
  313. #define EV4HWDISP (RETHINT + 1)
  314. #define EV6HWDISP (EV4HWDISP)
  315. { 12, 0, -EV4HWDISP, AXP_OPERAND_SIGNED, 0, 0 },
  316. /* The 5-bit index for the ev4 hw_m[ft]pr (pal19/pal1d) insns */
  317. #define EV4HWINDEX (EV4HWDISP + 1)
  318. { 5, 0, -EV4HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
  319. /* The 8-bit index for the oddly unqualified hw_m[tf]pr insns
  320. that occur in DEC PALcode. */
  321. #define EV4EXTHWINDEX (EV4HWINDEX + 1)
  322. { 8, 0, -EV4EXTHWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
  323. /* The 10-bit displacement for the ev5 hw_{ld,st} (pal1b/pal1f) insns */
  324. #define EV5HWDISP (EV4EXTHWINDEX + 1)
  325. { 10, 0, -EV5HWDISP, AXP_OPERAND_SIGNED, 0, 0 },
  326. /* The 16-bit index for the ev5 hw_m[ft]pr (pal19/pal1d) insns */
  327. #define EV5HWINDEX (EV5HWDISP + 1)
  328. { 16, 0, -EV5HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
  329. /* The 16-bit combined index/scoreboard mask for the ev6
  330. hw_m[ft]pr (pal19/pal1d) insns */
  331. #define EV6HWINDEX (EV5HWINDEX + 1)
  332. { 16, 0, -EV6HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
  333. /* The 13-bit branch hint for the ev6 hw_jmp/jsr (pal1e) insn */
  334. #define EV6HWJMPHINT (EV6HWINDEX+ 1)
  335. { 8, 0, -EV6HWJMPHINT,
  336. AXP_OPERAND_RELATIVE|AXP_OPERAND_DEFAULT_ZERO|AXP_OPERAND_NOOVERFLOW,
  337. insert_ev6hwjhint, extract_ev6hwjhint }
  338. };
  339. const unsigned alpha_num_operands = sizeof(alpha_operands)/sizeof(*alpha_operands);
  340. /* The RB field when it is the same as the RA field in the same insn.
  341. This operand is marked fake. The insertion function just copies
  342. the RA field into the RB field, and the extraction function just
  343. checks that the fields are the same. */
  344. /*ARGSUSED*/
  345. static unsigned
  346. insert_rba(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
  347. {
  348. return insn | (((insn >> 21) & 0x1f) << 16);
  349. }
  350. static int
  351. extract_rba(unsigned insn, int *invalid)
  352. {
  353. if (invalid != (int *) NULL
  354. && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
  355. *invalid = 1;
  356. return 0;
  357. }
  358. /* The same for the RC field */
  359. /*ARGSUSED*/
  360. static unsigned
  361. insert_rca(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
  362. {
  363. return insn | ((insn >> 21) & 0x1f);
  364. }
  365. static int
  366. extract_rca(unsigned insn, int *invalid)
  367. {
  368. if (invalid != (int *) NULL
  369. && ((insn >> 21) & 0x1f) != (insn & 0x1f))
  370. *invalid = 1;
  371. return 0;
  372. }
  373. /* Fake arguments in which the registers must be set to ZERO */
  374. /*ARGSUSED*/
  375. static unsigned
  376. insert_za(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
  377. {
  378. return insn | (31 << 21);
  379. }
  380. static int
  381. extract_za(unsigned insn, int *invalid)
  382. {
  383. if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)
  384. *invalid = 1;
  385. return 0;
  386. }
  387. /*ARGSUSED*/
  388. static unsigned
  389. insert_zb(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
  390. {
  391. return insn | (31 << 16);
  392. }
  393. static int
  394. extract_zb(unsigned insn, int *invalid)
  395. {
  396. if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)
  397. *invalid = 1;
  398. return 0;
  399. }
  400. /*ARGSUSED*/
  401. static unsigned
  402. insert_zc(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
  403. {
  404. return insn | 31;
  405. }
  406. static int
  407. extract_zc(unsigned insn, int *invalid)
  408. {
  409. if (invalid != (int *) NULL && (insn & 0x1f) != 31)
  410. *invalid = 1;
  411. return 0;
  412. }
  413. /* The displacement field of a Branch format insn. */
  414. static unsigned
  415. insert_bdisp(unsigned insn, int value, const char **errmsg)
  416. {
  417. if (errmsg != (const char **)NULL && (value & 3))
  418. *errmsg = _("branch operand unaligned");
  419. return insn | ((value / 4) & 0x1FFFFF);
  420. }
  421. /*ARGSUSED*/
  422. static int
  423. extract_bdisp(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
  424. {
  425. return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
  426. }
  427. /* The hint field of a JMP/JSR insn. */
  428. static unsigned
  429. insert_jhint(unsigned insn, int value, const char **errmsg)
  430. {
  431. if (errmsg != (const char **)NULL && (value & 3))
  432. *errmsg = _("jump hint unaligned");
  433. return insn | ((value / 4) & 0x3FFF);
  434. }
  435. /*ARGSUSED*/
  436. static int
  437. extract_jhint(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
  438. {
  439. return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
  440. }
  441. /* The hint field of an EV6 HW_JMP/JSR insn. */
  442. static unsigned
  443. insert_ev6hwjhint(unsigned insn, int value, const char **errmsg)
  444. {
  445. if (errmsg != (const char **)NULL && (value & 3))
  446. *errmsg = _("jump hint unaligned");
  447. return insn | ((value / 4) & 0x1FFF);
  448. }
  449. /*ARGSUSED*/
  450. static int
  451. extract_ev6hwjhint(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
  452. {
  453. return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
  454. }
  455. /* Macros used to form opcodes */
  456. /* The main opcode */
  457. #define OP(x) (((x) & 0x3F) << 26)
  458. #define OP_MASK 0xFC000000
  459. /* Branch format instructions */
  460. #define BRA_(oo) OP(oo)
  461. #define BRA_MASK OP_MASK
  462. #define BRA(oo) BRA_(oo), BRA_MASK
  463. /* Floating point format instructions */
  464. #define FP_(oo,fff) (OP(oo) | (((fff) & 0x7FF) << 5))
  465. #define FP_MASK (OP_MASK | 0xFFE0)
  466. #define FP(oo,fff) FP_(oo,fff), FP_MASK
  467. /* Memory format instructions */
  468. #define MEM_(oo) OP(oo)
  469. #define MEM_MASK OP_MASK
  470. #define MEM(oo) MEM_(oo), MEM_MASK
  471. /* Memory/Func Code format instructions */
  472. #define MFC_(oo,ffff) (OP(oo) | ((ffff) & 0xFFFF))
  473. #define MFC_MASK (OP_MASK | 0xFFFF)
  474. #define MFC(oo,ffff) MFC_(oo,ffff), MFC_MASK
  475. /* Memory/Branch format instructions */
  476. #define MBR_(oo,h) (OP(oo) | (((h) & 3) << 14))
  477. #define MBR_MASK (OP_MASK | 0xC000)
  478. #define MBR(oo,h) MBR_(oo,h), MBR_MASK
  479. /* Operate format instructions. The OPRL variant specifies a
  480. literal second argument. */
  481. #define OPR_(oo,ff) (OP(oo) | (((ff) & 0x7F) << 5))
  482. #define OPRL_(oo,ff) (OPR_((oo),(ff)) | 0x1000)
  483. #define OPR_MASK (OP_MASK | 0x1FE0)
  484. #define OPR(oo,ff) OPR_(oo,ff), OPR_MASK
  485. #define OPRL(oo,ff) OPRL_(oo,ff), OPR_MASK
  486. /* Generic PALcode format instructions */
  487. #define PCD_(oo) OP(oo)
  488. #define PCD_MASK OP_MASK
  489. #define PCD(oo) PCD_(oo), PCD_MASK
  490. /* Specific PALcode instructions */
  491. #define SPCD_(oo,ffff) (OP(oo) | ((ffff) & 0x3FFFFFF))
  492. #define SPCD_MASK 0xFFFFFFFF
  493. #define SPCD(oo,ffff) SPCD_(oo,ffff), SPCD_MASK
  494. /* Hardware memory (hw_{ld,st}) instructions */
  495. #define EV4HWMEM_(oo,f) (OP(oo) | (((f) & 0xF) << 12))
  496. #define EV4HWMEM_MASK (OP_MASK | 0xF000)
  497. #define EV4HWMEM(oo,f) EV4HWMEM_(oo,f), EV4HWMEM_MASK
  498. #define EV5HWMEM_(oo,f) (OP(oo) | (((f) & 0x3F) << 10))
  499. #define EV5HWMEM_MASK (OP_MASK | 0xF800)
  500. #define EV5HWMEM(oo,f) EV5HWMEM_(oo,f), EV5HWMEM_MASK
  501. #define EV6HWMEM_(oo,f) (OP(oo) | (((f) & 0xF) << 12))
  502. #define EV6HWMEM_MASK (OP_MASK | 0xF000)
  503. #define EV6HWMEM(oo,f) EV6HWMEM_(oo,f), EV6HWMEM_MASK
  504. #define EV6HWMBR_(oo,h) (OP(oo) | (((h) & 7) << 13))
  505. #define EV6HWMBR_MASK (OP_MASK | 0xE000)
  506. #define EV6HWMBR(oo,h) EV6HWMBR_(oo,h), EV6HWMBR_MASK
  507. /* Abbreviations for instruction subsets. */
  508. #define BASE AXP_OPCODE_BASE
  509. #define EV4 AXP_OPCODE_EV4
  510. #define EV5 AXP_OPCODE_EV5
  511. #define EV6 AXP_OPCODE_EV6
  512. #define BWX AXP_OPCODE_BWX
  513. #define CIX AXP_OPCODE_CIX
  514. #define MAX AXP_OPCODE_MAX
  515. /* Common combinations of arguments */
  516. #define ARG_NONE { 0 }
  517. #define ARG_BRA { RA, BDISP }
  518. #define ARG_FBRA { FA, BDISP }
  519. #define ARG_FP { FA, FB, DFC1 }
  520. #define ARG_FPZ1 { ZA, FB, DFC1 }
  521. #define ARG_MEM { RA, MDISP, PRB }
  522. #define ARG_FMEM { FA, MDISP, PRB }
  523. #define ARG_OPR { RA, RB, DRC1 }
  524. #define ARG_OPRL { RA, LIT, DRC1 }
  525. #define ARG_OPRZ1 { ZA, RB, DRC1 }
  526. #define ARG_OPRLZ1 { ZA, LIT, RC }
  527. #define ARG_PCD { PALFN }
  528. #define ARG_EV4HWMEM { RA, EV4HWDISP, PRB }
  529. #define ARG_EV4HWMPR { RA, RBA, EV4HWINDEX }
  530. #define ARG_EV5HWMEM { RA, EV5HWDISP, PRB }
  531. #define ARG_EV6HWMEM { RA, EV6HWDISP, PRB }
  532. /* The opcode table.
  533. The format of the opcode table is:
  534. NAME OPCODE MASK { OPERANDS }
  535. NAME is the name of the instruction.
  536. OPCODE is the instruction opcode.
  537. MASK is the opcode mask; this is used to tell the disassembler
  538. which bits in the actual opcode must match OPCODE.
  539. OPERANDS is the list of operands.
  540. The preceding macros merge the text of the OPCODE and MASK fields.
  541. The disassembler reads the table in order and prints the first
  542. instruction which matches, so this table is sorted to put more
  543. specific instructions before more general instructions.
  544. Otherwise, it is sorted by major opcode and minor function code.
  545. There are three classes of not-really-instructions in this table:
  546. ALIAS is another name for another instruction. Some of
  547. these come from the Architecture Handbook, some
  548. come from the original gas opcode tables. In all
  549. cases, the functionality of the opcode is unchanged.
  550. PSEUDO a stylized code form endorsed by Chapter A.4 of the
  551. Architecture Handbook.
  552. EXTRA a stylized code form found in the original gas tables.
  553. And two annotations:
  554. EV56 BUT opcodes that are officially introduced as of the ev56,
  555. but with defined results on previous implementations.
  556. EV56 UNA opcodes that were introduced as of the ev56 with
  557. presumably undefined results on previous implementations
  558. that were not assigned to a particular extension.
  559. */
  560. const struct alpha_opcode alpha_opcodes[] = {
  561. { "halt", SPCD(0x00,0x0000), BASE, ARG_NONE },
  562. { "draina", SPCD(0x00,0x0002), BASE, ARG_NONE },
  563. { "bpt", SPCD(0x00,0x0080), BASE, ARG_NONE },
  564. { "bugchk", SPCD(0x00,0x0081), BASE, ARG_NONE },
  565. { "callsys", SPCD(0x00,0x0083), BASE, ARG_NONE },
  566. { "chmk", SPCD(0x00,0x0083), BASE, ARG_NONE },
  567. { "imb", SPCD(0x00,0x0086), BASE, ARG_NONE },
  568. { "rduniq", SPCD(0x00,0x009e), BASE, ARG_NONE },
  569. { "wruniq", SPCD(0x00,0x009f), BASE, ARG_NONE },
  570. { "gentrap", SPCD(0x00,0x00aa), BASE, ARG_NONE },
  571. { "call_pal", PCD(0x00), BASE, ARG_PCD },
  572. { "pal", PCD(0x00), BASE, ARG_PCD }, /* alias */
  573. { "lda", MEM(0x08), BASE, { RA, MDISP, ZB } }, /* pseudo */
  574. { "lda", MEM(0x08), BASE, ARG_MEM },
  575. { "ldah", MEM(0x09), BASE, { RA, MDISP, ZB } }, /* pseudo */
  576. { "ldah", MEM(0x09), BASE, ARG_MEM },
  577. { "ldbu", MEM(0x0A), BWX, ARG_MEM },
  578. { "unop", MEM_(0x0B) | (30 << 16),
  579. MEM_MASK, BASE, { ZA } }, /* pseudo */
  580. { "ldq_u", MEM(0x0B), BASE, ARG_MEM },
  581. { "ldwu", MEM(0x0C), BWX, ARG_MEM },
  582. { "stw", MEM(0x0D), BWX, ARG_MEM },
  583. { "stb", MEM(0x0E), BWX, ARG_MEM },
  584. { "stq_u", MEM(0x0F), BASE, ARG_MEM },
  585. { "sextl", OPR(0x10,0x00), BASE, ARG_OPRZ1 }, /* pseudo */
  586. { "sextl", OPRL(0x10,0x00), BASE, ARG_OPRLZ1 }, /* pseudo */
  587. { "addl", OPR(0x10,0x00), BASE, ARG_OPR },
  588. { "addl", OPRL(0x10,0x00), BASE, ARG_OPRL },
  589. { "s4addl", OPR(0x10,0x02), BASE, ARG_OPR },
  590. { "s4addl", OPRL(0x10,0x02), BASE, ARG_OPRL },
  591. { "negl", OPR(0x10,0x09), BASE, ARG_OPRZ1 }, /* pseudo */
  592. { "negl", OPRL(0x10,0x09), BASE, ARG_OPRLZ1 }, /* pseudo */
  593. { "subl", OPR(0x10,0x09), BASE, ARG_OPR },
  594. { "subl", OPRL(0x10,0x09), BASE, ARG_OPRL },
  595. { "s4subl", OPR(0x10,0x0B), BASE, ARG_OPR },
  596. { "s4subl", OPRL(0x10,0x0B), BASE, ARG_OPRL },
  597. { "cmpbge", OPR(0x10,0x0F), BASE, ARG_OPR },
  598. { "cmpbge", OPRL(0x10,0x0F), BASE, ARG_OPRL },
  599. { "s8addl", OPR(0x10,0x12), BASE, ARG_OPR },
  600. { "s8addl", OPRL(0x10,0x12), BASE, ARG_OPRL },
  601. { "s8subl", OPR(0x10,0x1B), BASE, ARG_OPR },
  602. { "s8subl", OPRL(0x10,0x1B), BASE, ARG_OPRL },
  603. { "cmpult", OPR(0x10,0x1D), BASE, ARG_OPR },
  604. { "cmpult", OPRL(0x10,0x1D), BASE, ARG_OPRL },
  605. { "addq", OPR(0x10,0x20), BASE, ARG_OPR },
  606. { "addq", OPRL(0x10,0x20), BASE, ARG_OPRL },
  607. { "s4addq", OPR(0x10,0x22), BASE, ARG_OPR },
  608. { "s4addq", OPRL(0x10,0x22), BASE, ARG_OPRL },
  609. { "negq", OPR(0x10,0x29), BASE, ARG_OPRZ1 }, /* pseudo */
  610. { "negq", OPRL(0x10,0x29), BASE, ARG_OPRLZ1 }, /* pseudo */
  611. { "subq", OPR(0x10,0x29), BASE, ARG_OPR },
  612. { "subq", OPRL(0x10,0x29), BASE, ARG_OPRL },
  613. { "s4subq", OPR(0x10,0x2B), BASE, ARG_OPR },
  614. { "s4subq", OPRL(0x10,0x2B), BASE, ARG_OPRL },
  615. { "cmpeq", OPR(0x10,0x2D), BASE, ARG_OPR },
  616. { "cmpeq", OPRL(0x10,0x2D), BASE, ARG_OPRL },
  617. { "s8addq", OPR(0x10,0x32), BASE, ARG_OPR },
  618. { "s8addq", OPRL(0x10,0x32), BASE, ARG_OPRL },
  619. { "s8subq", OPR(0x10,0x3B), BASE, ARG_OPR },
  620. { "s8subq", OPRL(0x10,0x3B), BASE, ARG_OPRL },
  621. { "cmpule", OPR(0x10,0x3D), BASE, ARG_OPR },
  622. { "cmpule", OPRL(0x10,0x3D), BASE, ARG_OPRL },
  623. { "addl/v", OPR(0x10,0x40), BASE, ARG_OPR },
  624. { "addl/v", OPRL(0x10,0x40), BASE, ARG_OPRL },
  625. { "negl/v", OPR(0x10,0x49), BASE, ARG_OPRZ1 }, /* pseudo */
  626. { "negl/v", OPRL(0x10,0x49), BASE, ARG_OPRLZ1 }, /* pseudo */
  627. { "subl/v", OPR(0x10,0x49), BASE, ARG_OPR },
  628. { "subl/v", OPRL(0x10,0x49), BASE, ARG_OPRL },
  629. { "cmplt", OPR(0x10,0x4D), BASE, ARG_OPR },
  630. { "cmplt", OPRL(0x10,0x4D), BASE, ARG_OPRL },
  631. { "addq/v", OPR(0x10,0x60), BASE, ARG_OPR },
  632. { "addq/v", OPRL(0x10,0x60), BASE, ARG_OPRL },
  633. { "negq/v", OPR(0x10,0x69), BASE, ARG_OPRZ1 }, /* pseudo */
  634. { "negq/v", OPRL(0x10,0x69), BASE, ARG_OPRLZ1 }, /* pseudo */
  635. { "subq/v", OPR(0x10,0x69), BASE, ARG_OPR },
  636. { "subq/v", OPRL(0x10,0x69), BASE, ARG_OPRL },
  637. { "cmple", OPR(0x10,0x6D), BASE, ARG_OPR },
  638. { "cmple", OPRL(0x10,0x6D), BASE, ARG_OPRL },
  639. { "and", OPR(0x11,0x00), BASE, ARG_OPR },
  640. { "and", OPRL(0x11,0x00), BASE, ARG_OPRL },
  641. { "andnot", OPR(0x11,0x08), BASE, ARG_OPR }, /* alias */
  642. { "andnot", OPRL(0x11,0x08), BASE, ARG_OPRL }, /* alias */
  643. { "bic", OPR(0x11,0x08), BASE, ARG_OPR },
  644. { "bic", OPRL(0x11,0x08), BASE, ARG_OPRL },
  645. { "cmovlbs", OPR(0x11,0x14), BASE, ARG_OPR },
  646. { "cmovlbs", OPRL(0x11,0x14), BASE, ARG_OPRL },
  647. { "cmovlbc", OPR(0x11,0x16), BASE, ARG_OPR },
  648. { "cmovlbc", OPRL(0x11,0x16), BASE, ARG_OPRL },
  649. { "nop", OPR(0x11,0x20), BASE, { ZA, ZB, ZC } }, /* pseudo */
  650. { "clr", OPR(0x11,0x20), BASE, { ZA, ZB, RC } }, /* pseudo */
  651. { "mov", OPR(0x11,0x20), BASE, { ZA, RB, RC } }, /* pseudo */
  652. { "mov", OPR(0x11,0x20), BASE, { RA, RBA, RC } }, /* pseudo */
  653. { "mov", OPRL(0x11,0x20), BASE, { ZA, LIT, RC } }, /* pseudo */
  654. { "or", OPR(0x11,0x20), BASE, ARG_OPR }, /* alias */
  655. { "or", OPRL(0x11,0x20), BASE, ARG_OPRL }, /* alias */
  656. { "bis", OPR(0x11,0x20), BASE, ARG_OPR },
  657. { "bis", OPRL(0x11,0x20), BASE, ARG_OPRL },
  658. { "cmoveq", OPR(0x11,0x24), BASE, ARG_OPR },
  659. { "cmoveq", OPRL(0x11,0x24), BASE, ARG_OPRL },
  660. { "cmovne", OPR(0x11,0x26), BASE, ARG_OPR },
  661. { "cmovne", OPRL(0x11,0x26), BASE, ARG_OPRL },
  662. { "not", OPR(0x11,0x28), BASE, ARG_OPRZ1 }, /* pseudo */
  663. { "not", OPRL(0x11,0x28), BASE, ARG_OPRLZ1 }, /* pseudo */
  664. { "ornot", OPR(0x11,0x28), BASE, ARG_OPR },
  665. { "ornot", OPRL(0x11,0x28), BASE, ARG_OPRL },
  666. { "xor", OPR(0x11,0x40), BASE, ARG_OPR },
  667. { "xor", OPRL(0x11,0x40), BASE, ARG_OPRL },
  668. { "cmovlt", OPR(0x11,0x44), BASE, ARG_OPR },
  669. { "cmovlt", OPRL(0x11,0x44), BASE, ARG_OPRL },
  670. { "cmovge", OPR(0x11,0x46), BASE, ARG_OPR },
  671. { "cmovge", OPRL(0x11,0x46), BASE, ARG_OPRL },
  672. { "eqv", OPR(0x11,0x48), BASE, ARG_OPR },
  673. { "eqv", OPRL(0x11,0x48), BASE, ARG_OPRL },
  674. { "xornot", OPR(0x11,0x48), BASE, ARG_OPR }, /* alias */
  675. { "xornot", OPRL(0x11,0x48), BASE, ARG_OPRL }, /* alias */
  676. { "amask", OPR(0x11,0x61), BASE, ARG_OPRZ1 }, /* ev56 but */
  677. { "amask", OPRL(0x11,0x61), BASE, ARG_OPRLZ1 }, /* ev56 but */
  678. { "cmovle", OPR(0x11,0x64), BASE, ARG_OPR },
  679. { "cmovle", OPRL(0x11,0x64), BASE, ARG_OPRL },
  680. { "cmovgt", OPR(0x11,0x66), BASE, ARG_OPR },
  681. { "cmovgt", OPRL(0x11,0x66), BASE, ARG_OPRL },
  682. { "implver", OPRL_(0x11,0x6C)|(31<<21)|(1<<13),
  683. 0xFFFFFFE0, BASE, { RC } }, /* ev56 but */
  684. { "mskbl", OPR(0x12,0x02), BASE, ARG_OPR },
  685. { "mskbl", OPRL(0x12,0x02), BASE, ARG_OPRL },
  686. { "extbl", OPR(0x12,0x06), BASE, ARG_OPR },
  687. { "extbl", OPRL(0x12,0x06), BASE, ARG_OPRL },
  688. { "insbl", OPR(0x12,0x0B), BASE, ARG_OPR },
  689. { "insbl", OPRL(0x12,0x0B), BASE, ARG_OPRL },
  690. { "mskwl", OPR(0x12,0x12), BASE, ARG_OPR },
  691. { "mskwl", OPRL(0x12,0x12), BASE, ARG_OPRL },
  692. { "extwl", OPR(0x12,0x16), BASE, ARG_OPR },
  693. { "extwl", OPRL(0x12,0x16), BASE, ARG_OPRL },
  694. { "inswl", OPR(0x12,0x1B), BASE, ARG_OPR },
  695. { "inswl", OPRL(0x12,0x1B), BASE, ARG_OPRL },
  696. { "mskll", OPR(0x12,0x22), BASE, ARG_OPR },
  697. { "mskll", OPRL(0x12,0x22), BASE, ARG_OPRL },
  698. { "extll", OPR(0x12,0x26), BASE, ARG_OPR },
  699. { "extll", OPRL(0x12,0x26), BASE, ARG_OPRL },
  700. { "insll", OPR(0x12,0x2B), BASE, ARG_OPR },
  701. { "insll", OPRL(0x12,0x2B), BASE, ARG_OPRL },
  702. { "zap", OPR(0x12,0x30), BASE, ARG_OPR },
  703. { "zap", OPRL(0x12,0x30), BASE, ARG_OPRL },
  704. { "zapnot", OPR(0x12,0x31), BASE, ARG_OPR },
  705. { "zapnot", OPRL(0x12,0x31), BASE, ARG_OPRL },
  706. { "mskql", OPR(0x12,0x32), BASE, ARG_OPR },
  707. { "mskql", OPRL(0x12,0x32), BASE, ARG_OPRL },
  708. { "srl", OPR(0x12,0x34), BASE, ARG_OPR },
  709. { "srl", OPRL(0x12,0x34), BASE, ARG_OPRL },
  710. { "extql", OPR(0x12,0x36), BASE, ARG_OPR },
  711. { "extql", OPRL(0x12,0x36), BASE, ARG_OPRL },
  712. { "sll", OPR(0x12,0x39), BASE, ARG_OPR },
  713. { "sll", OPRL(0x12,0x39), BASE, ARG_OPRL },
  714. { "insql", OPR(0x12,0x3B), BASE, ARG_OPR },
  715. { "insql", OPRL(0x12,0x3B), BASE, ARG_OPRL },
  716. { "sra", OPR(0x12,0x3C), BASE, ARG_OPR },
  717. { "sra", OPRL(0x12,0x3C), BASE, ARG_OPRL },
  718. { "mskwh", OPR(0x12,0x52), BASE, ARG_OPR },
  719. { "mskwh", OPRL(0x12,0x52), BASE, ARG_OPRL },
  720. { "inswh", OPR(0x12,0x57), BASE, ARG_OPR },
  721. { "inswh", OPRL(0x12,0x57), BASE, ARG_OPRL },
  722. { "extwh", OPR(0x12,0x5A), BASE, ARG_OPR },
  723. { "extwh", OPRL(0x12,0x5A), BASE, ARG_OPRL },
  724. { "msklh", OPR(0x12,0x62), BASE, ARG_OPR },
  725. { "msklh", OPRL(0x12,0x62), BASE, ARG_OPRL },
  726. { "inslh", OPR(0x12,0x67), BASE, ARG_OPR },
  727. { "inslh", OPRL(0x12,0x67), BASE, ARG_OPRL },
  728. { "extlh", OPR(0x12,0x6A), BASE, ARG_OPR },
  729. { "extlh", OPRL(0x12,0x6A), BASE, ARG_OPRL },
  730. { "mskqh", OPR(0x12,0x72), BASE, ARG_OPR },
  731. { "mskqh", OPRL(0x12,0x72), BASE, ARG_OPRL },
  732. { "insqh", OPR(0x12,0x77), BASE, ARG_OPR },
  733. { "insqh", OPRL(0x12,0x77), BASE, ARG_OPRL },
  734. { "extqh", OPR(0x12,0x7A), BASE, ARG_OPR },
  735. { "extqh", OPRL(0x12,0x7A), BASE, ARG_OPRL },
  736. { "mull", OPR(0x13,0x00), BASE, ARG_OPR },
  737. { "mull", OPRL(0x13,0x00), BASE, ARG_OPRL },
  738. { "mulq", OPR(0x13,0x20), BASE, ARG_OPR },
  739. { "mulq", OPRL(0x13,0x20), BASE, ARG_OPRL },
  740. { "umulh", OPR(0x13,0x30), BASE, ARG_OPR },
  741. { "umulh", OPRL(0x13,0x30), BASE, ARG_OPRL },
  742. { "mull/v", OPR(0x13,0x40), BASE, ARG_OPR },
  743. { "mull/v", OPRL(0x13,0x40), BASE, ARG_OPRL },
  744. { "mulq/v", OPR(0x13,0x60), BASE, ARG_OPR },
  745. { "mulq/v", OPRL(0x13,0x60), BASE, ARG_OPRL },
  746. { "itofs", FP(0x14,0x004), CIX, { RA, ZB, FC } },
  747. { "sqrtf/c", FP(0x14,0x00A), CIX, ARG_FPZ1 },
  748. { "sqrts/c", FP(0x14,0x00B), CIX, ARG_FPZ1 },
  749. { "itoff", FP(0x14,0x014), CIX, { RA, ZB, FC } },
  750. { "itoft", FP(0x14,0x024), CIX, { RA, ZB, FC } },
  751. { "sqrtg/c", FP(0x14,0x02A), CIX, ARG_FPZ1 },
  752. { "sqrtt/c", FP(0x14,0x02B), CIX, ARG_FPZ1 },
  753. { "sqrts/m", FP(0x14,0x04B), CIX, ARG_FPZ1 },
  754. { "sqrtt/m", FP(0x14,0x06B), CIX, ARG_FPZ1 },
  755. { "sqrtf", FP(0x14,0x08A), CIX, ARG_FPZ1 },
  756. { "sqrts", FP(0x14,0x08B), CIX, ARG_FPZ1 },
  757. { "sqrtg", FP(0x14,0x0AA), CIX, ARG_FPZ1 },
  758. { "sqrtt", FP(0x14,0x0AB), CIX, ARG_FPZ1 },
  759. { "sqrts/d", FP(0x14,0x0CB), CIX, ARG_FPZ1 },
  760. { "sqrtt/d", FP(0x14,0x0EB), CIX, ARG_FPZ1 },
  761. { "sqrtf/uc", FP(0x14,0x10A), CIX, ARG_FPZ1 },
  762. { "sqrts/uc", FP(0x14,0x10B), CIX, ARG_FPZ1 },
  763. { "sqrtg/uc", FP(0x14,0x12A), CIX, ARG_FPZ1 },
  764. { "sqrtt/uc", FP(0x14,0x12B), CIX, ARG_FPZ1 },
  765. { "sqrts/um", FP(0x14,0x14B), CIX, ARG_FPZ1 },
  766. { "sqrtt/um", FP(0x14,0x16B), CIX, ARG_FPZ1 },
  767. { "sqrtf/u", FP(0x14,0x18A), CIX, ARG_FPZ1 },
  768. { "sqrts/u", FP(0x14,0x18B), CIX, ARG_FPZ1 },
  769. { "sqrtg/u", FP(0x14,0x1AA), CIX, ARG_FPZ1 },
  770. { "sqrtt/u", FP(0x14,0x1AB), CIX, ARG_FPZ1 },
  771. { "sqrts/ud", FP(0x14,0x1CB), CIX, ARG_FPZ1 },
  772. { "sqrtt/ud", FP(0x14,0x1EB), CIX, ARG_FPZ1 },
  773. { "sqrtf/sc", FP(0x14,0x40A), CIX, ARG_FPZ1 },
  774. { "sqrtg/sc", FP(0x14,0x42A), CIX, ARG_FPZ1 },
  775. { "sqrtf/s", FP(0x14,0x48A), CIX, ARG_FPZ1 },
  776. { "sqrtg/s", FP(0x14,0x4AA), CIX, ARG_FPZ1 },
  777. { "sqrtf/suc", FP(0x14,0x50A), CIX, ARG_FPZ1 },
  778. { "sqrts/suc", FP(0x14,0x50B), CIX, ARG_FPZ1 },
  779. { "sqrtg/suc", FP(0x14,0x52A), CIX, ARG_FPZ1 },
  780. { "sqrtt/suc", FP(0x14,0x52B), CIX, ARG_FPZ1 },
  781. { "sqrts/sum", FP(0x14,0x54B), CIX, ARG_FPZ1 },
  782. { "sqrtt/sum", FP(0x14,0x56B), CIX, ARG_FPZ1 },
  783. { "sqrtf/su", FP(0x14,0x58A), CIX, ARG_FPZ1 },
  784. { "sqrts/su", FP(0x14,0x58B), CIX, ARG_FPZ1 },
  785. { "sqrtg/su", FP(0x14,0x5AA), CIX, ARG_FPZ1 },
  786. { "sqrtt/su", FP(0x14,0x5AB), CIX, ARG_FPZ1 },
  787. { "sqrts/sud", FP(0x14,0x5CB), CIX, ARG_FPZ1 },
  788. { "sqrtt/sud", FP(0x14,0x5EB), CIX, ARG_FPZ1 },
  789. { "sqrts/suic", FP(0x14,0x70B), CIX, ARG_FPZ1 },
  790. { "sqrtt/suic", FP(0x14,0x72B), CIX, ARG_FPZ1 },
  791. { "sqrts/suim", FP(0x14,0x74B), CIX, ARG_FPZ1 },
  792. { "sqrtt/suim", FP(0x14,0x76B), CIX, ARG_FPZ1 },
  793. { "sqrts/sui", FP(0x14,0x78B), CIX, ARG_FPZ1 },
  794. { "sqrtt/sui", FP(0x14,0x7AB), CIX, ARG_FPZ1 },
  795. { "sqrts/suid", FP(0x14,0x7CB), CIX, ARG_FPZ1 },
  796. { "sqrtt/suid", FP(0x14,0x7EB), CIX, ARG_FPZ1 },
  797. { "addf/c", FP(0x15,0x000), BASE, ARG_FP },
  798. { "subf/c", FP(0x15,0x001), BASE, ARG_FP },
  799. { "mulf/c", FP(0x15,0x002), BASE, ARG_FP },
  800. { "divf/c", FP(0x15,0x003), BASE, ARG_FP },
  801. { "cvtdg/c", FP(0x15,0x01E), BASE, ARG_FPZ1 },
  802. { "addg/c", FP(0x15,0x020), BASE, ARG_FP },
  803. { "subg/c", FP(0x15,0x021), BASE, ARG_FP },
  804. { "mulg/c", FP(0x15,0x022), BASE, ARG_FP },
  805. { "divg/c", FP(0x15,0x023), BASE, ARG_FP },
  806. { "cvtgf/c", FP(0x15,0x02C), BASE, ARG_FPZ1 },
  807. { "cvtgd/c", FP(0x15,0x02D), BASE, ARG_FPZ1 },
  808. { "cvtgq/c", FP(0x15,0x02F), BASE, ARG_FPZ1 },
  809. { "cvtqf/c", FP(0x15,0x03C), BASE, ARG_FPZ1 },
  810. { "cvtqg/c", FP(0x15,0x03E), BASE, ARG_FPZ1 },
  811. { "addf", FP(0x15,0x080), BASE, ARG_FP },
  812. { "negf", FP(0x15,0x081), BASE, ARG_FPZ1 }, /* pseudo */
  813. { "subf", FP(0x15,0x081), BASE, ARG_FP },
  814. { "mulf", FP(0x15,0x082), BASE, ARG_FP },
  815. { "divf", FP(0x15,0x083), BASE, ARG_FP },
  816. { "cvtdg", FP(0x15,0x09E), BASE, ARG_FPZ1 },
  817. { "addg", FP(0x15,0x0A0), BASE, ARG_FP },
  818. { "negg", FP(0x15,0x0A1), BASE, ARG_FPZ1 }, /* pseudo */
  819. { "subg", FP(0x15,0x0A1), BASE, ARG_FP },
  820. { "mulg", FP(0x15,0x0A2), BASE, ARG_FP },
  821. { "divg", FP(0x15,0x0A3), BASE, ARG_FP },
  822. { "cmpgeq", FP(0x15,0x0A5), BASE, ARG_FP },
  823. { "cmpglt", FP(0x15,0x0A6), BASE, ARG_FP },
  824. { "cmpgle", FP(0x15,0x0A7), BASE, ARG_FP },
  825. { "cvtgf", FP(0x15,0x0AC), BASE, ARG_FPZ1 },
  826. { "cvtgd", FP(0x15,0x0AD), BASE, ARG_FPZ1 },
  827. { "cvtgq", FP(0x15,0x0AF), BASE, ARG_FPZ1 },
  828. { "cvtqf", FP(0x15,0x0BC), BASE, ARG_FPZ1 },
  829. { "cvtqg", FP(0x15,0x0BE), BASE, ARG_FPZ1 },
  830. { "addf/uc", FP(0x15,0x100), BASE, ARG_FP },
  831. { "subf/uc", FP(0x15,0x101), BASE, ARG_FP },
  832. { "mulf/uc", FP(0x15,0x102), BASE, ARG_FP },
  833. { "divf/uc", FP(0x15,0x103), BASE, ARG_FP },
  834. { "cvtdg/uc", FP(0x15,0x11E), BASE, ARG_FPZ1 },
  835. { "addg/uc", FP(0x15,0x120), BASE, ARG_FP },
  836. { "subg/uc", FP(0x15,0x121), BASE, ARG_FP },
  837. { "mulg/uc", FP(0x15,0x122), BASE, ARG_FP },
  838. { "divg/uc", FP(0x15,0x123), BASE, ARG_FP },
  839. { "cvtgf/uc", FP(0x15,0x12C), BASE, ARG_FPZ1 },
  840. { "cvtgd/uc", FP(0x15,0x12D), BASE, ARG_FPZ1 },
  841. { "cvtgq/vc", FP(0x15,0x12F), BASE, ARG_FPZ1 },
  842. { "addf/u", FP(0x15,0x180), BASE, ARG_FP },
  843. { "subf/u", FP(0x15,0x181), BASE, ARG_FP },
  844. { "mulf/u", FP(0x15,0x182), BASE, ARG_FP },
  845. { "divf/u", FP(0x15,0x183), BASE, ARG_FP },
  846. { "cvtdg/u", FP(0x15,0x19E), BASE, ARG_FPZ1 },
  847. { "addg/u", FP(0x15,0x1A0), BASE, ARG_FP },
  848. { "subg/u", FP(0x15,0x1A1), BASE, ARG_FP },
  849. { "mulg/u", FP(0x15,0x1A2), BASE, ARG_FP },
  850. { "divg/u", FP(0x15,0x1A3), BASE, ARG_FP },
  851. { "cvtgf/u", FP(0x15,0x1AC), BASE, ARG_FPZ1 },
  852. { "cvtgd/u", FP(0x15,0x1AD), BASE, ARG_FPZ1 },
  853. { "cvtgq/v", FP(0x15,0x1AF), BASE, ARG_FPZ1 },
  854. { "addf/sc", FP(0x15,0x400), BASE, ARG_FP },
  855. { "subf/sc", FP(0x15,0x401), BASE, ARG_FP },
  856. { "mulf/sc", FP(0x15,0x402), BASE, ARG_FP },
  857. { "divf/sc", FP(0x15,0x403), BASE, ARG_FP },
  858. { "cvtdg/sc", FP(0x15,0x41E), BASE, ARG_FPZ1 },
  859. { "addg/sc", FP(0x15,0x420), BASE, ARG_FP },
  860. { "subg/sc", FP(0x15,0x421), BASE, ARG_FP },
  861. { "mulg/sc", FP(0x15,0x422), BASE, ARG_FP },
  862. { "divg/sc", FP(0x15,0x423), BASE, ARG_FP },
  863. { "cvtgf/sc", FP(0x15,0x42C), BASE, ARG_FPZ1 },
  864. { "cvtgd/sc", FP(0x15,0x42D), BASE, ARG_FPZ1 },
  865. { "cvtgq/sc", FP(0x15,0x42F), BASE, ARG_FPZ1 },
  866. { "addf/s", FP(0x15,0x480), BASE, ARG_FP },
  867. { "negf/s", FP(0x15,0x481), BASE, ARG_FPZ1 }, /* pseudo */
  868. { "subf/s", FP(0x15,0x481), BASE, ARG_FP },
  869. { "mulf/s", FP(0x15,0x482), BASE, ARG_FP },
  870. { "divf/s", FP(0x15,0x483), BASE, ARG_FP },
  871. { "cvtdg/s", FP(0x15,0x49E), BASE, ARG_FPZ1 },
  872. { "addg/s", FP(0x15,0x4A0), BASE, ARG_FP },
  873. { "negg/s", FP(0x15,0x4A1), BASE, ARG_FPZ1 }, /* pseudo */
  874. { "subg/s", FP(0x15,0x4A1), BASE, ARG_FP },
  875. { "mulg/s", FP(0x15,0x4A2), BASE, ARG_FP },
  876. { "divg/s", FP(0x15,0x4A3), BASE, ARG_FP },
  877. { "cmpgeq/s", FP(0x15,0x4A5), BASE, ARG_FP },
  878. { "cmpglt/s", FP(0x15,0x4A6), BASE, ARG_FP },
  879. { "cmpgle/s", FP(0x15,0x4A7), BASE, ARG_FP },
  880. { "cvtgf/s", FP(0x15,0x4AC), BASE, ARG_FPZ1 },
  881. { "cvtgd/s", FP(0x15,0x4AD), BASE, ARG_FPZ1 },
  882. { "cvtgq/s", FP(0x15,0x4AF), BASE, ARG_FPZ1 },
  883. { "addf/suc", FP(0x15,0x500), BASE, ARG_FP },
  884. { "subf/suc", FP(0x15,0x501), BASE, ARG_FP },
  885. { "mulf/suc", FP(0x15,0x502), BASE, ARG_FP },
  886. { "divf/suc", FP(0x15,0x503), BASE, ARG_FP },
  887. { "cvtdg/suc", FP(0x15,0x51E), BASE, ARG_FPZ1 },
  888. { "addg/suc", FP(0x15,0x520), BASE, ARG_FP },
  889. { "subg/suc", FP(0x15,0x521), BASE, ARG_FP },
  890. { "mulg/suc", FP(0x15,0x522), BASE, ARG_FP },
  891. { "divg/suc", FP(0x15,0x523), BASE, ARG_FP },
  892. { "cvtgf/suc", FP(0x15,0x52C), BASE, ARG_FPZ1 },
  893. { "cvtgd/suc", FP(0x15,0x52D), BASE, ARG_FPZ1 },
  894. { "cvtgq/svc", FP(0x15,0x52F), BASE, ARG_FPZ1 },
  895. { "addf/su", FP(0x15,0x580), BASE, ARG_FP },
  896. { "subf/su", FP(0x15,0x581), BASE, ARG_FP },
  897. { "mulf/su", FP(0x15,0x582), BASE, ARG_FP },
  898. { "divf/su", FP(0x15,0x583), BASE, ARG_FP },
  899. { "cvtdg/su", FP(0x15,0x59E), BASE, ARG_FPZ1 },
  900. { "addg/su", FP(0x15,0x5A0), BASE, ARG_FP },
  901. { "subg/su", FP(0x15,0x5A1), BASE, ARG_FP },
  902. { "mulg/su", FP(0x15,0x5A2), BASE, ARG_FP },
  903. { "divg/su", FP(0x15,0x5A3), BASE, ARG_FP },
  904. { "cvtgf/su", FP(0x15,0x5AC), BASE, ARG_FPZ1 },
  905. { "cvtgd/su", FP(0x15,0x5AD), BASE, ARG_FPZ1 },
  906. { "cvtgq/sv", FP(0x15,0x5AF), BASE, ARG_FPZ1 },
  907. { "adds/c", FP(0x16,0x000), BASE, ARG_FP },
  908. { "subs/c", FP(0x16,0x001), BASE, ARG_FP },
  909. { "muls/c", FP(0x16,0x002), BASE, ARG_FP },
  910. { "divs/c", FP(0x16,0x003), BASE, ARG_FP },
  911. { "addt/c", FP(0x16,0x020), BASE, ARG_FP },
  912. { "subt/c", FP(0x16,0x021), BASE, ARG_FP },
  913. { "mult/c", FP(0x16,0x022), BASE, ARG_FP },
  914. { "divt/c", FP(0x16,0x023), BASE, ARG_FP },
  915. { "cvtts/c", FP(0x16,0x02C), BASE, ARG_FPZ1 },
  916. { "cvttq/c", FP(0x16,0x02F), BASE, ARG_FPZ1 },
  917. { "cvtqs/c", FP(0x16,0x03C), BASE, ARG_FPZ1 },
  918. { "cvtqt/c", FP(0x16,0x03E), BASE, ARG_FPZ1 },
  919. { "adds/m", FP(0x16,0x040), BASE, ARG_FP },
  920. { "subs/m", FP(0x16,0x041), BASE, ARG_FP },
  921. { "muls/m", FP(0x16,0x042), BASE, ARG_FP },
  922. { "divs/m", FP(0x16,0x043), BASE, ARG_FP },
  923. { "addt/m", FP(0x16,0x060), BASE, ARG_FP },
  924. { "subt/m", FP(0x16,0x061), BASE, ARG_FP },
  925. { "mult/m", FP(0x16,0x062), BASE, ARG_FP },
  926. { "divt/m", FP(0x16,0x063), BASE, ARG_FP },
  927. { "cvtts/m", FP(0x16,0x06C), BASE, ARG_FPZ1 },
  928. { "cvttq/m", FP(0x16,0x06F), BASE, ARG_FPZ1 },
  929. { "cvtqs/m", FP(0x16,0x07C), BASE, ARG_FPZ1 },
  930. { "cvtqt/m", FP(0x16,0x07E), BASE, ARG_FPZ1 },
  931. { "adds", FP(0x16,0x080), BASE, ARG_FP },
  932. { "negs", FP(0x16,0x081), BASE, ARG_FPZ1 }, /* pseudo */
  933. { "subs", FP(0x16,0x081), BASE, ARG_FP },
  934. { "muls", FP(0x16,0x082), BASE, ARG_FP },
  935. { "divs", FP(0x16,0x083), BASE, ARG_FP },
  936. { "addt", FP(0x16,0x0A0), BASE, ARG_FP },
  937. { "negt", FP(0x16,0x0A1), BASE, ARG_FPZ1 }, /* pseudo */
  938. { "subt", FP(0x16,0x0A1), BASE, ARG_FP },
  939. { "mult", FP(0x16,0x0A2), BASE, ARG_FP },
  940. { "divt", FP(0x16,0x0A3), BASE, ARG_FP },
  941. { "cmptun", FP(0x16,0x0A4), BASE, ARG_FP },
  942. { "cmpteq", FP(0x16,0x0A5), BASE, ARG_FP },
  943. { "cmptlt", FP(0x16,0x0A6), BASE, ARG_FP },
  944. { "cmptle", FP(0x16,0x0A7), BASE, ARG_FP },
  945. { "cvtts", FP(0x16,0x0AC), BASE, ARG_FPZ1 },
  946. { "cvttq", FP(0x16,0x0AF), BASE, ARG_FPZ1 },
  947. { "cvtqs", FP(0x16,0x0BC), BASE, ARG_FPZ1 },
  948. { "cvtqt", FP(0x16,0x0BE), BASE, ARG_FPZ1 },
  949. { "adds/d", FP(0x16,0x0C0), BASE, ARG_FP },
  950. { "subs/d", FP(0x16,0x0C1), BASE, ARG_FP },
  951. { "muls/d", FP(0x16,0x0C2), BASE, ARG_FP },
  952. { "divs/d", FP(0x16,0x0C3), BASE, ARG_FP },
  953. { "addt/d", FP(0x16,0x0E0), BASE, ARG_FP },
  954. { "subt/d", FP(0x16,0x0E1), BASE, ARG_FP },
  955. { "mult/d", FP(0x16,0x0E2), BASE, ARG_FP },
  956. { "divt/d", FP(0x16,0x0E3), BASE, ARG_FP },
  957. { "cvtts/d", FP(0x16,0x0EC), BASE, ARG_FPZ1 },
  958. { "cvttq/d", FP(0x16,0x0EF), BASE, ARG_FPZ1 },
  959. { "cvtqs/d", FP(0x16,0x0FC), BASE, ARG_FPZ1 },
  960. { "cvtqt/d", FP(0x16,0x0FE), BASE, ARG_FPZ1 },
  961. { "adds/uc", FP(0x16,0x100), BASE, ARG_FP },
  962. { "subs/uc", FP(0x16,0x101), BASE, ARG_FP },
  963. { "muls/uc", FP(0x16,0x102), BASE, ARG_FP },
  964. { "divs/uc", FP(0x16,0x103), BASE, ARG_FP },
  965. { "addt/uc", FP(0x16,0x120), BASE, ARG_FP },
  966. { "subt/uc", FP(0x16,0x121), BASE, ARG_FP },
  967. { "mult/uc", FP(0x16,0x122), BASE, ARG_FP },
  968. { "divt/uc", FP(0x16,0x123), BASE, ARG_FP },
  969. { "cvtts/uc", FP(0x16,0x12C), BASE, ARG_FPZ1 },
  970. { "cvttq/vc", FP(0x16,0x12F), BASE, ARG_FPZ1 },
  971. { "adds/um", FP(0x16,0x140), BASE, ARG_FP },
  972. { "subs/um", FP(0x16,0x141), BASE, ARG_FP },
  973. { "muls/um", FP(0x16,0x142), BASE, ARG_FP },
  974. { "divs/um", FP(0x16,0x143), BASE, ARG_FP },
  975. { "addt/um", FP(0x16,0x160), BASE, ARG_FP },
  976. { "subt/um", FP(0x16,0x161), BASE, ARG_FP },
  977. { "mult/um", FP(0x16,0x162), BASE, ARG_FP },
  978. { "divt/um", FP(0x16,0x163), BASE, ARG_FP },
  979. { "cvtts/um", FP(0x16,0x16C), BASE, ARG_FPZ1 },
  980. { "cvttq/vm", FP(0x16,0x16F), BASE, ARG_FPZ1 },
  981. { "adds/u", FP(0x16,0x180), BASE, ARG_FP },
  982. { "subs/u", FP(0x16,0x181), BASE, ARG_FP },
  983. { "muls/u", FP(0x16,0x182), BASE, ARG_FP },
  984. { "divs/u", FP(0x16,0x183), BASE, ARG_FP },
  985. { "addt/u", FP(0x16,0x1A0), BASE, ARG_FP },
  986. { "subt/u", FP(0x16,0x1A1), BASE, ARG_FP },
  987. { "mult/u", FP(0x16,0x1A2), BASE, ARG_FP },
  988. { "divt/u", FP(0x16,0x1A3), BASE, ARG_FP },
  989. { "cvtts/u", FP(0x16,0x1AC), BASE, ARG_FPZ1 },
  990. { "cvttq/v", FP(0x16,0x1AF), BASE, ARG_FPZ1 },
  991. { "adds/ud", FP(0x16,0x1C0), BASE, ARG_FP },
  992. { "subs/ud", FP(0x16,0x1C1), BASE, ARG_FP },
  993. { "muls/ud", FP(0x16,0x1C2), BASE, ARG_FP },
  994. { "divs/ud", FP(0x16,0x1C3), BASE, ARG_FP },
  995. { "addt/ud", FP(0x16,0x1E0), BASE, ARG_FP },
  996. { "subt/ud", FP(0x16,0x1E1), BASE, ARG_FP },
  997. { "mult/ud", FP(0x16,0x1E2), BASE, ARG_FP },
  998. { "divt/ud", FP(0x16,0x1E3), BASE, ARG_FP },
  999. { "cvtts/ud", FP(0x16,0x1EC), BASE, ARG_FPZ1 },
  1000. { "cvttq/vd", FP(0x16,0x1EF), BASE, ARG_FPZ1 },
  1001. { "cvtst", FP(0x16,0x2AC), BASE, ARG_FPZ1 },
  1002. { "adds/suc", FP(0x16,0x500), BASE, ARG_FP },
  1003. { "subs/suc", FP(0x16,0x501), BASE, ARG_FP },
  1004. { "muls/suc", FP(0x16,0x502), BASE, ARG_FP },
  1005. { "divs/suc", FP(0x16,0x503), BASE, ARG_FP },
  1006. { "addt/suc", FP(0x16,0x520), BASE, ARG_FP },
  1007. { "subt/suc", FP(0x16,0x521), BASE, ARG_FP },
  1008. { "mult/suc", FP(0x16,0x522), BASE, ARG_FP },
  1009. { "divt/suc", FP(0x16,0x523), BASE, ARG_FP },
  1010. { "cvtts/suc", FP(0x16,0x52C), BASE, ARG_FPZ1 },
  1011. { "cvttq/svc", FP(0x16,0x52F), BASE, ARG_FPZ1 },
  1012. { "adds/sum", FP(0x16,0x540), BASE, ARG_FP },
  1013. { "subs/sum", FP(0x16,0x541), BASE, ARG_FP },
  1014. { "muls/sum", FP(0x16,0x542), BASE, ARG_FP },
  1015. { "divs/sum", FP(0x16,0x543), BASE, ARG_FP },
  1016. { "addt/sum", FP(0x16,0x560), BASE, ARG_FP },
  1017. { "subt/sum", FP(0x16,0x561), BASE, ARG_FP },
  1018. { "mult/sum", FP(0x16,0x562), BASE, ARG_FP },
  1019. { "divt/sum", FP(0x16,0x563), BASE, ARG_FP },
  1020. { "cvtts/sum", FP(0x16,0x56C), BASE, ARG_FPZ1 },
  1021. { "cvttq/svm", FP(0x16,0x56F), BASE, ARG_FPZ1 },
  1022. { "adds/su", FP(0x16,0x580), BASE, ARG_FP },
  1023. { "negs/su", FP(0x16,0x581), BASE, ARG_FPZ1 }, /* pseudo */
  1024. { "subs/su", FP(0x16,0x581), BASE, ARG_FP },
  1025. { "muls/su", FP(0x16,0x582), BASE, ARG_FP },
  1026. { "divs/su", FP(0x16,0x583), BASE, ARG_FP },
  1027. { "addt/su", FP(0x16,0x5A0), BASE, ARG_FP },
  1028. { "negt/su", FP(0x16,0x5A1), BASE, ARG_FPZ1 }, /* pseudo */
  1029. { "subt/su", FP(0x16,0x5A1), BASE, ARG_FP },
  1030. { "mult/su", FP(0x16,0x5A2), BASE, ARG_FP },
  1031. { "divt/su", FP(0x16,0x5A3), BASE, ARG_FP },
  1032. { "cmptun/su", FP(0x16,0x5A4), BASE, ARG_FP },
  1033. { "cmpteq/su", FP(0x16,0x5A5), BASE, ARG_FP },
  1034. { "cmptlt/su", FP(0x16,0x5A6), BASE, ARG_FP },
  1035. { "cmptle/su", FP(0x16,0x5A7), BASE, ARG_FP },
  1036. { "cvtts/su", FP(0x16,0x5AC), BASE, ARG_FPZ1 },
  1037. { "cvttq/sv", FP(0x16,0x5AF), BASE, ARG_FPZ1 },
  1038. { "adds/sud", FP(0x16,0x5C0), BASE, ARG_FP },
  1039. { "subs/sud", FP(0x16,0x5C1), BASE, ARG_FP },
  1040. { "muls/sud", FP(0x16,0x5C2), BASE, ARG_FP },
  1041. { "divs/sud", FP(0x16,0x5C3), BASE, ARG_FP },
  1042. { "addt/sud", FP(0x16,0x5E0), BASE, ARG_FP },
  1043. { "subt/sud", FP(0x16,0x5E1), BASE, ARG_FP },
  1044. { "mult/sud", FP(0x16,0x5E2), BASE, ARG_FP },
  1045. { "divt/sud", FP(0x16,0x5E3), BASE, ARG_FP },
  1046. { "cvtts/sud", FP(0x16,0x5EC), BASE, ARG_FPZ1 },
  1047. { "cvttq/svd", FP(0x16,0x5EF), BASE, ARG_FPZ1 },
  1048. { "cvtst/s", FP(0x16,0x6AC), BASE, ARG_FPZ1 },
  1049. { "adds/suic", FP(0x16,0x700), BASE, ARG_FP },
  1050. { "subs/suic", FP(0x16,0x701), BASE, ARG_FP },
  1051. { "muls/suic", FP(0x16,0x702), BASE, ARG_FP },
  1052. { "divs/suic", FP(0x16,0x703), BASE, ARG_FP },
  1053. { "addt/suic", FP(0x16,0x720), BASE, ARG_FP },
  1054. { "subt/suic", FP(0x16,0x721), BASE, ARG_FP },
  1055. { "mult/suic", FP(0x16,0x722), BASE, ARG_FP },
  1056. { "divt/suic", FP(0x16,0x723), BASE, ARG_FP },
  1057. { "cvtts/suic", FP(0x16,0x72C), BASE, ARG_FPZ1 },
  1058. { "cvttq/svic", FP(0x16,0x72F), BASE, ARG_FPZ1 },
  1059. { "cvtqs/suic", FP(0x16,0x73C), BASE, ARG_FPZ1 },
  1060. { "cvtqt/suic", FP(0x16,0x73E), BASE, ARG_FPZ1 },
  1061. { "adds/suim", FP(0x16,0x740), BASE, ARG_FP },
  1062. { "subs/suim", FP(0x16,0x741), BASE, ARG_FP },
  1063. { "muls/suim", FP(0x16,0x742), BASE, ARG_FP },
  1064. { "divs/suim", FP(0x16,0x743), BASE, ARG_FP },
  1065. { "addt/suim", FP(0x16,0x760), BASE, ARG_FP },
  1066. { "subt/suim", FP(0x16,0x761), BASE, ARG_FP },
  1067. { "mult/suim", FP(0x16,0x762), BASE, ARG_FP },
  1068. { "divt/suim", FP(0x16,0x763), BASE, ARG_FP },
  1069. { "cvtts/suim", FP(0x16,0x76C), BASE, ARG_FPZ1 },
  1070. { "cvttq/svim", FP(0x16,0x76F), BASE, ARG_FPZ1 },
  1071. { "cvtqs/suim", FP(0x16,0x77C), BASE, ARG_FPZ1 },
  1072. { "cvtqt/suim", FP(0x16,0x77E), BASE, ARG_FPZ1 },
  1073. { "adds/sui", FP(0x16,0x780), BASE, ARG_FP },
  1074. { "negs/sui", FP(0x16,0x781), BASE, ARG_FPZ1 }, /* pseudo */
  1075. { "subs/sui", FP(0x16,0x781), BASE, ARG_FP },
  1076. { "muls/sui", FP(0x16,0x782), BASE, ARG_FP },
  1077. { "divs/sui", FP(0x16,0x783), BASE, ARG_FP },
  1078. { "addt/sui", FP(0x16,0x7A0), BASE, ARG_FP },
  1079. { "negt/sui", FP(0x16,0x7A1), BASE, ARG_FPZ1 }, /* pseudo */
  1080. { "subt/sui", FP(0x16,0x7A1), BASE, ARG_FP },
  1081. { "mult/sui", FP(0x16,0x7A2), BASE, ARG_FP },
  1082. { "divt/sui", FP(0x16,0x7A3), BASE, ARG_FP },
  1083. { "cvtts/sui", FP(0x16,0x7AC), BASE, ARG_FPZ1 },
  1084. { "cvttq/svi", FP(0x16,0x7AF), BASE, ARG_FPZ1 },
  1085. { "cvtqs/sui", FP(0x16,0x7BC), BASE, ARG_FPZ1 },
  1086. { "cvtqt/sui", FP(0x16,0x7BE), BASE, ARG_FPZ1 },
  1087. { "adds/suid", FP(0x16,0x7C0), BASE, ARG_FP },
  1088. { "subs/suid", FP(0x16,0x7C1), BASE, ARG_FP },
  1089. { "muls/suid", FP(0x16,0x7C2), BASE, ARG_FP },
  1090. { "divs/suid", FP(0x16,0x7C3), BASE, ARG_FP },
  1091. { "addt/suid", FP(0x16,0x7E0), BASE, ARG_FP },
  1092. { "subt/suid", FP(0x16,0x7E1), BASE, ARG_FP },
  1093. { "mult/suid", FP(0x16,0x7E2), BASE, ARG_FP },
  1094. { "divt/suid", FP(0x16,0x7E3), BASE, ARG_FP },
  1095. { "cvtts/suid", FP(0x16,0x7EC), BASE, ARG_FPZ1 },
  1096. { "cvttq/svid", FP(0x16,0x7EF), BASE, ARG_FPZ1 },
  1097. { "cvtqs/suid", FP(0x16,0x7FC), BASE, ARG_FPZ1 },
  1098. { "cvtqt/suid", FP(0x16,0x7FE), BASE, ARG_FPZ1 },
  1099. { "cvtlq", FP(0x17,0x010), BASE, ARG_FPZ1 },
  1100. { "fnop", FP(0x17,0x020), BASE, { ZA, ZB, ZC } }, /* pseudo */
  1101. { "fclr", FP(0x17,0x020), BASE, { ZA, ZB, FC } }, /* pseudo */
  1102. { "fabs", FP(0x17,0x020), BASE, ARG_FPZ1 }, /* pseudo */
  1103. { "fmov", FP(0x17,0x020), BASE, { FA, RBA, FC } }, /* pseudo */
  1104. { "cpys", FP(0x17,0x020), BASE, ARG_FP },
  1105. { "fneg", FP(0x17,0x021), BASE, { FA, RBA, FC } }, /* pseudo */
  1106. { "cpysn", FP(0x17,0x021), BASE, ARG_FP },
  1107. { "cpyse", FP(0x17,0x022), BASE, ARG_FP },
  1108. { "mt_fpcr", FP(0x17,0x024), BASE, { FA, RBA, RCA } },
  1109. { "mf_fpcr", FP(0x17,0x025), BASE, { FA, RBA, RCA } },
  1110. { "fcmoveq", FP(0x17,0x02A), BASE, ARG_FP },
  1111. { "fcmovne", FP(0x17,0x02B), BASE, ARG_FP },
  1112. { "fcmovlt", FP(0x17,0x02C), BASE, ARG_FP },
  1113. { "fcmovge", FP(0x17,0x02D), BASE, ARG_FP },
  1114. { "fcmovle", FP(0x17,0x02E), BASE, ARG_FP },
  1115. { "fcmovgt", FP(0x17,0x02F), BASE, ARG_FP },
  1116. { "cvtql", FP(0x17,0x030), BASE, ARG_FPZ1 },
  1117. { "cvtql/v", FP(0x17,0x130), BASE, ARG_FPZ1 },
  1118. { "cvtql/sv", FP(0x17,0x530), BASE, ARG_FPZ1 },
  1119. { "trapb", MFC(0x18,0x0000), BASE, ARG_NONE },
  1120. { "draint", MFC(0x18,0x0000), BASE, ARG_NONE }, /* alias */
  1121. { "excb", MFC(0x18,0x0400), BASE, ARG_NONE },
  1122. { "mb", MFC(0x18,0x4000), BASE, ARG_NONE },
  1123. { "wmb", MFC(0x18,0x4400), BASE, ARG_NONE },
  1124. { "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } },
  1125. { "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } },
  1126. { "rpcc", MFC(0x18,0xC000), BASE, { RA } },
  1127. { "rc", MFC(0x18,0xE000), BASE, { RA } },
  1128. { "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */
  1129. { "rs", MFC(0x18,0xF000), BASE, { RA } },
  1130. { "wh64", MFC(0x18,0xF800), BASE, { ZA, PRB } }, /* ev56 una */
  1131. { "wh64en", MFC(0x18,0xFC00), BASE, { ZA, PRB } }, /* ev7 una */
  1132. { "hw_mfpr", OPR(0x19,0x00), EV4, { RA, RBA, EV4EXTHWINDEX } },
  1133. { "hw_mfpr", OP(0x19), OP_MASK, EV5, { RA, RBA, EV5HWINDEX } },
  1134. { "hw_mfpr", OP(0x19), OP_MASK, EV6, { RA, ZB, EV6HWINDEX } },
  1135. { "hw_mfpr/i", OPR(0x19,0x01), EV4, ARG_EV4HWMPR },
  1136. { "hw_mfpr/a", OPR(0x19,0x02), EV4, ARG_EV4HWMPR },
  1137. { "hw_mfpr/ai", OPR(0x19,0x03), EV4, ARG_EV4HWMPR },
  1138. { "hw_mfpr/p", OPR(0x19,0x04), EV4, ARG_EV4HWMPR },
  1139. { "hw_mfpr/pi", OPR(0x19,0x05), EV4, ARG_EV4HWMPR },
  1140. { "hw_mfpr/pa", OPR(0x19,0x06), EV4, ARG_EV4HWMPR },
  1141. { "hw_mfpr/pai", OPR(0x19,0x07), EV4, ARG_EV4HWMPR },
  1142. { "pal19", PCD(0x19), BASE, ARG_PCD },
  1143. { "jmp", MBR_(0x1A,0), MBR_MASK | 0x3FFF, /* pseudo */
  1144. BASE, { ZA, CPRB } },
  1145. { "jmp", MBR(0x1A,0), BASE, { RA, CPRB, JMPHINT } },
  1146. { "jsr", MBR(0x1A,1), BASE, { RA, CPRB, JMPHINT } },
  1147. { "ret", MBR_(0x1A,2) | (31 << 21) | (26 << 16) | 1,/* pseudo */
  1148. 0xFFFFFFFF, BASE, { 0 } },
  1149. { "ret", MBR(0x1A,2), BASE, { RA, CPRB, RETHINT } },
  1150. { "jcr", MBR(0x1A,3), BASE, { RA, CPRB, RETHINT } }, /* alias */
  1151. { "jsr_coroutine", MBR(0x1A,3), BASE, { RA, CPRB, RETHINT } },
  1152. { "hw_ldl", EV4HWMEM(0x1B,0x0), EV4, ARG_EV4HWMEM },
  1153. { "hw_ldl", EV5HWMEM(0x1B,0x00), EV5, ARG_EV5HWMEM },
  1154. { "hw_ldl", EV6HWMEM(0x1B,0x8), EV6, ARG_EV6HWMEM },
  1155. { "hw_ldl/a", EV4HWMEM(0x1B,0x4), EV4, ARG_EV4HWMEM },
  1156. { "hw_ldl/a", EV5HWMEM(0x1B,0x10), EV5, ARG_EV5HWMEM },
  1157. { "hw_ldl/a", EV6HWMEM(0x1B,0xC), EV6, ARG_EV6HWMEM },
  1158. { "hw_ldl/al", EV5HWMEM(0x1B,0x11), EV5, ARG_EV5HWMEM },
  1159. { "hw_ldl/ar", EV4HWMEM(0x1B,0x6), EV4, ARG_EV4HWMEM },
  1160. { "hw_ldl/av", EV5HWMEM(0x1B,0x12), EV5, ARG_EV5HWMEM },
  1161. { "hw_ldl/avl", EV5HWMEM(0x1B,0x13), EV5, ARG_EV5HWMEM },
  1162. { "hw_ldl/aw", EV5HWMEM(0x1B,0x18), EV5, ARG_EV5HWMEM },
  1163. { "hw_ldl/awl", EV5HWMEM(0x1B,0x19), EV5, ARG_EV5HWMEM },
  1164. { "hw_ldl/awv", EV5HWMEM(0x1B,0x1a), EV5, ARG_EV5HWMEM },
  1165. { "hw_ldl/awvl", EV5HWMEM(0x1B,0x1b), EV5, ARG_EV5HWMEM },
  1166. { "hw_ldl/l", EV5HWMEM(0x1B,0x01), EV5, ARG_EV5HWMEM },
  1167. { "hw_ldl/p", EV4HWMEM(0x1B,0x8), EV4, ARG_EV4HWMEM },
  1168. { "hw_ldl/p", EV5HWMEM(0x1B,0x20), EV5, ARG_EV5HWMEM },
  1169. { "hw_ldl/p", EV6HWMEM(0x1B,0x0), EV6, ARG_EV6HWMEM },
  1170. { "hw_ldl/pa", EV4HWMEM(0x1B,0xC), EV4, ARG_EV4HWMEM },
  1171. { "hw_ldl/pa", EV5HWMEM(0x1B,0x30), EV5, ARG_EV5HWMEM },
  1172. { "hw_ldl/pal", EV5HWMEM(0x1B,0x31), EV5, ARG_EV5HWMEM },
  1173. { "hw_ldl/par", EV4HWMEM(0x1B,0xE), EV4, ARG_EV4HWMEM },
  1174. { "hw_ldl/pav", EV5HWMEM(0x1B,0x32), EV5, ARG_EV5HWMEM },
  1175. { "hw_ldl/pavl", EV5HWMEM(0x1B,0x33), EV5, ARG_EV5HWMEM },
  1176. { "hw_ldl/paw", EV5HWMEM(0x1B,0x38), EV5, ARG_EV5HWMEM },
  1177. { "hw_ldl/pawl", EV5HWMEM(0x1B,0x39), EV5, ARG_EV5HWMEM },
  1178. { "hw_ldl/pawv", EV5HWMEM(0x1B,0x3a), EV5, ARG_EV5HWMEM },
  1179. { "hw_ldl/pawvl", EV5HWMEM(0x1B,0x3b), EV5, ARG_EV5HWMEM },
  1180. { "hw_ldl/pl", EV5HWMEM(0x1B,0x21), EV5, ARG_EV5HWMEM },
  1181. { "hw_ldl/pr", EV4HWMEM(0x1B,0xA), EV4, ARG_EV4HWMEM },
  1182. { "hw_ldl/pv", EV5HWMEM(0x1B,0x22), EV5, ARG_EV5HWMEM },
  1183. { "hw_ldl/pvl", EV5HWMEM(0x1B,0x23), EV5, ARG_EV5HWMEM },
  1184. { "hw_ldl/pw", EV5HWMEM(0x1B,0x28), EV5, ARG_EV5HWMEM },
  1185. { "hw_ldl/pwl", EV5HWMEM(0x1B,0x29), EV5, ARG_EV5HWMEM },
  1186. { "hw_ldl/pwv", EV5HWMEM(0x1B,0x2a), EV5, ARG_EV5HWMEM },
  1187. { "hw_ldl/pwvl", EV5HWMEM(0x1B,0x2b), EV5, ARG_EV5HWMEM },
  1188. { "hw_ldl/r", EV4HWMEM(0x1B,0x2), EV4, ARG_EV4HWMEM },
  1189. { "hw_ldl/v", EV5HWMEM(0x1B,0x02), EV5, ARG_EV5HWMEM },
  1190. { "hw_ldl/v", EV6HWMEM(0x1B,0x4), EV6, ARG_EV6HWMEM },
  1191. { "hw_ldl/vl", EV5HWMEM(0x1B,0x03), EV5, ARG_EV5HWMEM },
  1192. { "hw_ldl/w", EV5HWMEM(0x1B,0x08), EV5, ARG_EV5HWMEM },
  1193. { "hw_ldl/w", EV6HWMEM(0x1B,0xA), EV6, ARG_EV6HWMEM },
  1194. { "hw_ldl/wa", EV6HWMEM(0x1B,0xE), EV6, ARG_EV6HWMEM },
  1195. { "hw_ldl/wl", EV5HWMEM(0x1B,0x09), EV5, ARG_EV5HWMEM },
  1196. { "hw_ldl/wv", EV5HWMEM(0x1B,0x0a), EV5, ARG_EV5HWMEM },
  1197. { "hw_ldl/wvl", EV5HWMEM(0x1B,0x0b), EV5, ARG_EV5HWMEM },
  1198. { "hw_ldl_l", EV5HWMEM(0x1B,0x01), EV5, ARG_EV5HWMEM },
  1199. { "hw_ldl_l/a", EV5HWMEM(0x1B,0x11), EV5, ARG_EV5HWMEM },
  1200. { "hw_ldl_l/av", EV5HWMEM(0x1B,0x13), EV5, ARG_EV5HWMEM },
  1201. { "hw_ldl_l/aw", EV5HWMEM(0x1B,0x19), EV5, ARG_EV5HWMEM },
  1202. { "hw_ldl_l/awv", EV5HWMEM(0x1B,0x1b), EV5, ARG_EV5HWMEM },
  1203. { "hw_ldl_l/p", EV5HWMEM(0x1B,0x21), EV5, ARG_EV5HWMEM },
  1204. { "hw_ldl_l/p", EV6HWMEM(0x1B,0x2), EV6, ARG_EV6HWMEM },
  1205. { "hw_ldl_l/pa", EV5HWMEM(0x1B,0x31), EV5, ARG_EV5HWMEM },
  1206. { "hw_ldl_l/pav", EV5HWMEM(0x1B,0x33), EV5, ARG_EV5HWMEM },
  1207. { "hw_ldl_l/paw", EV5HWMEM(0x1B,0x39), EV5, ARG_EV5HWMEM },
  1208. { "hw_ldl_l/pawv", EV5HWMEM(0x1B,0x3b), EV5, ARG_EV5HWMEM },
  1209. { "hw_ldl_l/pv", EV5HWMEM(0x1B,0x23), EV5, ARG_EV5HWMEM },
  1210. { "hw_ldl_l/pw", EV5HWMEM(0x1B,0x29), EV5, ARG_EV5HWMEM },
  1211. { "hw_ldl_l/pwv", EV5HWMEM(0x1B,0x2b), EV5, ARG_EV5HWMEM },
  1212. { "hw_ldl_l/v", EV5HWMEM(0x1B,0x03), EV5, ARG_EV5HWMEM },
  1213. { "hw_ldl_l/w", EV5HWMEM(0x1B,0x09), EV5, ARG_EV5HWMEM },
  1214. { "hw_ldl_l/wv", EV5HWMEM(0x1B,0x0b), EV5, ARG_EV5HWMEM },
  1215. { "hw_ldq", EV4HWMEM(0x1B,0x1), EV4, ARG_EV4HWMEM },
  1216. { "hw_ldq", EV5HWMEM(0x1B,0x04), EV5, ARG_EV5HWMEM },
  1217. { "hw_ldq", EV6HWMEM(0x1B,0x9), EV6, ARG_EV6HWMEM },
  1218. { "hw_ldq/a", EV4HWMEM(0x1B,0x5), EV4, ARG_EV4HWMEM },
  1219. { "hw_ldq/a", EV5HWMEM(0x1B,0x14), EV5, ARG_EV5HWMEM },
  1220. { "hw_ldq/a", EV6HWMEM(0x1B,0xD), EV6, ARG_EV6HWMEM },
  1221. { "hw_ldq/al", EV5HWMEM(0x1B,0x15), EV5, ARG_EV5HWMEM },
  1222. { "hw_ldq/ar", EV4HWMEM(0x1B,0x7), EV4, ARG_EV4HWMEM },
  1223. { "hw_ldq/av", EV5HWMEM(0x1B,0x16), EV5, ARG_EV5HWMEM },
  1224. { "hw_ldq/avl", EV5HWMEM(0x1B,0x17), EV5, ARG_EV5HWMEM },
  1225. { "hw_ldq/aw", EV5HWMEM(0x1B,0x1c), EV5, ARG_EV5HWMEM },
  1226. { "hw_ldq/awl", EV5HWMEM(0x1B,0x1d), EV5, ARG_EV5HWMEM },
  1227. { "hw_ldq/awv", EV5HWMEM(0x1B,0x1e), EV5, ARG_EV5HWMEM },
  1228. { "hw_ldq/awvl", EV5HWMEM(0x1B,0x1f), EV5, ARG_EV5HWMEM },
  1229. { "hw_ldq/l", EV5HWMEM(0x1B,0x05), EV5, ARG_EV5HWMEM },
  1230. { "hw_ldq/p", EV4HWMEM(0x1B,0x9), EV4, ARG_EV4HWMEM },
  1231. { "hw_ldq/p", EV5HWMEM(0x1B,0x24), EV5, ARG_EV5HWMEM },
  1232. { "hw_ldq/p", EV6HWMEM(0x1B,0x1), EV6, ARG_EV6HWMEM },
  1233. { "hw_ldq/pa", EV4HWMEM(0x1B,0xD), EV4, ARG_EV4HWMEM },
  1234. { "hw_ldq/pa", EV5HWMEM(0x1B,0x34), EV5, ARG_EV5HWMEM },
  1235. { "hw_ldq/pal", EV5HWMEM(0x1B,0x35), EV5, ARG_EV5HWMEM },
  1236. { "hw_ldq/par", EV4HWMEM(0x1B,0xF), EV4, ARG_EV4HWMEM },
  1237. { "hw_ldq/pav", EV5HWMEM(0x1B,0x36), EV5, ARG_EV5HWMEM },
  1238. { "hw_ldq/pavl", EV5HWMEM(0x1B,0x37), EV5, ARG_EV5HWMEM },
  1239. { "hw_ldq/paw", EV5HWMEM(0x1B,0x3c), EV5, ARG_EV5HWMEM },
  1240. { "hw_ldq/pawl", EV5HWMEM(0x1B,0x3d), EV5, ARG_EV5HWMEM },
  1241. { "hw_ldq/pawv", EV5HWMEM(0x1B,0x3e), EV5, ARG_EV5HWMEM },
  1242. { "hw_ldq/pawvl", EV5HWMEM(0x1B,0x3f), EV5, ARG_EV5HWMEM },
  1243. { "hw_ldq/pl", EV5HWMEM(0x1B,0x25), EV5, ARG_EV5HWMEM },
  1244. { "hw_ldq/pr", EV4HWMEM(0x1B,0xB), EV4, ARG_EV4HWMEM },
  1245. { "hw_ldq/pv", EV5HWMEM(0x1B,0x26), EV5, ARG_EV5HWMEM },
  1246. { "hw_ldq/pvl", EV5HWMEM(0x1B,0x27), EV5, ARG_EV5HWMEM },
  1247. { "hw_ldq/pw", EV5HWMEM(0x1B,0x2c), EV5, ARG_EV5HWMEM },
  1248. { "hw_ldq/pwl", EV5HWMEM(0x1B,0x2d), EV5, ARG_EV5HWMEM },
  1249. { "hw_ldq/pwv", EV5HWMEM(0x1B,0x2e), EV5, ARG_EV5HWMEM },
  1250. { "hw_ldq/pwvl", EV5HWMEM(0x1B,0x2f), EV5, ARG_EV5HWMEM },
  1251. { "hw_ldq/r", EV4HWMEM(0x1B,0x3), EV4, ARG_EV4HWMEM },
  1252. { "hw_ldq/v", EV5HWMEM(0x1B,0x06), EV5, ARG_EV5HWMEM },
  1253. { "hw_ldq/v", EV6HWMEM(0x1B,0x5), EV6, ARG_EV6HWMEM },
  1254. { "hw_ldq/vl", EV5HWMEM(0x1B,0x07), EV5, ARG_EV5HWMEM },
  1255. { "hw_ldq/w", EV5HWMEM(0x1B,0x0c), EV5, ARG_EV5HWMEM },
  1256. { "hw_ldq/w", EV6HWMEM(0x1B,0xB), EV6, ARG_EV6HWMEM },
  1257. { "hw_ldq/wa", EV6HWMEM(0x1B,0xF), EV6, ARG_EV6HWMEM },
  1258. { "hw_ldq/wl", EV5HWMEM(0x1B,0x0d), EV5, ARG_EV5HWMEM },
  1259. { "hw_ldq/wv", EV5HWMEM(0x1B,0x0e), EV5, ARG_EV5HWMEM },
  1260. { "hw_ldq/wvl", EV5HWMEM(0x1B,0x0f), EV5, ARG_EV5HWMEM },
  1261. { "hw_ldq_l", EV5HWMEM(0x1B,0x05), EV5, ARG_EV5HWMEM },
  1262. { "hw_ldq_l/a", EV5HWMEM(0x1B,0x15), EV5, ARG_EV5HWMEM },
  1263. { "hw_ldq_l/av", EV5HWMEM(0x1B,0x17), EV5, ARG_EV5HWMEM },
  1264. { "hw_ldq_l/aw", EV5HWMEM(0x1B,0x1d), EV5, ARG_EV5HWMEM },
  1265. { "hw_ldq_l/awv", EV5HWMEM(0x1B,0x1f), EV5, ARG_EV5HWMEM },
  1266. { "hw_ldq_l/p", EV5HWMEM(0x1B,0x25), EV5, ARG_EV5HWMEM },
  1267. { "hw_ldq_l/p", EV6HWMEM(0x1B,0x3), EV6, ARG_EV6HWMEM },
  1268. { "hw_ldq_l/pa", EV5HWMEM(0x1B,0x35), EV5, ARG_EV5HWMEM },
  1269. { "hw_ldq_l/pav", EV5HWMEM(0x1B,0x37), EV5, ARG_EV5HWMEM },
  1270. { "hw_ldq_l/paw", EV5HWMEM(0x1B,0x3d), EV5, ARG_EV5HWMEM },
  1271. { "hw_ldq_l/pawv", EV5HWMEM(0x1B,0x3f), EV5, ARG_EV5HWMEM },
  1272. { "hw_ldq_l/pv", EV5HWMEM(0x1B,0x27), EV5, ARG_EV5HWMEM },
  1273. { "hw_ldq_l/pw", EV5HWMEM(0x1B,0x2d), EV5, ARG_EV5HWMEM },
  1274. { "hw_ldq_l/pwv", EV5HWMEM(0x1B,0x2f), EV5, ARG_EV5HWMEM },
  1275. { "hw_ldq_l/v", EV5HWMEM(0x1B,0x07), EV5, ARG_EV5HWMEM },
  1276. { "hw_ldq_l/w", EV5HWMEM(0x1B,0x0d), EV5, ARG_EV5HWMEM },
  1277. { "hw_ldq_l/wv", EV5HWMEM(0x1B,0x0f), EV5, ARG_EV5HWMEM },
  1278. { "hw_ld", EV4HWMEM(0x1B,0x0), EV4, ARG_EV4HWMEM },
  1279. { "hw_ld", EV5HWMEM(0x1B,0x00), EV5, ARG_EV5HWMEM },
  1280. { "hw_ld/a", EV4HWMEM(0x1B,0x4), EV4, ARG_EV4HWMEM },
  1281. { "hw_ld/a", EV5HWMEM(0x1B,0x10), EV5, ARG_EV5HWMEM },
  1282. { "hw_ld/al", EV5HWMEM(0x1B,0x11), EV5, ARG_EV5HWMEM },
  1283. { "hw_ld/aq", EV4HWMEM(0x1B,0x5), EV4, ARG_EV4HWMEM },
  1284. { "hw_ld/aq", EV5HWMEM(0x1B,0x14), EV5, ARG_EV5HWMEM },
  1285. { "hw_ld/aql", EV5HWMEM(0x1B,0x15), EV5, ARG_EV5HWMEM },
  1286. { "hw_ld/aqv", EV5HWMEM(0x1B,0x16), EV5, ARG_EV5HWMEM },
  1287. { "hw_ld/aqvl", EV5HWMEM(0x1B,0x17), EV5, ARG_EV5HWMEM },
  1288. { "hw_ld/ar", EV4HWMEM(0x1B,0x6), EV4, ARG_EV4HWMEM },
  1289. { "hw_ld/arq", EV4HWMEM(0x1B,0x7), EV4, ARG_EV4HWMEM },
  1290. { "hw_ld/av", EV5HWMEM(0x1B,0x12), EV5, ARG_EV5HWMEM },
  1291. { "hw_ld/avl", EV5HWMEM(0x1B,0x13), EV5, ARG_EV5HWMEM },
  1292. { "hw_ld/aw", EV5HWMEM(0x1B,0x18), EV5, ARG_EV5HWMEM },
  1293. { "hw_ld/awl", EV5HWMEM(0x1B,0x19), EV5, ARG_EV5HWMEM },
  1294. { "hw_ld/awq", EV5HWMEM(0x1B,0x1c), EV5, ARG_EV5HWMEM },
  1295. { "hw_ld/awql", EV5HWMEM(0x1B,0x1d), EV5, ARG_EV5HWMEM },
  1296. { "hw_ld/awqv", EV5HWMEM(0x1B,0x1e), EV5, ARG_EV5HWMEM },
  1297. { "hw_ld/awqvl", EV5HWMEM(0x1B,0x1f), EV5, ARG_EV5HWMEM },
  1298. { "hw_ld/awv", EV5HWMEM(0x1B,0x1a), EV5, ARG_EV5HWMEM },
  1299. { "hw_ld/awvl", EV5HWMEM(0x1B,0x1b), EV5, ARG_EV5HWMEM },
  1300. { "hw_ld/l", EV5HWMEM(0x1B,0x01), EV5, ARG_EV5HWMEM },
  1301. { "hw_ld/p", EV4HWMEM(0x1B,0x8), EV4, ARG_EV4HWMEM },
  1302. { "hw_ld/p", EV5HWMEM(0x1B,0x20), EV5, ARG_EV5HWMEM },
  1303. { "hw_ld/pa", EV4HWMEM(0x1B,0xC), EV4, ARG_EV4HWMEM },
  1304. { "hw_ld/pa", EV5HWMEM(0x1B,0x30), EV5, ARG_EV5HWMEM },
  1305. { "hw_ld/pal", EV5HWMEM(0x1B,0x31), EV5, ARG_EV5HWMEM },
  1306. { "hw_ld/paq", EV4HWMEM(0x1B,0xD), EV4, ARG_EV4HWMEM },
  1307. { "hw_ld/paq", EV5HWMEM(0x1B,0x34), EV5, ARG_EV5HWMEM },
  1308. { "hw_ld/paql", EV5HWMEM(0x1B,0x35), EV5, ARG_EV5HWMEM },
  1309. { "hw_ld/paqv", EV5HWMEM(0x1B,0x36), EV5, ARG_EV5HWMEM },
  1310. { "hw_ld/paqvl", EV5HWMEM(0x1B,0x37), EV5, ARG_EV5HWMEM },
  1311. { "hw_ld/par", EV4HWMEM(0x1B,0xE), EV4, ARG_EV4HWMEM },
  1312. { "hw_ld/parq", EV4HWMEM(0x1B,0xF), EV4, ARG_EV4HWMEM },
  1313. { "hw_ld/pav", EV5HWMEM(0x1B,0x32), EV5, ARG_EV5HWMEM },
  1314. { "hw_ld/pavl", EV5HWMEM(0x1B,0x33), EV5, ARG_EV5HWMEM },
  1315. { "hw_ld/paw", EV5HWMEM(0x1B,0x38), EV5, ARG_EV5HWMEM },
  1316. { "hw_ld/pawl", EV5HWMEM(0x1B,0x39), EV5, ARG_EV5HWMEM },
  1317. { "hw_ld/pawq", EV5HWMEM(0x1B,0x3c), EV5, ARG_EV5HWMEM },
  1318. { "hw_ld/pawql", EV5HWMEM(0x1B,0x3d), EV5, ARG_EV5HWMEM },
  1319. { "hw_ld/pawqv", EV5HWMEM(0x1B,0x3e), EV5, ARG_EV5HWMEM },
  1320. { "hw_ld/pawqvl", EV5HWMEM(0x1B,0x3f), EV5, ARG_EV5HWMEM },
  1321. { "hw_ld/pawv", EV5HWMEM(0x1B,0x3a), EV5, ARG_EV5HWMEM },
  1322. { "hw_ld/pawvl", EV5HWMEM(0x1B,0x3b), EV5, ARG_EV5HWMEM },
  1323. { "hw_ld/pl", EV5HWMEM(0x1B,0x21), EV5, ARG_EV5HWMEM },
  1324. { "hw_ld/pq", EV4HWMEM(0x1B,0x9), EV4, ARG_EV4HWMEM },
  1325. { "hw_ld/pq", EV5HWMEM(0x1B,0x24), EV5, ARG_EV5HWMEM },
  1326. { "hw_ld/pql", EV5HWMEM(0x1B,0x25), EV5, ARG_EV5HWMEM },
  1327. { "hw_ld/pqv", EV5HWMEM(0x1B,0x26), EV5, ARG_EV5HWMEM },
  1328. { "hw_ld/pqvl", EV5HWMEM(0x1B,0x27), EV5, ARG_EV5HWMEM },
  1329. { "hw_ld/pr", EV4HWMEM(0x1B,0xA), EV4, ARG_EV4HWMEM },
  1330. { "hw_ld/prq", EV4HWMEM(0x1B,0xB), EV4, ARG_EV4HWMEM },
  1331. { "hw_ld/pv", EV5HWMEM(0x1B,0x22), EV5, ARG_EV5HWMEM },
  1332. { "hw_ld/pvl", EV5HWMEM(0x1B,0x23), EV5, ARG_EV5HWMEM },
  1333. { "hw_ld/pw", EV5HWMEM(0x1B,0x28), EV5, ARG_EV5HWMEM },
  1334. { "hw_ld/pwl", EV5HWMEM(0x1B,0x29), EV5, ARG_EV5HWMEM },
  1335. { "hw_ld/pwq", EV5HWMEM(0x1B,0x2c), EV5, ARG_EV5HWMEM },
  1336. { "hw_ld/pwql", EV5HWMEM(0x1B,0x2d), EV5, ARG_EV5HWMEM },
  1337. { "hw_ld/pwqv", EV5HWMEM(0x1B,0x2e), EV5, ARG_EV5HWMEM },
  1338. { "hw_ld/pwqvl", EV5HWMEM(0x1B,0x2f), EV5, ARG_EV5HWMEM },
  1339. { "hw_ld/pwv", EV5HWMEM(0x1B,0x2a), EV5, ARG_EV5HWMEM },
  1340. { "hw_ld/pwvl", EV5HWMEM(0x1B,0x2b), EV5, ARG_EV5HWMEM },
  1341. { "hw_ld/q", EV4HWMEM(0x1B,0x1), EV4, ARG_EV4HWMEM },
  1342. { "hw_ld/q", EV5HWMEM(0x1B,0x04), EV5, ARG_EV5HWMEM },
  1343. { "hw_ld/ql", EV5HWMEM(0x1B,0x05), EV5, ARG_EV5HWMEM },
  1344. { "hw_ld/qv", EV5HWMEM(0x1B,0x06), EV5, ARG_EV5HWMEM },
  1345. { "hw_ld/qvl", EV5HWMEM(0x1B,0x07), EV5, ARG_EV5HWMEM },
  1346. { "hw_ld/r", EV4HWMEM(0x1B,0x2), EV4, ARG_EV4HWMEM },
  1347. { "hw_ld/rq", EV4HWMEM(0x1B,0x3), EV4, ARG_EV4HWMEM },
  1348. { "hw_ld/v", EV5HWMEM(0x1B,0x02), EV5, ARG_EV5HWMEM },
  1349. { "hw_ld/vl", EV5HWMEM(0x1B,0x03), EV5, ARG_EV5HWMEM },
  1350. { "hw_ld/w", EV5HWMEM(0x1B,0x08), EV5, ARG_EV5HWMEM },
  1351. { "hw_ld/wl", EV5HWMEM(0x1B,0x09), EV5, ARG_EV5HWMEM },
  1352. { "hw_ld/wq", EV5HWMEM(0x1B,0x0c), EV5, ARG_EV5HWMEM },
  1353. { "hw_ld/wql", EV5HWMEM(0x1B,0x0d), EV5, ARG_EV5HWMEM },
  1354. { "hw_ld/wqv", EV5HWMEM(0x1B,0x0e), EV5, ARG_EV5HWMEM },
  1355. { "hw_ld/wqvl", EV5HWMEM(0x1B,0x0f), EV5, ARG_EV5HWMEM },
  1356. { "hw_ld/wv", EV5HWMEM(0x1B,0x0a), EV5, ARG_EV5HWMEM },
  1357. { "hw_ld/wvl", EV5HWMEM(0x1B,0x0b), EV5, ARG_EV5HWMEM },
  1358. { "pal1b", PCD(0x1B), BASE, ARG_PCD },
  1359. { "sextb", OPR(0x1C, 0x00), BWX, ARG_OPRZ1 },
  1360. { "sextw", OPR(0x1C, 0x01), BWX, ARG_OPRZ1 },
  1361. { "ctpop", OPR(0x1C, 0x30), CIX, ARG_OPRZ1 },
  1362. { "perr", OPR(0x1C, 0x31), MAX, ARG_OPR },
  1363. { "ctlz", OPR(0x1C, 0x32), CIX, ARG_OPRZ1 },
  1364. { "cttz", OPR(0x1C, 0x33), CIX, ARG_OPRZ1 },
  1365. { "unpkbw", OPR(0x1C, 0x34), MAX, ARG_OPRZ1 },
  1366. { "unpkbl", OPR(0x1C, 0x35), MAX, ARG_OPRZ1 },
  1367. { "pkwb", OPR(0x1C, 0x36), MAX, ARG_OPRZ1 },
  1368. { "pklb", OPR(0x1C, 0x37), MAX, ARG_OPRZ1 },
  1369. { "minsb8", OPR(0x1C, 0x38), MAX, ARG_OPR },
  1370. { "minsb8", OPRL(0x1C, 0x38), MAX, ARG_OPRL },
  1371. { "minsw4", OPR(0x1C, 0x39), MAX, ARG_OPR },
  1372. { "minsw4", OPRL(0x1C, 0x39), MAX, ARG_OPRL },
  1373. { "minub8", OPR(0x1C, 0x3A), MAX, ARG_OPR },
  1374. { "minub8", OPRL(0x1C, 0x3A), MAX, ARG_OPRL },
  1375. { "minuw4", OPR(0x1C, 0x3B), MAX, ARG_OPR },
  1376. { "minuw4", OPRL(0x1C, 0x3B), MAX, ARG_OPRL },
  1377. { "maxub8", OPR(0x1C, 0x3C), MAX, ARG_OPR },
  1378. { "maxub8", OPRL(0x1C, 0x3C), MAX, ARG_OPRL },
  1379. { "maxuw4", OPR(0x1C, 0x3D), MAX, ARG_OPR },
  1380. { "maxuw4", OPRL(0x1C, 0x3D), MAX, ARG_OPRL },
  1381. { "maxsb8", OPR(0x1C, 0x3E), MAX, ARG_OPR },
  1382. { "maxsb8", OPRL(0x1C, 0x3E), MAX, ARG_OPRL },
  1383. { "maxsw4", OPR(0x1C, 0x3F), MAX, ARG_OPR },
  1384. { "maxsw4", OPRL(0x1C, 0x3F), MAX, ARG_OPRL },
  1385. { "ftoit", FP(0x1C, 0x70), CIX, { FA, ZB, RC } },
  1386. { "ftois", FP(0x1C, 0x78), CIX, { FA, ZB, RC } },
  1387. { "hw_mtpr", OPR(0x1D,0x00), EV4, { RA, RBA, EV4EXTHWINDEX } },
  1388. { "hw_mtpr", OP(0x1D), OP_MASK, EV5, { RA, RBA, EV5HWINDEX } },
  1389. { "hw_mtpr", OP(0x1D), OP_MASK, EV6, { ZA, RB, EV6HWINDEX } },
  1390. { "hw_mtpr/i", OPR(0x1D,0x01), EV4, ARG_EV4HWMPR },
  1391. { "hw_mtpr/a", OPR(0x1D,0x02), EV4, ARG_EV4HWMPR },
  1392. { "hw_mtpr/ai", OPR(0x1D,0x03), EV4, ARG_EV4HWMPR },
  1393. { "hw_mtpr/p", OPR(0x1D,0x04), EV4, ARG_EV4HWMPR },
  1394. { "hw_mtpr/pi", OPR(0x1D,0x05), EV4, ARG_EV4HWMPR },
  1395. { "hw_mtpr/pa", OPR(0x1D,0x06), EV4, ARG_EV4HWMPR },
  1396. { "hw_mtpr/pai", OPR(0x1D,0x07), EV4, ARG_EV4HWMPR },
  1397. { "pal1d", PCD(0x1D), BASE, ARG_PCD },
  1398. { "hw_rei", SPCD(0x1E,0x3FF8000), EV4|EV5, ARG_NONE },
  1399. { "hw_rei_stall", SPCD(0x1E,0x3FFC000), EV5, ARG_NONE },
  1400. { "hw_jmp", EV6HWMBR(0x1E,0x0), EV6, { ZA, PRB, EV6HWJMPHINT } },
  1401. { "hw_jsr", EV6HWMBR(0x1E,0x2), EV6, { ZA, PRB, EV6HWJMPHINT } },
  1402. { "hw_ret", EV6HWMBR(0x1E,0x4), EV6, { ZA, PRB } },
  1403. { "hw_jcr", EV6HWMBR(0x1E,0x6), EV6, { ZA, PRB } },
  1404. { "hw_coroutine", EV6HWMBR(0x1E,0x6), EV6, { ZA, PRB } }, /* alias */
  1405. { "hw_jmp/stall", EV6HWMBR(0x1E,0x1), EV6, { ZA, PRB, EV6HWJMPHINT } },
  1406. { "hw_jsr/stall", EV6HWMBR(0x1E,0x3), EV6, { ZA, PRB, EV6HWJMPHINT } },
  1407. { "hw_ret/stall", EV6HWMBR(0x1E,0x5), EV6, { ZA, PRB } },
  1408. { "hw_jcr/stall", EV6HWMBR(0x1E,0x7), EV6, { ZA, PRB } },
  1409. { "hw_coroutine/stall", EV6HWMBR(0x1E,0x7), EV6, { ZA, PRB } }, /* alias */
  1410. { "pal1e", PCD(0x1E), BASE, ARG_PCD },
  1411. { "hw_stl", EV4HWMEM(0x1F,0x0), EV4, ARG_EV4HWMEM },
  1412. { "hw_stl", EV5HWMEM(0x1F,0x00), EV5, ARG_EV5HWMEM },
  1413. { "hw_stl", EV6HWMEM(0x1F,0x4), EV6, ARG_EV6HWMEM }, /* ??? 8 */
  1414. { "hw_stl/a", EV4HWMEM(0x1F,0x4), EV4, ARG_EV4HWMEM },
  1415. { "hw_stl/a", EV5HWMEM(0x1F,0x10), EV5, ARG_EV5HWMEM },
  1416. { "hw_stl/a", EV6HWMEM(0x1F,0xC), EV6, ARG_EV6HWMEM },
  1417. { "hw_stl/ac", EV5HWMEM(0x1F,0x11), EV5, ARG_EV5HWMEM },
  1418. { "hw_stl/ar", EV4HWMEM(0x1F,0x6), EV4, ARG_EV4HWMEM },
  1419. { "hw_stl/av", EV5HWMEM(0x1F,0x12), EV5, ARG_EV5HWMEM },
  1420. { "hw_stl/avc", EV5HWMEM(0x1F,0x13), EV5, ARG_EV5HWMEM },
  1421. { "hw_stl/c", EV5HWMEM(0x1F,0x01), EV5, ARG_EV5HWMEM },
  1422. { "hw_stl/p", EV4HWMEM(0x1F,0x8), EV4, ARG_EV4HWMEM },
  1423. { "hw_stl/p", EV5HWMEM(0x1F,0x20), EV5, ARG_EV5HWMEM },
  1424. { "hw_stl/p", EV6HWMEM(0x1F,0x0), EV6, ARG_EV6HWMEM },
  1425. { "hw_stl/pa", EV4HWMEM(0x1F,0xC), EV4, ARG_EV4HWMEM },
  1426. { "hw_stl/pa", EV5HWMEM(0x1F,0x30), EV5, ARG_EV5HWMEM },
  1427. { "hw_stl/pac", EV5HWMEM(0x1F,0x31), EV5, ARG_EV5HWMEM },
  1428. { "hw_stl/pav", EV5HWMEM(0x1F,0x32), EV5, ARG_EV5HWMEM },
  1429. { "hw_stl/pavc", EV5HWMEM(0x1F,0x33), EV5, ARG_EV5HWMEM },
  1430. { "hw_stl/pc", EV5HWMEM(0x1F,0x21), EV5, ARG_EV5HWMEM },
  1431. { "hw_stl/pr", EV4HWMEM(0x1F,0xA), EV4, ARG_EV4HWMEM },
  1432. { "hw_stl/pv", EV5HWMEM(0x1F,0x22), EV5, ARG_EV5HWMEM },
  1433. { "hw_stl/pvc", EV5HWMEM(0x1F,0x23), EV5, ARG_EV5HWMEM },
  1434. { "hw_stl/r", EV4HWMEM(0x1F,0x2), EV4, ARG_EV4HWMEM },
  1435. { "hw_stl/v", EV5HWMEM(0x1F,0x02), EV5, ARG_EV5HWMEM },
  1436. { "hw_stl/vc", EV5HWMEM(0x1F,0x03), EV5, ARG_EV5HWMEM },
  1437. { "hw_stl_c", EV5HWMEM(0x1F,0x01), EV5, ARG_EV5HWMEM },
  1438. { "hw_stl_c/a", EV5HWMEM(0x1F,0x11), EV5, ARG_EV5HWMEM },
  1439. { "hw_stl_c/av", EV5HWMEM(0x1F,0x13), EV5, ARG_EV5HWMEM },
  1440. { "hw_stl_c/p", EV5HWMEM(0x1F,0x21), EV5, ARG_EV5HWMEM },
  1441. { "hw_stl_c/p", EV6HWMEM(0x1F,0x2), EV6, ARG_EV6HWMEM },
  1442. { "hw_stl_c/pa", EV5HWMEM(0x1F,0x31), EV5, ARG_EV5HWMEM },
  1443. { "hw_stl_c/pav", EV5HWMEM(0x1F,0x33), EV5, ARG_EV5HWMEM },
  1444. { "hw_stl_c/pv", EV5HWMEM(0x1F,0x23), EV5, ARG_EV5HWMEM },
  1445. { "hw_stl_c/v", EV5HWMEM(0x1F,0x03), EV5, ARG_EV5HWMEM },
  1446. { "hw_stq", EV4HWMEM(0x1F,0x1), EV4, ARG_EV4HWMEM },
  1447. { "hw_stq", EV5HWMEM(0x1F,0x04), EV5, ARG_EV5HWMEM },
  1448. { "hw_stq", EV6HWMEM(0x1F,0x5), EV6, ARG_EV6HWMEM }, /* ??? 9 */
  1449. { "hw_stq/a", EV4HWMEM(0x1F,0x5), EV4, ARG_EV4HWMEM },
  1450. { "hw_stq/a", EV5HWMEM(0x1F,0x14), EV5, ARG_EV5HWMEM },
  1451. { "hw_stq/a", EV6HWMEM(0x1F,0xD), EV6, ARG_EV6HWMEM },
  1452. { "hw_stq/ac", EV5HWMEM(0x1F,0x15), EV5, ARG_EV5HWMEM },
  1453. { "hw_stq/ar", EV4HWMEM(0x1F,0x7), EV4, ARG_EV4HWMEM },
  1454. { "hw_stq/av", EV5HWMEM(0x1F,0x16), EV5, ARG_EV5HWMEM },
  1455. { "hw_stq/avc", EV5HWMEM(0x1F,0x17), EV5, ARG_EV5HWMEM },
  1456. { "hw_stq/c", EV5HWMEM(0x1F,0x05), EV5, ARG_EV5HWMEM },
  1457. { "hw_stq/p", EV4HWMEM(0x1F,0x9), EV4, ARG_EV4HWMEM },
  1458. { "hw_stq/p", EV5HWMEM(0x1F,0x24), EV5, ARG_EV5HWMEM },
  1459. { "hw_stq/p", EV6HWMEM(0x1F,0x1), EV6, ARG_EV6HWMEM },
  1460. { "hw_stq/pa", EV4HWMEM(0x1F,0xD), EV4, ARG_EV4HWMEM },
  1461. { "hw_stq/pa", EV5HWMEM(0x1F,0x34), EV5, ARG_EV5HWMEM },
  1462. { "hw_stq/pac", EV5HWMEM(0x1F,0x35), EV5, ARG_EV5HWMEM },
  1463. { "hw_stq/par", EV4HWMEM(0x1F,0xE), EV4, ARG_EV4HWMEM },
  1464. { "hw_stq/par", EV4HWMEM(0x1F,0xF), EV4, ARG_EV4HWMEM },
  1465. { "hw_stq/pav", EV5HWMEM(0x1F,0x36), EV5, ARG_EV5HWMEM },
  1466. { "hw_stq/pavc", EV5HWMEM(0x1F,0x37), EV5, ARG_EV5HWMEM },
  1467. { "hw_stq/pc", EV5HWMEM(0x1F,0x25), EV5, ARG_EV5HWMEM },
  1468. { "hw_stq/pr", EV4HWMEM(0x1F,0xB), EV4, ARG_EV4HWMEM },
  1469. { "hw_stq/pv", EV5HWMEM(0x1F,0x26), EV5, ARG_EV5HWMEM },
  1470. { "hw_stq/pvc", EV5HWMEM(0x1F,0x27), EV5, ARG_EV5HWMEM },
  1471. { "hw_stq/r", EV4HWMEM(0x1F,0x3), EV4, ARG_EV4HWMEM },
  1472. { "hw_stq/v", EV5HWMEM(0x1F,0x06), EV5, ARG_EV5HWMEM },
  1473. { "hw_stq/vc", EV5HWMEM(0x1F,0x07), EV5, ARG_EV5HWMEM },
  1474. { "hw_stq_c", EV5HWMEM(0x1F,0x05), EV5, ARG_EV5HWMEM },
  1475. { "hw_stq_c/a", EV5HWMEM(0x1F,0x15), EV5, ARG_EV5HWMEM },
  1476. { "hw_stq_c/av", EV5HWMEM(0x1F,0x17), EV5, ARG_EV5HWMEM },
  1477. { "hw_stq_c/p", EV5HWMEM(0x1F,0x25), EV5, ARG_EV5HWMEM },
  1478. { "hw_stq_c/p", EV6HWMEM(0x1F,0x3), EV6, ARG_EV6HWMEM },
  1479. { "hw_stq_c/pa", EV5HWMEM(0x1F,0x35), EV5, ARG_EV5HWMEM },
  1480. { "hw_stq_c/pav", EV5HWMEM(0x1F,0x37), EV5, ARG_EV5HWMEM },
  1481. { "hw_stq_c/pv", EV5HWMEM(0x1F,0x27), EV5, ARG_EV5HWMEM },
  1482. { "hw_stq_c/v", EV5HWMEM(0x1F,0x07), EV5, ARG_EV5HWMEM },
  1483. { "hw_st", EV4HWMEM(0x1F,0x0), EV4, ARG_EV4HWMEM },
  1484. { "hw_st", EV5HWMEM(0x1F,0x00), EV5, ARG_EV5HWMEM },
  1485. { "hw_st/a", EV4HWMEM(0x1F,0x4), EV4, ARG_EV4HWMEM },
  1486. { "hw_st/a", EV5HWMEM(0x1F,0x10), EV5, ARG_EV5HWMEM },
  1487. { "hw_st/ac", EV5HWMEM(0x1F,0x11), EV5, ARG_EV5HWMEM },
  1488. { "hw_st/aq", EV4HWMEM(0x1F,0x5), EV4, ARG_EV4HWMEM },
  1489. { "hw_st/aq", EV5HWMEM(0x1F,0x14), EV5, ARG_EV5HWMEM },
  1490. { "hw_st/aqc", EV5HWMEM(0x1F,0x15), EV5, ARG_EV5HWMEM },
  1491. { "hw_st/aqv", EV5HWMEM(0x1F,0x16), EV5, ARG_EV5HWMEM },
  1492. { "hw_st/aqvc", EV5HWMEM(0x1F,0x17), EV5, ARG_EV5HWMEM },
  1493. { "hw_st/ar", EV4HWMEM(0x1F,0x6), EV4, ARG_EV4HWMEM },
  1494. { "hw_st/arq", EV4HWMEM(0x1F,0x7), EV4, ARG_EV4HWMEM },
  1495. { "hw_st/av", EV5HWMEM(0x1F,0x12), EV5, ARG_EV5HWMEM },
  1496. { "hw_st/avc", EV5HWMEM(0x1F,0x13), EV5, ARG_EV5HWMEM },
  1497. { "hw_st/c", EV5HWMEM(0x1F,0x01), EV5, ARG_EV5HWMEM },
  1498. { "hw_st/p", EV4HWMEM(0x1F,0x8), EV4, ARG_EV4HWMEM },
  1499. { "hw_st/p", EV5HWMEM(0x1F,0x20), EV5, ARG_EV5HWMEM },
  1500. { "hw_st/pa", EV4HWMEM(0x1F,0xC), EV4, ARG_EV4HWMEM },
  1501. { "hw_st/pa", EV5HWMEM(0x1F,0x30), EV5, ARG_EV5HWMEM },
  1502. { "hw_st/pac", EV5HWMEM(0x1F,0x31), EV5, ARG_EV5HWMEM },
  1503. { "hw_st/paq", EV4HWMEM(0x1F,0xD), EV4, ARG_EV4HWMEM },
  1504. { "hw_st/paq", EV5HWMEM(0x1F,0x34), EV5, ARG_EV5HWMEM },
  1505. { "hw_st/paqc", EV5HWMEM(0x1F,0x35), EV5, ARG_EV5HWMEM },
  1506. { "hw_st/paqv", EV5HWMEM(0x1F,0x36), EV5, ARG_EV5HWMEM },
  1507. { "hw_st/paqvc", EV5HWMEM(0x1F,0x37), EV5, ARG_EV5HWMEM },
  1508. { "hw_st/par", EV4HWMEM(0x1F,0xE), EV4, ARG_EV4HWMEM },
  1509. { "hw_st/parq", EV4HWMEM(0x1F,0xF), EV4, ARG_EV4HWMEM },
  1510. { "hw_st/pav", EV5HWMEM(0x1F,0x32), EV5, ARG_EV5HWMEM },
  1511. { "hw_st/pavc", EV5HWMEM(0x1F,0x33), EV5, ARG_EV5HWMEM },
  1512. { "hw_st/pc", EV5HWMEM(0x1F,0x21), EV5, ARG_EV5HWMEM },
  1513. { "hw_st/pq", EV4HWMEM(0x1F,0x9), EV4, ARG_EV4HWMEM },
  1514. { "hw_st/pq", EV5HWMEM(0x1F,0x24), EV5, ARG_EV5HWMEM },
  1515. { "hw_st/pqc", EV5HWMEM(0x1F,0x25), EV5, ARG_EV5HWMEM },
  1516. { "hw_st/pqv", EV5HWMEM(0x1F,0x26), EV5, ARG_EV5HWMEM },
  1517. { "hw_st/pqvc", EV5HWMEM(0x1F,0x27), EV5, ARG_EV5HWMEM },
  1518. { "hw_st/pr", EV4HWMEM(0x1F,0xA), EV4, ARG_EV4HWMEM },
  1519. { "hw_st/prq", EV4HWMEM(0x1F,0xB), EV4, ARG_EV4HWMEM },
  1520. { "hw_st/pv", EV5HWMEM(0x1F,0x22), EV5, ARG_EV5HWMEM },
  1521. { "hw_st/pvc", EV5HWMEM(0x1F,0x23), EV5, ARG_EV5HWMEM },
  1522. { "hw_st/q", EV4HWMEM(0x1F,0x1), EV4, ARG_EV4HWMEM },
  1523. { "hw_st/q", EV5HWMEM(0x1F,0x04), EV5, ARG_EV5HWMEM },
  1524. { "hw_st/qc", EV5HWMEM(0x1F,0x05), EV5, ARG_EV5HWMEM },
  1525. { "hw_st/qv", EV5HWMEM(0x1F,0x06), EV5, ARG_EV5HWMEM },
  1526. { "hw_st/qvc", EV5HWMEM(0x1F,0x07), EV5, ARG_EV5HWMEM },
  1527. { "hw_st/r", EV4HWMEM(0x1F,0x2), EV4, ARG_EV4HWMEM },
  1528. { "hw_st/v", EV5HWMEM(0x1F,0x02), EV5, ARG_EV5HWMEM },
  1529. { "hw_st/vc", EV5HWMEM(0x1F,0x03), EV5, ARG_EV5HWMEM },
  1530. { "pal1f", PCD(0x1F), BASE, ARG_PCD },
  1531. { "ldf", MEM(0x20), BASE, ARG_FMEM },
  1532. { "ldg", MEM(0x21), BASE, ARG_FMEM },
  1533. { "lds", MEM(0x22), BASE, ARG_FMEM },
  1534. { "ldt", MEM(0x23), BASE, ARG_FMEM },
  1535. { "stf", MEM(0x24), BASE, ARG_FMEM },
  1536. { "stg", MEM(0x25), BASE, ARG_FMEM },
  1537. { "sts", MEM(0x26), BASE, ARG_FMEM },
  1538. { "stt", MEM(0x27), BASE, ARG_FMEM },
  1539. { "ldl", MEM(0x28), BASE, ARG_MEM },
  1540. { "ldq", MEM(0x29), BASE, ARG_MEM },
  1541. { "ldl_l", MEM(0x2A), BASE, ARG_MEM },
  1542. { "ldq_l", MEM(0x2B), BASE, ARG_MEM },
  1543. { "stl", MEM(0x2C), BASE, ARG_MEM },
  1544. { "stq", MEM(0x2D), BASE, ARG_MEM },
  1545. { "stl_c", MEM(0x2E), BASE, ARG_MEM },
  1546. { "stq_c", MEM(0x2F), BASE, ARG_MEM },
  1547. { "br", BRA(0x30), BASE, { ZA, BDISP } }, /* pseudo */
  1548. { "br", BRA(0x30), BASE, ARG_BRA },
  1549. { "fbeq", BRA(0x31), BASE, ARG_FBRA },
  1550. { "fblt", BRA(0x32), BASE, ARG_FBRA },
  1551. { "fble", BRA(0x33), BASE, ARG_FBRA },
  1552. { "bsr", BRA(0x34), BASE, ARG_BRA },
  1553. { "fbne", BRA(0x35), BASE, ARG_FBRA },
  1554. { "fbge", BRA(0x36), BASE, ARG_FBRA },
  1555. { "fbgt", BRA(0x37), BASE, ARG_FBRA },
  1556. { "blbc", BRA(0x38), BASE, ARG_BRA },
  1557. { "beq", BRA(0x39), BASE, ARG_BRA },
  1558. { "blt", BRA(0x3A), BASE, ARG_BRA },
  1559. { "ble", BRA(0x3B), BASE, ARG_BRA },
  1560. { "blbs", BRA(0x3C), BASE, ARG_BRA },
  1561. { "bne", BRA(0x3D), BASE, ARG_BRA },
  1562. { "bge", BRA(0x3E), BASE, ARG_BRA },
  1563. { "bgt", BRA(0x3F), BASE, ARG_BRA },
  1564. };
  1565. const unsigned alpha_num_opcodes = sizeof(alpha_opcodes)/sizeof(*alpha_opcodes);
  1566. /* OSF register names. */
  1567. static const char * const osf_regnames[64] = {
  1568. "v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
  1569. "t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
  1570. "a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
  1571. "t10", "t11", "ra", "t12", "at", "gp", "sp", "zero",
  1572. "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7",
  1573. "$f8", "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15",
  1574. "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",
  1575. "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31"
  1576. };
  1577. /* VMS register names. */
  1578. static const char * const vms_regnames[64] = {
  1579. "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
  1580. "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15",
  1581. "R16", "R17", "R18", "R19", "R20", "R21", "R22", "R23",
  1582. "R24", "AI", "RA", "PV", "AT", "FP", "SP", "RZ",
  1583. "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7",
  1584. "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15",
  1585. "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23",
  1586. "F24", "F25", "F26", "F27", "F28", "F29", "F30", "FZ"
  1587. };
  1588. /* Disassemble Alpha instructions. */
  1589. int
  1590. print_insn_alpha (bfd_vma memaddr, struct disassemble_info *info)
  1591. {
  1592. static const struct alpha_opcode *opcode_index[AXP_NOPS+1];
  1593. const char * const * regnames;
  1594. const struct alpha_opcode *opcode, *opcode_end;
  1595. const unsigned char *opindex;
  1596. unsigned insn, op, isa_mask;
  1597. int need_comma;
  1598. /* Initialize the majorop table the first time through */
  1599. if (!opcode_index[0])
  1600. {
  1601. opcode = alpha_opcodes;
  1602. opcode_end = opcode + alpha_num_opcodes;
  1603. for (op = 0; op < AXP_NOPS; ++op)
  1604. {
  1605. opcode_index[op] = opcode;
  1606. while (opcode < opcode_end && op == AXP_OP (opcode->opcode))
  1607. ++opcode;
  1608. }
  1609. opcode_index[op] = opcode;
  1610. }
  1611. if (info->flavour == bfd_target_evax_flavour)
  1612. regnames = vms_regnames;
  1613. else
  1614. regnames = osf_regnames;
  1615. isa_mask = AXP_OPCODE_NOPAL;
  1616. switch (info->mach)
  1617. {
  1618. case bfd_mach_alpha_ev4:
  1619. isa_mask |= AXP_OPCODE_EV4;
  1620. break;
  1621. case bfd_mach_alpha_ev5:
  1622. isa_mask |= AXP_OPCODE_EV5;
  1623. break;
  1624. case bfd_mach_alpha_ev6:
  1625. isa_mask |= AXP_OPCODE_EV6;
  1626. break;
  1627. }
  1628. /* Read the insn into a host word */
  1629. {
  1630. bfd_byte buffer[4];
  1631. int status = (*info->read_memory_func) (memaddr, buffer, 4, info);
  1632. if (status != 0)
  1633. {
  1634. (*info->memory_error_func) (status, memaddr, info);
  1635. return -1;
  1636. }
  1637. insn = bfd_getl32 (buffer);
  1638. }
  1639. /* Get the major opcode of the instruction. */
  1640. op = AXP_OP (insn);
  1641. /* Find the first match in the opcode table. */
  1642. opcode_end = opcode_index[op + 1];
  1643. for (opcode = opcode_index[op]; opcode < opcode_end; ++opcode)
  1644. {
  1645. if ((insn ^ opcode->opcode) & opcode->mask)
  1646. continue;
  1647. if (!(opcode->flags & isa_mask))
  1648. continue;
  1649. /* Make two passes over the operands. First see if any of them
  1650. have extraction functions, and, if they do, make sure the
  1651. instruction is valid. */
  1652. {
  1653. int invalid = 0;
  1654. for (opindex = opcode->operands; *opindex != 0; opindex++)
  1655. {
  1656. const struct alpha_operand *operand = alpha_operands + *opindex;
  1657. if (operand->extract)
  1658. (*operand->extract) (insn, &invalid);
  1659. }
  1660. if (invalid)
  1661. continue;
  1662. }
  1663. /* The instruction is valid. */
  1664. goto found;
  1665. }
  1666. /* No instruction found */
  1667. (*info->fprintf_func) (info->stream, ".long %#08x", insn);
  1668. return 4;
  1669. found:
  1670. (*info->fprintf_func) (info->stream, "%s", opcode->name);
  1671. if (opcode->operands[0] != 0)
  1672. (*info->fprintf_func) (info->stream, "\t");
  1673. /* Now extract and print the operands. */
  1674. need_comma = 0;
  1675. for (opindex = opcode->operands; *opindex != 0; opindex++)
  1676. {
  1677. const struct alpha_operand *operand = alpha_operands + *opindex;
  1678. int value;
  1679. /* Operands that are marked FAKE are simply ignored. We
  1680. already made sure that the extract function considered
  1681. the instruction to be valid. */
  1682. if ((operand->flags & AXP_OPERAND_FAKE) != 0)
  1683. continue;
  1684. /* Extract the value from the instruction. */
  1685. if (operand->extract)
  1686. value = (*operand->extract) (insn, (int *) NULL);
  1687. else
  1688. {
  1689. value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
  1690. if (operand->flags & AXP_OPERAND_SIGNED)
  1691. {
  1692. int signbit = 1 << (operand->bits - 1);
  1693. value = (value ^ signbit) - signbit;
  1694. }
  1695. }
  1696. if (need_comma &&
  1697. ((operand->flags & (AXP_OPERAND_PARENS | AXP_OPERAND_COMMA))
  1698. != AXP_OPERAND_PARENS))
  1699. {
  1700. (*info->fprintf_func) (info->stream, ",");
  1701. }
  1702. if (operand->flags & AXP_OPERAND_PARENS)
  1703. (*info->fprintf_func) (info->stream, "(");
  1704. /* Print the operand as directed by the flags. */
  1705. if (operand->flags & AXP_OPERAND_IR)
  1706. (*info->fprintf_func) (info->stream, "%s", regnames[value]);
  1707. else if (operand->flags & AXP_OPERAND_FPR)
  1708. (*info->fprintf_func) (info->stream, "%s", regnames[value + 32]);
  1709. else if (operand->flags & AXP_OPERAND_RELATIVE)
  1710. (*info->print_address_func) (memaddr + 4 + value, info);
  1711. else if (operand->flags & AXP_OPERAND_SIGNED)
  1712. (*info->fprintf_func) (info->stream, "%d", value);
  1713. else
  1714. (*info->fprintf_func) (info->stream, "%#x", value);
  1715. if (operand->flags & AXP_OPERAND_PARENS)
  1716. (*info->fprintf_func) (info->stream, ")");
  1717. need_comma = 1;
  1718. }
  1719. return 4;
  1720. }