cris-opc.c 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210
  1. /* cris-opc.c -- Table of opcodes for the CRIS processor.
  2. Copyright (C) 2000-2015 Free Software Foundation, Inc.
  3. Contributed by Axis Communications AB, Lund, Sweden.
  4. Originally written for GAS 1.38.1 by Mikael Asker.
  5. Reorganized by Hans-Peter Nilsson.
  6. This file is part of the GNU opcodes library.
  7. This library is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 3, or (at your option)
  10. any later version.
  11. It is distributed in the hope that it will be useful, but WITHOUT
  12. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  13. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  14. License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  18. MA 02110-1301, USA. */
  19. #include "opcode/cris.h"
  20. #ifndef NULL
  21. #define NULL (0)
  22. #endif
  23. /* This table isn't used for CRISv32 and the size of immediate operands. */
  24. const struct cris_spec_reg
  25. cris_spec_regs[] =
  26. {
  27. {"bz", 0, 1, cris_ver_v32p, NULL},
  28. {"p0", 0, 1, 0, NULL},
  29. {"vr", 1, 1, 0, NULL},
  30. {"p1", 1, 1, 0, NULL},
  31. {"pid", 2, 1, cris_ver_v32p, NULL},
  32. {"p2", 2, 1, cris_ver_v32p, NULL},
  33. {"p2", 2, 1, cris_ver_warning, NULL},
  34. {"srs", 3, 1, cris_ver_v32p, NULL},
  35. {"p3", 3, 1, cris_ver_v32p, NULL},
  36. {"p3", 3, 1, cris_ver_warning, NULL},
  37. {"wz", 4, 2, cris_ver_v32p, NULL},
  38. {"p4", 4, 2, 0, NULL},
  39. {"ccr", 5, 2, cris_ver_v0_10, NULL},
  40. {"exs", 5, 4, cris_ver_v32p, NULL},
  41. {"p5", 5, 2, cris_ver_v0_10, NULL},
  42. {"p5", 5, 4, cris_ver_v32p, NULL},
  43. {"dcr0",6, 2, cris_ver_v0_3, NULL},
  44. {"eda", 6, 4, cris_ver_v32p, NULL},
  45. {"p6", 6, 2, cris_ver_v0_3, NULL},
  46. {"p6", 6, 4, cris_ver_v32p, NULL},
  47. {"dcr1/mof", 7, 4, cris_ver_v10p,
  48. "Register `dcr1/mof' with ambiguous size specified. Guessing 4 bytes"},
  49. {"dcr1/mof", 7, 2, cris_ver_v0_3,
  50. "Register `dcr1/mof' with ambiguous size specified. Guessing 2 bytes"},
  51. {"mof", 7, 4, cris_ver_v10p, NULL},
  52. {"dcr1",7, 2, cris_ver_v0_3, NULL},
  53. {"p7", 7, 4, cris_ver_v10p, NULL},
  54. {"p7", 7, 2, cris_ver_v0_3, NULL},
  55. {"dz", 8, 4, cris_ver_v32p, NULL},
  56. {"p8", 8, 4, 0, NULL},
  57. {"ibr", 9, 4, cris_ver_v0_10, NULL},
  58. {"ebp", 9, 4, cris_ver_v32p, NULL},
  59. {"p9", 9, 4, 0, NULL},
  60. {"irp", 10, 4, cris_ver_v0_10, NULL},
  61. {"erp", 10, 4, cris_ver_v32p, NULL},
  62. {"p10", 10, 4, 0, NULL},
  63. {"srp", 11, 4, 0, NULL},
  64. {"p11", 11, 4, 0, NULL},
  65. /* For disassembly use only. Accept at assembly with a warning. */
  66. {"bar/dtp0", 12, 4, cris_ver_warning,
  67. "Ambiguous register `bar/dtp0' specified"},
  68. {"nrp", 12, 4, cris_ver_v32p, NULL},
  69. {"bar", 12, 4, cris_ver_v8_10, NULL},
  70. {"dtp0",12, 4, cris_ver_v0_3, NULL},
  71. {"p12", 12, 4, 0, NULL},
  72. /* For disassembly use only. Accept at assembly with a warning. */
  73. {"dccr/dtp1",13, 4, cris_ver_warning,
  74. "Ambiguous register `dccr/dtp1' specified"},
  75. {"ccs", 13, 4, cris_ver_v32p, NULL},
  76. {"dccr",13, 4, cris_ver_v8_10, NULL},
  77. {"dtp1",13, 4, cris_ver_v0_3, NULL},
  78. {"p13", 13, 4, 0, NULL},
  79. {"brp", 14, 4, cris_ver_v3_10, NULL},
  80. {"usp", 14, 4, cris_ver_v32p, NULL},
  81. {"p14", 14, 4, cris_ver_v3p, NULL},
  82. {"usp", 15, 4, cris_ver_v10, NULL},
  83. {"spc", 15, 4, cris_ver_v32p, NULL},
  84. {"p15", 15, 4, cris_ver_v10p, NULL},
  85. {NULL, 0, 0, cris_ver_version_all, NULL}
  86. };
  87. /* Add version specifiers to this table when necessary.
  88. The (now) regular coding of register names suggests a simpler
  89. implementation. */
  90. const struct cris_support_reg cris_support_regs[] =
  91. {
  92. {"s0", 0},
  93. {"s1", 1},
  94. {"s2", 2},
  95. {"s3", 3},
  96. {"s4", 4},
  97. {"s5", 5},
  98. {"s6", 6},
  99. {"s7", 7},
  100. {"s8", 8},
  101. {"s9", 9},
  102. {"s10", 10},
  103. {"s11", 11},
  104. {"s12", 12},
  105. {"s13", 13},
  106. {"s14", 14},
  107. {"s15", 15},
  108. {NULL, 0}
  109. };
  110. /* All CRIS opcodes are 16 bits.
  111. - The match component is a mask saying which bits must match a
  112. particular opcode in order for an instruction to be an instance
  113. of that opcode.
  114. - The args component is a string containing characters symbolically
  115. matching the operands of an instruction. Used for both assembly
  116. and disassembly.
  117. Operand-matching characters:
  118. [ ] , space
  119. Verbatim.
  120. A The string "ACR" (case-insensitive).
  121. B Not really an operand. It causes a "BDAP -size,SP" prefix to be
  122. output for the PUSH alias-instructions and recognizes a push-
  123. prefix at disassembly. This letter isn't recognized for v32.
  124. Must be followed by a R or P letter.
  125. ! Non-match pattern, will not match if there's a prefix insn.
  126. b Non-matching operand, used for branches with 16-bit
  127. displacement. Only recognized by the disassembler.
  128. c 5-bit unsigned immediate in bits <4:0>.
  129. C 4-bit unsigned immediate in bits <3:0>.
  130. d At assembly, optionally (as in put other cases before this one)
  131. ".d" or ".D" at the start of the operands, followed by one space
  132. character. At disassembly, nothing.
  133. D General register in bits <15:12> and <3:0>.
  134. f List of flags in bits <15:12> and <3:0>.
  135. i 6-bit signed immediate in bits <5:0>.
  136. I 6-bit unsigned immediate in bits <5:0>.
  137. M Size modifier (B, W or D) for CLEAR instructions.
  138. m Size modifier (B, W or D) in bits <5:4>
  139. N A 32-bit dword, like in the difference between s and y.
  140. This has no effect on bits in the opcode. Can also be expressed
  141. as "[pc+]" in input.
  142. n As N, but PC-relative (to the start of the instruction).
  143. o [-128..127] word offset in bits <7:1> and <0>. Used by 8-bit
  144. branch instructions.
  145. O [-128..127] offset in bits <7:0>. Also matches a comma and a
  146. general register after the expression, in bits <15:12>. Used
  147. only for the BDAP prefix insn (in v32 the ADDOQ insn; same opcode).
  148. P Special register in bits <15:12>.
  149. p Indicates that the insn is a prefix insn. Must be first
  150. character.
  151. Q As O, but don't relax; force an 8-bit offset.
  152. R General register in bits <15:12>.
  153. r General register in bits <3:0>.
  154. S Source operand in bit <10> and a prefix; a 3-operand prefix
  155. without side-effect.
  156. s Source operand in bits <10> and <3:0>, optionally with a
  157. side-effect prefix, except [pc] (the name, not R15 as in ACR)
  158. isn't allowed for v32 and higher.
  159. T Support register in bits <15:12>.
  160. u 4-bit (PC-relative) unsigned immediate word offset in bits <3:0>.
  161. U Relaxes to either u or n, instruction is assumed LAPCQ or LAPC.
  162. Not recognized at disassembly.
  163. x Register-dot-modifier, for example "r5.w" in bits <15:12> and <5:4>.
  164. y Like 's' but do not allow an integer at assembly.
  165. Y The difference s-y; only an integer is allowed.
  166. z Size modifier (B or W) in bit <4>. */
  167. /* Please note the order of the opcodes in this table is significant.
  168. The assembler requires that all instances of the same mnemonic must
  169. be consecutive. If they aren't, the assembler might not recognize
  170. them, or may indicate an internal error.
  171. The disassembler should not normally care about the order of the
  172. opcodes, but will prefer an earlier alternative if the "match-score"
  173. (see cris-dis.c) is computed as equal.
  174. It should not be significant for proper execution that this table is
  175. in alphabetical order, but please follow that convention for an easy
  176. overview. */
  177. const struct cris_opcode
  178. cris_opcodes[] =
  179. {
  180. {"abs", 0x06B0, 0x0940, "r,R", 0, SIZE_NONE, 0,
  181. cris_abs_op},
  182. {"add", 0x0600, 0x09c0, "m r,R", 0, SIZE_NONE, 0,
  183. cris_reg_mode_add_sub_cmp_and_or_move_op},
  184. {"add", 0x0A00, 0x01c0, "m s,R", 0, SIZE_FIELD, 0,
  185. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  186. {"add", 0x0A00, 0x01c0, "m S,D", 0, SIZE_NONE,
  187. cris_ver_v0_10,
  188. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  189. {"add", 0x0a00, 0x05c0, "m S,R,r", 0, SIZE_NONE,
  190. cris_ver_v0_10,
  191. cris_three_operand_add_sub_cmp_and_or_op},
  192. {"add", 0x0A00, 0x01c0, "m s,R", 0, SIZE_FIELD,
  193. cris_ver_v32p,
  194. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  195. {"addc", 0x0570, 0x0A80, "r,R", 0, SIZE_FIX_32,
  196. cris_ver_v32p,
  197. cris_not_implemented_op},
  198. {"addc", 0x09A0, 0x0250, "s,R", 0, SIZE_FIX_32,
  199. cris_ver_v32p,
  200. cris_not_implemented_op},
  201. {"addi", 0x0540, 0x0A80, "x,r,A", 0, SIZE_NONE,
  202. cris_ver_v32p,
  203. cris_addi_op},
  204. {"addi", 0x0500, 0x0Ac0, "x,r", 0, SIZE_NONE, 0,
  205. cris_addi_op},
  206. /* This collates after "addo", but we want to disassemble as "addoq",
  207. not "addo". */
  208. {"addoq", 0x0100, 0x0E00, "Q,A", 0, SIZE_NONE,
  209. cris_ver_v32p,
  210. cris_not_implemented_op},
  211. {"addo", 0x0940, 0x0280, "m s,R,A", 0, SIZE_FIELD_SIGNED,
  212. cris_ver_v32p,
  213. cris_not_implemented_op},
  214. /* This must be located after the insn above, lest we misinterpret
  215. "addo.b -1,r0,acr" as "addo .b-1,r0,acr". FIXME: Sounds like a
  216. parser bug. */
  217. {"addo", 0x0100, 0x0E00, "O,A", 0, SIZE_NONE,
  218. cris_ver_v32p,
  219. cris_not_implemented_op},
  220. {"addq", 0x0200, 0x0Dc0, "I,R", 0, SIZE_NONE, 0,
  221. cris_quick_mode_add_sub_op},
  222. {"adds", 0x0420, 0x0Bc0, "z r,R", 0, SIZE_NONE, 0,
  223. cris_reg_mode_add_sub_cmp_and_or_move_op},
  224. /* FIXME: SIZE_FIELD_SIGNED and all necessary changes. */
  225. {"adds", 0x0820, 0x03c0, "z s,R", 0, SIZE_FIELD, 0,
  226. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  227. {"adds", 0x0820, 0x03c0, "z S,D", 0, SIZE_NONE,
  228. cris_ver_v0_10,
  229. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  230. {"adds", 0x0820, 0x07c0, "z S,R,r", 0, SIZE_NONE,
  231. cris_ver_v0_10,
  232. cris_three_operand_add_sub_cmp_and_or_op},
  233. {"addu", 0x0400, 0x0be0, "z r,R", 0, SIZE_NONE, 0,
  234. cris_reg_mode_add_sub_cmp_and_or_move_op},
  235. /* FIXME: SIZE_FIELD_UNSIGNED and all necessary changes. */
  236. {"addu", 0x0800, 0x03e0, "z s,R", 0, SIZE_FIELD, 0,
  237. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  238. {"addu", 0x0800, 0x03e0, "z S,D", 0, SIZE_NONE,
  239. cris_ver_v0_10,
  240. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  241. {"addu", 0x0800, 0x07e0, "z S,R,r", 0, SIZE_NONE,
  242. cris_ver_v0_10,
  243. cris_three_operand_add_sub_cmp_and_or_op},
  244. {"and", 0x0700, 0x08C0, "m r,R", 0, SIZE_NONE, 0,
  245. cris_reg_mode_add_sub_cmp_and_or_move_op},
  246. {"and", 0x0B00, 0x00C0, "m s,R", 0, SIZE_FIELD, 0,
  247. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  248. {"and", 0x0B00, 0x00C0, "m S,D", 0, SIZE_NONE,
  249. cris_ver_v0_10,
  250. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  251. {"and", 0x0B00, 0x04C0, "m S,R,r", 0, SIZE_NONE,
  252. cris_ver_v0_10,
  253. cris_three_operand_add_sub_cmp_and_or_op},
  254. {"andq", 0x0300, 0x0CC0, "i,R", 0, SIZE_NONE, 0,
  255. cris_quick_mode_and_cmp_move_or_op},
  256. {"asr", 0x0780, 0x0840, "m r,R", 0, SIZE_NONE, 0,
  257. cris_asr_op},
  258. {"asrq", 0x03a0, 0x0c40, "c,R", 0, SIZE_NONE, 0,
  259. cris_asrq_op},
  260. {"ax", 0x15B0, 0xEA4F, "", 0, SIZE_NONE, 0,
  261. cris_ax_ei_setf_op},
  262. /* FIXME: Should use branch #defines. */
  263. {"b", 0x0dff, 0x0200, "b", 1, SIZE_NONE, 0,
  264. cris_sixteen_bit_offset_branch_op},
  265. {"ba",
  266. BA_QUICK_OPCODE,
  267. 0x0F00+(0xF-CC_A)*0x1000, "o", 1, SIZE_NONE, 0,
  268. cris_eight_bit_offset_branch_op},
  269. /* Needs to come after the usual "ba o", which might be relaxed to
  270. this one. */
  271. {"ba", BA_DWORD_OPCODE,
  272. 0xffff & (~BA_DWORD_OPCODE), "n", 0, SIZE_FIX_32,
  273. cris_ver_v32p,
  274. cris_none_reg_mode_jump_op},
  275. {"bas", 0x0EBF, 0x0140, "n,P", 0, SIZE_FIX_32,
  276. cris_ver_v32p,
  277. cris_none_reg_mode_jump_op},
  278. {"basc", 0x0EFF, 0x0100, "n,P", 0, SIZE_FIX_32,
  279. cris_ver_v32p,
  280. cris_none_reg_mode_jump_op},
  281. {"bcc",
  282. BRANCH_QUICK_OPCODE+CC_CC*0x1000,
  283. 0x0f00+(0xF-CC_CC)*0x1000, "o", 1, SIZE_NONE, 0,
  284. cris_eight_bit_offset_branch_op},
  285. {"bcs",
  286. BRANCH_QUICK_OPCODE+CC_CS*0x1000,
  287. 0x0f00+(0xF-CC_CS)*0x1000, "o", 1, SIZE_NONE, 0,
  288. cris_eight_bit_offset_branch_op},
  289. {"bdap",
  290. BDAP_INDIR_OPCODE, BDAP_INDIR_Z_BITS, "pm s,R", 0, SIZE_FIELD_SIGNED,
  291. cris_ver_v0_10,
  292. cris_bdap_prefix},
  293. {"bdap",
  294. BDAP_QUICK_OPCODE, BDAP_QUICK_Z_BITS, "pO", 0, SIZE_NONE,
  295. cris_ver_v0_10,
  296. cris_quick_mode_bdap_prefix},
  297. {"beq",
  298. BRANCH_QUICK_OPCODE+CC_EQ*0x1000,
  299. 0x0f00+(0xF-CC_EQ)*0x1000, "o", 1, SIZE_NONE, 0,
  300. cris_eight_bit_offset_branch_op},
  301. /* This is deliberately put before "bext" to trump it, even though not
  302. in alphabetical order, since we don't do excluding version checks
  303. for v0..v10. */
  304. {"bwf",
  305. BRANCH_QUICK_OPCODE+CC_EXT*0x1000,
  306. 0x0f00+(0xF-CC_EXT)*0x1000, "o", 1, SIZE_NONE,
  307. cris_ver_v10,
  308. cris_eight_bit_offset_branch_op},
  309. {"bext",
  310. BRANCH_QUICK_OPCODE+CC_EXT*0x1000,
  311. 0x0f00+(0xF-CC_EXT)*0x1000, "o", 1, SIZE_NONE,
  312. cris_ver_v0_3,
  313. cris_eight_bit_offset_branch_op},
  314. {"bge",
  315. BRANCH_QUICK_OPCODE+CC_GE*0x1000,
  316. 0x0f00+(0xF-CC_GE)*0x1000, "o", 1, SIZE_NONE, 0,
  317. cris_eight_bit_offset_branch_op},
  318. {"bgt",
  319. BRANCH_QUICK_OPCODE+CC_GT*0x1000,
  320. 0x0f00+(0xF-CC_GT)*0x1000, "o", 1, SIZE_NONE, 0,
  321. cris_eight_bit_offset_branch_op},
  322. {"bhi",
  323. BRANCH_QUICK_OPCODE+CC_HI*0x1000,
  324. 0x0f00+(0xF-CC_HI)*0x1000, "o", 1, SIZE_NONE, 0,
  325. cris_eight_bit_offset_branch_op},
  326. {"bhs",
  327. BRANCH_QUICK_OPCODE+CC_HS*0x1000,
  328. 0x0f00+(0xF-CC_HS)*0x1000, "o", 1, SIZE_NONE, 0,
  329. cris_eight_bit_offset_branch_op},
  330. {"biap", BIAP_OPCODE, BIAP_Z_BITS, "pm r,R", 0, SIZE_NONE,
  331. cris_ver_v0_10,
  332. cris_biap_prefix},
  333. {"ble",
  334. BRANCH_QUICK_OPCODE+CC_LE*0x1000,
  335. 0x0f00+(0xF-CC_LE)*0x1000, "o", 1, SIZE_NONE, 0,
  336. cris_eight_bit_offset_branch_op},
  337. {"blo",
  338. BRANCH_QUICK_OPCODE+CC_LO*0x1000,
  339. 0x0f00+(0xF-CC_LO)*0x1000, "o", 1, SIZE_NONE, 0,
  340. cris_eight_bit_offset_branch_op},
  341. {"bls",
  342. BRANCH_QUICK_OPCODE+CC_LS*0x1000,
  343. 0x0f00+(0xF-CC_LS)*0x1000, "o", 1, SIZE_NONE, 0,
  344. cris_eight_bit_offset_branch_op},
  345. {"blt",
  346. BRANCH_QUICK_OPCODE+CC_LT*0x1000,
  347. 0x0f00+(0xF-CC_LT)*0x1000, "o", 1, SIZE_NONE, 0,
  348. cris_eight_bit_offset_branch_op},
  349. {"bmi",
  350. BRANCH_QUICK_OPCODE+CC_MI*0x1000,
  351. 0x0f00+(0xF-CC_MI)*0x1000, "o", 1, SIZE_NONE, 0,
  352. cris_eight_bit_offset_branch_op},
  353. {"bmod", 0x0ab0, 0x0140, "s,R", 0, SIZE_FIX_32,
  354. cris_ver_sim_v0_10,
  355. cris_not_implemented_op},
  356. {"bmod", 0x0ab0, 0x0140, "S,D", 0, SIZE_NONE,
  357. cris_ver_sim_v0_10,
  358. cris_not_implemented_op},
  359. {"bmod", 0x0ab0, 0x0540, "S,R,r", 0, SIZE_NONE,
  360. cris_ver_sim_v0_10,
  361. cris_not_implemented_op},
  362. {"bne",
  363. BRANCH_QUICK_OPCODE+CC_NE*0x1000,
  364. 0x0f00+(0xF-CC_NE)*0x1000, "o", 1, SIZE_NONE, 0,
  365. cris_eight_bit_offset_branch_op},
  366. {"bound", 0x05c0, 0x0A00, "m r,R", 0, SIZE_NONE, 0,
  367. cris_two_operand_bound_op},
  368. /* FIXME: SIZE_FIELD_UNSIGNED and all necessary changes. */
  369. {"bound", 0x09c0, 0x0200, "m s,R", 0, SIZE_FIELD,
  370. cris_ver_v0_10,
  371. cris_two_operand_bound_op},
  372. /* FIXME: SIZE_FIELD_UNSIGNED and all necessary changes. */
  373. {"bound", 0x0dcf, 0x0200, "m Y,R", 0, SIZE_FIELD, 0,
  374. cris_two_operand_bound_op},
  375. {"bound", 0x09c0, 0x0200, "m S,D", 0, SIZE_NONE,
  376. cris_ver_v0_10,
  377. cris_two_operand_bound_op},
  378. {"bound", 0x09c0, 0x0600, "m S,R,r", 0, SIZE_NONE,
  379. cris_ver_v0_10,
  380. cris_three_operand_bound_op},
  381. {"bpl",
  382. BRANCH_QUICK_OPCODE+CC_PL*0x1000,
  383. 0x0f00+(0xF-CC_PL)*0x1000, "o", 1, SIZE_NONE, 0,
  384. cris_eight_bit_offset_branch_op},
  385. {"break", 0xe930, 0x16c0, "C", 0, SIZE_NONE,
  386. cris_ver_v3p,
  387. cris_break_op},
  388. {"bsb",
  389. BRANCH_QUICK_OPCODE+CC_EXT*0x1000,
  390. 0x0f00+(0xF-CC_EXT)*0x1000, "o", 1, SIZE_NONE,
  391. cris_ver_v32p,
  392. cris_eight_bit_offset_branch_op},
  393. {"bsr", 0xBEBF, 0x4140, "n", 0, SIZE_FIX_32,
  394. cris_ver_v32p,
  395. cris_none_reg_mode_jump_op},
  396. {"bsrc", 0xBEFF, 0x4100, "n", 0, SIZE_FIX_32,
  397. cris_ver_v32p,
  398. cris_none_reg_mode_jump_op},
  399. {"bstore", 0x0af0, 0x0100, "s,R", 0, SIZE_FIX_32,
  400. cris_ver_warning,
  401. cris_not_implemented_op},
  402. {"bstore", 0x0af0, 0x0100, "S,D", 0, SIZE_NONE,
  403. cris_ver_warning,
  404. cris_not_implemented_op},
  405. {"bstore", 0x0af0, 0x0500, "S,R,r", 0, SIZE_NONE,
  406. cris_ver_warning,
  407. cris_not_implemented_op},
  408. {"btst", 0x04F0, 0x0B00, "r,R", 0, SIZE_NONE, 0,
  409. cris_btst_nop_op},
  410. {"btstq", 0x0380, 0x0C60, "c,R", 0, SIZE_NONE, 0,
  411. cris_btst_nop_op},
  412. {"bvc",
  413. BRANCH_QUICK_OPCODE+CC_VC*0x1000,
  414. 0x0f00+(0xF-CC_VC)*0x1000, "o", 1, SIZE_NONE, 0,
  415. cris_eight_bit_offset_branch_op},
  416. {"bvs",
  417. BRANCH_QUICK_OPCODE+CC_VS*0x1000,
  418. 0x0f00+(0xF-CC_VS)*0x1000, "o", 1, SIZE_NONE, 0,
  419. cris_eight_bit_offset_branch_op},
  420. {"clear", 0x0670, 0x3980, "M r", 0, SIZE_NONE, 0,
  421. cris_reg_mode_clear_op},
  422. {"clear", 0x0A70, 0x3180, "M y", 0, SIZE_NONE, 0,
  423. cris_none_reg_mode_clear_test_op},
  424. {"clear", 0x0A70, 0x3180, "M S", 0, SIZE_NONE,
  425. cris_ver_v0_10,
  426. cris_none_reg_mode_clear_test_op},
  427. {"clearf", 0x05F0, 0x0A00, "f", 0, SIZE_NONE, 0,
  428. cris_clearf_di_op},
  429. {"cmp", 0x06C0, 0x0900, "m r,R", 0, SIZE_NONE, 0,
  430. cris_reg_mode_add_sub_cmp_and_or_move_op},
  431. {"cmp", 0x0Ac0, 0x0100, "m s,R", 0, SIZE_FIELD, 0,
  432. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  433. {"cmp", 0x0Ac0, 0x0100, "m S,D", 0, SIZE_NONE,
  434. cris_ver_v0_10,
  435. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  436. {"cmpq", 0x02C0, 0x0D00, "i,R", 0, SIZE_NONE, 0,
  437. cris_quick_mode_and_cmp_move_or_op},
  438. /* FIXME: SIZE_FIELD_SIGNED and all necessary changes. */
  439. {"cmps", 0x08e0, 0x0300, "z s,R", 0, SIZE_FIELD, 0,
  440. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  441. {"cmps", 0x08e0, 0x0300, "z S,D", 0, SIZE_NONE,
  442. cris_ver_v0_10,
  443. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  444. /* FIXME: SIZE_FIELD_UNSIGNED and all necessary changes. */
  445. {"cmpu", 0x08c0, 0x0320, "z s,R" , 0, SIZE_FIELD, 0,
  446. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  447. {"cmpu", 0x08c0, 0x0320, "z S,D", 0, SIZE_NONE,
  448. cris_ver_v0_10,
  449. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  450. {"di", 0x25F0, 0xDA0F, "", 0, SIZE_NONE, 0,
  451. cris_clearf_di_op},
  452. {"dip", DIP_OPCODE, DIP_Z_BITS, "ps", 0, SIZE_FIX_32,
  453. cris_ver_v0_10,
  454. cris_dip_prefix},
  455. {"div", 0x0980, 0x0640, "m R,r", 0, SIZE_FIELD, 0,
  456. cris_not_implemented_op},
  457. {"dstep", 0x06f0, 0x0900, "r,R", 0, SIZE_NONE, 0,
  458. cris_dstep_logshift_mstep_neg_not_op},
  459. {"ei", 0x25B0, 0xDA4F, "", 0, SIZE_NONE, 0,
  460. cris_ax_ei_setf_op},
  461. {"fidxd", 0x0ab0, 0xf540, "[r]", 0, SIZE_NONE,
  462. cris_ver_v32p,
  463. cris_not_implemented_op},
  464. {"fidxi", 0x0d30, 0xF2C0, "[r]", 0, SIZE_NONE,
  465. cris_ver_v32p,
  466. cris_not_implemented_op},
  467. {"ftagd", 0x1AB0, 0xE540, "[r]", 0, SIZE_NONE,
  468. cris_ver_v32p,
  469. cris_not_implemented_op},
  470. {"ftagi", 0x1D30, 0xE2C0, "[r]", 0, SIZE_NONE,
  471. cris_ver_v32p,
  472. cris_not_implemented_op},
  473. {"halt", 0xF930, 0x06CF, "", 0, SIZE_NONE,
  474. cris_ver_v32p,
  475. cris_not_implemented_op},
  476. {"jas", 0x09B0, 0x0640, "r,P", 0, SIZE_NONE,
  477. cris_ver_v32p,
  478. cris_reg_mode_jump_op},
  479. {"jas", 0x0DBF, 0x0240, "N,P", 0, SIZE_FIX_32,
  480. cris_ver_v32p,
  481. cris_reg_mode_jump_op},
  482. {"jasc", 0x0B30, 0x04C0, "r,P", 0, SIZE_NONE,
  483. cris_ver_v32p,
  484. cris_reg_mode_jump_op},
  485. {"jasc", 0x0F3F, 0x00C0, "N,P", 0, SIZE_FIX_32,
  486. cris_ver_v32p,
  487. cris_reg_mode_jump_op},
  488. {"jbrc", 0x69b0, 0x9640, "r", 0, SIZE_NONE,
  489. cris_ver_v8_10,
  490. cris_reg_mode_jump_op},
  491. {"jbrc", 0x6930, 0x92c0, "s", 0, SIZE_FIX_32,
  492. cris_ver_v8_10,
  493. cris_none_reg_mode_jump_op},
  494. {"jbrc", 0x6930, 0x92c0, "S", 0, SIZE_NONE,
  495. cris_ver_v8_10,
  496. cris_none_reg_mode_jump_op},
  497. {"jir", 0xA9b0, 0x5640, "r", 0, SIZE_NONE,
  498. cris_ver_v8_10,
  499. cris_reg_mode_jump_op},
  500. {"jir", 0xA930, 0x52c0, "s", 0, SIZE_FIX_32,
  501. cris_ver_v8_10,
  502. cris_none_reg_mode_jump_op},
  503. {"jir", 0xA930, 0x52c0, "S", 0, SIZE_NONE,
  504. cris_ver_v8_10,
  505. cris_none_reg_mode_jump_op},
  506. {"jirc", 0x29b0, 0xd640, "r", 0, SIZE_NONE,
  507. cris_ver_v8_10,
  508. cris_reg_mode_jump_op},
  509. {"jirc", 0x2930, 0xd2c0, "s", 0, SIZE_FIX_32,
  510. cris_ver_v8_10,
  511. cris_none_reg_mode_jump_op},
  512. {"jirc", 0x2930, 0xd2c0, "S", 0, SIZE_NONE,
  513. cris_ver_v8_10,
  514. cris_none_reg_mode_jump_op},
  515. {"jsr", 0xB9b0, 0x4640, "r", 0, SIZE_NONE, 0,
  516. cris_reg_mode_jump_op},
  517. {"jsr", 0xB930, 0x42c0, "s", 0, SIZE_FIX_32,
  518. cris_ver_v0_10,
  519. cris_none_reg_mode_jump_op},
  520. {"jsr", 0xBDBF, 0x4240, "N", 0, SIZE_FIX_32,
  521. cris_ver_v32p,
  522. cris_none_reg_mode_jump_op},
  523. {"jsr", 0xB930, 0x42c0, "S", 0, SIZE_NONE,
  524. cris_ver_v0_10,
  525. cris_none_reg_mode_jump_op},
  526. {"jsrc", 0x39b0, 0xc640, "r", 0, SIZE_NONE,
  527. cris_ver_v8_10,
  528. cris_reg_mode_jump_op},
  529. {"jsrc", 0x3930, 0xc2c0, "s", 0, SIZE_FIX_32,
  530. cris_ver_v8_10,
  531. cris_none_reg_mode_jump_op},
  532. {"jsrc", 0x3930, 0xc2c0, "S", 0, SIZE_NONE,
  533. cris_ver_v8_10,
  534. cris_none_reg_mode_jump_op},
  535. {"jsrc", 0xBB30, 0x44C0, "r", 0, SIZE_NONE,
  536. cris_ver_v32p,
  537. cris_reg_mode_jump_op},
  538. {"jsrc", 0xBF3F, 0x40C0, "N", 0, SIZE_FIX_32,
  539. cris_ver_v32p,
  540. cris_reg_mode_jump_op},
  541. {"jump", 0x09b0, 0xF640, "r", 0, SIZE_NONE, 0,
  542. cris_reg_mode_jump_op},
  543. {"jump",
  544. JUMP_INDIR_OPCODE, JUMP_INDIR_Z_BITS, "s", 0, SIZE_FIX_32,
  545. cris_ver_v0_10,
  546. cris_none_reg_mode_jump_op},
  547. {"jump",
  548. JUMP_INDIR_OPCODE, JUMP_INDIR_Z_BITS, "S", 0, SIZE_NONE,
  549. cris_ver_v0_10,
  550. cris_none_reg_mode_jump_op},
  551. {"jump", 0x09F0, 0x060F, "P", 0, SIZE_NONE,
  552. cris_ver_v32p,
  553. cris_none_reg_mode_jump_op},
  554. {"jump",
  555. JUMP_PC_INCR_OPCODE_V32,
  556. (0xffff & ~JUMP_PC_INCR_OPCODE_V32), "N", 0, SIZE_FIX_32,
  557. cris_ver_v32p,
  558. cris_none_reg_mode_jump_op},
  559. {"jmpu", 0x8930, 0x72c0, "s", 0, SIZE_FIX_32,
  560. cris_ver_v10,
  561. cris_none_reg_mode_jump_op},
  562. {"jmpu", 0x8930, 0x72c0, "S", 0, SIZE_NONE,
  563. cris_ver_v10,
  564. cris_none_reg_mode_jump_op},
  565. {"lapc", 0x0970, 0x0680, "U,R", 0, SIZE_NONE,
  566. cris_ver_v32p,
  567. cris_not_implemented_op},
  568. {"lapc", 0x0D7F, 0x0280, "dn,R", 0, SIZE_FIX_32,
  569. cris_ver_v32p,
  570. cris_not_implemented_op},
  571. {"lapcq", 0x0970, 0x0680, "u,R", 0, SIZE_NONE,
  572. cris_ver_v32p,
  573. cris_addi_op},
  574. {"lsl", 0x04C0, 0x0B00, "m r,R", 0, SIZE_NONE, 0,
  575. cris_dstep_logshift_mstep_neg_not_op},
  576. {"lslq", 0x03c0, 0x0C20, "c,R", 0, SIZE_NONE, 0,
  577. cris_dstep_logshift_mstep_neg_not_op},
  578. {"lsr", 0x07C0, 0x0800, "m r,R", 0, SIZE_NONE, 0,
  579. cris_dstep_logshift_mstep_neg_not_op},
  580. {"lsrq", 0x03e0, 0x0C00, "c,R", 0, SIZE_NONE, 0,
  581. cris_dstep_logshift_mstep_neg_not_op},
  582. {"lz", 0x0730, 0x08C0, "r,R", 0, SIZE_NONE,
  583. cris_ver_v3p,
  584. cris_not_implemented_op},
  585. {"mcp", 0x07f0, 0x0800, "P,r", 0, SIZE_NONE,
  586. cris_ver_v32p,
  587. cris_not_implemented_op},
  588. {"move", 0x0640, 0x0980, "m r,R", 0, SIZE_NONE, 0,
  589. cris_reg_mode_add_sub_cmp_and_or_move_op},
  590. {"move", 0x0A40, 0x0180, "m s,R", 0, SIZE_FIELD, 0,
  591. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  592. {"move", 0x0A40, 0x0180, "m S,D", 0, SIZE_NONE,
  593. cris_ver_v0_10,
  594. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  595. {"move", 0x0630, 0x09c0, "r,P", 0, SIZE_NONE, 0,
  596. cris_move_to_preg_op},
  597. {"move", 0x0670, 0x0980, "P,r", 0, SIZE_NONE, 0,
  598. cris_reg_mode_move_from_preg_op},
  599. {"move", 0x0BC0, 0x0000, "m R,y", 0, SIZE_FIELD, 0,
  600. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  601. {"move", 0x0BC0, 0x0000, "m D,S", 0, SIZE_NONE,
  602. cris_ver_v0_10,
  603. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  604. {"move",
  605. MOVE_M_TO_PREG_OPCODE, MOVE_M_TO_PREG_ZBITS,
  606. "s,P", 0, SIZE_SPEC_REG, 0,
  607. cris_move_to_preg_op},
  608. {"move", 0x0A30, 0x01c0, "S,P", 0, SIZE_NONE,
  609. cris_ver_v0_10,
  610. cris_move_to_preg_op},
  611. {"move", 0x0A70, 0x0180, "P,y", 0, SIZE_SPEC_REG, 0,
  612. cris_none_reg_mode_move_from_preg_op},
  613. {"move", 0x0A70, 0x0180, "P,S", 0, SIZE_NONE,
  614. cris_ver_v0_10,
  615. cris_none_reg_mode_move_from_preg_op},
  616. {"move", 0x0B70, 0x0480, "r,T", 0, SIZE_NONE,
  617. cris_ver_v32p,
  618. cris_not_implemented_op},
  619. {"move", 0x0F70, 0x0080, "T,r", 0, SIZE_NONE,
  620. cris_ver_v32p,
  621. cris_not_implemented_op},
  622. {"movem", 0x0BF0, 0x0000, "R,y", 0, SIZE_FIX_32, 0,
  623. cris_move_reg_to_mem_movem_op},
  624. {"movem", 0x0BF0, 0x0000, "D,S", 0, SIZE_NONE,
  625. cris_ver_v0_10,
  626. cris_move_reg_to_mem_movem_op},
  627. {"movem", 0x0BB0, 0x0040, "s,R", 0, SIZE_FIX_32, 0,
  628. cris_move_mem_to_reg_movem_op},
  629. {"movem", 0x0BB0, 0x0040, "S,D", 0, SIZE_NONE,
  630. cris_ver_v0_10,
  631. cris_move_mem_to_reg_movem_op},
  632. {"moveq", 0x0240, 0x0D80, "i,R", 0, SIZE_NONE, 0,
  633. cris_quick_mode_and_cmp_move_or_op},
  634. {"movs", 0x0460, 0x0B80, "z r,R", 0, SIZE_NONE, 0,
  635. cris_reg_mode_add_sub_cmp_and_or_move_op},
  636. /* FIXME: SIZE_FIELD_SIGNED and all necessary changes. */
  637. {"movs", 0x0860, 0x0380, "z s,R", 0, SIZE_FIELD, 0,
  638. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  639. {"movs", 0x0860, 0x0380, "z S,D", 0, SIZE_NONE,
  640. cris_ver_v0_10,
  641. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  642. {"movu", 0x0440, 0x0Ba0, "z r,R", 0, SIZE_NONE, 0,
  643. cris_reg_mode_add_sub_cmp_and_or_move_op},
  644. /* FIXME: SIZE_FIELD_UNSIGNED and all necessary changes. */
  645. {"movu", 0x0840, 0x03a0, "z s,R", 0, SIZE_FIELD, 0,
  646. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  647. {"movu", 0x0840, 0x03a0, "z S,D", 0, SIZE_NONE,
  648. cris_ver_v0_10,
  649. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  650. {"mstep", 0x07f0, 0x0800, "r,R", 0, SIZE_NONE,
  651. cris_ver_v0_10,
  652. cris_dstep_logshift_mstep_neg_not_op},
  653. {"muls", 0x0d00, 0x02c0, "m r,R", 0, SIZE_NONE,
  654. cris_ver_v10p,
  655. cris_muls_op},
  656. {"mulu", 0x0900, 0x06c0, "m r,R", 0, SIZE_NONE,
  657. cris_ver_v10p,
  658. cris_mulu_op},
  659. {"neg", 0x0580, 0x0A40, "m r,R", 0, SIZE_NONE, 0,
  660. cris_dstep_logshift_mstep_neg_not_op},
  661. {"nop", NOP_OPCODE, NOP_Z_BITS, "", 0, SIZE_NONE,
  662. cris_ver_v0_10,
  663. cris_btst_nop_op},
  664. {"nop", NOP_OPCODE_V32, NOP_Z_BITS_V32, "", 0, SIZE_NONE,
  665. cris_ver_v32p,
  666. cris_btst_nop_op},
  667. {"not", 0x8770, 0x7880, "r", 0, SIZE_NONE, 0,
  668. cris_dstep_logshift_mstep_neg_not_op},
  669. {"or", 0x0740, 0x0880, "m r,R", 0, SIZE_NONE, 0,
  670. cris_reg_mode_add_sub_cmp_and_or_move_op},
  671. {"or", 0x0B40, 0x0080, "m s,R", 0, SIZE_FIELD, 0,
  672. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  673. {"or", 0x0B40, 0x0080, "m S,D", 0, SIZE_NONE,
  674. cris_ver_v0_10,
  675. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  676. {"or", 0x0B40, 0x0480, "m S,R,r", 0, SIZE_NONE,
  677. cris_ver_v0_10,
  678. cris_three_operand_add_sub_cmp_and_or_op},
  679. {"orq", 0x0340, 0x0C80, "i,R", 0, SIZE_NONE, 0,
  680. cris_quick_mode_and_cmp_move_or_op},
  681. {"pop", 0x0E6E, 0x0191, "!R", 0, SIZE_NONE,
  682. cris_ver_v0_10,
  683. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  684. {"pop", 0x0e3e, 0x01c1, "!P", 0, SIZE_NONE,
  685. cris_ver_v0_10,
  686. cris_none_reg_mode_move_from_preg_op},
  687. {"push", 0x0FEE, 0x0011, "BR", 0, SIZE_NONE,
  688. cris_ver_v0_10,
  689. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  690. {"push", 0x0E7E, 0x0181, "BP", 0, SIZE_NONE,
  691. cris_ver_v0_10,
  692. cris_move_to_preg_op},
  693. {"rbf", 0x3b30, 0xc0c0, "y", 0, SIZE_NONE,
  694. cris_ver_v10,
  695. cris_not_implemented_op},
  696. {"rbf", 0x3b30, 0xc0c0, "S", 0, SIZE_NONE,
  697. cris_ver_v10,
  698. cris_not_implemented_op},
  699. {"rfe", 0x2930, 0xD6CF, "", 0, SIZE_NONE,
  700. cris_ver_v32p,
  701. cris_not_implemented_op},
  702. {"rfg", 0x4930, 0xB6CF, "", 0, SIZE_NONE,
  703. cris_ver_v32p,
  704. cris_not_implemented_op},
  705. {"rfn", 0x5930, 0xA6CF, "", 0, SIZE_NONE,
  706. cris_ver_v32p,
  707. cris_not_implemented_op},
  708. {"ret", 0xB67F, 0x4980, "", 1, SIZE_NONE,
  709. cris_ver_v0_10,
  710. cris_reg_mode_move_from_preg_op},
  711. {"ret", 0xB9F0, 0x460F, "", 1, SIZE_NONE,
  712. cris_ver_v32p,
  713. cris_reg_mode_move_from_preg_op},
  714. {"retb", 0xe67f, 0x1980, "", 1, SIZE_NONE,
  715. cris_ver_v0_10,
  716. cris_reg_mode_move_from_preg_op},
  717. {"rete", 0xA9F0, 0x560F, "", 1, SIZE_NONE,
  718. cris_ver_v32p,
  719. cris_reg_mode_move_from_preg_op},
  720. {"reti", 0xA67F, 0x5980, "", 1, SIZE_NONE,
  721. cris_ver_v0_10,
  722. cris_reg_mode_move_from_preg_op},
  723. {"retn", 0xC9F0, 0x360F, "", 1, SIZE_NONE,
  724. cris_ver_v32p,
  725. cris_reg_mode_move_from_preg_op},
  726. {"sbfs", 0x3b70, 0xc080, "y", 0, SIZE_NONE,
  727. cris_ver_v10,
  728. cris_not_implemented_op},
  729. {"sbfs", 0x3b70, 0xc080, "S", 0, SIZE_NONE,
  730. cris_ver_v10,
  731. cris_not_implemented_op},
  732. {"sa",
  733. 0x0530+CC_A*0x1000,
  734. 0x0AC0+(0xf-CC_A)*0x1000, "r", 0, SIZE_NONE, 0,
  735. cris_scc_op},
  736. {"ssb",
  737. 0x0530+CC_EXT*0x1000,
  738. 0x0AC0+(0xf-CC_EXT)*0x1000, "r", 0, SIZE_NONE,
  739. cris_ver_v32p,
  740. cris_scc_op},
  741. {"scc",
  742. 0x0530+CC_CC*0x1000,
  743. 0x0AC0+(0xf-CC_CC)*0x1000, "r", 0, SIZE_NONE, 0,
  744. cris_scc_op},
  745. {"scs",
  746. 0x0530+CC_CS*0x1000,
  747. 0x0AC0+(0xf-CC_CS)*0x1000, "r", 0, SIZE_NONE, 0,
  748. cris_scc_op},
  749. {"seq",
  750. 0x0530+CC_EQ*0x1000,
  751. 0x0AC0+(0xf-CC_EQ)*0x1000, "r", 0, SIZE_NONE, 0,
  752. cris_scc_op},
  753. {"setf", 0x05b0, 0x0A40, "f", 0, SIZE_NONE, 0,
  754. cris_ax_ei_setf_op},
  755. {"sfe", 0x3930, 0xC6CF, "", 0, SIZE_NONE,
  756. cris_ver_v32p,
  757. cris_not_implemented_op},
  758. /* Need to have "swf" in front of "sext" so it is the one displayed in
  759. disassembly. */
  760. {"swf",
  761. 0x0530+CC_EXT*0x1000,
  762. 0x0AC0+(0xf-CC_EXT)*0x1000, "r", 0, SIZE_NONE,
  763. cris_ver_v10,
  764. cris_scc_op},
  765. {"sext",
  766. 0x0530+CC_EXT*0x1000,
  767. 0x0AC0+(0xf-CC_EXT)*0x1000, "r", 0, SIZE_NONE,
  768. cris_ver_v0_3,
  769. cris_scc_op},
  770. {"sge",
  771. 0x0530+CC_GE*0x1000,
  772. 0x0AC0+(0xf-CC_GE)*0x1000, "r", 0, SIZE_NONE, 0,
  773. cris_scc_op},
  774. {"sgt",
  775. 0x0530+CC_GT*0x1000,
  776. 0x0AC0+(0xf-CC_GT)*0x1000, "r", 0, SIZE_NONE, 0,
  777. cris_scc_op},
  778. {"shi",
  779. 0x0530+CC_HI*0x1000,
  780. 0x0AC0+(0xf-CC_HI)*0x1000, "r", 0, SIZE_NONE, 0,
  781. cris_scc_op},
  782. {"shs",
  783. 0x0530+CC_HS*0x1000,
  784. 0x0AC0+(0xf-CC_HS)*0x1000, "r", 0, SIZE_NONE, 0,
  785. cris_scc_op},
  786. {"sle",
  787. 0x0530+CC_LE*0x1000,
  788. 0x0AC0+(0xf-CC_LE)*0x1000, "r", 0, SIZE_NONE, 0,
  789. cris_scc_op},
  790. {"slo",
  791. 0x0530+CC_LO*0x1000,
  792. 0x0AC0+(0xf-CC_LO)*0x1000, "r", 0, SIZE_NONE, 0,
  793. cris_scc_op},
  794. {"sls",
  795. 0x0530+CC_LS*0x1000,
  796. 0x0AC0+(0xf-CC_LS)*0x1000, "r", 0, SIZE_NONE, 0,
  797. cris_scc_op},
  798. {"slt",
  799. 0x0530+CC_LT*0x1000,
  800. 0x0AC0+(0xf-CC_LT)*0x1000, "r", 0, SIZE_NONE, 0,
  801. cris_scc_op},
  802. {"smi",
  803. 0x0530+CC_MI*0x1000,
  804. 0x0AC0+(0xf-CC_MI)*0x1000, "r", 0, SIZE_NONE, 0,
  805. cris_scc_op},
  806. {"sne",
  807. 0x0530+CC_NE*0x1000,
  808. 0x0AC0+(0xf-CC_NE)*0x1000, "r", 0, SIZE_NONE, 0,
  809. cris_scc_op},
  810. {"spl",
  811. 0x0530+CC_PL*0x1000,
  812. 0x0AC0+(0xf-CC_PL)*0x1000, "r", 0, SIZE_NONE, 0,
  813. cris_scc_op},
  814. {"sub", 0x0680, 0x0940, "m r,R", 0, SIZE_NONE, 0,
  815. cris_reg_mode_add_sub_cmp_and_or_move_op},
  816. {"sub", 0x0a80, 0x0140, "m s,R", 0, SIZE_FIELD, 0,
  817. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  818. {"sub", 0x0a80, 0x0140, "m S,D", 0, SIZE_NONE,
  819. cris_ver_v0_10,
  820. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  821. {"sub", 0x0a80, 0x0540, "m S,R,r", 0, SIZE_NONE,
  822. cris_ver_v0_10,
  823. cris_three_operand_add_sub_cmp_and_or_op},
  824. {"subq", 0x0280, 0x0d40, "I,R", 0, SIZE_NONE, 0,
  825. cris_quick_mode_add_sub_op},
  826. {"subs", 0x04a0, 0x0b40, "z r,R", 0, SIZE_NONE, 0,
  827. cris_reg_mode_add_sub_cmp_and_or_move_op},
  828. /* FIXME: SIZE_FIELD_SIGNED and all necessary changes. */
  829. {"subs", 0x08a0, 0x0340, "z s,R", 0, SIZE_FIELD, 0,
  830. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  831. {"subs", 0x08a0, 0x0340, "z S,D", 0, SIZE_NONE,
  832. cris_ver_v0_10,
  833. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  834. {"subs", 0x08a0, 0x0740, "z S,R,r", 0, SIZE_NONE,
  835. cris_ver_v0_10,
  836. cris_three_operand_add_sub_cmp_and_or_op},
  837. {"subu", 0x0480, 0x0b60, "z r,R", 0, SIZE_NONE, 0,
  838. cris_reg_mode_add_sub_cmp_and_or_move_op},
  839. /* FIXME: SIZE_FIELD_UNSIGNED and all necessary changes. */
  840. {"subu", 0x0880, 0x0360, "z s,R", 0, SIZE_FIELD, 0,
  841. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  842. {"subu", 0x0880, 0x0360, "z S,D", 0, SIZE_NONE,
  843. cris_ver_v0_10,
  844. cris_none_reg_mode_add_sub_cmp_and_or_move_op},
  845. {"subu", 0x0880, 0x0760, "z S,R,r", 0, SIZE_NONE,
  846. cris_ver_v0_10,
  847. cris_three_operand_add_sub_cmp_and_or_op},
  848. {"svc",
  849. 0x0530+CC_VC*0x1000,
  850. 0x0AC0+(0xf-CC_VC)*0x1000, "r", 0, SIZE_NONE, 0,
  851. cris_scc_op},
  852. {"svs",
  853. 0x0530+CC_VS*0x1000,
  854. 0x0AC0+(0xf-CC_VS)*0x1000, "r", 0, SIZE_NONE, 0,
  855. cris_scc_op},
  856. /* The insn "swapn" is the same as "not" and will be disassembled as
  857. such, but the swap* family of mnmonics are generally v8-and-higher
  858. only, so count it in. */
  859. {"swapn", 0x8770, 0x7880, "r", 0, SIZE_NONE,
  860. cris_ver_v8p,
  861. cris_not_implemented_op},
  862. {"swapw", 0x4770, 0xb880, "r", 0, SIZE_NONE,
  863. cris_ver_v8p,
  864. cris_not_implemented_op},
  865. {"swapnw", 0xc770, 0x3880, "r", 0, SIZE_NONE,
  866. cris_ver_v8p,
  867. cris_not_implemented_op},
  868. {"swapb", 0x2770, 0xd880, "r", 0, SIZE_NONE,
  869. cris_ver_v8p,
  870. cris_not_implemented_op},
  871. {"swapnb", 0xA770, 0x5880, "r", 0, SIZE_NONE,
  872. cris_ver_v8p,
  873. cris_not_implemented_op},
  874. {"swapwb", 0x6770, 0x9880, "r", 0, SIZE_NONE,
  875. cris_ver_v8p,
  876. cris_not_implemented_op},
  877. {"swapnwb", 0xE770, 0x1880, "r", 0, SIZE_NONE,
  878. cris_ver_v8p,
  879. cris_not_implemented_op},
  880. {"swapr", 0x1770, 0xe880, "r", 0, SIZE_NONE,
  881. cris_ver_v8p,
  882. cris_not_implemented_op},
  883. {"swapnr", 0x9770, 0x6880, "r", 0, SIZE_NONE,
  884. cris_ver_v8p,
  885. cris_not_implemented_op},
  886. {"swapwr", 0x5770, 0xa880, "r", 0, SIZE_NONE,
  887. cris_ver_v8p,
  888. cris_not_implemented_op},
  889. {"swapnwr", 0xd770, 0x2880, "r", 0, SIZE_NONE,
  890. cris_ver_v8p,
  891. cris_not_implemented_op},
  892. {"swapbr", 0x3770, 0xc880, "r", 0, SIZE_NONE,
  893. cris_ver_v8p,
  894. cris_not_implemented_op},
  895. {"swapnbr", 0xb770, 0x4880, "r", 0, SIZE_NONE,
  896. cris_ver_v8p,
  897. cris_not_implemented_op},
  898. {"swapwbr", 0x7770, 0x8880, "r", 0, SIZE_NONE,
  899. cris_ver_v8p,
  900. cris_not_implemented_op},
  901. {"swapnwbr", 0xf770, 0x0880, "r", 0, SIZE_NONE,
  902. cris_ver_v8p,
  903. cris_not_implemented_op},
  904. {"test", 0x0640, 0x0980, "m D", 0, SIZE_NONE,
  905. cris_ver_v0_10,
  906. cris_reg_mode_test_op},
  907. {"test", 0x0b80, 0xf040, "m y", 0, SIZE_FIELD, 0,
  908. cris_none_reg_mode_clear_test_op},
  909. {"test", 0x0b80, 0xf040, "m S", 0, SIZE_NONE,
  910. cris_ver_v0_10,
  911. cris_none_reg_mode_clear_test_op},
  912. {"xor", 0x07B0, 0x0840, "r,R", 0, SIZE_NONE, 0,
  913. cris_xor_op},
  914. {NULL, 0, 0, NULL, 0, 0, 0, cris_not_implemented_op}
  915. };
  916. /* Condition-names, indexed by the CC_* numbers as found in cris.h. */
  917. const char * const
  918. cris_cc_strings[] =
  919. {
  920. "hs",
  921. "lo",
  922. "ne",
  923. "eq",
  924. "vc",
  925. "vs",
  926. "pl",
  927. "mi",
  928. "ls",
  929. "hi",
  930. "ge",
  931. "lt",
  932. "gt",
  933. "le",
  934. "a",
  935. /* This is a placeholder. In v0, this would be "ext". In v32, this
  936. is "sb". See cris_conds15. */
  937. "wf"
  938. };
  939. /* Different names and semantics for condition 1111 (0xf). */
  940. const struct cris_cond15 cris_cond15s[] =
  941. {
  942. /* FIXME: In what version did condition "ext" disappear? */
  943. {"ext", cris_ver_v0_3},
  944. {"wf", cris_ver_v10},
  945. {"sb", cris_ver_v32p},
  946. {NULL, 0}
  947. };
  948. /*
  949. * Local variables:
  950. * eval: (c-set-style "gnu")
  951. * indent-tabs-mode: t
  952. * End:
  953. */