Rizin
unix-like reverse engineering framework and cli tools
arc-opc.c
Go to the documentation of this file.
1 /* Opcode table for the ARC.
2  Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2009, 2011
3  Free Software Foundation, Inc.
4  Contributed by Doug Evans (dje@cygnus.com).
5 
6  Copyright 2007-2012 Synopsys Inc
7  Contributor: Brendon Kehoe <brendan@zen.org>
8  Contributor: Michael Eager <eager@eagercon.com>
9  Contributor: Joern Rennecke <joern.rennecke@embecosm.com>
10 
11  This file is part of libopcodes.
12 
13  This library is free software; you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation; either version 3, or (at your option)
16  any later version.
17 
18  It is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
21  License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software Foundation,
25  Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
26 
27 #include "sysdep.h"
28 #include <stdio.h>
29 #include <string.h>
30 #include "ansidecl.h"
31 #include "arc.h"
32 #include "opintl.h"
33 
34 
35 /* -------------------------------------------------------------------------- */
36 /* local types */
37 /* -------------------------------------------------------------------------- */
38 
40 
41 
42 /* -------------------------------------------------------------------------- */
43 /* local macros */
44 /* -------------------------------------------------------------------------- */
45 
46 #define ELEMENTS_IN(arr) (sizeof (arr) / sizeof ((arr)[0]))
47 
48 
49 /* -------------------------------------------------------------------------- */
50 /* forward declarations of functions */
51 /* -------------------------------------------------------------------------- */
52 
53 int arc_get_noshortcut_flag (void);
54 
55 #define INSERT_FN(fn) \
56 static arc_insn fn (arc_insn, long *, const struct arc_operand *, \
57  int, const struct arc_operand_value *, long, \
58  const char **)
59 
60 #define EXTRACT_FN(fn) \
61 static long fn (arc_insn *, const struct arc_operand *, \
62  int, const struct arc_operand_value **, int *)
63 
89 
100 
101 
102 /* -------------------------------------------------------------------------- */
103 /* local data */
104 /* -------------------------------------------------------------------------- */
105 
106 /* Nonzero if we've seen an 'f' suffix (in certain insns). */
107 static int flag_p;
108 
109 /* Nonzero if we've finished processing the 'f' suffix. */
111 
112 /* Nonzero if we've seen a 'a' suffix (address writeback). */
113 static int addrwb_p;
114 
115 /* Nonzero if we've inserted a nullify condition. */
116 static int nullify_p;
117 
118 /* The value of the a nullify condition we inserted. */
119 static int nullify;
120 
121 /* Nonzero if we've inserted jumpflags. */
122 static int jumpflags_p;
123 
124 /* Nonzero if we've inserted a shimm. */
125 static int shimm_p;
126 
127 /* The value of the shimm we inserted (each insn only gets one but it can
128  appear multiple times). */
129 static int shimm;
130 
131 /* Nonzero if we've inserted a limm (during assembly) or seen a limm
132  (during disassembly). */
133 static int limm_p;
134 
135 /* The value of the limm we inserted. Each insn only gets one but it can
136  appear multiple times. */
137 static long limm;
138 
139 
140 /* Configuration flags. */
141 
142 /* Various ARC_HAVE_XXX bits. */
143 static int cpu_type;
144 
145 
146 /* Given a format letter, yields the index into `arc_operands'.
147  eg: arc_operand_map['a'] = REGA, for ARCtangent-A4. */
148 static unsigned char arc_operand_map_a4[256];
149 static unsigned char arc_operand_map_ac[256];
150 
151 
152 #define OPERANDS 3
153 
154 static enum operand ls_operand[OPERANDS];
155 
156 
157 /* Various types of ARC operands, including insn suffixes. */
158 
159 /* Insn format values:
160 
161  'a' REGA register A field
162  'b' REGB register B field
163  'c' REGC register C field
164  'S' SHIMMFINISH finish inserting a shimm value
165  'L' LIMMFINISH finish inserting a limm value
166  'o' OFFSET offset in st insns
167  'O' OFFSET offset in ld insns
168  '0' SYNTAX_ST_NE enforce store insn syntax, no errors
169  '1' SYNTAX_LD_NE enforce load insn syntax, no errors
170  '2' SYNTAX_ST enforce store insn syntax, errors, last pattern only
171  '3' SYNTAX_LD enforce load insn syntax, errors, last pattern only
172  's' BASE base in st insn
173  'f' FLAG F flag
174  'F' FLAGFINISH finish inserting the F flag
175  'G' FLAGINSN insert F flag in "flag" insn
176  'n' DELAY N field (nullify field)
177  'q' COND condition code field
178  'Q' FORCELIMM set `arc_cond_p' to 1 to ensure a constant is a limm
179  'B' BRANCH branch address (22 bit pc relative)
180  'J' JUMP jump address (26 bit absolute)
181  'j' JUMPFLAGS optional high order bits of 'J'
182  'z' SIZE1 size field in ld a,[b,c]
183  'Z' SIZE10 size field in ld a,[b,shimm]
184  'y' SIZE22 size field in st c,[b,shimm]
185  'x' SIGN0 sign extend field ld a,[b,c]
186  'X' SIGN9 sign extend field ld a,[b,shimm]
187  'w' ADDRESS3 write-back field in ld a,[b,c]
188  'W' ADDRESS12 write-back field in ld a,[b,shimm]
189  'v' ADDRESS24 write-back field in st c,[b,shimm]
190  'e' CACHEBYPASS5 cache bypass in ld a,[b,c]
191  'E' CACHEBYPASS14 cache bypass in ld a,[b,shimm]
192  'D' CACHEBYPASS26 cache bypass in st c,[b,shimm]
193  'U' UNOPMACRO fake operand to copy REGB to REGC for unop macros
194 
195  The following modifiers may appear between the % and char (eg: %.f):
196 
197  '.' MODDOT '.' prefix must be present
198  'r' REG generic register value, for register table
199  'A' AUXREG auxiliary register in lr a,[b], sr c,[b]
200 
201  Fields are:
202 
203  CHAR BITS SHIFT FLAGS INSERT_FN EXTRACT_FN */
204 
205 /* Operand table used for ARCtangent-A4 instructions */
206 
207 static const struct arc_operand arc_operands_a4[] =
208 {
209 /* Place holder (??? not sure if needed). */
210 #define UNUSED 0
211  { 0, 0, 0, 0, 0, 0 },
212 
213 /* Register A or shimm/limm indicator. */
214 #define REGA (UNUSED + 1)
216 
217 /* Register B or shimm/limm indicator. */
218 #define REGB (REGA + 1)
220 
221 /* Register C or shimm/limm indicator. */
222 #define REGC (REGB + 1)
224 
225 /* Fake operand used to insert shimm value into most instructions. */
226 #define SHIMMFINISH (REGC + 1)
228 
229 /* Fake operand used to insert limm value into most instructions. */
230 #define LIMMFINISH (SHIMMFINISH + 1)
232 
233 /* Shimm operand when there is no reg indicator (st). */
234 #define ST_OFFSET (LIMMFINISH + 1)
236 
237 /* Shimm operand when there is no reg indicator (ld). */
238 #define LD_OFFSET (ST_OFFSET + 1)
240 
241 /* Operand for base. */
242 #define BASE (LD_OFFSET + 1)
244 
245 /* 0 enforce syntax for st insns. */
246 #define SYNTAX_ST_NE (BASE + 1)
248 
249 /* 1 enforce syntax for ld insns. */
250 #define SYNTAX_LD_NE (SYNTAX_ST_NE + 1)
252 
253 /* 0 enforce syntax for st insns. */
254 #define SYNTAX_ST (SYNTAX_LD_NE + 1)
256 
257 /* 0 enforce syntax for ld insns. */
258 #define SYNTAX_LD (SYNTAX_ST + 1)
260 
261 /* Flag update bit (insertion is deferred until we know how). */
262 #define FLAG (SYNTAX_LD + 1)
264 
265 /* Fake utility operand to finish 'f' suffix handling. */
266 #define FLAGFINISH (FLAG + 1)
267  { 'F', 1, 8, ARC_OPERAND_FAKE, insert_flagfinish, 0 },
268 
269 /* Fake utility operand to set the 'f' flag for the "flag" insn. */
270 #define FLAGINSN (FLAGFINISH + 1)
271  { 'G', 1, 8, ARC_OPERAND_FAKE, insert_flag, 0 },
272 
273 /* Branch delay types. */
274 #define DELAY (FLAGINSN + 1)
275  { 'n', 2, 5, ARC_OPERAND_SUFFIX , insert_nullify, 0 },
276 
277 /* Conditions. */
278 #define COND (DELAY + 1)
280 
281 /* Set `arc_cond_p' to 1 to ensure a constant is treated as a limm. */
282 #define FORCELIMM (COND + 1)
283  { 'Q', 0, 0, ARC_OPERAND_FAKE, insert_forcelimm, 0 },
284 
285 /* Branch address; b, bl, and lp insns. */
286 #define BRANCH (FORCELIMM + 1)
288 
289 /* Jump address; j insn (this is basically the same as 'L' except that the
290  value is right shifted by 2). */
291 #define JUMP (BRANCH + 1)
293 
294 /* Jump flags; j{,l} insn value or'ed into 'J' addr for flag values. */
295 #define JUMPFLAGS (JUMP + 1)
297 
298 /* Size field, stored in bit 1,2. */
299 #define SIZE1 (JUMPFLAGS + 1)
300  { 'z', 2, 1, ARC_OPERAND_SUFFIX, 0, 0 },
301 
302 /* Size field, stored in bit 10,11. */
303 #define SIZE10 (SIZE1 + 1)
304  { 'Z', 2, 10, ARC_OPERAND_SUFFIX, 0, 0 },
305 
306 /* Size field, stored in bit 22,23. */
307 #define SIZE22 (SIZE10 + 1)
308  { 'y', 2, 22, ARC_OPERAND_SUFFIX, 0, 0 },
309 
310 /* Sign extend field, stored in bit 0. */
311 #define SIGN0 (SIZE22 + 1)
312  { 'x', 1, 0, ARC_OPERAND_SUFFIX, 0, 0 },
313 
314 /* Sign extend field, stored in bit 9. */
315 #define SIGN9 (SIGN0 + 1)
316  { 'X', 1, 9, ARC_OPERAND_SUFFIX, 0, 0 },
317 
318 /* Address write back, stored in bit 3. */
319 #define ADDRESS3 (SIGN9 + 1)
320  { 'w', 1, 3, ARC_OPERAND_SUFFIX, insert_addr_wb, 0},
321 
322 /* Address write back, stored in bit 12. */
323 #define ADDRESS12 (ADDRESS3 + 1)
324  { 'W', 1, 12, ARC_OPERAND_SUFFIX, insert_addr_wb, 0},
325 
326 /* Address write back, stored in bit 24. */
327 #define ADDRESS24 (ADDRESS12 + 1)
328  { 'v', 1, 24, ARC_OPERAND_SUFFIX, insert_addr_wb, 0},
329 
330 /* Cache bypass, stored in bit 5. */
331 #define CACHEBYPASS5 (ADDRESS24 + 1)
332  { 'e', 1, 5, ARC_OPERAND_SUFFIX, 0, 0 },
333 
334 /* Cache bypass, stored in bit 14. */
335 #define CACHEBYPASS14 (CACHEBYPASS5 + 1)
336  { 'E', 1, 14, ARC_OPERAND_SUFFIX, 0, 0 },
337 
338 /* Cache bypass, stored in bit 26. */
339 #define CACHEBYPASS26 (CACHEBYPASS14 + 1)
340  { 'D', 1, 26, ARC_OPERAND_SUFFIX, 0, 0 },
341 
342 /* Unop macro, used to copy REGB to REGC. */
343 #define UNOPMACRO (CACHEBYPASS26 + 1)
345 
346 /* '.' modifier ('.' required). */
347 #define MODDOT (UNOPMACRO + 1)
348  { '.', 1, 0, ARC_MOD_DOT, 0, 0 },
349 
350 /* Dummy 'r' modifier for the register table.
351  It's called a "dummy" because there's no point in inserting an 'r' into all
352  the %a/%b/%c occurrences in the insn table. */
353 #define REG (MODDOT + 1)
354  { 'r', 6, 0, ARC_MOD_REG, 0, 0 },
355 
356 /* Known auxiliary register modifier (stored in shimm field). */
357 #define AUXREG (REG + 1)
358  { 'A', 9, 0, ARC_MOD_AUXREG, 0, 0 },
359 
360 /* End of list place holder. */
361  { 0, 0, 0, 0, 0, 0 }
362 };
363 
364 
365 /* Various types of ARCompact operands, including insn suffixes */
366 
367 /* Operand format values:
368 
369  'A' REGA_AC register A field for ARCompact 32-bit insns
370  'B' REGB_SOURCE_AC register B (as a source) field for ARCompact 32-bit insns
371  '#' REGB_DEST_AC register B (as a destination) field for ARCompact 32-bit insns
372  'C' REGC_AC register C field for ARCompact 32-bit insns
373  'u' UIMM6_AC 6-bit unsigned immediate
374  'K' SIMM12_AC 12-bit signed immediate
375  'L' LIMM_AC 32-bit long immediate
376  'F' FLAGFINISH_AC finish inserting the F flag for ARCompact insns
377  'n' DELAY_AC N field (nullify field)
378  'N' JUMP_DELAY_AC nullify field for "j" and "jl" insns
379  'o' OFFSET_AC 9-bit Offset in ARCompact 32-bit 'ld' insns
380  'd' SIMM9_AC 9-bit signed immediate value for 'bbit' insns
381  'z' SIZE1_AC size field in ARCompact "st" insns
382  't' SIZE7_AC size field in ARCompact "ld" insns
383  'T' SIZE17_AC size field in ARCompact "ld" insns
384  'x' SIGN6_AC sign extend field in ARCompact "ld" insns
385  'X' SIGN16_AC sign extend field in ARCompact "ld" insns
386  'w' ADDRESS3_AC write-back field in ld a,[b,c]
387  'p' ADDRESS9_AC write-back field in ARCompact "ld a,[b,s9]" insns
388  'P' ADDRESS22_AC write-back field in ARCompact "ld a,[b,c]" insns
389 
390  '&' ADDRESS22S_AC scaling field in ARCompact "ld a,[limm,c]" insns
391  'D' CACHEBYPASS5_AC cache bypass in ARCompact "st" insns
392  'v' CACHEBYPASS11_AC cache bypass in ARCompact "ld a,[b,s9]" insns
393  'V' CACHEBYPASS15_AC cache bypass in ARCompact "ld a,[b,c]" insns and
394  A700 Atomic Exchange (ex.<di> b,[c] and ex.<di> b,[limm]
395  'g' BASE_AC base in ARCompact "st" insns
396  'h' BLINK_AC branch address (21-bit pc-relative) in
397  conditional 'bl' (BLcc) insns
398  'H' UNCOND_BLINK_AC branch address (25-bit pc-relative) in
399  unconditional 'bl' (BL) insns
400  'i' BRANCH_AC branch address (21-bit pc-relative) in
401  conditional 'b' (Bcc) insns
402  'I' UNCOND_BRANCH_AC branch address (25-bit pc-relative) in
403  unconditional 'b' (B) insns
404  'y' UIMM7BY2_AC 7-bit unsigned immediate operand used in ARCompact
405  'lp' insns
406  'Y' SIMM13BY2_AC 13-bit signed immediate operand used in ARCompact
407  'lp' insns
408  'q' COND_AC condition code field
409  'f' FLAG_AC F flag in ARCompact insns
410  'Q' FORCELIMM_AC set `arc_cond_p' to 1 to ensure a constant is a limm
411  '0' SYNTAX_ST_NE_AC enforce store insn syntax, no errors
412  '1' SYNTAX_LD_NE_AC enforce load insn syntax, no errors
413  '2' SYNTAX_ST_AC enforce store insn syntax, errors, last pattern only
414  '3' SYNTAX_LD_AC enforce load insn syntax, errors, last pattern only
415  '7' ILINK1 'ilink1' register indicator
416  '8' ILINK2 'ilink2' register indicator
417 
418  The following modifiers may appear between the % and char (eg: %.f):
419 
420  '.' MODDOT_AC '.' prefix must be present
421  'r' REG_AC generic register value, for register table
422  'G' AUXREG_AC auxiliary register in "lr" and "sr" insns
423 
424  The following operands are used specific to 16-bit insns
425 
426  'a' REGA_AC16 register A field for ARCompact 16-bit insns
427  'b' REGB_AC16 register B field for ARCompact 16-bit insns
428  'c' REGC_AC16 register C field for ARCompact 16-bit insns
429  'U' REGH_AC16 high register H field for ARCompact 16-bit insns
430 
431 
432  'e' UIMM3_AC16 3-bit unsigned immediate
433  'E' UIMM5_AC16 5-bit unsigned immediate
434  'j' UIMM7_AC16 7-bit unsigned immediate
435  'J' UIMM8_AC16 8-bit unsigned immediate
436  'k' UIMM6BY2_AC16 6-bit unsigned immediate, stored in bits 0-4
437  'l' UIMM7BY4_AC16 7-bit unsigned immediate, stored in bits 0-4
438  'm' UIMM10BY4_AC16 10-bit unsigned immediate, stored in bits 0-7
439  's' COND_BRANCH_AC16 branch address (7-bit pc-relative) for 16-bit
440  conditional branch insns (ex: bgt_s)
441  'S' CMP_BRANCH_AC16 branch address (8-bit pc-relative) for 16-bit
442  compare and branch insns (ex: breq_s, brne_s)
443  'Z' UNCOND_BRANCH_AC16 branch address (10-bit pc-relative) for 16-bit
444  branch insns (b_s, beq_s, bne_s)
445  'W' BLINK_AC16 branch address (11-bit pc-relative) for 16-bit
446  branch and link insns (bl_s)
447  'M' SIMM9_AC16 9-bit offset, used in "ldb_s" insn
448  'O' SIMM10BY2_AC16 10-bit offset(2-byte aligned), used in "ldw_s" insn
449  'R' SIMM11BY4_AC16 11-bit offset(4-byte aligned), used in "ld_s" insn
450  '4' REG_R0 'r0' register indicator
451  '5' REG_GP 'gp' register indicator
452  '6' REG_SP 'sp' register indicator
453  '9' REG_BLINK 'blink' register indicator
454  '!' REG_PCL 'pcl' register indicator
455  '@' UIMM6_A700_16 6-bit unsigned immediate in A700
456 
457  The following operands are used specific to the Aurora SIMD insns
458 
459  '*' SIMD_VR_DEST 'vr' registers as the destination in the A field
460  '(' SIMD_VR_REGB 'vr' registers in the field B
461  ')' SIMD_VR_REGC 'vr' registers in the field C
462 
463  '{' SIMD_I_REGB 'I' registers in the field B
464  '}' SIMD_I_REGC 'I' registers in the field C
465 
466  '<' SIMD_DR_REGB 'DR' registers in the field B
467  '>' SIMD_DR_REGC 'DR' registers in the field C
468  '?' SIMD_U8_CONSTANT A unsigned 8 bit constant
469  '\13' SIMD_I_REGA 'I' registers in the field A
470  '\14' SIMD_I_S12 signed 12 bit in simd instruction
471  '\15' SIMD_I_K_REGA 'K' registers in the field A
472  '\16' SIMD_I_K_REGB 'K' registers in the field B
473  '\17' SIMD_I_K_REGC 'K' registers in the field C
474  '\20' SIMD_I_U16 unsigned 16 bit in simd
475  '\21' SIMD_I_UU16 high order 8 of 16 bit unsigned
476  '\22' SIMD_I_UL16 low order 8 of 16 bit unsigned
477  '\23' SIMD_DISCARDED value not used
478  '\24' SIMD_I_S15 simd 15 bit signed field
479  '\25' SIMD_I_ZR zero constant value field
480 
481 
482  Fields are:
483 
484  CHAR BITS SHIFT FLAGS INSERT_FN EXTRACT_FN
485 */
486 
487 /* Operand table used for ARCompact instructions */
488 
489 static const struct arc_operand arc_operands_ac[] =
490 {
491 /* place holder (??? not sure if needed) */
492 #define UNUSED_AC 0
493  { 0, 0, 0, 0, 0, 0 },
494 
495 /* register A used for ARCompact 32-bit insns */
496 #define REGA_AC (UNUSED_AC + 1)
498 
499 /* register B used for ARCompact 32-bit insns as a source */
500 #define REGB_SOURCE_AC (REGA_AC + 1)
502 
503 /* register B used for ARCompact 32-bit insns as a destination */
504 #define REGB_DEST_AC (REGB_SOURCE_AC + 1)
506 
507 /* register C used for ARCompact 32-bit insns */
508 #define REGC_AC (REGB_DEST_AC + 1)
510 
511 /* 6-bit unsigned immediate value, used in ARCompact 32-bit insns */
512 #define UIMM6_AC (REGC_AC + 1)
513  { 'u', 6, 6, ARC_OPERAND_UNSIGNED, 0, 0 },
514 
515 /* 12-bit signed immediate value, used in ARCompact 32-bit insns */
516 #define SIMM12_AC (UIMM6_AC + 1)
517  { 'K', 12, 6, ARC_OPERAND_SIGNED, 0, 0 },
518 
519 /* 32-bit long immediate value, used in ARCompact insns */
520 #define LIMM_AC (SIMM12_AC + 1)
521  { 'L', 32, 32, ARC_OPERAND_ADDRESS | ARC_OPERAND_LIMM, insert_reg, 0 },
522 
523 /* set `arc_cond_p' to 1 to ensure a constant is treated as a limm */
524 #define FORCELIMM_AC (LIMM_AC + 1)
525  { 'Q', 0, 0, ARC_OPERAND_FAKE, insert_forcelimm, 0 },
526 
527 /* conditional code indicator, used in ARCompact insns */
528 #define COND_AC (FORCELIMM_AC + 1)
530 
531 /* flag update bit (insertion is deferred until we know how) */
532 #define FLAG_AC (COND_AC + 1)
533  { 'f', 1, 15, ARC_OPERAND_SUFFIX, insert_flag, extract_flag },
534 
535 /* fake utility operand to finish 'f' suffix handling for ARCompact inst */
536 #define FLAGFINISH_AC (FLAG_AC + 1)
537  { 'F', 1, 15, ARC_OPERAND_FAKE, insert_flagfinish, 0 },
538 
539 /* branch delay types for ARCompact 32-bit insns */
540 #define DELAY_AC (FLAGFINISH_AC + 1)
541  { 'n', 1, 5, ARC_OPERAND_SUFFIX, insert_nullify, 0 },
542 
543 /* delay types for ARCompact 32-bit "j"/"jl" insns */
544 #define JUMP_DELAY_AC (DELAY_AC + 1)
545  { 'N', 1, 16, ARC_OPERAND_SUFFIX, insert_nullify, 0 },
546 
547 /* size field, stored in bit 1,2 */
548 #define SIZE1_AC (JUMP_DELAY_AC + 1)
549  { 'z', 2, 1, ARC_OPERAND_SUFFIX, 0, 0 },
550 
551 /* size field, stored in bit 7,8 */
552 #define SIZE7_AC (SIZE1_AC + 1)
553  { 't', 2, 7, ARC_OPERAND_SUFFIX, 0, 0 },
554 
555 /* size field, stored in bit 17,18 */
556 #define SIZE17_AC (SIZE7_AC + 1)
557  { 'T', 2, 17, ARC_OPERAND_SUFFIX, 0, 0 },
558 
559 /* sign extend field, stored in bit 6 */
560 #define SIGN6_AC (SIZE17_AC + 1)
561  { 'x', 1, 6, ARC_OPERAND_SUFFIX, 0, 0 },
562 
563 /* sign extend field, stored in bit 16 */
564 #define SIGN16_AC (SIGN6_AC + 1)
565  { 'X', 1, 16, ARC_OPERAND_SUFFIX, 0, 0 },
566 
567 /* address write back field, stored in bit 3,4 */
568 #define ADDRESS3_AC (SIGN16_AC + 1)
569  { 'w', 2, 3, ARC_OPERAND_SUFFIX, insert_addr_wb, 0 },
570 
571 /* address write back field, stored in bit 9, 10 */
572 #define ADDRESS9_AC (ADDRESS3_AC + 1)
573  { 'p', 2, 9, ARC_OPERAND_SUFFIX, insert_addr_wb, 0 },
574 
575 /* address write back field, stored in bit 22 */
576 #define ADDRESS22_AC (ADDRESS9_AC + 1)
577  { 'P', 2, 22, ARC_OPERAND_SUFFIX, insert_addr_wb, 0 },
578 
579 /* address scaling field, stored in bit 22 */
580 #define ADDRESS22S_AC (ADDRESS22_AC + 1)
581  { '&', 2, 22, ARC_OPERAND_SUFFIX, insert_addr_wb, 0 },
582 
583 /* cache bypass field, stored in bit 5 */
584 #define CACHEBYPASS5_AC (ADDRESS22S_AC + 1)
585  { 'D', 1, 5, ARC_OPERAND_SUFFIX, 0, 0 },
586 
587 /* cache bypass field, stored in bit 11 */
588 #define CACHEBYPASS11_AC (CACHEBYPASS5_AC + 1)
589  { 'v', 1, 11, ARC_OPERAND_SUFFIX, 0, 0 },
590 
591 /* cache bypass field, stored in bit 15 */
592 #define CACHEBYPASS15_AC (CACHEBYPASS11_AC + 1)
593  { 'V', 1, 15, ARC_OPERAND_SUFFIX, 0, 0 },
594 
595 /* base register for ARCompact 32-bit "ld"/"st" insns */
596 #define BASE_AC (CACHEBYPASS15_AC + 1)
598 
599 /* 9-bit signed immediate offset, used in ARCompact 32-bit "ld" insn */
600 #define OFFSET_AC (BASE_AC + 1)
602 
603 /* branch address(9-bit, pc-relative, 2-byte aligned), used for
604  "bbit0"/"bbit1" insns */
605 #define SIMM9_AC (OFFSET_AC + 1)
607 
608 /* branch address(21-bit, pc-relative, 4-byte aligned), used for
609  ARCompact 32-bit conditional 'bl' insns */
610 #define BLINK_AC (SIMM9_AC + 1)
612 
613 /* branch address(25-bit, pc-relative, 4-byte aligned), used for
614  ARCompact 32-bit unconditional 'bl' insns */
615 #define UNCOND_BLINK_AC (BLINK_AC + 1)
617 
618 /* branch address(21-bit, pc-relative, 2-byte aligned), used for
619  ARCompact 32-bit conditional 'b' insns */
620 #define BRANCH_AC (UNCOND_BLINK_AC + 1)
622 
623 /* branch address(25-bit, pc-relative, 2-byte aligned), used for
624  ARCompact 32-bit unconditional 'b' insns */
625 #define UNCOND_BRANCH_AC (BRANCH_AC + 1)
627 
628 /* branch address (7-bit, unsigned pc-relative, 2-byte aligned), used for
629  ARCompact 32-bit conditional 'lp' insns */
630 #define UIMM7BY2_AC (UNCOND_BRANCH_AC + 1)
632 
633 /* branch address (13-bit, pc-relative, 2-byte aligned), used for
634  ARCompact 32-bit uncoditional 'lp' insns */
635 #define SIMM13BY2_AC (UIMM7BY2_AC + 1)
637 
638 /* enforce syntax for st insns */
639 #define SYNTAX_ST_NE_AC (SIMM13BY2_AC + 1)
641 
642 /* enforce syntax for ld insns */
643 #define SYNTAX_LD_NE_AC (SYNTAX_ST_NE_AC + 1)
645 
646 /* enforce syntax for st insns */
647 #define SYNTAX_ST_AC (SYNTAX_LD_NE_AC + 1)
649 
650 /* enforce syntax for ld insns */
651 #define SYNTAX_LD_AC (SYNTAX_ST_AC + 1)
653 
654 /* enforce syntax for ex insns */
655 #define SYNTAX_EX_AT (SYNTAX_LD_AC + 1)
657 
658 /* 'ilink1' register indicator, used for ARCompact 'j' insn */
659 #define ILINK1 (SYNTAX_EX_AT + 1)
660  { '7', 0, 0, 0, 0, 0 },
661 
662 /* 'ilink2' register indicator, used for ARCompact 'j' insn */
663 #define ILINK2 (ILINK1 + 1)
664  { '8', 0, 0, 0, 0, 0 },
665 
666 /* '.' modifier ('.' required). */
667 #define MODDOT_AC (ILINK2 + 1)
668  { '.', 1, 0, ARC_MOD_DOT, 0, 0 },
669 
670 /* Dummy 'r' modifier for the register table. */
671 #define REG_AC (MODDOT_AC + 1)
672  { 'r', 6, 0, ARC_MOD_REG, 0, 0 },
673 
674 /* Known auxiliary register modifier */
675 #define AUXREG_AC (REG_AC + 1)
676  { 'G', 9, 0, ARC_MOD_AUXREG, 0, 0 },
677 
678 /* Operands used specific to ARCompact 16-bit insns */
679 
680 /* register A indicator, for ARCompact 16-bit insns */
681 #define REGA_AC16 (AUXREG_AC + 1)
683 
684 /* register B indicator, for ARCompact 16-bit insns */
685 #define REGB_AC16 (REGA_AC16 + 1)
687 
688 /* register C indicator, for ARCompact 16-bit insns */
689 #define REGC_AC16 (REGB_AC16 + 1)
691 
692 /* high register(r0-r63) indicator, for ARCompact 16-bit insns */
693 #define REGH_AC16 (REGC_AC16 + 1)
695 
696 /* 3-bit unsigned immediate, stored in bits 0-2 */
697 #define UIMM3_AC16 (REGH_AC16 + 1)
698  { 'e', 3, 0, ARC_OPERAND_UNSIGNED, 0, 0 },
699 
700 /* 5-bit unsigned immediate, stored in bits 0-4 */
701 #define UIMM5_AC16 (UIMM3_AC16 + 1)
702  { 'E', 5, 0, ARC_OPERAND_UNSIGNED, 0, 0 },
703 
704 /* 7-bit unsigned immediate, stored in bits 0-6 */
705 #define UIMM7_AC16 (UIMM5_AC16 + 1)
706  { 'j', 7, 0, ARC_OPERAND_UNSIGNED, 0, 0 },
707 
708 /* 8-bit unsigned immediate, stored in bits 0-7 */
709 #define UIMM8_AC16 (UIMM7_AC16 + 1)
710  { 'J', 8, 0, ARC_OPERAND_UNSIGNED, 0, 0 },
711 
712 /* 6-bit unsigned immediate, stored in bits 0-4, used in 16-bit ld insns */
713 #define UIMM6BY2_AC16 (UIMM8_AC16 + 1)
715 
716 /* 7-bit unsigned immediate, stored in bits 0-4, used in 16-bit
717  add/sub/ld/st insns */
718 #define UIMM7BY4_AC16 (UIMM6BY2_AC16 + 1)
719  { 'l', 5, 0, ARC_OPERAND_UNSIGNED | ARC_OPERAND_4BYTE_ALIGNED, 0, 0 },
720 
721 /* 10-bit unsigned immediate, stored in bits 0-7, used in "ld_s" insn */
722 #define UIMM10BY4_AC16 (UIMM7BY4_AC16 + 1)
724 
725 /* branch address(7-bit, pc-relative, 2-byte aligned), used for
726  ARCompact 16-bit conditional branch insns */
727 #define COND_BRANCH_AC16 (UIMM10BY4_AC16 + 1)
729 
730 /* branch address(8-bit, pc-relative, 2-byte aligned), used for
731  ARCompact 16-bit compare and branch insns */
732 #define CMP_BRANCH_AC16 (COND_BRANCH_AC16 + 1)
734 
735 /* branch address(10-bit, pc-relative, 2-byte aligned), used for
736  ARCompact 16-bit branch insns */
737 #define UNCOND_BRANCH_AC16 (CMP_BRANCH_AC16 + 1)
739 
740 /* branch address(13-bit, pc-relative), used for ARCompact 16-bit
741  branch and link insns */
742 #define BLINK_AC16 (UNCOND_BRANCH_AC16 + 1)
744 
745 /* 9-bit signed immediate offset, used in "ldb_s" insn */
746 #define SIMM9_AC16 (BLINK_AC16 + 1)
748 
749 /* 10-bit signed immediate offset(2-byte aligned), used in "ldw_s" insn */
750 #define SIMM10BY2_AC16 (SIMM9_AC16 + 1)
752 
753 /* 11-bit signed immediate offset(4-byte aligned), used in "ld_s" insn */
754 #define SIMM11BY4_AC16 (SIMM10BY2_AC16 + 1)
756 
757 /* 'r0' register indicator */
758 #define REG_R0 (SIMM11BY4_AC16 + 1)
759  { '4', 0, 0, 0, 0, 0 },
760 
761 /* 'gp' register indicator */
762 #define REG_GP (REG_R0 + 1)
763  { '5', 0, 0, 0, 0, 0 },
764 
765 /* 'sp' register indicator */
766 #define REG_SP (REG_GP + 1)
767  { '6', 0, 0, 0, 0, 0 },
768 
769 /* 'blink' register indicator */
770 #define REG_BLINK (REG_SP + 1)
771  { '9', 0, 0, 0, 0, 0 },
772 
773 /* 'pcl' register indicator */
774 #define REG_PCL (REG_BLINK + 1)
775  { '!', 0, 0, 0, 0, 0 },
776 
777  /* 'd' UIMM6_A700_16 6-bit unsigned immediate in A700 */
778 #define UIMM6_A700_16 (REG_PCL + 1)
779  { '@', 6 ,5, ARC_OPERAND_UNSIGNED, 0 , 0},
780 
781  /***** Here are the operands exclusively used in the Aurora SIMD instructions *******/
782 
783  /* '*' For a 128 bit vr register for the Aurora platform in field A*/
784 #define SIMD_VR_DEST (UIMM6_A700_16 + 1)
786 
787  /* '(' For a 128 bit vr register for the Aurora platform in field B*/
788 #define SIMD_VR_REGB (SIMD_VR_DEST + 1)
790 
791  /*')' For a 128 bit vr register for the Aurora platform in field C*/
792 #define SIMD_VR_REGC (SIMD_VR_REGB + 1)
794 
795  /*'?' For a 8 bit unsigned constant */
796 #define SIMD_U8_CONSTANT (SIMD_VR_REGC + 1)
797  { '?', 8, 6 , ARC_OPERAND_UNSIGNED , insert_u8, 0},
798 
799  /* '{' For the I registers inserted into field B*/
800 #define SIMD_I_REGB (SIMD_U8_CONSTANT + 1)
802 
803  /* '}' For the I registers inserted into field C*/
804 #define SIMD_I_REGC (SIMD_I_REGB + 1)
806 
807  /* '<' For the DR registers inserted into field B */
808 #define SIMD_DR_REGB (SIMD_I_REGC + 1)
810 
811  /* '>' For the DR registers inserted into field C*/
812 #define SIMD_DR_REGC (SIMD_DR_REGB + 1)
814 
815  /* small data symbol */
816 #define SDASYM (SIMD_DR_REGC + 1)
817  { '[', 0, 0, ARC_MOD_SDASYM, 0, 0 },
818 
819 /* simd const lanemask */
820 #define SIMD_LANEMASK (SDASYM+1)
821  { ']', 0, 15, ARC_OPERAND_SUFFIX,0,0},
822 
823 #define THROW_AC (SIMD_LANEMASK + 1)
824  { '\07', 6, 0, ARC_OPERAND_UNSIGNED, 0, 0 },
825 
826 #define SIMD_I_REGA (THROW_AC + 1)
828 #define SIMD_I_S12 (SIMD_I_REGA+1)
830 #define SIMD_K_A (SIMD_I_S12+1)
832 #define SIMD_K_B (SIMD_K_A+1)
834 #define SIMD_K_C (SIMD_K_B+1)
836 #define SIMD_I_U16 (SIMD_K_C+1)
838 #define SIMD_I_UU16 (SIMD_I_U16+1)
840 #define SIMD_I_UL16 (SIMD_I_UU16+1)
842 #define SIMD_DISCARDED (SIMD_I_UL16+1)
844 #define SIMD_I_S15 (SIMD_DISCARDED+1)
846 #define SIMD_I_ZERO (SIMD_SIMD_I_S15+1)
848 /* end of list place holder */
849  { 0, 0, 0, 0, 0, 0 }
850 };
851 
852 
853 /* -------------------------------------------------------------------------- */
854 /* externally visible data */
855 /* -------------------------------------------------------------------------- */
856 
857 /* Nonzero if we've seen a 'q' suffix (condition code). */
859 
860 /* Non-zero, for ARCtangent-A4 */
861 /* START ARC LOCAL */
862 /* Since the arc_operand_map and arc_operands default to the A4, we
863  should make sure arc_opcode_init_tables understands this, otherwise
864  we would operate with a CPU_TYPE for the A4, but the operand tables
865  would be for ARCompact. */
866 int arc_mach_a4 = 1;
867 /* END ARC LOCAL */
868 
869 /* For ARC700, no extension registers nor LP_COUNT may be the target of
870  LD or EX instructions, the only allowed encoding above 32 is 62,
871  which is used for prefetch. The initial setting of arc_ld_ext_mask
872  reflects these constraints.
873 
874  For ARC500 / ARC600, LP_COUNT is also forbidden for loads, but extension
875  registers might allow loads. */
876 unsigned long arc_ld_ext_mask = 1 << (62 - 32);
877 
879 
881 
882 #define LS_VALUE 0
883 #define LS_DEST 0
884 #define LS_BASE 1
885 #define LS_OFFSET 2
886 
887 /* By default, the pointer 'arc_operand_map' points to the operand map table
888  used for ARCtangent-A4 (i.e arc_operand_map_a4[]) . */
890 
891 /* By default, the pointer 'arc_operands' points to the operand table
892  used for 32-bit instructions (i.e arc_operands_a4[]) */
894 
895 
896 /* -------------------------------------------------------------------------- */
897 /* local functions */
898 /* -------------------------------------------------------------------------- */
899 
900 /* Insertion functions. */
901 
902 /********Insertion function for some SIMD operands***************/
903 static arc_insn
904 insert_u8 (arc_insn insn, long * insn2 ATTRIBUTE_UNUSED,
905  const struct arc_operand *operand,
906  int mods ATTRIBUTE_UNUSED,
907  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
908  long value ATTRIBUTE_UNUSED,
909  const char **errmsg ATTRIBUTE_UNUSED
910  )
911 {
912 
913  long msb2;
914  long lsb6;
915 
916  msb2 = value >> 6;
917  msb2 = msb2 << 15;
918 
919  lsb6 = value & 0x3f ;
920 
921  insn |= msb2;
922  insn |= (lsb6 << operand->shift);
923  return insn;
924 }
925 /* Insert a signed twelve bit number into a 64 bit instruction.
926  * insn is top 32 bits of instruction and gets the least significant six
927  * bits in the C operand position. The most significant six bits go to the
928  * bottom of ex.
929  * insn Top half of instruction.
930  * ex Bottom half of instruction.
931  * operand unused.
932  * reg irrevent, only used for register operands.
933  * value Signed twelve bit number.
934  * errmsg error message.
935  */
936 static arc_insn
937 insert_s12 (arc_insn insn, long *ex,
938  const struct arc_operand *operand ATTRIBUTE_UNUSED,
939  int mods ATTRIBUTE_UNUSED,
940  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
941  long value ATTRIBUTE_UNUSED,
942  const char **errmsg ATTRIBUTE_UNUSED
943  )
944 {
945 
946  long msb6;
947  long lsb6;
948 
949  msb6 = (value >> 6) & 0x3ff;
950  lsb6 = (value & 0x3f) << 6 ;
951 
952  insn |= lsb6;
953  if (ex) {
954  *ex |= msb6;
955  }
956  return insn;
957 }
958 /* Insert an unsigned sixteen bit number into a 64 bit instruction.
959  * insn is top 32 bits of instruction and gets the least significant six
960  * bits in the C operand position. The most significant six bits go to the
961  * bottom of ex.
962  * insn Top half of instruction.
963  * ex Bottom half of instruction.
964  * operand unused.
965  * reg irrevent, only used for register operands.
966  * value Signed twelve bit number.
967  * errmsg error message.
968  */
969 static arc_insn
970 insert_u16 (arc_insn insn, long *ex,
971  const struct arc_operand *operand ATTRIBUTE_UNUSED,
972  int mods ATTRIBUTE_UNUSED,
973  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
974  long value ATTRIBUTE_UNUSED,
975  const char **errmsg ATTRIBUTE_UNUSED
976  )
977 {
978 
979  long msb6;
980  long lsb6;
981 
982  msb6 = (value >> 6) & 0x3ff;
983  lsb6 = (value & 0x3f) << 6 ;
984 
985  insn |= lsb6;
986  if (ex) {
987  *ex |= msb6;
988  }
989  return insn;
990 }
991 /* Insert upper half of unsigned sixteen bit number into a 64 bit instruction.
992  * insn is top 32 bits of instruction and gets the least significant six
993  * bits in the C operand position. The most significant six bits go to the
994  * bottom of ex.
995  * insn Top half of instruction.
996  * ex Bottom half of instruction.
997  * operand unused.
998  * reg irrevent, only used for register operands.
999  * value Signed twelve bit number.
1000  * errmsg error message.
1001  */
1002 static arc_insn
1003 insert_uu16 (arc_insn insn, long *ex,
1004  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1005  int mods ATTRIBUTE_UNUSED,
1006  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1007  long value ATTRIBUTE_UNUSED,
1008  const char **errmsg ATTRIBUTE_UNUSED
1009  )
1010 {
1011 
1012  long msb8;
1013 
1014  msb8 = (value & 0xff) << 2;
1015  if (ex) {
1016  *ex |= msb8;
1017  }
1018  return insn;
1019 }
1020 /* Insert lower eight bits of unsigned sixteen bit number into a 64 bit
1021  * instruction.
1022  * insn is top 32 bits of instruction and gets the least significant six
1023  * bits in the C operand position. The most significant six bits go to the
1024  * bottom of ex.
1025  * insn Top half of instruction.
1026  * ex Bottom half of instruction.
1027  * operand unused.
1028  * reg irrevent, only used for register operands.
1029  * value Signed twelve bit number.
1030  * errmsg error message.
1031  */
1032 static arc_insn
1033 insert_ul16 (arc_insn insn, long *ex,
1034  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1035  int mods ATTRIBUTE_UNUSED,
1036  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1037  long value ATTRIBUTE_UNUSED,
1038  const char **errmsg ATTRIBUTE_UNUSED
1039  )
1040 {
1041 
1042  long msb2;
1043  long lsb6;
1044 
1045  msb2 = (value >> 6) & 0x3;
1046  lsb6 = (value & 0x3f) << 6 ;
1047 
1048  insn |= lsb6;
1049  if (ex) {
1050  *ex |= msb2;
1051  }
1052  return insn;
1053 }
1054 /* Insert 15 bits of signed number into a 64 bit instruction.
1055  * insn is top 32 bits of instruction and is unchanged.
1056  * insn Top half of instruction.
1057  * ex Bottom half of instruction, receives value in lower 15 bits.
1058  * operand unused.
1059  * reg irrevent, only used for register operands.
1060  * value Signed twelve bit number.
1061  * errmsg error message.
1062  */
1063 static arc_insn
1064 insert_s15 (arc_insn insn, long *ex,
1065  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1066  int mods ATTRIBUTE_UNUSED,
1067  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1068  long value ATTRIBUTE_UNUSED,
1069  const char **errmsg ATTRIBUTE_UNUSED
1070  )
1071 {
1072 
1073  if (ex) {
1074  *ex |= (value & 0x7fff);
1075  }
1076  return insn;
1077 }
1078 /* Discarded field.
1079  * insn is top 32 bits of instruction and gets the least significant six
1080  * bits in the C operand position. The most significant six bits go to the
1081  * bottom of ex.
1082  * insn Top half of instruction.
1083  * insn2 Bottom half of instruction.
1084  * operand unused.
1085  * reg irrevent, only used for register operands.
1086  * value Signed twelve bit number.
1087  * errmsg error message.
1088  */
1089 static arc_insn
1091  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1092  int mods ATTRIBUTE_UNUSED,
1093  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1094  long value ATTRIBUTE_UNUSED,
1095  const char **errmsg ATTRIBUTE_UNUSED
1096  )
1097 {
1098  return insn;
1099 }
1100 
1101 /* Insert a value into a register field.
1102  If REG is NULL, then this is actually a constant.
1103 
1104  We must also handle auxiliary registers for lr/sr insns. */
1105 
1106 static arc_insn
1108  const struct arc_operand *operand,
1109  int mods,
1110  const struct arc_operand_value *reg,
1111  long value,
1112  const char **errmsg)
1113 {
1114  static char buf[100];
1115  enum operand op_type = OP_NONE;
1116  if (!reg)
1117  {
1118  /* We have a constant that also requires a value stored in a register
1119  field. Handle these by updating the register field and saving the
1120  value for later handling by either %S (shimm) or %L (limm). */
1121 
1122  /* Try to use a shimm value before a limm one. */
1124  /* If we've seen a conditional suffix we have to use a limm. */
1125  && !arc_cond_p
1126  /* If we already have a shimm value that is different than ours
1127  we have to use a limm. */
1128  && (!shimm_p || shimm == value))
1129  {
1130  int marker;
1131 
1132  op_type = OP_SHIMM;
1133  /* Forget about shimm as dest mlm. */
1134 
1135  if ('a' != operand->fmt)
1136  {
1137  shimm_p = 1;
1138  shimm = value;
1139  flagshimm_handled_p = 1;
1141  }
1142  else
1143  {
1144  /* Don't request flag setting on shimm as dest. */
1145  marker = ARC_REG_SHIMM;
1146  }
1147  insn |= marker << operand->shift;
1148  /* insn |= value & 511; - done later. */
1149  }
1150  else if ((mods & ARC_MOD_SDASYM) && !ac_add_reg_sdasym_insn (insn))
1151  {
1152  /* If it is an ld/ldw/st/stw insn without any .aa suffixes, then
1153  make it a scaled instruction, i.e. set .aa field to 3 */
1154  if (addrwb_p == 0)
1155  {
1156  /* Check for ld with .aa=0 */
1157  if ((insn & 0xf8000000) == 0x10000000)
1158  {
1159  /* if an ld/ldw insn */
1160  if ((((insn >> 7) & 3) == 0) ||
1161  (((insn >> 7) & 3) == 2)) {
1162  /* Set .aa to 3 */
1163  addrwb_p = 0x600;
1164  }
1165  }
1166  /* Check for st with .aa=0 */
1167  else if ((insn & 0xf8000001) == 0x18000000)
1168  {
1169  /* if an st/stw insn */
1170  if ((((insn >> 1) & 3) == 0) ||
1171  (((insn >> 1) & 3) == 2)) {
1172  /* Set .aa to 3 */
1173  addrwb_p = 0x18;
1174  }
1175  }
1176  } /* addrwb_p == 0 */
1177  }
1178  /* We have to use a limm. If we've already seen one they must match. */
1179  else if (!limm_p || limm == value)
1180  {
1181  if ('a' != operand->fmt)
1182  {
1183  op_type = OP_LIMM;
1184  limm_p = 1;
1185  limm = value;
1186  if (arc_mach_a4) {
1187  insn |= ARC_REG_LIMM << operand->shift;
1188  }
1189  /* The constant is stored later. */
1190  }
1191  else
1192  {
1193  if (arc_mach_a4) {
1194  insn |= ARC_REG_SHIMM << operand->shift;
1195  }
1196  /* insn |= value & 511; - done later. */
1197  }
1198  }
1199  else{
1200  *errmsg = _("unable to fit different valued constants into instruction");
1201  }
1202  }
1203  else
1204  {
1205  /* We have to handle both normal and auxiliary registers. */
1206 
1207  if ((reg->type == AUXREG) || (reg->type == AUXREG_AC))
1208  {
1209  if (!(mods & ARC_MOD_AUXREG)) {
1210  *errmsg = _ ("auxiliary register not allowed here");
1211  } else if (arc_mach_a4) {
1212  if ((insn & I (-1)) == I (2)) /* Check for use validity. */
1213  {
1214  if (reg->flags & ARC_REGISTER_READONLY) {
1215  *errmsg = _ ("attempt to set readonly register");
1216  }
1217  } else {
1218  if (reg->flags & ARC_REGISTER_WRITEONLY) {
1219  *errmsg = _ ("attempt to read writeonly register");
1220  }
1221  }
1222  insn |= ARC_REG_SHIMM << operand->shift;
1223  insn |= reg->value << arc_operands[reg->type].shift;
1224  }
1225  else /* Insert auxiliary register value for ARCompact ISA. */
1226  {
1227  /* TODO: Check for validity of using ARCompact auxiliary regs. */
1228 
1229  // insn |= reg->value << operand->shift;
1230  /* Replace this later with the corresponding function to do
1231  the insertion of signed 12 bit immediates .
1232  This is because the auxillary registers used as a mnemonic
1233  would be stored in this fashion. */
1234 
1235  insn |= (((reg->value & 0x3f) << 6) | ((reg->value & 0xffffffc0) >> 6));
1236  }
1237  }
1238  else
1239  {
1240  /* Check for use validity. */
1241  if (('a' == operand->fmt) || (arc_mach_a4 && ((insn & I(-1)) < I(2))) ||
1242  (!arc_mach_a4 && (('A' == operand->fmt)||('#' == operand->fmt))))
1243  {
1244  if (reg->flags & ARC_REGISTER_READONLY) {
1245  *errmsg = _ ("attempt to set readonly register");
1246  }
1247  }
1248  if ('a' != operand->fmt || (!arc_mach_a4 && ('A' != operand->fmt)))
1249  {
1250  if (reg->flags & ARC_REGISTER_WRITEONLY) {
1251  *errmsg = _ ("attempt to read writeonly register");
1252  }
1253  }
1254  /* We should never get an invalid register number here. */
1255  if (arc_mach_a4 && ((unsigned int) reg->value > 60))
1256  {
1257  sprintf (buf, _("invalid register number `%d'"), reg->value);
1258  *errmsg = buf;
1259  }
1260  if (!arc_mach_a4 && ((unsigned int) reg->value > 63))
1261  {
1262  sprintf (buf, _("invalid register number `%d'"), reg->value);
1263  *errmsg = buf;
1264  }
1265  if (!arc_mach_a4 && ( ('B' == operand->fmt) || ('#' == operand->fmt)
1266  || ('g' == operand->fmt) || ('(' == operand->fmt)
1267  || ('{' == operand->fmt) || ('<' == operand->fmt)))
1268  {
1269  insn |= (reg->value & 0x7) << operand->shift;
1270  insn |= (reg->value >> 3) << ARC_SHIFT_REGB_HIGH_AC;
1271  }
1272  else if (!arc_mach_a4 && ('U' == operand->fmt))
1273  {
1274  insn |= (reg->value & 0x7) << operand->shift;
1275  insn |= reg->value >> 3;
1276 
1277  /* Ravi: Quoting from the ARC Programmer reference:
1278  The program counter (PCL) is not permitted to be the
1279  destination of an instruction. A value of in 0x03 in the
1280  sub opcode field, i, and a value of 0x3F in destination
1281  register field, H, will raise an Instruction Error
1282  exception.
1283  This should solve the mov_s pcl, whatever bug. */
1284  if ((insn & 0xFF) == 0xFF) {
1285  *errmsg = _ ("attempt to set readonly register");
1286  }
1287  } else {
1288  insn |= reg->value << operand->shift;
1289  }
1290  op_type = OP_REG;
1291  }
1292  }
1293 
1294  if (arc_mach_a4)
1295  {
1296  switch (operand->fmt)
1297  {
1298  case 'a':
1299  ls_operand[LS_DEST] = op_type;
1300  break;
1301  case 's':
1302  ls_operand[LS_BASE] = op_type;
1303  break;
1304  case 'c':
1305  if ((insn & I (-1)) == I (2)) {
1306  ls_operand[LS_VALUE] = op_type;
1307  } else {
1308  ls_operand[LS_OFFSET] = op_type;
1309  }
1310  break;
1311  case 'o': case 'O':
1312  ls_operand[LS_OFFSET] = op_type;
1313  break;
1314  }
1315  }
1316  else
1317  {
1318  switch (operand->fmt)
1319  {
1320  case 'a':
1321  case 'A':
1322  case '#':
1323  case '*':
1324  ls_operand[LS_DEST] = op_type;
1325  break;
1326  case 'C':
1327  case ')':
1328  case '}':
1329  case '>':
1330  if ((insn & I (-1)) == I (3)) {
1331  ls_operand[LS_VALUE] = op_type;
1332  } else {
1333  ls_operand[LS_OFFSET] = op_type;
1334  }
1335  break;
1336  }
1337  }
1338  return insn;
1339 }
1340 
1341 /* Called when we see an 'f' flag. */
1342 
1343 static arc_insn
1345  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1346  int mods ATTRIBUTE_UNUSED,
1347  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1348  long value ATTRIBUTE_UNUSED,
1349  const char **errmsg ATTRIBUTE_UNUSED)
1350 {
1351  /* We can't store anything in the insn until we've parsed the registers.
1352  Just record the fact that we've got this flag. `insert_reg' will use it
1353  to store the correct value (ARC_REG_SHIMM_UPDATE or bit 0x100). */
1354  flag_p = 1;
1355  return insn;
1356 }
1357 
1358 /* Called when we see an nullify condition. */
1359 
1360 static arc_insn
1362  const struct arc_operand *operand,
1363  int mods ATTRIBUTE_UNUSED,
1364  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1365  long value,
1366  const char **errmsg ATTRIBUTE_UNUSED)
1367 {
1368  nullify_p = 1;
1369  insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
1370  nullify = value;
1371  return insn;
1372 }
1373 
1374 /* Called after completely building an insn to ensure the 'f' flag gets set
1375  properly. This is needed because we don't know how to set this flag until
1376  we've parsed the registers. */
1377 
1378 static arc_insn
1380  const struct arc_operand *operand,
1381  int mods ATTRIBUTE_UNUSED,
1382  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1383  long value ATTRIBUTE_UNUSED,
1384  const char **errmsg ATTRIBUTE_UNUSED)
1385 {
1386  if (flag_p && !flagshimm_handled_p)
1387  {
1388  //if (shimm_p) abort ();
1389  flagshimm_handled_p = 1;
1390  insn |= (1 << operand->shift);
1391  }
1392  return insn;
1393 }
1394 
1395 /* Called when we see a conditional flag (eg: .eq). */
1396 
1397 static arc_insn
1399  const struct arc_operand *operand,
1400  int mods ATTRIBUTE_UNUSED,
1401  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1402  long value,
1403  const char **errmsg ATTRIBUTE_UNUSED)
1404 {
1405  arc_cond_p = 1;
1406 
1407  insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
1408  return insn;
1409 }
1410 
1411 /* Used in the "j" instruction to prevent constants from being interpreted as
1412  shimm values (which the jump insn doesn't accept). This can also be used
1413  to force the use of limm values in other situations (eg: ld r0,[foo] uses
1414  this).
1415  ??? The mechanism is sound. Access to it is a bit klunky right now. */
1416 
1417 static arc_insn
1419  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1420  int mods ATTRIBUTE_UNUSED,
1421  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1422  long value ATTRIBUTE_UNUSED,
1423  const char **errmsg ATTRIBUTE_UNUSED)
1424 {
1425  arc_cond_p = 1;
1426  return insn;
1427 }
1428 
1429 static arc_insn
1431  const struct arc_operand *operand,
1432  int mods ATTRIBUTE_UNUSED,
1433  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1434  long value ATTRIBUTE_UNUSED,
1435  const char **errmsg ATTRIBUTE_UNUSED)
1436 {
1437  /* Ravi: added the 'w' to handle the st.ab st.as instructions after
1438  * adding suport for it in the arc_suffixes_ac by defining aw, ab and as
1439  * to be ADDRESS3_AC also */
1440 
1441  if (!arc_mach_a4 && (('p' == operand->fmt) || ('P' == operand->fmt) || ('w' == operand->fmt) || ('&' == operand->fmt))) {
1442  addrwb_p = value << operand->shift;
1443  } else {
1444  addrwb_p = 1 << operand->shift;
1445  }
1446  return insn;
1447 }
1448 
1449 static arc_insn
1451  const struct arc_operand *operand,
1452  int mods,
1453  const struct arc_operand_value *reg,
1454  long value,
1455  const char **errmsg)
1456 {
1457  if (reg != NULL)
1458  {
1459  arc_insn myinsn;
1460  if (!arc_mach_a4 && ('g' == operand->fmt)) {
1461  insn |= insert_reg (0, ex, operand, mods, reg, value, errmsg);
1462  } else {
1463  myinsn = (insert_reg (0, ex, operand, mods, reg, value, errmsg) >> operand->shift);
1464  insn |= B (myinsn);
1465  }
1467  }
1468  else if (arc_mach_a4 && ARC_SHIMM_CONST_P (value) && !arc_cond_p)
1469  {
1470  if (shimm_p && value != shimm)
1471  {
1472  /* Convert the previous shimm operand to a limm. */
1473  limm_p = 1;
1474  limm = shimm;
1475  insn &= ~C(-1); /* We know where the value is in insn. */
1476  insn |= C(ARC_REG_LIMM);
1478  }
1479  insn |= ARC_REG_SHIMM << operand->shift;
1480  shimm_p = 1;
1481  shimm = value;
1484  }
1485  else if (arc_mach_a4)
1486  {
1487  if (limm_p && value != limm)
1488  {
1489  *errmsg = _("too many long constants");
1490  return insn;
1491  }
1492  limm_p = 1;
1493  limm = value;
1494  insn |= B(ARC_REG_LIMM);
1496  }
1497 
1498  return insn;
1499 }
1500 
1501 /* Used in ld/st insns to handle the offset field. We don't try to
1502  match operand syntax here. We catch bad combinations later. */
1503 
1504 static arc_insn
1506  const struct arc_operand *operand,
1507  int mods,
1508  const struct arc_operand_value *reg,
1509  long value,
1510  const char **errmsg)
1511 {
1512  long minval, maxval;
1513 
1514  if (reg != NULL)
1515  {
1516  if (arc_mach_a4)
1517  {
1518  arc_insn myinsn
1519  = (insert_reg (0, ex, operand, mods, reg, value, errmsg)
1520  >> operand->shift);
1521 
1522  /* Not if store, catch it later. */
1523  if (operand->flags & ARC_OPERAND_LOAD) {
1524  /* Not if opcode == 1, catch it later. */
1525  if ((insn & I (-1)) != I (1)) {
1526  insn |= C (myinsn);
1527  }
1528  }
1529  } else {
1530  insn |= insert_reg (0, ex, operand, mods, reg, value, errmsg);
1531  }
1533  }
1534  else
1535  {
1536  int bits;
1537 
1538  if (operand->flags & ARC_OPERAND_2BYTE_ALIGNED) {
1539  bits = operand->bits + 1;
1540  } else if (operand->flags & ARC_OPERAND_4BYTE_ALIGNED) {
1541  bits = operand->bits + 2;
1542  } else {
1543  bits = operand->bits;
1544  }
1545 
1546  /* This is *way* more general than necessary, but maybe some day it'll
1547  be useful. */
1548  if (operand->flags & ARC_OPERAND_SIGNED)
1549  {
1550  minval = -(1 << (bits - 1));
1551  maxval = (1 << (bits - 1)) - 1;
1552  }
1553  else
1554  {
1555  minval = 0;
1556  maxval = (1 << bits) - 1;
1557  }
1558  if (arc_mach_a4 && ((arc_cond_p && !limm_p) || value < minval || value > maxval))
1559  {
1560  if (limm_p && value != limm) {
1561  *errmsg = _ ("too many long constants");
1562  } else {
1563  limm_p = 1;
1564  limm = value;
1565  if (operand->flags & ARC_OPERAND_STORE) {
1566  insn |= B (ARC_REG_LIMM);
1567  }
1568  if (operand->flags & ARC_OPERAND_LOAD) {
1569  insn |= C (ARC_REG_LIMM);
1570  }
1572  }
1573  }
1574  else
1575  {
1576  if ((value < minval || value > maxval)) {
1577  *errmsg = _ ("need too many limms");
1578  } else if (arc_mach_a4 && shimm_p && value != shimm) {
1579  /* Check for bad operand combinations
1580  before we lose info about them. */
1581  if ((insn & I (-1)) == I (1)) {
1582  *errmsg = _ ("to many shimms in load");
1583  goto out;
1584  }
1585  if (limm_p && operand->flags & ARC_OPERAND_LOAD) {
1586  *errmsg = _ ("too many long constants");
1587  goto out;
1588  }
1589  /* Convert what we thought was a shimm to a limm. */
1590  limm_p = 1;
1591  limm = shimm;
1592  if (ls_operand[LS_VALUE] == OP_SHIMM && operand->flags & ARC_OPERAND_STORE) {
1593  insn &= ~C (-1);
1594  insn |= C (ARC_REG_LIMM);
1596  }
1597  if (ls_operand[LS_BASE] == OP_SHIMM && operand->flags & ARC_OPERAND_STORE) {
1598  insn &= ~B (-1);
1599  insn |= B (ARC_REG_LIMM);
1601  }
1602  }
1603  if (!arc_mach_a4)
1604  {
1605  switch (operand->fmt)
1606  {
1607  case 'o':
1608  insn |= ((value & 0xff) << operand->shift);
1609  insn |= (((value & 0x100) >> 8) << 15);
1610  break;
1611  case 'k':
1612  insn |= ((value >> 1) & 0x1f) << operand->shift;
1613  break;
1614  case 'm':
1615  insn |= ((value >> 2) & 0xff) << operand->shift;
1616  break;
1617  case 'M':
1618  insn |= (value & 0x1ff) << operand->shift;
1619  break;
1620  case 'O':
1621  insn |= ((value >> 1) & 0x1ff) << operand->shift;
1622  break;
1623  case 'R':
1624  insn |= ((value >> 2) & 0x1ff) << operand->shift;
1625  break;
1626  }
1627  }
1628  shimm = value;
1629  shimm_p = 1;
1631  }
1632  }
1633  out:
1634  return insn;
1635 }
1636 
1637 /* Used in st insns to do final disassemble syntax check. */
1638 
1639 static long
1641  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1642  int mods ATTRIBUTE_UNUSED,
1643  const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
1644  int *invalid)
1645 {
1646 #define ST_SYNTAX(V,B,O) \
1647 ((ls_operand[LS_VALUE] == (V) && \
1648  ls_operand[LS_BASE] == (B) && \
1649  ls_operand[LS_OFFSET] == (O)))
1650 
1652  *invalid = 1;
1653  }
1654  return 0;
1655 }
1656 
1657 int
1659 {
1660  int retval = 0;
1661 
1662  /* Check for st shimm,[limm]. */
1663 
1664  if ((insn & (I(-1) | C(-1) | B(-1))) ==
1665  (I(2) | C(ARC_REG_SHIMM) | B(ARC_REG_LIMM)))
1666  {
1667  retval = insn & 0x1ff;
1668  if (retval & 0x100) { /* Sign extend 9 bit offset. */
1669  retval |= ~0x1ff;
1670  }
1671  }
1672  return -retval; /* Negate offset for return. */
1673 }
1674 
1675 /* Used in st insns to do final syntax check. */
1676 
1677 static arc_insn
1679  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1680  int mods ATTRIBUTE_UNUSED,
1681  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1682  long value ATTRIBUTE_UNUSED,
1683  const char **errmsg)
1684 {
1685  /* do syntax check for ARCompact 'st' insn */
1686  if (!arc_mach_a4)
1687  {
1688  /* TODO - check for validity of operands for ARCompact store insn */
1689 
1690  if (addrwb_p)
1691  {
1692  if (ls_operand[LS_BASE] != OP_REG) {
1693  *errmsg = _ ("address writeback not allowed");
1694  }
1695  insn |= addrwb_p;
1696  }
1697  return insn;
1698  }
1699 
1700  /* Do syntax check for ARCtangent-A4 'st' insn. */
1701  if (ST_SYNTAX (OP_SHIMM, OP_REG, OP_NONE) && shimm != 0)
1702  {
1703  /* Change an illegal insn into a legal one, it's easier to
1704  do it here than to try to handle it during operand scan. */
1705  limm_p = 1;
1706  limm = shimm;
1707  shimm_p = 0;
1708  shimm = 0;
1709  insn= insn & ~(C(-1) | 511);
1710  insn |= ARC_REG_LIMM << ARC_SHIFT_REGC;
1712  }
1713 
1716  {
1717  /* Try to salvage this syntax. */
1718  if (shimm & 0x1) /* Odd shimms won't work. */
1719  {
1720  if (limm_p) { /* Do we have a limm already? */
1721  *errmsg = _ ("impossible store");
1722  }
1723  limm_p = 1;
1724  limm = shimm;
1725  shimm = 0;
1726  shimm_p = 0;
1727  insn = insn & ~(B (-1) | 511);
1728  insn |= B (ARC_REG_LIMM);
1730  }
1731  else
1732  {
1733  shimm >>= 1;
1734  insn = insn & ~511;
1735  insn |= shimm;
1737  }
1738  }
1739  if (ST_SYNTAX (OP_SHIMM, OP_LIMM, OP_NONE)) {
1740  limm += arc_limm_fixup_adjust (insn);
1741  }
1742  if (ST_SYNTAX (OP_LIMM, OP_SHIMM, OP_SHIMM) && (shimm * 2 == limm)) {
1743  insn &= ~C (-1);
1744  limm_p = 0;
1745  limm = 0;
1746  insn |= C (ARC_REG_SHIMM);
1748  }
1750  *errmsg = _ ("st operand error");
1751  }
1752  if (addrwb_p) {
1753  if (ls_operand[LS_BASE] != OP_REG) {
1754  *errmsg = _ ("address writeback not allowed");
1755  }
1756  insn |= addrwb_p;
1757  }
1758  if (ST_SYNTAX (OP_SHIMM, OP_REG, OP_NONE) && shimm) {
1759  *errmsg = _ ("store value must be zero");
1760  }
1761  return insn;
1762 }
1763 
1764 /* Used in ld insns to do final syntax check. */
1765 
1766 static arc_insn
1768  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1769  int mods ATTRIBUTE_UNUSED,
1770  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1771  long value ATTRIBUTE_UNUSED,
1772  const char **errmsg)
1773 {
1774 #define LD_SYNTAX(D, B, O) \
1775  ( (ls_operand[LS_DEST] == (D) \
1776  && ls_operand[LS_BASE] == (B) \
1777  && ls_operand[LS_OFFSET] == (O)))
1778 
1779 #define X(x,b,m) ((unsigned)((x)&(((1<<(m))-1)<<(b)))>>(b))
1780  int test = insn & I (-1);
1781 
1782  /* do syntax check for ARCompact 'ld' insn */
1783  if (!arc_mach_a4)
1784  {
1785  /* TODO - check for validity of operands for ARCompact load insn */
1786 
1787  /* Extract operand 6 bits of the A field from insn starting at bit
1788  position 0. */
1789  unsigned char ac_reg_num = X(insn,0,6);
1790 
1791  if (addrwb_p)
1792  {
1793  if (ls_operand[LS_BASE] != OP_REG
1794  /* .as is not actually an address write-back. */
1795  && addrwb_p != 0xc00000) {
1796  *errmsg = _ ("address writeback not allowed");
1797  }
1798  insn |= addrwb_p;
1799  }
1800 
1801  /* Fixme: We should hash define register names to their respective
1802  numbers and not use them as 29, 30, 31,.... */
1803 
1804  if (0x20 <= ac_reg_num && ac_reg_num <= 0x3F)
1805  {
1806  if (!((arc_ld_ext_mask >> (ac_reg_num - 32)) & 1)) {
1807  *errmsg = _ ("ld operand error: Instruction Error exception");
1808  }
1809  }
1810 
1811  /* Ravi: operand validity checks for the ARC700 */
1813  /* if (arc_get_opcode_mach (arc_mach_type, 0) == ARC_MACH_ARC7) */
1814  {
1815  if (ac_reg_num == 29 || ac_reg_num == 30)
1816  {
1817  *errmsg = _("ld operand error: Privilege Violation exception");
1818  }
1819  }
1820 
1821  return insn;
1822  }
1823 
1824  /* do syntax check for ARCtangent-A4 'ld' insn */
1825  if (!(test == I (1)))
1826  {
1828  *errmsg = _ ("invalid load/shimm insn");
1829  }
1830  }
1832  *errmsg = _ ("ld operand error");
1833  }
1834  if (addrwb_p) {
1835  if (ls_operand[LS_BASE] != OP_REG) {
1836  *errmsg = _ ("address writeback not allowed");
1837  }
1838  insn |= addrwb_p;
1839  }
1840  return insn;
1841 }
1842 
1843 /* Used in ld insns to do final syntax check. */
1844 
1845 static long
1847  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1848  int mods ATTRIBUTE_UNUSED,
1849  const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
1850  int *invalid)
1851 {
1852  int test = insn[0] & I(-1);
1853 
1854  if (!(test == I(1)))
1855  {
1857  *invalid = 1;
1858  }
1859  }
1861  *invalid = 1;
1862  }
1863  return 0;
1864 }
1865 
1866 static arc_insn
1868  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1869  int mods ATTRIBUTE_UNUSED,
1870  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1871  long value ATTRIBUTE_UNUSED,
1872  const char **errmsg)
1873 {
1874  /* Ravi: operand validity checks for the ARC700 */
1875  if (cpu_type == ARC_MACH_ARC7)
1876  /* if (arc_get_opcode_mach (arc_mach_type, 0) == ARC_MACH_ARC7) */
1877  {
1878  unsigned ac_reg_hi = X (insn, 12, 3);
1879  unsigned ac_reg_lo = X (insn, 24, 3);
1880  unsigned ac_reg_num = (ac_reg_hi << 3) | ac_reg_lo;
1881 
1882  if (arc_user_mode_only && (ac_reg_num == 29 || ac_reg_num == 30)) {
1883  *errmsg = _ ("ex operand error: Privilege Violation exception");
1884  }
1885  if (0x20 <= ac_reg_num && ac_reg_num <= 0x3F && !((arc_ld_ext_mask >> (ac_reg_num - 32)) & 1)) {
1886  *errmsg = _ ("ld operand error: Instruction Error exception");
1887  }
1888  }
1889  return insn;
1890 }
1891 
1892 
1893 /* Called at the end of processing normal insns (eg: add) to insert a shimm
1894  value (if present) into the insn. */
1895 
1896 static arc_insn
1898  const struct arc_operand *operand,
1899  int mods ATTRIBUTE_UNUSED,
1900  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1901  long value ATTRIBUTE_UNUSED,
1902  const char **errmsg ATTRIBUTE_UNUSED)
1903 {
1904  if (shimm_p) {
1905  insn |= (shimm & ((1 << operand->bits) - 1)) << operand->shift;
1906  }
1907  return insn;
1908 }
1909 
1910 /* Called at the end of processing normal insns (eg: add) to insert a limm
1911  value (if present) into the insn.
1912 
1913  Note that this function is only intended to handle instructions (with 4 byte
1914  immediate operands). It is not intended to handle data. */
1915 
1916 /* ??? Actually, there's nothing for us to do as we can't call frag_more, the
1917  caller must do that. The extract fns take a pointer to two words. The
1918  insert fns could be converted and then we could do something useful, but
1919  then the reloc handlers would have to know to work on the second word of
1920  a 2 word quantity. That's too much so we don't handle them. */
1921 
1922 static arc_insn
1924  const struct arc_operand *operand ATTRIBUTE_UNUSED,
1925  int mods ATTRIBUTE_UNUSED,
1926  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1927  long value ATTRIBUTE_UNUSED,
1928  const char **errmsg ATTRIBUTE_UNUSED)
1929 {
1930  return insn;
1931 }
1932 
1933 static arc_insn
1935  const struct arc_operand *operand,
1936  int mods ATTRIBUTE_UNUSED,
1937  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1938  long value,
1939  const char **errmsg)
1940 {
1941  if (!flag_p) {
1942  *errmsg = _ ("jump flags, but no .f seen");
1943 
1944  } else if (!limm_p) {
1945  *errmsg = _ ("jump flags, but no limm addr");
1946 
1947  } else if (limm & 0xfc000000) {
1948  *errmsg = _ ("flag bits of jump address limm lost");
1949 
1950  } else if (limm & 0x03000000) {
1951  *errmsg = _ ("attempt to set HR bits");
1952 
1953  } else if ((value & ((1 << operand->bits) - 1)) != value) {
1954  *errmsg = _ ("bad jump flags value");
1955  }
1956 
1957  jumpflags_p = 1;
1958  limm = ((limm & ((1 << operand->shift) - 1)) | ((value & ((1 << operand->bits) - 1)) << operand->shift));
1959  return insn;
1960 }
1961 
1962 /* Called at the end of unary operand macros to copy the B field to C. */
1963 
1964 static arc_insn
1966  const struct arc_operand *operand,
1967  int mods ATTRIBUTE_UNUSED,
1968  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1969  long value ATTRIBUTE_UNUSED,
1970  const char **errmsg ATTRIBUTE_UNUSED)
1971 {
1972  insn |= ((insn >> ARC_SHIFT_REGB) & ARC_MASK_REG) << operand->shift;
1973  return insn;
1974 }
1975 
1976 /* Insert a relative address for a branch insn (b, bl, or lp). */
1977 
1978 static arc_insn
1980  const struct arc_operand *operand,
1981  int mods ATTRIBUTE_UNUSED,
1982  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
1983  long value,
1984  const char **errmsg)
1985 {
1986  if (!arc_mach_a4 && ('h' == operand->fmt))
1987  {
1988  if (value & 3) {
1989  *errmsg = _ ("branch address not on 4 byte boundary");
1990  }
1991 
1992  value = value >> 2;
1993  /* Insert least significant 9-bits. */
1994  insn |= (value & 0x1ff) << operand->shift;
1995  /* Insert most significant 10-bits. */
1996  insn |= ((value >> 9) & 0x3ff) << 6;
1997  }
1998  else if (!arc_mach_a4 && ('H' == operand->fmt))
1999  {
2000  if (value & 3) {
2001  *errmsg = _ ("branch address not on 4 byte boundary");
2002  }
2003 
2004  value = value >> 2;
2005  /* Insert least significant 9-bits. */
2006  insn |= (value & 0x1ff) << operand->shift;
2007  /* Insert next least significant 10-bits. */
2008  insn |= ((value >> 9) & 0x3ff) << 6;
2009  /* Insert most significant 4-bits. */
2010  insn |= (value >> 19) & 0xf;
2011  }
2012  else if (!arc_mach_a4 && ('i' == operand->fmt))
2013  {
2014  if (value & 1) {
2015  *errmsg = _ ("branch address not on 2 byte boundary");
2016  }
2017 
2018  value = value >> 1;
2019  /* Insert least significant 10-bits. */
2020  insn |= (value & 0x3ff) << operand->shift;
2021  /* Insert most significant 10-bits. */
2022  insn |= ((value >> 10) & 0x3ff) << 6;
2023  }
2024  else if (!arc_mach_a4 && ('I' == operand->fmt))
2025  {
2026  if (value & 1) {
2027  *errmsg = _ ("branch address not on 2 byte boundary");
2028  }
2029 
2030  value = value >> 1;
2031  /* Insert least significant 10-bits. */
2032  insn |= (value & 0x3ff) << operand->shift;
2033  /* Insert next least significant 10-bits. */
2034  insn |= ((value >> 10) & 0x3ff) << 6;
2035  /* Insert most significant 4-bits. */
2036  insn |= (value >> 20) & 0xf;
2037  }
2038  else if (!arc_mach_a4 && ('d' == operand->fmt))
2039  {
2040  /* Insert least significant 7-bits. */
2041  insn |= ((value >> 1) & 0x7f) << operand->shift;
2042  /* Insert most significant bit. */
2043  insn |= (((value >> 1) & 0x80) >> 7) << 15;
2044  }
2045  else if (!arc_mach_a4 && ('y' == operand->fmt))
2046  {
2047  /* Insert most significant 6-bits of 7-bit unsigned immediate value. */
2048  insn |= ((value >> 1) & 0x3f) << operand->shift;
2049  }
2050  else if (!arc_mach_a4 && ('Y' == operand->fmt))
2051  {
2052  /* Insert bit-1 to bit-6 of 13-bit signed immediate value. */
2053  insn |= ((value >> 1) & 0x3f) << operand->shift;
2054  /* Insert bit-7 to bit-13 of 13-bit signed immediate value. */
2055  insn |= ((value >> 1) & 0xfc0) >> 6;
2056  }
2057  else if (!arc_mach_a4 && (('s' == operand->fmt) || ('S' == operand->fmt)
2058  || ('Z' == operand->fmt)))
2059  {
2060  if (value & 1) {
2061  *errmsg = _ ("branch address not on 2 byte boundary");
2062  }
2063  insn |= ((value >> 1) & ((1 << operand->bits) - 1)) << operand->shift;
2064  }
2065  else if (!arc_mach_a4 && ('W' == operand->fmt))
2066  {
2067  if (value & 3) {
2068  *errmsg = _ ("branch address not on 4 byte boundary");
2069  }
2070  insn |= ((value >> 2) & ((1 << operand->bits) - 1)) << operand->shift;
2071  }
2072  else
2073  {
2074  /* for ARCtangent-A4 */
2075 
2076  if (value & 3) {
2077  *errmsg = _ ("branch address not on 4 byte boundary");
2078  }
2079  insn |= ((value >> 2) & ((1 << operand->bits) - 1)) << operand->shift;
2080  }
2081  return insn;
2082 }
2083 
2084 /* Insert a limm value as a 26 bit address right shifted 2 into the insn.
2085 
2086  Note that this function is only intended to handle instructions (with 4 byte
2087  immediate operands). It is not intended to handle data. */
2088 
2089 /* ??? Actually, there's little for us to do as we can't call frag_more, the
2090  caller must do that. The extract fns take a pointer to two words. The
2091  insert fns could be converted and then we could do something useful, but
2092  then the reloc handlers would have to know to work on the second word of
2093  a 2 word quantity. That's too much so we don't handle them.
2094 
2095  We do check for correct usage of the nullify suffix, or we
2096  set the default correctly, though. */
2097 
2098 static arc_insn
2100  const struct arc_operand *operand ATTRIBUTE_UNUSED,
2101  int mods ATTRIBUTE_UNUSED,
2102  const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
2103  long value ATTRIBUTE_UNUSED,
2104  const char **errmsg)
2105 {
2106  if (limm_p)
2107  {
2108  /* If it is a jump and link, .jd must be specified. */
2109  if (insn & R (-1, 9, 1))
2110  {
2111  if (!nullify_p) {
2112  insn |= 0x02 << 5; /* Default nullify to .jd. */
2113  } else if (nullify != 0x02) {
2114  *errmsg = _ ("must specify .jd or no nullify suffix");
2115  }
2116  }
2117  }
2118  return insn;
2119 }
2120 ␌
2121 /* Extraction functions.
2122 
2123  The suffix extraction functions' return value is redundant since it can be
2124  obtained from (*OPVAL)->value. However, the boolean suffixes don't have
2125  a suffix table entry for the "false" case, so values of zero must be
2126  obtained from the return value (!*OPVAL). */
2127 
2128 /* Called by the disassembler before printing an instruction. */
2129 
2130 void
2132 {
2134 }
2135 
2136 static const struct arc_operand_value *
2137 lookup_register (int type, long regno)
2138 {
2139  const struct arc_operand_value *r,*end;
2140  struct arc_ext_operand_value *ext_oper = arc_ext_operands;
2141 
2142  while (ext_oper)
2143  {
2144  if (ext_oper->operand.type == type && ext_oper->operand.value == regno) {
2145  return (&ext_oper->operand);
2146  }
2147  ext_oper = ext_oper->next;
2148  }
2149 
2150  if (type == REG || type == REG_AC) {
2151  return &arc_reg_names[regno];
2152  }
2153 
2154  /* ??? This is a little slow and can be speeded up. */
2156  r < end; ++r) {
2157  if (type == r->type && regno == r->value) {
2158  return r;
2159  }
2160  }
2161  return 0;
2162 }
2163 
2164 /* As we're extracting registers, keep an eye out for the 'f' indicator
2165  (ARC_REG_SHIMM_UPDATE). If we find a register (not a constant marker,
2166  like ARC_REG_SHIMM), set OPVAL so our caller will know this is a register.
2167 
2168  We must also handle auxiliary registers for lr/sr insns. They are just
2169  constants with special names. */
2170 
2171 static long
2173  const struct arc_operand *operand,
2174  int mods,
2175  const struct arc_operand_value **opval,
2176  int *invalid ATTRIBUTE_UNUSED)
2177 {
2178  int regno;
2179  long value;
2180  enum operand op_type;
2181 
2182  /* Get the register number. */
2183  regno = (*insn >> operand->shift) & ((1 << operand->bits) - 1);
2184 
2185  /* Is it a constant marker? */
2186  if (regno == ARC_REG_SHIMM)
2187  {
2188  op_type = OP_SHIMM;
2189  /* Always return zero if dest is a shimm mlm. */
2190 
2191  if ('a' != operand->fmt)
2192  {
2193  value = *insn & 511;
2194  if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) {
2195  value -= 512;
2196  }
2197  if (!flagshimm_handled_p) {
2198  flag_p = 0;
2199  }
2200  flagshimm_handled_p = 1;
2201  } else {
2202  value = 0;
2203  }
2204  }
2205  else if (regno == ARC_REG_SHIMM_UPDATE)
2206  {
2207  op_type = OP_SHIMM;
2208 
2209  /* Always return zero if dest is a shimm mlm. */
2210  if ('a' != operand->fmt)
2211  {
2212  value = *insn & 511;
2213  if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) {
2214  value -= 512;
2215  }
2216  } else {
2217  value = 0;
2218  }
2219 
2220  flag_p = 1;
2221  flagshimm_handled_p = 1;
2222  }
2223  else if (regno == ARC_REG_LIMM)
2224  {
2225  op_type = OP_LIMM;
2226  value = insn[1];
2227  limm_p = 1;
2228 
2229  /* If this is a jump instruction (j,jl), show new pc correctly. */
2230  if (0x07 == ((*insn & I (-1)) >> 27)) {
2231  value = (value & 0xffffff);
2232  }
2233  }
2234 
2235  /* It's a register, set OPVAL (that's the only way we distinguish registers
2236  from constants here). */
2237  else
2238  {
2239  const struct arc_operand_value *reg = lookup_register (REG, regno);
2240 
2241  op_type = OP_REG;
2242 
2243  if (!reg) {
2244  return 0;
2245  }
2246  if (opval != NULL) {
2247  *opval = reg;
2248  }
2249  value = regno;
2250  }
2251 
2252  /* If this field takes an auxiliary register, see if it's a known one. */
2253  if ((mods & ARC_MOD_AUXREG)
2254  && ARC_REG_CONSTANT_P (regno))
2255  {
2256  const struct arc_operand_value *reg = lookup_register (AUXREG, value);
2257 
2258  /* This is really a constant, but tell the caller it has a special
2259  name. */
2260  if (reg != NULL && opval != NULL) {
2261  *opval = reg;
2262  }
2263  }
2264 
2265  switch (operand->fmt)
2266  {
2267  case 'a':
2268  ls_operand[LS_DEST] = op_type;
2269  break;
2270  case 's':
2271  ls_operand[LS_BASE] = op_type;
2272  break;
2273  case 'c':
2274  if ((insn[0] & I (-1)) == I (2)) {
2275  ls_operand[LS_VALUE] = op_type;
2276  } else {
2277  ls_operand[LS_OFFSET] = op_type;
2278  }
2279  break;
2280  case 'o': case 'O':
2281  ls_operand[LS_OFFSET] = op_type;
2282  break;
2283  }
2284 
2285  return value;
2286 }
2287 
2288 /* Return the value of the "flag update" field for shimm insns.
2289  This value is actually stored in the register field. */
2290 
2291 static long
2293  const struct arc_operand *operand,
2294  int mods ATTRIBUTE_UNUSED,
2295  const struct arc_operand_value **opval,
2296  int *invalid ATTRIBUTE_UNUSED)
2297 {
2298  int f;
2299  const struct arc_operand_value *val;
2300 
2301  if (flagshimm_handled_p) {
2302  f = flag_p != 0;
2303  } else {
2304  f = (*insn & (1 << operand->shift)) != 0;
2305  }
2306 
2307  /* There is no text for zero values. */
2308  if (f == 0) {
2309  return 0;
2310  }
2311  flag_p = 1;
2313  if (opval != NULL && val != NULL) {
2314  *opval = val;
2315  }
2316  return val?val->value:0;
2317 }
2318 
2319 /* Extract the condition code (if it exists).
2320  If we've seen a shimm value in this insn (meaning that the insn can't have
2321  a condition code field), then we don't store anything in OPVAL and return
2322  zero. */
2323 
2324 static long
2326  const struct arc_operand *operand,
2327  int mods ATTRIBUTE_UNUSED,
2328  const struct arc_operand_value **opval,
2329  int *invalid ATTRIBUTE_UNUSED)
2330 {
2331  long cond;
2332  const struct arc_operand_value *val;
2333 
2334  if (flagshimm_handled_p) {
2335  return 0;
2336  }
2337 
2338  cond = (*insn >> operand->shift) & ((1 << operand->bits) - 1);
2340 
2341  /* Ignore NULL values of `val'. Several condition code values are
2342  reserved for extensions. */
2343  if (opval != NULL && val != NULL) {
2344  *opval = val;
2345  }
2346  return cond;
2347 }
2348 
2349 /* Extract a branch address.
2350  We return the value as a real address (not right shifted by 2). */
2351 
2352 static long
2354  const struct arc_operand *operand,
2355  int mods ATTRIBUTE_UNUSED,
2356  const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
2357  int *invalid ATTRIBUTE_UNUSED)
2358 {
2359  long addr;
2360 
2361  addr = (*insn >> operand->shift) & ((1 << operand->bits) - 1);
2362  if ((operand->flags & ARC_OPERAND_SIGNED) && (addr & (1 << (operand->bits - 1)))) {
2363  addr -= 1 << operand->bits;
2364  }
2365 
2366  return addr << 2;
2367 }
2368 
2369 /* Extract the flags bits from a j or jl long immediate. */
2370 
2371 static long
2373  const struct arc_operand *operand,
2374  int mods ATTRIBUTE_UNUSED,
2375  const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
2376  int *invalid)
2377 {
2378  if (!flag_p || !limm_p) {
2379  *invalid = 1;
2380  }
2381  return ((flag_p && limm_p)
2382  ? (insn[1] >> operand->shift) & ((1 << operand->bits) - 1)
2383  : 0);
2384 }
2385 
2386 /* Extract st insn's offset. */
2387 
2388 static long
2390  const struct arc_operand *operand,
2391  int mods ATTRIBUTE_UNUSED,
2392  const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
2393  int *invalid)
2394 {
2395  int value = 0;
2396 
2398  {
2399  value = insn[0] & 511;
2400  if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) {
2401  value -= 512;
2402  }
2403  if (value) {
2405  }
2406  } else {
2407  *invalid = 1;
2408  }
2409 
2410  return value;
2411 }
2412 
2413 /* Extract ld insn's offset. */
2414 
2415 static long
2417  const struct arc_operand *operand,
2418  int mods,
2419  const struct arc_operand_value **opval,
2420  int *invalid)
2421 {
2422  int test = insn[0] & I(-1);
2423  int value = 0;
2424 
2425  if (test)
2426  {
2427  value = insn[0] & 511;
2428  if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) {
2429  value -= 512;
2430  }
2431  if (value) {
2433  }
2434 
2435  return value;
2436  }
2437  /* If it isn't in the insn, it's concealed behind reg 'c'. */
2438  return extract_reg (insn, &arc_operands[arc_operand_map['c']],
2439  mods, opval, invalid);
2440 }
2441 
2442 /* The only thing this does is set the `invalid' flag if B != C.
2443  This is needed because the "mov" macro appears before it's real insn "and"
2444  and we don't want the disassembler to confuse them. */
2445 
2446 static long
2448  const struct arc_operand *operand ATTRIBUTE_UNUSED,
2449  int mods ATTRIBUTE_UNUSED,
2450  const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
2451  int *invalid)
2452 {
2453  /* This misses the case where B == ARC_REG_SHIMM_UPDATE &&
2454  C == ARC_REG_SHIMM (or vice versa). No big deal. Those insns will get
2455  printed as "and"s. */
2456  if (((*insn >> ARC_SHIFT_REGB) & ARC_MASK_REG) != ((*insn >> ARC_SHIFT_REGC) & ARC_MASK_REG)) {
2457  if (invalid != NULL) {
2458  *invalid = 1;
2459  }
2460  }
2461 
2462  return 0;
2463 }
2464 ␌
2465 /* ARC instructions.
2466 
2467  Longer versions of insns must appear before shorter ones (if gas sees
2468  "lsr r2,r3,1" when it's parsing "lsr %a,%b" it will think the ",1" is
2469  junk). This isn't necessary for `ld' because of the trailing ']'.
2470 
2471  Instructions that are really macros based on other insns must appear
2472  before the real insn so they're chosen when disassembling. Eg: The `mov'
2473  insn is really the `and' insn.
2474 
2475  This table is best viewed on a wide screen (161 columns). I'd prefer to
2476  keep it this way. The rest of the file, however, should be viewable on an
2477  80 column terminal. */
2478 
2479 /* ??? This table also includes macros: asl, lsl, and mov. The ppc port has
2480  a more general facility for dealing with macros which could be used if
2481  we need to. */
2482 
2483 /* This table can't be `const' because members `next_asm' and `next_dis' are
2484  computed at run-time. We could split this into two, but that doesn't seem
2485  worth it. */
2486 
2487 static struct arc_opcode arc_opcodes[] = {
2488 
2489  /* Base case instruction set (ARC4, ARC5, ARC6, ARC7). */
2490  /* Macros appear first. */
2491 
2492  /* "mov" is really an "and". */
2493  { "mov%.q%.f %a,%b%F%S%L%U", I(-1), I(12), ARC_MACH_ARC4, 0, 0 ,0,0},
2494  /* "asl" is really an "add". */
2495  { "asl%.q%.f %a,%b%F%S%L%U", I(-1), I(8), ARC_MACH_ARC4, 0, 0 ,0,0},
2496  /* "lsl" is really an "add". */
2497  { "lsl%.q%.f %a,%b%F%S%L%U", I(-1), I(8), ARC_MACH_ARC4, 0, 0 ,0,0},
2498  /* "nop" is really an "xor". */
2499  { "nop", 0xffffffff, 0x7fffffff, ARC_MACH_ARC4, 0, 0 ,0,0},
2500  /* "rlc" is really an "adc". */
2501  { "rlc%.q%.f %a,%b%F%S%L%U", I(-1), I(9), ARC_MACH_ARC4, 0, 0 ,0,0},
2502 
2503  /* The rest of these needn't be sorted, but it helps to find them if they are. */
2504  { "adc%.q%.f %a,%b,%c%F%S%L", I(-1), I(9), ARC_MACH_ARC4, 0, 0 ,0,0},
2505  { "add%.q%.f %a,%b,%c%F%S%L", I(-1), I(8), ARC_MACH_ARC4, 0, 0 ,0,0},
2506  { "and%.q%.f %a,%b,%c%F%S%L", I(-1), I(12), ARC_MACH_ARC4, 0, 0 ,0,0},
2507  { "asr%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(1), ARC_MACH_ARC4, 0, 0 ,0,0},
2508  { "bic%.q%.f %a,%b,%c%F%S%L", I(-1), I(14), ARC_MACH_ARC4, 0, 0 ,0,0},
2509  { "b%q%.n %B", I(-1), I(4), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2510  { "bl%q%.n %B", I(-1), I(5), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2511  { "b%.q%.n %B", I(-1), I(4), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2512  { "bl.%q%.n %B", I(-1), I(5), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2513  { "brk", 0x1ffffe00, 0x1ffffe00, ARC_MACH_ARC4, 0, 0 ,0,0},
2514  { "extb%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(7), ARC_MACH_ARC4, 0, 0 ,0,0},
2515  { "extw%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(8), ARC_MACH_ARC4, 0, 0 ,0,0},
2516  { "flag%.q %b%G%S%L", I(-1)|A(-1)|C(-1), I(3)|A(ARC_REG_SHIMM_UPDATE)|C(0), ARC_MACH_ARC4, 0, 0 ,0,0},
2517 
2518  /* %Q: force arc_cond_p=1 --> no shimm values */
2519  /* This insn allows an optional flags spec. */
2520  { "j%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2521  { "j%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2522  { "j%.q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2523  /* This insn allows an optional flags spec. */
2524  { "jl%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2525  { "jl%.q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2526  { "jl%q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2527  { "jl%.q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_ARC4 | ARC_OPCODE_COND_BRANCH, 0, 0 ,0,0},
2528  /* Put opcode 1 ld insns first so shimm gets prefered over limm. */
2529  /* "[%b]" is before "[%b,%o]" so 0 offsets don't get printed. */
2530  { "ld%Z%.X%.W%.E %a,[%s]%S%L%1", I(-1)|R(-1,13,1)|R(-1,0,511), I(1)|R(0,13,1)|R(0,0,511), ARC_MACH_ARC4, 0, 0 ,0,0},
2531  { "ld%z%.x%.w%.e %a,[%s]%S%L%1", I(-1)|R(-1,4,1)|R(-1,6,7), I(0)|R(0,4,1)|R(0,6,7), ARC_MACH_ARC4, 0, 0 ,0,0},
2532  { "ld%z%.x%.w%.e %a,[%s,%O]%S%L%1", I(-1)|R(-1,4,1)|R(-1,6,7), I(0)|R(0,4,1)|R(0,6,7), ARC_MACH_ARC4, 0, 0 ,0,0},
2533  { "ld%Z%.X%.W%.E %a,[%s,%O]%S%L%3", I(-1)|R(-1,13,1), I(1)|R(0,13,1), ARC_MACH_ARC4, 0, 0 ,0,0},
2534  { "lp%q%.n %B", I(-1), I(6), ARC_MACH_ARC4, 0, 0 ,0,0},
2535  { "lp%.q%.n %B", I(-1), I(6), ARC_MACH_ARC4, 0, 0 ,0,0},
2536  { "lr %a,[%Ab]%S%L", I(-1)|C(-1), I(1)|C(0x10), ARC_MACH_ARC4, 0, 0 ,0,0},
2537  { "lsr%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(2), ARC_MACH_ARC4, 0, 0 ,0,0},
2538  { "or%.q%.f %a,%b,%c%F%S%L", I(-1), I(13), ARC_MACH_ARC4, 0, 0 ,0,0},
2539  { "ror%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(3), ARC_MACH_ARC4, 0, 0 ,0,0},
2540  { "rrc%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(4), ARC_MACH_ARC4, 0, 0 ,0,0},
2541  { "sbc%.q%.f %a,%b,%c%F%S%L", I(-1), I(11), ARC_MACH_ARC4, 0, 0 ,0,0},
2542  { "sexb%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(5), ARC_MACH_ARC4, 0, 0 ,0,0},
2543  { "sexw%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(6), ARC_MACH_ARC4, 0, 0 ,0,0},
2544  { "sleep", 0x1ffffe01, 0x1ffffe01, ARC_MACH_ARC4, 0, 0 ,0,0},
2545  { "sr %c,[%Ab]%S%L", I(-1)|A(-1), I(2)|A(0x10), ARC_MACH_ARC4, 0, 0 ,0,0},
2546  /* "[%b]" is before "[%b,%o]" so 0 offsets don't get printed. */
2547  { "st%y%.v%.D %c,[%s]%L%S%0", I(-1)|R(-1,25,1)|R(-1,21,1), I(2)|R(0,25,1)|R(0,21,1), ARC_MACH_ARC4, 0, 0 ,0,0},
2548  { "st%y%.v%.D %c,[%s,%o]%S%L%2", I(-1)|R(-1,25,1)|R(-1,21,1), I(2)|R(0,25,1)|R(0,21,1), ARC_MACH_ARC4, 0, 0 ,0,0},
2549  { "sub%.q%.f %a,%b,%c%F%S%L", I(-1), I(10), ARC_MACH_ARC4, 0, 0 ,0,0},
2550  { "swi", 0x1ffffe02, 0x1ffffe02, ARC_MACH_ARC4, 0, 0 ,0,0},
2551  { "xor%.q%.f %a,%b,%c%F%S%L", I(-1), I(15), ARC_MACH_ARC4, 0, 0 ,0,0},
2552 
2553  /* ARCompact Instruction Set */
2554 
2555  { "abs%.f %#,%C%F", 0xf8ff003f, 0x202f0009, ARCOMPACT, 0, 0 ,0,0},
2556  { "abs%.f %#,%u%F", 0xf8ff003f, 0x206f0009, ARCOMPACT, 0, 0 ,0,0},
2557  { "abs%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f89, ARCOMPACT, 0, 0 ,0,0},
2558  { "abs%.f 0,%C%F", 0xffff703f, 0x262f7009, ARCOMPACT, 0, 0 ,0,0},
2559  { "abs%.f 0,%u%F", 0xf8ff003f, 0x266f7009, ARCOMPACT, 0, 0 ,0,0},
2560  { "abs%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f89, ARCOMPACT, 0, 0 ,0,0},
2561 
2562  { "adc%.f %A,%B,%C%F", 0xf8ff0000, 0x20010000, ARCOMPACT, 0, 0 ,0,0},
2563  { "adc%.f %A,%B,%u%F", 0xf8ff0000, 0x20410000, ARCOMPACT, 0, 0 ,0,0},
2564  { "adc%.f %#,%B,%K%F", 0xf8ff0000, 0x20810000, ARCOMPACT, 0, 0 ,0,0},
2565  { "adc%.f %#,%K,%B%F", 0xf8ff0000, 0x20810000, ARCOMPACT, 0, 0 ,0,0},
2566  { "adc%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20010f80, ARCOMPACT, 0, 0 ,0,0},
2567  { "adc%.f%Q %A,%L,%C%F", 0xffff7000, 0x26017000, ARCOMPACT, 0, 0 ,0,0},
2568  { "adc%.f%Q %A,%L,%u%F", 0xffff7000, 0x26417000, ARCOMPACT, 0, 0 ,0,0},
2569  { "adc%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26017f80, ARCOMPACT, 0, 0 ,0,0},
2570  { "adc%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c10000, ARCOMPACT, 0, 0 ,0,0},
2571  { "adc%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20c10020, ARCOMPACT, 0, 0 ,0,0},
2572  { "adc%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20c10000, ARCOMPACT, 0, 0 ,0,0},
2573  { "adc%.q%.f %#,%u,%B%F", 0xf8ff00f0, 0x20c10020, ARCOMPACT, 0, 0 ,0,0},
2574  { "adc%.q%.f%Q %#,%B,%L%F", 0xf8ff0ff0, 0x20c10f80, ARCOMPACT, 0, 0 ,0,0},
2575  { "adc%.q%.f%Q %#,%L,%B%F", 0xf8ff0ff0, 0x20c10f80, ARCOMPACT, 0, 0 ,0,0},
2576  { "adc%.f 0,%B,%C%F", 0xf8ff00ff, 0x2001003e, ARCOMPACT, 0, 0 ,0,0},
2577  { "adc%.f 0,%B,%u%F", 0xf8ff003f, 0x2041003e, ARCOMPACT, 0, 0 ,0,0},
2578  { "adc%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20010fbe, ARCOMPACT, 0, 0 ,0,0},
2579  { "adc%.f%Q 0,%L,%C%F", 0xffff703f, 0x2601703e, ARCOMPACT, 0, 0 ,0,0},
2580  { "adc%.f%Q 0,%L,%u%F", 0xffff703f, 0x2641703e, ARCOMPACT, 0, 0 ,0,0},
2581  { "adc%.f%Q 0,%L,%K%F", 0xffff7000, 0x26817000, ARCOMPACT, 0, 0 ,0,0},
2582  { "adc%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c17000, ARCOMPACT, 0, 0 ,0,0},
2583  { "adc%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c17020, ARCOMPACT, 0, 0 ,0,0},
2584  { "adc%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c17f80, ARCOMPACT, 0, 0 ,0,0},
2585  { "add%.f %A,%B,%C%F", 0xf8ff0000, 0x20000000, ARCOMPACT, 0, 0 ,0,0},
2586  { "add%.f %A,%B,%u%F", 0xf8ff0000, 0x20400000, ARCOMPACT, 0, 0 ,0,0},
2587  { "add%.f %#,%B,%K%F", 0xf8ff0000, 0x20800000, ARCOMPACT, 0, 0 ,0,0},
2588  { "add%.f%Q %A,%B,%[L%F", 0xf8ff0fc0, 0x20000f80, ARCOMPACT, 0, 0 ,0,0},
2589  { "add%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20000f80, ARCOMPACT, 0, 0 ,0,0},
2590  { "add%.f%Q %A,%L,%C%F", 0xffff7000, 0x26007000, ARCOMPACT, 0, 0 ,0,0},
2591  { "add%.f%Q %A,%L,%u%F", 0xffff7000, 0x26407000, ARCOMPACT, 0, 0 ,0,0},
2592  { "add%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26007f80, ARCOMPACT, 0, 0 ,0,0},
2593  { "add%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c00000, ARCOMPACT, 0, 0 ,0,0},
2594  { "add%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20c00020, ARCOMPACT, 0, 0 ,0,0},
2595  { "add%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20c00000, ARCOMPACT, 0, 0 ,0,0},
2596  { "add%.q%.f %#,%u,%B%F", 0xf8ff00f0, 0x20c00020, ARCOMPACT, 0, 0 ,0,0},
2597  { "add%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c00f80, ARCOMPACT, 0, 0 ,0,0},
2598  { "add%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20c00f80, ARCOMPACT, 0, 0 ,0,0},
2599  { "add%.f 0,%B,%C%F", 0xf8ff003f, 0x2000003e, ARCOMPACT, 0, 0 ,0,0},
2600  { "add%.f 0,%B,%u%F", 0xf8ff003f, 0x2040003e, ARCOMPACT, 0, 0 ,0,0},
2601  { "add%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20000fbe, ARCOMPACT, 0, 0 ,0,0},
2602  { "add%.f%Q 0,%L,%C%F", 0xffff703f, 0x2600703e, ARCOMPACT, 0, 0 ,0,0},
2603  { "add%.f%Q 0,%L,%u%F", 0xffff703f, 0x2640703e, ARCOMPACT, 0, 0 ,0,0},
2604  { "add%.f%Q 0,%L,%K%F", 0xffff7000, 0x26807000, ARCOMPACT, 0, 0 ,0,0},
2605  { "add%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c07000, ARCOMPACT, 0, 0 ,0,0},
2606  { "add%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c07020, ARCOMPACT, 0, 0 ,0,0},
2607  { "add%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c07f80, ARCOMPACT, 0, 0 ,0,0},
2608  { "add1%.f %A,%B,%C%F", 0xf8ff0000, 0x20140000, ARCOMPACT, 0, 0 ,0,0},
2609  { "add1%.f %A,%B,%u%F", 0xf8ff0000, 0x20540000, ARCOMPACT, 0, 0 ,0,0},
2610  { "add1%.f %#,%B,%K%F", 0xf8ff0000, 0x20940000, ARCOMPACT, 0, 0 ,0,0},
2611  { "add1%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20140f80, ARCOMPACT, 0, 0 ,0,0},
2612  { "add1%.f%Q %A,%L,%C%F", 0xffff7000, 0x26147000, ARCOMPACT, 0, 0 ,0,0},
2613  { "add1%.f%Q %A,%L,%u%F", 0xffff7000, 0x26547000, ARCOMPACT, 0, 0 ,0,0},
2614  { "add1%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26147f80, ARCOMPACT, 0, 0 ,0,0},
2615  { "add1%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d40000, ARCOMPACT, 0, 0 ,0,0},
2616  { "add1%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20d40020, ARCOMPACT, 0, 0 ,0,0},
2617  { "add1%.q%.f%Q %#,%B,%L%F", 0xf8ff0ff0, 0x20d40f80, ARCOMPACT, 0, 0 ,0,0},
2618  { "add1%.f 0,%B,%C%F", 0xf8ff003f, 0x2014003e, ARCOMPACT, 0, 0 ,0,0},
2619  { "add1%.f 0,%B,%u%F", 0xf8ff003f, 0x2054003e, ARCOMPACT, 0, 0 ,0,0},
2620  { "add1%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20140fbe, ARCOMPACT, 0, 0 ,0,0},
2621  { "add1%.f%Q 0,%L,%C%F", 0xffff703f, 0x2614703e, ARCOMPACT, 0, 0 ,0,0},
2622  { "add1%.f%Q 0,%L,%u%F", 0xffff703f, 0x2654703e, ARCOMPACT, 0, 0 ,0,0},
2623  { "add1%.f%Q 0,%L,%K%F", 0xffff7000, 0x26947000, ARCOMPACT, 0, 0 ,0,0},
2624  { "add1%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d47000, ARCOMPACT, 0, 0 ,0,0},
2625  { "add1%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d47020, ARCOMPACT, 0, 0 ,0,0},
2626  { "add1%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26d47f80, ARCOMPACT, 0, 0 ,0,0},
2627  { "add2%.f %A,%B,%C%F", 0xf8ff0000, 0x20150000, ARCOMPACT, 0, 0 ,0,0},
2628  { "add2%.f %A,%B,%u%F", 0xf8ff0000, 0x20550000, ARCOMPACT, 0, 0 ,0,0},
2629  { "add2%.f %#,%B,%K%F", 0xf8ff0000, 0x20950000, ARCOMPACT, 0, 0 ,0,0},
2630  { "add2%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20150f80, ARCOMPACT, 0, 0 ,0,0},
2631  { "add2%.f%Q %A,%L,%C%F", 0xffff7000, 0x26157000, ARCOMPACT, 0, 0 ,0,0},
2632  { "add2%.f%Q %A,%L,%u%F", 0xffff7000, 0x26557000, ARCOMPACT, 0, 0 ,0,0},
2633  { "add2%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26157f80, ARCOMPACT, 0, 0 ,0,0},
2634  { "add2%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d50000, ARCOMPACT, 0, 0 ,0,0},
2635  { "add2%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20d50020, ARCOMPACT, 0, 0 ,0,0},
2636  { "add2%.q%.f%Q %#,%B,%L%F", 0xf8ff0ff0, 0x20d50f80, ARCOMPACT, 0, 0 ,0,0},
2637  { "add2%.f 0,%B,%C%F", 0xf8ff003f, 0x2015003e, ARCOMPACT, 0, 0 ,0,0},
2638  { "add2%.f 0,%B,%u%F", 0xf8ff003f, 0x2055003e, ARCOMPACT, 0, 0 ,0,0},
2639  { "add2%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20150fbe, ARCOMPACT, 0, 0 ,0,0},
2640  { "add2%.f%Q 0,%L,%C%F", 0xffff703f, 0x2615703e, ARCOMPACT, 0, 0 ,0,0},
2641  { "add2%.f%Q 0,%L,%u%F", 0xffff703f, 0x2655703e, ARCOMPACT, 0, 0 ,0,0},
2642  { "add2%.f%Q 0,%L,%K%F", 0xffff7000, 0x26957000, ARCOMPACT, 0, 0 ,0,0},
2643  { "add2%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d57000, ARCOMPACT, 0, 0 ,0,0},
2644  { "add2%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d57020, ARCOMPACT, 0, 0 ,0,0},
2645  { "add2%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26d57f80, ARCOMPACT, 0, 0 ,0,0},
2646  { "add3%.f %A,%B,%C%F", 0xf8ff0000, 0x20160000, ARCOMPACT, 0, 0 ,0,0},
2647  { "add3%.f %A,%B,%u%F", 0xf8ff0000, 0x20560000, ARCOMPACT, 0, 0 ,0,0},
2648  { "add3%.f %#,%B,%K%F", 0xf8ff0000, 0x20960000, ARCOMPACT, 0, 0 ,0,0},
2649  { "add3%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20160f80, ARCOMPACT, 0, 0 ,0,0},
2650  { "add3%.f%Q %A,%L,%C%F", 0xffff7000, 0x26167000, ARCOMPACT, 0, 0 ,0,0},
2651  { "add3%.f%Q %A,%L,%u%F", 0xffff7000, 0x26567000, ARCOMPACT, 0, 0 ,0,0},
2652  { "add3%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26167f80, ARCOMPACT, 0, 0 ,0,0},
2653  { "add3%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d60000, ARCOMPACT, 0, 0 ,0,0},
2654  { "add3%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20d60020, ARCOMPACT, 0, 0 ,0,0},
2655  { "add3%.q%.f%Q %#,%B,%L%F", 0xf8ff0ff0, 0x20d60f80, ARCOMPACT, 0, 0 ,0,0},
2656  { "add3%.f 0,%B,%C%F", 0xf8ff003f, 0x2016003e, ARCOMPACT, 0, 0 ,0,0},
2657  { "add3%.f 0,%B,%u%F", 0xf8ff003f, 0x2056003e, ARCOMPACT, 0, 0 ,0,0},
2658  { "add3%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20160fbe, ARCOMPACT, 0, 0 ,0,0},
2659  { "add3%.f%Q 0,%L,%C%F", 0xffff703f, 0x2616703e, ARCOMPACT, 0, 0 ,0,0},
2660  { "add3%.f%Q 0,%L,%u%F", 0xffff7000, 0x26967000, ARCOMPACT, 0, 0 ,0,0},
2661  { "add3%.f%Q 0,%L,%K%F", 0xffff7000, 0x26967000, ARCOMPACT, 0, 0 ,0,0},
2662  { "add3%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d67000, ARCOMPACT, 0, 0 ,0,0},
2663  { "add3%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d67020, ARCOMPACT, 0, 0 ,0,0},
2664  { "add3%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26d67f80, ARCOMPACT, 0, 0 ,0,0},
2665 
2666  { "and%.f %A,%B,%C%F", 0xf8ff0000, 0x20040000, ARCOMPACT, 0, 0 ,0,0},
2667  { "and%.f %A,%B,%u%F", 0xf8ff0000, 0x20440000, ARCOMPACT, 0, 0 ,0,0},
2668  { "and%.f %#,%B,%K%F", 0xf8ff0000, 0x20840000, ARCOMPACT, 0, 0 ,0,0},
2669  { "and%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20040f80, ARCOMPACT, 0, 0 ,0,0},
2670  { "and%.f%Q %A,%L,%C%F", 0xffff7000, 0x26047000, ARCOMPACT, 0, 0 ,0,0},
2671  { "and%.f%Q %A,%L,%u%F", 0xffff7000, 0x26447000, ARCOMPACT, 0, 0 ,0,0},
2672  { "and%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26047f80, ARCOMPACT, 0, 0 ,0,0},
2673  { "and%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c40000, ARCOMPACT, 0, 0 ,0,0},
2674  { "and%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20c40000, ARCOMPACT, 0, 0 ,0,0},
2675  { "and%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20c40020, ARCOMPACT, 0, 0 ,0,0},
2676  { "and%.q%.f %#,%u,%B%F", 0xf8ff00f0, 0x20c40020, ARCOMPACT, 0, 0 ,0,0},
2677  { "and%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c40f80, ARCOMPACT, 0, 0 ,0,0},
2678  { "and%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20c40f80, ARCOMPACT, 0, 0 ,0,0},
2679  { "and%.f 0,%B,%C%F", 0xf8ff003f, 0x2004003e, ARCOMPACT, 0, 0 ,0,0},
2680  { "and%.f 0,%B,%u%F", 0xf8ff003f, 0x2044003e, ARCOMPACT, 0, 0 ,0,0},
2681  { "and%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20040fbe, ARCOMPACT, 0, 0 ,0,0},
2682  { "and%.f%Q 0,%L,%C%F", 0xffff703f, 0x2604703e, ARCOMPACT, 0, 0 ,0,0},
2683  { "and%.f%Q 0,%L,%u%F", 0xffff703f, 0x2644703e, ARCOMPACT, 0, 0 ,0,0},
2684  { "and%.f%Q 0,%L,%K%F", 0xffff7000, 0x26847000, ARCOMPACT, 0, 0 ,0,0},
2685  { "and%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c47000, ARCOMPACT, 0, 0 ,0,0},
2686  { "and%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c47020, ARCOMPACT, 0, 0 ,0,0},
2687  { "and%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c47f80, ARCOMPACT, 0, 0 ,0,0},
2688 
2689  { "asl%.f %A,%B,%C%F", 0xf8ff0000, 0x28000000, ARCOMPACT, 0, 0 ,0,0},
2690  { "asl%.f %A,%B,%u%F", 0xf8ff0000, 0x28400000, ARCOMPACT, 0, 0 ,0,0},
2691  { "asl%.f %#,%B,%K%F", 0xf8ff0000, 0x28800000, ARCOMPACT, 0, 0 ,0,0},
2692  { "asl%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x28000f80, ARCOMPACT, 0, 0 ,0,0},
2693  { "asl%.f%Q %A,%L,%C%F", 0xffff7000, 0x2e007000, ARCOMPACT, 0, 0 ,0,0},
2694  { "asl%.f%Q %A,%L,%u%F", 0xffff7000, 0x2e407000, ARCOMPACT, 0, 0 ,0,0},
2695  { "asl%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x2e007f80, ARCOMPACT, 0, 0 ,0,0},
2696  { "asl%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x28c00000, ARCOMPACT, 0, 0 ,0,0},
2697  { "asl%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x28c00020, ARCOMPACT, 0, 0 ,0,0},
2698  { "asl%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x28c00f80, ARCOMPACT, 0, 0 ,0,0},
2699  { "asl%.f 0,%B,%C%F", 0xf8ff003f, 0x2800003e, ARCOMPACT, 0, 0 ,0,0},
2700  { "asl%.f 0,%B,%u%F", 0xf8ff003f, 0x2840003e, ARCOMPACT, 0, 0 ,0,0},
2701  { "asl%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x28000fbe, ARCOMPACT, 0, 0 ,0,0},
2702  { "asl%.f%Q 0,%L,%C%F", 0xffff703f, 0x2e00703e, ARCOMPACT, 0, 0 ,0,0},
2703  { "asl%.f%Q 0,%L,%u%F", 0xffff703f, 0x2e40703e, ARCOMPACT, 0, 0 ,0,0},
2704  { "asl%.f%Q 0,%L,%K%F", 0xffff7000, 0x2e807000, ARCOMPACT, 0, 0 ,0,0},
2705  { "asl%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x2ec07000, ARCOMPACT, 0, 0 ,0,0},
2706  { "asl%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x2ec07020, ARCOMPACT, 0, 0 ,0,0},
2707  { "asl%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x2ec07f80, ARCOMPACT, 0, 0 ,0,0},
2708  { "asl%.f %#,%C%F", 0xf8ff003f, 0x202f0000, ARCOMPACT, 0, 0 ,0,0},
2709  { "asl%.f %#,%u%F", 0xf8ff003f, 0x206f0000, ARCOMPACT, 0, 0 ,0,0},
2710  { "asl%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f80, ARCOMPACT, 0, 0 ,0,0},
2711  { "asl%.f 0,%C%F", 0xffff703f, 0x262f7000, ARCOMPACT, 0, 0 ,0,0},
2712  { "asl%.f 0,%u%F", 0xffff703f, 0x266f7000, ARCOMPACT, 0, 0 ,0,0},
2713  { "asl%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f80, ARCOMPACT, 0, 0 ,0,0},
2714 
2715  { "asr%.f %A,%B,%C%F", 0xf8ff0000, 0x28020000, ARCOMPACT, 0, 0 ,0,0},
2716  { "asr%.f %A,%B,%u%F", 0xf8ff0000, 0x28420000, ARCOMPACT, 0, 0 ,0,0},
2717  { "asr%.f %#,%B,%K%F", 0xf8ff0000, 0x28820000, ARCOMPACT, 0, 0 ,0,0},
2718  { "asr%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x28020f80, ARCOMPACT, 0, 0 ,0,0},
2719  { "asr%.f%Q %A,%L,%C%F", 0xffff7000, 0x2e027000, ARCOMPACT, 0, 0 ,0,0},
2720  { "asr%.f%Q %A,%L,%u%F", 0xffff7000, 0x2e427000, ARCOMPACT, 0, 0 ,0,0},
2721  { "asr%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x2e027f80, ARCOMPACT, 0, 0 ,0,0},
2722  { "asr%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x28c20000, ARCOMPACT, 0, 0 ,0,0},
2723  { "asr%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x28c20020, ARCOMPACT, 0, 0 ,0,0},
2724  { "asr%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x28c20f80, ARCOMPACT, 0, 0 ,0,0},
2725  { "asr%.f 0,%B,%C%F", 0xf8ff003f, 0x2802003e, ARCOMPACT, 0, 0 ,0,0},
2726  { "asr%.f 0,%B,%u%F", 0xf8ff003f, 0x2842003e, ARCOMPACT, 0, 0 ,0,0},
2727  { "asr%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x28020fbe, ARCOMPACT, 0, 0 ,0,0},
2728  { "asr%.f%Q 0,%L,%C%F", 0xffff703f, 0x2e02703e, ARCOMPACT, 0, 0 ,0,0},
2729  { "asr%.f%Q 0,%L,%u%F", 0xffff703f, 0x2e42703e, ARCOMPACT, 0, 0 ,0,0},
2730  { "asr%.f%Q 0,%L,%K%F", 0xffff7000, 0x2e827000, ARCOMPACT, 0, 0 ,0,0},
2731  { "asr%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x2ec27000, ARCOMPACT, 0, 0 ,0,0},
2732  { "asr%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x2ec27020, ARCOMPACT, 0, 0 ,0,0},
2733  { "asr%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x2ec27f80, ARCOMPACT, 0, 0 ,0,0},
2734  { "asr%.f %#,%C%F", 0xf8ff003f, 0x202f0001, ARCOMPACT, 0, 0 ,0,0},
2735  { "asr%.f %#,%u%F", 0xf8ff003f, 0x206f0001, ARCOMPACT, 0, 0 ,0,0},
2736  { "asr%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f81, ARCOMPACT, 0, 0 ,0,0},
2737  { "asr%.f 0,%C%F", 0xffff703f, 0x262f7001, ARCOMPACT, 0, 0 ,0,0},
2738  { "asr%.f 0,%u%F", 0xffff703f, 0x266f7001, ARCOMPACT, 0, 0 ,0,0},
2739  { "asr%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f81, ARCOMPACT, 0, 0 ,0,0},
2740  { "bbit0%.n %B,%C,%d", 0xf801001f, 0x0801000e, ARCOMPACT, 0, 0 ,0,0},
2741  { "bbit0%.n %B,%u,%d", 0xf801001f, 0x0801001e, ARCOMPACT, 0, 0 ,0,0},
2742  { "bbit0%Q %B,%L,%d", 0xf8010fff, 0x08010f8e, ARCOMPACT, 0, 0 ,0,0},
2743  { "bbit0%Q %L,%C,%d", 0xff01703f, 0x0e01700e, ARCOMPACT, 0, 0 ,0,0},
2744  { "bbit1%.n %B,%C,%d", 0xf801001f, 0x0801000f, ARCOMPACT, 0, 0 ,0,0},
2745  { "bbit1%.n %B,%u,%d", 0xf801001f, 0x0801001f, ARCOMPACT, 0, 0 ,0,0},
2746  { "bbit1%Q %B,%L,%d", 0xf8010fff, 0x08010f8f, ARCOMPACT, 0, 0 ,0,0},
2747  { "bbit1%Q %L,%C,%d", 0xff01703f, 0x0e01700f, ARCOMPACT, 0, 0 ,0,0},
2748  { "b%.n %I", 0xf8010010, 0x00010000, ARCOMPACT, 0, 0 ,0,0},
2749  { "b%q%.n %i", 0xf8010000, 0x00000000, ARCOMPACT, 0, 0 ,0,0},
2750  { "b%.q%.n %i", 0xf8010000, 0x00000000, ARCOMPACT, 0, 0 ,0,0},
2751  { "bclr%.f %A,%B,%C%F", 0xf8ff0000, 0x20100000, ARCOMPACT, 0, 0 ,0,0},
2752  { "bclr%.f %A,%B,%u%F", 0xf8ff0000, 0x20500000, ARCOMPACT, 0, 0 ,0,0},
2753  { "bclr%.f %#,%B,%K%F", 0xf8ff0000, 0x20900000, ARCOMPACT, 0, 0 ,0,0},
2754  { "bclr%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20100f80, ARCOMPACT, 0, 0 ,0,0},
2755  { "bclr%.f%Q %A,%L,%C%F", 0xffff7000, 0x26107000, ARCOMPACT, 0, 0 ,0,0},
2756  { "bclr%.f%Q %A,%L,%u%F", 0xffff7000, 0x26507000, ARCOMPACT, 0, 0 ,0,0},
2757  { "bclr%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26107f80, ARCOMPACT, 0, 0 ,0,0},
2758  { "bclr%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d00000, ARCOMPACT, 0, 0 ,0,0},
2759  { "bclr%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20d00020, ARCOMPACT, 0, 0 ,0,0},
2760  { "bclr%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20d00f80, ARCOMPACT, 0, 0 ,0,0},
2761  { "bclr%.f 0,%B,%C%F", 0xf8ff003f, 0x2010003e, ARCOMPACT, 0, 0 ,0,0},
2762  { "bclr%.f 0,%B,%u%F", 0xf8ff003f, 0x2050003e, ARCOMPACT, 0, 0 ,0,0},
2763  { "bclr%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20100fbe, ARCOMPACT, 0, 0 ,0,0},
2764  { "bclr%.f%Q 0,%L,%C%F", 0xffff703f, 0x2610703e, ARCOMPACT, 0, 0 ,0,0},
2765  { "bclr%.f%Q 0,%L,%u%F", 0xffff703f, 0x2650703e, ARCOMPACT, 0, 0 ,0,0},
2766  { "bclr%.f%Q 0,%L,%K%F", 0xffff7000, 0x26907000, ARCOMPACT, 0, 0 ,0,0},
2767  { "bclr%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d07000, ARCOMPACT, 0, 0 ,0,0},
2768  { "bclr%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d07020, ARCOMPACT, 0, 0 ,0,0},
2769  { "bclr%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x26d07f80, ARCOMPACT, 0, 0 ,0,0},
2770  { "bic%.f %A,%B,%C%F", 0xf8ff0000, 0x20060000, ARCOMPACT, 0, 0 ,0,0},
2771  { "bic%.f %A,%B,%u%F", 0xf8ff0000, 0x20460000, ARCOMPACT, 0, 0 ,0,0},
2772  { "bic%.f %#,%B,%K%F", 0xf8ff0000, 0x20860000, ARCOMPACT, 0, 0 ,0,0},
2773  { "bic%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20060f80, ARCOMPACT, 0, 0 ,0,0},
2774  { "bic%.f%Q %A,%L,%C%F", 0xffff7000, 0x26067000, ARCOMPACT, 0, 0 ,0,0},
2775  { "bic%.f%Q %A,%L,%u%F", 0xffff7000, 0x26467000, ARCOMPACT, 0, 0 ,0,0},
2776  { "bic%.f%Q %A,%L,%K%F", 0xffff7000, 0x26067000, ARCOMPACT, 0, 0 ,0,0},
2777  { "bic%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c60000, ARCOMPACT, 0, 0 ,0,0},
2778  { "bic%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c60020, ARCOMPACT, 0, 0 ,0,0},
2779  { "bic%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c60f80, ARCOMPACT, 0, 0 ,0,0},
2780  { "bic%.f 0,%B,%C%F", 0xf8ff003f, 0x2006003e, ARCOMPACT, 0, 0 ,0,0},
2781  { "bic%.f 0,%B,%u%F", 0xf8ff003f, 0x2046003e, ARCOMPACT, 0, 0 ,0,0},
2782  { "bic%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20060fbe, ARCOMPACT, 0, 0 ,0,0},
2783  { "bic%.f%Q 0,%L,%C%F", 0xffff703f, 0x2606703e, ARCOMPACT, 0, 0 ,0,0},
2784  { "bic%.f%Q 0,%L,%u%F", 0xffff703f, 0x2646703e, ARCOMPACT, 0, 0 ,0,0},
2785  { "bic%.f%Q 0,%L,%K%F", 0xffff7000, 0x26867000, ARCOMPACT, 0, 0 ,0,0},
2786  { "bic%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c67000, ARCOMPACT, 0, 0 ,0,0},
2787  { "bic%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c67020, ARCOMPACT, 0, 0 ,0,0},
2788  { "bic%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x26c67f80, ARCOMPACT, 0, 0 ,0,0},
2789  { "bl%.n %H", 0xf8030030, 0x08020000, ARCOMPACT, 0, 0 ,0,0},
2790  { "bl%q%.n %h", 0xf803003f, 0x08000000, ARCOMPACT, 0, 0 ,0,0},
2791  { "bl%.q%.n %h", 0xf803003f, 0x08000000, ARCOMPACT, 0, 0 ,0,0},
2792  { "bmsk%.f %A,%B,%C%F", 0xf8ff0000, 0x20130000, ARCOMPACT, 0, 0 ,0,0},
2793  { "bmsk%.f %A,%B,%u%F", 0xf8ff0000, 0x20530000, ARCOMPACT, 0, 0 ,0,0},
2794  { "bmsk%.f %#,%B,%K%F", 0xf8ff0000, 0x20930000, ARCOMPACT, 0, 0 ,0,0},
2795  { "bmsk%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20130f80, ARCOMPACT, 0, 0 ,0,0},
2796  { "bmsk%.f%Q %A,%L,%C%F", 0xffff7000, 0x26137000, ARCOMPACT, 0, 0 ,0,0},
2797  { "bmsk%.f%Q %A,%L,%u%F", 0xffff7000, 0x26537000, ARCOMPACT, 0, 0 ,0,0},
2798  { "bmsk%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26137f80, ARCOMPACT, 0, 0 ,0,0},
2799  { "bmsk%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d30000, ARCOMPACT, 0, 0 ,0,0},
2800  { "bmsk%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20d30020, ARCOMPACT, 0, 0 ,0,0},
2801  { "bmsk%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20d30f80, ARCOMPACT, 0, 0 ,0,0},
2802  { "bmsk%.f 0,%B,%C%F", 0xf8ff003f, 0x2013003e, ARCOMPACT, 0, 0 ,0,0},
2803  { "bmsk%.f 0,%B,%u%F", 0xf8ff003f, 0x2053003e, ARCOMPACT, 0, 0 ,0,0},
2804  { "bmsk%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20130fbe, ARCOMPACT, 0, 0 ,0,0},
2805  { "bmsk%.f%Q 0,%L,%C%F", 0xffff703f, 0x2613703e, ARCOMPACT, 0, 0 ,0,0},
2806  { "bmsk%.f%Q 0,%L,%u%F", 0xffff703f, 0x2653703e, ARCOMPACT, 0, 0 ,0,0},
2807  { "bmsk%.f%Q 0,%L,%K%F", 0xffff7000, 0x26937000, ARCOMPACT, 0, 0 ,0,0},
2808  { "bmsk%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d37000, ARCOMPACT, 0, 0 ,0,0},
2809  { "bmsk%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d37020, ARCOMPACT, 0, 0 ,0,0},
2810  { "bmsk%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x26d37f80, ARCOMPACT, 0, 0 ,0,0},
2811  { "breq%.n %B,%C,%d", 0xf801003f, 0x08010000, ARCOMPACT, 0, 0 ,0,0},
2812  { "breq%.n %B,%u,%d", 0xf801003f, 0x08010010, ARCOMPACT, 0, 0 ,0,0},
2813  { "breq%Q %B,%L,%d", 0xf8010fff, 0x08010f80, ARCOMPACT, 0, 0 ,0,0},
2814  { "breq%Q %L,%C,%d", 0xff01703f, 0x0e017000, ARCOMPACT, 0, 0 ,0,0},
2815  { "brne%.n %B,%C,%d", 0xf801003f, 0x08010001, ARCOMPACT, 0, 0 ,0,0},
2816  { "brne%.n %B,%u,%d", 0xf801003f, 0x08010011, ARCOMPACT, 0, 0 ,0,0},
2817  { "brne%Q %B,%L,%d", 0xf8010fff, 0x08010f81, ARCOMPACT, 0, 0 ,0,0},
2818  { "brne%Q %L,%C,%d", 0xff01703f, 0x0e017001, ARCOMPACT, 0, 0 ,0,0},
2819 
2820  /*Pseudo mnemonics for BRcc instruction*/
2821  { "brgt%.n %C,%B,%d", 0xf801003f, 0x08010002, ARCOMPACT, 0, 0 ,0,0},
2822  { "brgt%.n %B,%u,%d", 0xf801003f, 0x08010013, ARCOMPACT|ARC_INCR_U6, 0, 0 ,0,0},
2823  { "brgt%Q %L,%B,%d", 0xf8010fff, 0x08010f82, ARCOMPACT, 0, 0 ,0,0},
2824  { "brgt%Q %C,%L,%d", 0xff01703f, 0x0e017002, ARCOMPACT, 0, 0 ,0,0},
2825 
2826  { "brle%.n %C,%B,%d", 0xf801003f, 0x08010003, ARCOMPACT, 0, 0 ,0,0},
2827  { "brle%.n %B,%u,%d", 0xf801003f, 0x08010012, ARCOMPACT|ARC_INCR_U6, 0, 0 ,0,0},
2828  { "brle%Q %L,%B,%d", 0xf8010fff, 0x08010f83, ARCOMPACT, 0, 0 ,0,0},
2829  { "brle%Q %C,%L,%d", 0xff01703f, 0x0e017003, ARCOMPACT, 0, 0 ,0,0},
2830 
2831  { "brhi%.n %C,%B,%d", 0xf801003f, 0x08010004, ARCOMPACT, 0, 0 ,0,0},
2832  { "brhi%.n %B,%u,%d", 0xf801003f, 0x08010015, ARCOMPACT|ARC_INCR_U6, 0, 0 ,0,0},
2833  { "brhi%Q %L,%B,%d", 0xf8010fff, 0x08010f84, ARCOMPACT, 0, 0 ,0,0},
2834  { "brhi%Q %C,%L,%d", 0xff01703f, 0x0e017004, ARCOMPACT, 0, 0 ,0,0},
2835 
2836 
2837  { "brls%.n %C,%B,%d", 0xf801003f, 0x08010005, ARCOMPACT, 0, 0 ,0,0},
2838  { "brls%.n %B,%u,%d", 0xf801003f, 0x08010014, ARCOMPACT|ARC_INCR_U6, 0, 0 ,0,0},
2839  { "brls%Q %L,%B,%d", 0xf8010fff, 0x08010f85, ARCOMPACT, 0, 0 ,0,0},
2840  { "brls%Q %C,%L,%d", 0xff01703f, 0x0e017005, ARCOMPACT, 0, 0 ,0,0},
2841 
2842  { "brcc%.n %B,%C,%d", 0xff01003f, 0x08010005, ARCOMPACT, 0, 0 ,0,0},
2843  { "brcc%.n %B,%u,%d", 0xff01003f, 0x08010015, ARCOMPACT, 0, 0 ,0,0},
2844  { "brcc%Q %B,%L,%d", 0xf8010fff, 0x08010f85, ARCOMPACT, 0, 0 ,0,0},
2845  { "brcc%Q %L,%C,%d", 0xf801003f, 0x0e017005, ARCOMPACT, 0, 0 ,0,0},
2846 
2847  { "brcs%.n %B,%C,%d", 0xff01003f, 0x08010004, ARCOMPACT, 0, 0 ,0,0},
2848  { "brcs%.n %B,%u,%d", 0xff01003f, 0x08010014, ARCOMPACT, 0, 0 ,0,0},
2849  { "brcs%Q %B,%L,%d", 0xf8010fff, 0x08010f84, ARCOMPACT, 0, 0 ,0,0},
2850  { "brcs%Q %L,%C,%d", 0xf801003f, 0x0e017004, ARCOMPACT, 0, 0 ,0,0},
2851  /*Pseudo Mnemonics definition ends*/
2852 
2853  { "brlt%.n %B,%C,%d", 0xf801003f, 0x08010002, ARCOMPACT, 0, 0 ,0,0},
2854  { "brlt%.n %B,%u,%d", 0xf801003f, 0x08010012, ARCOMPACT, 0, 0 ,0,0},
2855  { "brlt%Q %B,%L,%d", 0xf8010fff, 0x08010f82, ARCOMPACT, 0, 0 ,0,0},
2856  { "brlt%Q %L,%C,%d", 0xff01703f, 0x0e017002, ARCOMPACT, 0, 0 ,0,0},
2857  { "brk", 0xffffffff, 0x256F003F, ARCOMPACT, 0, 0 ,0,0},
2858  { "brge%.n %B,%C,%d", 0xf801003f, 0x08010003, ARCOMPACT, 0, 0 ,0,0},
2859  { "brge%.n %B,%u,%d", 0xf801003f, 0x08010013, ARCOMPACT, 0, 0 ,0,0},
2860  { "brge%Q %B,%L,%d", 0xf8010fff, 0x08010f83, ARCOMPACT, 0, 0 ,0,0},
2861  { "brge%Q %L,%C,%d", 0xff01703f, 0x0e017003, ARCOMPACT, 0, 0 ,0,0},
2862  { "brlo%.n %B,%C,%d", 0xf801003f, 0x08010004, ARCOMPACT, 0, 0 ,0,0},
2863  { "brlo%.n %B,%u,%d", 0xf801003f, 0x08010014, ARCOMPACT, 0, 0 ,0,0},
2864  { "brlo%Q %B,%L,%d", 0xf8010fff, 0x08010f84, ARCOMPACT, 0, 0 ,0,0},
2865  { "brlo%Q %L,%C,%d", 0xff01703f, 0x0e017004, ARCOMPACT, 0, 0 ,0,0},
2866  { "brhs%.n %B,%C,%d", 0xf801003f, 0x08010005, ARCOMPACT, 0, 0 ,0,0},
2867  { "brhs%.n %B,%u,%d", 0xf801003f, 0x08010015, ARCOMPACT, 0, 0 ,0,0},
2868  { "brhs%Q %B,%L,%d", 0xf8010fff, 0x08010f85, ARCOMPACT, 0, 0 ,0,0},
2869  { "brhs%Q %L,%C,%d", 0xff01703f, 0x0e017005, ARCOMPACT, 0, 0 ,0,0},
2870  { "bset%.f %A,%B,%C%F", 0xf8ff0000, 0x200f0000, ARCOMPACT, 0, 0 ,0,0},
2871  { "bset%.f %A,%B,%u%F", 0xf8ff0000, 0x204f0000, ARCOMPACT, 0, 0 ,0,0},
2872  { "bset%.f %#,%B,%K%F", 0xf8ff0000, 0x208f0000, ARCOMPACT, 0, 0 ,0,0},
2873  { "bset%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x200f0f80, ARCOMPACT, 0, 0 ,0,0},
2874  { "bset%.f%Q %A,%L,%C%F", 0xffff7000, 0x260f7000, ARCOMPACT, 0, 0 ,0,0},
2875  { "bset%.f%Q %A,%L,%u%F", 0xffff7000, 0x264f7000, ARCOMPACT, 0, 0 ,0,0},
2876  { "bset%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x260f7f80, ARCOMPACT, 0, 0 ,0,0},
2877  { "bset%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20cf0000, ARCOMPACT, 0, 0 ,0,0},
2878  { "bset%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20cf0020, ARCOMPACT, 0, 0 ,0,0},
2879  { "bset%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20cf0f80, ARCOMPACT, 0, 0 ,0,0},
2880  { "bset%.f 0,%B,%C%F", 0xf8ff003f, 0x200f003e, ARCOMPACT, 0, 0 ,0,0},
2881  { "bset%.f 0,%B,%u%F", 0xf8ff003f, 0x204f003e, ARCOMPACT, 0, 0 ,0,0},
2882  { "bset%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x200f0fbe, ARCOMPACT, 0, 0 ,0,0},
2883  { "bset%.f%Q 0,%L,%C%F", 0xffff703f, 0x260f703e, ARCOMPACT, 0, 0 ,0,0},
2884  { "bset%.f%Q 0,%L,%u%F", 0xffff703f, 0x264f703e, ARCOMPACT, 0, 0 ,0,0},
2885  { "bset%.f%Q 0,%L,%K%F", 0xffff7000, 0x268f7000, ARCOMPACT, 0, 0 ,0,0},
2886  { "bset%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26cf7000, ARCOMPACT, 0, 0 ,0,0},
2887  { "bset%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26cf7020, ARCOMPACT, 0, 0 ,0,0},
2888  { "bset%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x26cf7f80, ARCOMPACT, 0, 0 ,0,0},
2889  { "btst %B,%C", 0xf8ff803f, 0x20118000, ARCOMPACT, 0, 0 ,0,0},
2890  { "btst %B,%u", 0xf8ff803f, 0x20518000, ARCOMPACT, 0, 0 ,0,0},
2891  { "btst %B,%K", 0xf8ff8000, 0x20918000, ARCOMPACT, 0, 0 ,0,0},
2892  { "btst%Q %B,%L", 0xf8ff8000, 0x20118f80, ARCOMPACT, 0, 0 ,0,0},
2893  { "btst%Q %L,%C", 0xfffff03f, 0x2611f000, ARCOMPACT, 0, 0 ,0,0},
2894  { "btst%Q %L,%u", 0xfffff03f, 0x2651f000, ARCOMPACT, 0, 0 ,0,0},
2895  { "btst%Q %L,%L", 0xffffffff, 0x2611ff80, ARCOMPACT, 0, 0 ,0,0},
2896  { "btst%.q %B,%C", 0xf8ff8020, 0x20d18000, ARCOMPACT, 0, 0 ,0,0},
2897  { "btst%.q %B,%u", 0xf8ff8020, 0x20d18020, ARCOMPACT, 0, 0 ,0,0},
2898  { "btst%.q%Q %B,%L", 0xf8ff8fe0, 0x20d18f80, ARCOMPACT, 0, 0 ,0,0},
2899  { "btst%.q%Q %L,%C", 0xfffff020, 0x26d1f000, ARCOMPACT, 0, 0 ,0,0},
2900  { "btst%.q%Q %L,%u", 0xfffff020, 0x26d1f020, ARCOMPACT, 0, 0 ,0,0},
2901  { "btst%.q%Q %L,%L", 0xffffffe0, 0x26d1ff80, ARCOMPACT, 0, 0 ,0,0},
2902  { "bxor%.f %A,%B,%C%F", 0xf8ff0000, 0x20120000, ARCOMPACT, 0, 0 ,0,0},
2903  { "bxor%.f %A,%B,%u%F", 0xf8ff0000, 0x20520000, ARCOMPACT, 0, 0 ,0,0},
2904  { "bxor%.f %#,%B,%K%F", 0xf8ff0000, 0x20920000, ARCOMPACT, 0, 0 ,0,0},
2905  { "bxor%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20120f80, ARCOMPACT, 0, 0 ,0,0},
2906  { "bxor%.f%Q %A,%L,%C%F", 0xffff7000, 0x26127000, ARCOMPACT, 0, 0 ,0,0},
2907  { "bxor%.f%Q %A,%L,%u%F", 0xffff7000, 0x26527000, ARCOMPACT, 0, 0 ,0,0},
2908  { "bxor%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26127f80, ARCOMPACT, 0, 0 ,0,0},
2909  { "bxor%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d20000, ARCOMPACT, 0, 0 ,0,0},
2910  { "bxor%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20d20000, ARCOMPACT, 0, 0 ,0,0},
2911  { "bxor%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20d20020, ARCOMPACT, 0, 0 ,0,0},
2912  { "bxor%.q%.f %#,%u,%B%F", 0xf8ff0020, 0x20d20020, ARCOMPACT, 0, 0 ,0,0},
2913  { "bxor%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20d20f80, ARCOMPACT, 0, 0 ,0,0},
2914  { "bxor%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20d20f80, ARCOMPACT, 0, 0 ,0,0},
2915  { "bxor%.f 0,%B,%C%F", 0xf8ff003f, 0x2012003e, ARCOMPACT, 0, 0 ,0,0},
2916  { "bxor%.f 0,%B,%u%F", 0xf8ff003f, 0x2052003e, ARCOMPACT, 0, 0 ,0,0},
2917  { "bxor%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20120fbe, ARCOMPACT, 0, 0 ,0,0},
2918  { "bxor%.f%Q 0,%L,%C%F", 0xffff703f, 0x2612703e, ARCOMPACT, 0, 0 ,0,0},
2919  { "bxor%.f%Q 0,%L,%u%F", 0xffff703f, 0x2652703e, ARCOMPACT, 0, 0 ,0,0},
2920  { "bxor%.f%Q 0,%L,%K%F", 0xffff7000, 0x26927000, ARCOMPACT, 0, 0 ,0,0},
2921  { "bxor%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d27000, ARCOMPACT, 0, 0 ,0,0},
2922  { "bxor%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d27020, ARCOMPACT, 0, 0 ,0,0},
2923  { "bxor%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x26d27f80, ARCOMPACT, 0, 0 ,0,0},
2924  { "cmp %B,%C", 0xf8ff803f, 0x200c8000, ARCOMPACT, 0, 0 ,0,0},
2925  { "cmp%.f %B,%C", 0xf8ff803f, 0x200c8000, ARCOMPACT, 0, 0 ,0,0},
2926  { "cmp %B,%u", 0xf8ff803f, 0x204c8000, ARCOMPACT, 0, 0 ,0,0},
2927  { "cmp%.f %B,%u", 0xf8ff803f, 0x204c8000, ARCOMPACT, 0, 0 ,0,0},
2928  { "cmp %B,%K", 0xf8ff8000, 0x208c8000, ARCOMPACT, 0, 0 ,0,0},
2929  { "cmp%.f %B,%K", 0xf8ff8000, 0x208c8000, ARCOMPACT, 0, 0 ,0,0},
2930  { "cmp%Q %B,%L", 0xf8ff8000, 0x200c8f80, ARCOMPACT, 0, 0 ,0,0},
2931  { "cmp%.f%Q %B,%L", 0xf8ff8000, 0x200c8f80, ARCOMPACT, 0, 0 ,0,0},
2932  { "cmp%Q %L,%C", 0xfffff03f, 0x260cf000, ARCOMPACT, 0, 0 ,0,0},
2933  { "cmp%.f%Q %L,%C", 0xfffff03f, 0x260cf000, ARCOMPACT, 0, 0 ,0,0},
2934  { "cmp%Q %L,%u", 0xfffff03f, 0x264cf000, ARCOMPACT, 0, 0 ,0,0},
2935  { "cmp%.f%Q %L,%u", 0xfffff03f, 0x264cf000, ARCOMPACT, 0, 0 ,0,0},
2936  { "cmp%Q %L,%L", 0xffffffff, 0x260cff80, ARCOMPACT, 0, 0 ,0,0},
2937  { "cmp%.f%Q %L,%L", 0xffffffff, 0x260cff80, ARCOMPACT, 0, 0 ,0,0},
2938  { "cmp%.q %B,%C", 0xf8ff8020, 0x20cc8000, ARCOMPACT, 0, 0 ,0,0},
2939  { "cmp%.q%.f %B,%C", 0xf8ff8020, 0x20cc8000, ARCOMPACT, 0, 0 ,0,0},
2940  { "cmp%.q %B,%u", 0xf8ff8020, 0x20cc8020, ARCOMPACT, 0, 0 ,0,0},
2941  { "cmp%.q%.f %B,%u", 0xf8ff8020, 0x20cc8020, ARCOMPACT, 0, 0 ,0,0},
2942  { "cmp%.q%Q %B,%L", 0xf8ff8fe0, 0x20cc8f80, ARCOMPACT, 0, 0 ,0,0},
2943  { "cmp%.q%.f%Q %B,%L", 0xf8ff8fe0, 0x20cc8f80, ARCOMPACT, 0, 0 ,0,0},
2944  { "cmp%.q%Q %L,%C", 0xfffff020, 0x26ccf000, ARCOMPACT, 0, 0 ,0,0},
2945  { "cmp%.q%.f%Q %L,%C", 0xfffff020, 0x26ccf000, ARCOMPACT, 0, 0 ,0,0},
2946  { "cmp%.q%Q %L,%u", 0xfffff020, 0x26ccf020, ARCOMPACT, 0, 0 ,0,0},
2947  { "cmp%.q%.f%Q %L,%u", 0xfffff020, 0x26ccf020, ARCOMPACT, 0, 0 ,0,0},
2948  { "cmp%.q%Q %L,%L", 0xffffffe0, 0x26ccff80, ARCOMPACT, 0, 0 ,0,0},
2949  { "cmp%.q%.f%Q %L,%L", 0xffffffe0, 0x26ccff80, ARCOMPACT, 0, 0 ,0,0},
2950 
2951  /* ARC A700 extension for Atomic Exchange */
2952  { "ex%.V %#,[%C]%^",0xf8ff003f,0x202f000C,ARC_MACH_ARC7,0,0,0,0},
2953  { "ex%.V %#,[%u]%^",0xf8ff003f,0x206f000C,ARC_MACH_ARC7,0,0,0,0},
2954  { "ex%.V %#,[%L]%^",0xf8ff0fff,0x202f0f8c,ARC_MACH_ARC7,0,0,0,0},
2955 
2956  { "extb%.f %#,%C%F", 0xf8ff003f, 0x202f0007, ARCOMPACT, 0, 0 ,0,0},
2957  { "extb%.f %#,%u%F", 0xf8ff003f, 0x206f0007, ARCOMPACT, 0, 0 ,0,0},
2958  { "extb%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f87, ARCOMPACT, 0, 0 ,0,0},
2959  { "extb%.f 0,%C%F", 0xffff703f, 0x262f7007, ARCOMPACT, 0, 0 ,0,0},
2960  { "extb%.f 0,%u%F", 0xffff703f, 0x266f7007, ARCOMPACT, 0, 0 ,0,0},
2961  { "extb%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f87, ARCOMPACT, 0, 0 ,0,0},
2962  { "extw%.f %#,%C%F", 0xf8ff003f, 0x202f0008, ARCOMPACT, 0, 0 ,0,0},
2963  { "extw%.f %#,%u%F", 0xf8ff003f, 0x206f0008, ARCOMPACT, 0, 0 ,0,0},
2964  { "extw%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f88, ARCOMPACT, 0, 0 ,0,0},
2965  { "extw%.f 0,%C%F", 0xffff703f, 0x262f7008, ARCOMPACT, 0, 0 ,0,0},
2966  { "extw%.f 0,%u%F", 0xffff703f, 0x266f7008, ARCOMPACT, 0, 0 ,0,0},
2967  { "extw%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f88, ARCOMPACT, 0, 0 ,0,0},
2968 
2969  { "flag %u", 0xfffff020, 0x20690000, ARCOMPACT, 0, 0 ,0,0},
2970  { "flag %C", 0xfffff020, 0x20290000, ARCOMPACT, 0, 0 ,0,0},
2971  { "flag%.q%Q %C", 0xfffff020, 0x20e90000, ARCOMPACT, 0, 0 ,0,0},
2972  { "flag%.q%Q %u", 0xfffff020, 0x20e90020, ARCOMPACT, 0, 0 ,0,0},
2973  { "flag %K", 0xfffff000, 0x20a90000, ARCOMPACT, 0, 0, 0, 0 },
2974  { "flag %L", 0xffffffff, 0x20290f80, ARCOMPACT, 0, 0 ,0,0},
2975  { "flag%.q%Q %L", 0xffffffe0, 0x20e90f80, ARCOMPACT, 0, 0, 0, 0 },
2976 
2977  { "j%.N [%C]", 0xfffef03f, 0x20200000, ARCOMPACT, 0, 0 ,0,0},
2978  { "j%.N %u", 0xfffef03f, 0x20600000, ARCOMPACT, 0, 0 ,0,0},
2979  { "j%.N %K", 0xfffef000, 0x20a00000, ARCOMPACT, 0, 0 ,0,0},
2980  { "j%Q %L", 0xffffffff, 0x20200f80, ARCOMPACT, 0, 0 ,0,0},
2981  { "j%.f [%7]", 0xffffffff, 0x20208740, ARCOMPACT, 0, 0 ,0,0},
2982  { "j%.f [%8]", 0xffffffff, 0x20208780, ARCOMPACT, 0, 0 ,0,0},
2983  { "j%q%.N [%C]", 0xfffef020, 0x20e00000, ARCOMPACT, 0, 0 ,0,0},
2984  { "j%q%.N %u", 0xfffef020, 0x20e00020, ARCOMPACT, 0, 0 ,0,0},
2985  { "j%q%Q %L", 0xffffffe0, 0x20e00f80, ARCOMPACT, 0, 0 ,0,0},
2986  { "j%q%.f [%7]", 0xffffffe0, 0x20e08740, ARCOMPACT, 0, 0 ,0,0},
2987  { "j%q%.f [%8]", 0xffffffe0, 0x20e08780, ARCOMPACT, 0, 0 ,0,0},
2988  { "j%.q%.N [%C]", 0xfffef020, 0x20e00000, ARCOMPACT, 0, 0 ,0,0},
2989  { "j%.q%.N %u", 0xfffef020, 0x20e00020, ARCOMPACT, 0, 0 ,0,0},
2990  { "j%.q%Q %L", 0xffffffe0, 0x20e00f80, ARCOMPACT, 0, 0 ,0,0},
2991  { "j%.q%.f [%7]", 0xffffffe0, 0x20e08740, ARCOMPACT, 0, 0 ,0,0},
2992  { "j%.q%.f [%8]", 0xffffffe0, 0x20e08780, ARCOMPACT, 0, 0 ,0,0},
2993  { "jl%.N [%C]", 0xfffef03f, 0x20220000, ARCOMPACT, 0, 0 ,0,0},
2994  { "jl%.N %u", 0xfffef03f, 0x20620000, ARCOMPACT, 0, 0 ,0,0},
2995  { "jl%.N %K", 0xfffef000, 0x20a20000, ARCOMPACT, 0, 0 ,0,0},
2996  { "jl%Q %L", 0xffffffff, 0x20220f80, ARCOMPACT, 0, 0 ,0,0},
2997  { "jl%q%.N [%C]", 0xfffef020, 0x20e20000, ARCOMPACT, 0, 0 ,0,0},
2998  { "jl%q%.N %u", 0xfffef020, 0x20e20020, ARCOMPACT, 0, 0 ,0,0},
2999  { "jl%q%Q %L", 0xffffffe0, 0x20e20f80, ARCOMPACT, 0, 0 ,0,0},
3000  { "jl%.q%.N [%C]", 0xfffef020, 0x20e20000, ARCOMPACT, 0, 0 ,0,0},
3001  { "jl%.q%.N %u", 0xfffef020, 0x20e20020, ARCOMPACT, 0, 0 ,0,0},
3002  { "jl%.q%Q %L", 0xffffffe0, 0x20e20f80, ARCOMPACT, 0, 0 ,0,0},
3003 
3004  /* Prefetch equivalent with ld<.aa> 0,[b,s9] / [b,limm] / [limm]
3005  / [b,c] / [limm,c]
3006  This is valid only in the A700
3007  */
3008 
3009  { "ld%.p 0,[%g,%o]%3", 0xf80009ff, 0x1000003e, ARC_MACH_ARC7, 0, 0 ,0,0},
3010  { "prefetch%.p [%g,%o]%3",0xf80009ff, 0x1000003e, ARC_MACH_ARC7, 0, 0 ,0,0},
3011  { "pf%.p [%g,%o]%3",0xf80009ff, 0x1000003e, ARC_MACH_ARC7, 0, 0 ,0,0},
3012 
3013  { "ld 0,[%L]%3", 0xff0079ff, 0x1600703e, ARC_MACH_ARC7, 0, 0 ,0,0},
3014  { "prefetch [%L]%3", 0xff0079ff, 0x1600703e, ARC_MACH_ARC7, 0, 0 ,0,0},
3015  { "pf [%L]%3", 0xff0079ff, 0x1600703e, ARC_MACH_ARC7, 0, 0 ,0,0},
3016 
3017 
3018  { "ld%.P 0,[%g,%C]%1", 0xf83f803f, 0x2030003e, ARC_MACH_ARC7, 0, 0 ,0,0},
3019  { "prefetch%.p [%g,%C]%1", 0xf83f803f, 0x2030003e, ARC_MACH_ARC7, 0, 0 ,0,0},
3020  { "pf%.P [%g,%C]%1", 0xf83f803f, 0x2030003e, ARC_MACH_ARC7, 0, 0 ,0,0},
3021 
3022 
3023  { "ld%.P 0,[%g,%L]%1", 0xf83f8fff, 0x20300fbe, ARC_MACH_ARC7, 0, 0 ,0,0},
3024  { "prefetch%.p [%g,%L]%1", 0xf83f8fff, 0x20300fbe, ARC_MACH_ARC7, 0, 0 ,0,0},
3025  { "pf%.P [%g,%L]%1", 0xf83f8fff, 0x20300fbe, ARC_MACH_ARC7, 0, 0 ,0,0},
3026 
3027  { "ld 0,[%L,%C]%1", 0xff3ff03f, 0x2630703e, ARC_MACH_ARC7, 0, 0 ,0,0},
3028  { "prefetch [%L,%C]%1", 0xff3ff03f, 0x2630703e, ARC_MACH_ARC7, 0, 0 ,0,0},
3029  { "pf [%L,%C]%1", 0xff3ff03f, 0x2630703e, ARC_MACH_ARC7, 0, 0 ,0,0},
3030 
3031  /* load instruction opcodes */
3032  { "ld%T%.X%.P%.V %A,[%g,%C]%1", 0xf8380000, 0x20300000, ARCOMPACT, 0, 0 ,0,0},
3033  { "ld%T%.P%.X%.V %A,[%g,%C]%1", 0xf8380000, 0x20300000, ARCOMPACT, 0, 0 ,0,0},
3034  { "ld%t%.x%.p%.v %A,[%g]%1", 0xf8ff8000, 0x10000000, ARCOMPACT, 0, 0 ,0,0},
3035  { "ld%t%.p%.x%.v %A,[%g]%1", 0xf8ff8000, 0x10000000, ARCOMPACT, 0, 0 ,0,0},
3036  { "ld%t%.x%.p%.v %A,[%g,%o]%1", 0xf8000000, 0x10000000, ARCOMPACT, 0, 0 ,0,0},
3037  { "ld%t%.p%.x%.v %A,[%g,%o]%1", 0xf8000000, 0x10000000, ARCOMPACT, 0, 0 ,0,0},
3038  { "ld%t%.x%.P%.v %A,[%g,%[L]%1", 0xf8000000, 0x10000000, ARCOMPACT, 0, 0 ,0,0},
3039  { "ld%t%.P%.x%.v %A,[%g,%[L]%1", 0xf8000000, 0x10000000, ARCOMPACT, 0, 0 ,0,0},
3040  { "ld%T%.X%.P%.V%Q %A,[%g,%L]%1", 0xf8380fc0, 0x20300f80, ARCOMPACT, 0, 0 ,0,0},
3041  { "ld%T%.P%.X%.V%Q %A,[%g,%L]%1", 0xf8380fc0, 0x20300f80, ARCOMPACT, 0, 0 ,0,0},
3042  { "ld%T%.X%.&%.V%Q %A,[%L,%C]%1", 0xfff87000, 0x26307000, ARCOMPACT, 0, 0 ,0,0},
3043  { "ld%T%.&%.X%.V%Q %A,[%L,%C]%1", 0xfff87000, 0x26307000, ARCOMPACT, 0, 0 ,0,0},
3044  { "ld%t%.x%.v%Q %A,[%L,%o]%1", 0xfff87000, 0x16007000, ARCOMPACT, 0, 0 ,0,0},
3045  { "ld%t%.v%.x%Q %A,[%L,%o]%1", 0xfff87000, 0x16007000, ARCOMPACT, 0, 0 ,0,0},
3046  { "ld%T%.X%.V%Q %A,[%L,%L]%1", 0xfff87fc0, 0x26307f80, ARCOMPACT, 0, 0 ,0,0},
3047  { "ld%T%.V%.X%Q %A,[%L,%L]%1", 0xfff87fc0, 0x26307f80, ARCOMPACT, 0, 0 ,0,0},
3048  { "ld%t%.x%.v%Q %A,[%L]%3", 0xfffff600, 0x16007000, ARCOMPACT, 0, 0 ,0,0},
3049  { "ld%t%.v%.x%Q %A,[%L]%3", 0xfffff600, 0x16007000, ARCOMPACT, 0, 0 ,0,0},
3050 
3051 
3052 
3053  { "lp %Y", 0xfffff000, 0x20a80000, ARCOMPACT, 0, 0 ,0,0},
3054  { "lp%q %y", 0xfffff020, 0x20e80020, ARCOMPACT, 0, 0 ,0,0},
3055  { "lp%.q %y", 0xfffff020, 0x20e80020, ARCOMPACT, 0, 0 ,0,0},
3056 
3057  { "lr %#,[%C]", 0xf8ff803f, 0x202a0000, ARCOMPACT, 0, 0 ,0,0},
3058  { "lr %#,[%GC]", 0xf8ff8000, 0x20aa0000, ARCOMPACT, 0, 0 ,0,0},
3059  { "lr %#,[%K]", 0xf8ff8000, 0x20aa0000, ARCOMPACT, 0, 0 ,0,0},
3060  { "lr%Q %#,[%L]", 0xf8ff8fff, 0x202a0f80, ARCOMPACT, 0, 0 ,0,0},
3061 
3062  { "lsl%.f %A,%B,%C%F", 0xf8ff0000, 0x28000000, ARCOMPACT, 0, 0 ,0,0},
3063  { "lsl%.f %A,%B,%u%F", 0xf8ff0000, 0x28400000, ARCOMPACT, 0, 0 ,0,0},
3064  { "lsl%.f %#,%B,%K%F", 0xf8ff0000, 0x28800000, ARCOMPACT, 0, 0 ,0,0},
3065  { "lsl%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x28000f80, ARCOMPACT, 0, 0 ,0,0},
3066  { "lsl%.f%Q %A,%L,%C%F", 0xffff7000, 0x2e007000, ARCOMPACT, 0, 0 ,0,0},
3067  { "lsl%.f%Q %A,%L,%u%F", 0xffff7000, 0x2e407000, ARCOMPACT, 0, 0 ,0,0},
3068  { "lsl%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x2e007f80, ARCOMPACT, 0, 0 ,0,0},
3069  { "lsl%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x28c00000, ARCOMPACT, 0, 0 ,0,0},
3070  { "lsl%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x28c00020, ARCOMPACT, 0, 0 ,0,0},
3071  { "lsl%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x28c00f80, ARCOMPACT, 0, 0 ,0,0},
3072  { "lsl%.f 0,%B,%C%F", 0xf8ff003f, 0x2800003e, ARCOMPACT, 0, 0 ,0,0},
3073  { "lsl%.f 0,%B,%u%F", 0xf8ff003f, 0x2840003e, ARCOMPACT, 0, 0 ,0,0},
3074  { "lsl%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x28000fbe, ARCOMPACT, 0, 0 ,0,0},
3075  { "lsl%.f%Q 0,%L,%C%F", 0xffff703f, 0x2e00703e, ARCOMPACT, 0, 0 ,0,0},
3076  { "lsl%.f%Q 0,%L,%K%F", 0xffff003f, 0x2e807000, ARCOMPACT, 0, 0 ,0,0},
3077  { "lsl%.f%Q 0,%L,%u%F", 0xffff703f, 0x2e40703e, ARCOMPACT, 0, 0 ,0,0},
3078  { "lsl%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x2ec07000, ARCOMPACT, 0, 0 ,0,0},
3079  { "lsl%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x2ec07020, ARCOMPACT, 0, 0 ,0,0},
3080  { "lsl%.q%.f%Q 0,%L,%u%F", 0xffff7fe0, 0x2ec07f80, ARCOMPACT, 0, 0 ,0,0},
3081  { "lsl%.f %#,%C%F", 0xf8ff003f, 0x202f0000, ARCOMPACT, 0, 0 ,0,0},
3082  { "lsl%.f %#,%u%F", 0xf8ff003f, 0x206f0000, ARCOMPACT, 0, 0 ,0,0},
3083  { "lsl%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f80, ARCOMPACT, 0, 0 ,0,0},
3084  { "lsl%.f 0,%C%F", 0xffff703f, 0x262f7000, ARCOMPACT, 0, 0 ,0,0},
3085  { "lsl%.f 0,%u%F", 0xffff703f, 0x266f7000, ARCOMPACT, 0, 0 ,0,0},
3086  { "lsl%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f80, ARCOMPACT, 0, 0 ,0,0},
3087 
3088  { "lsr%.f %A,%B,%C%F", 0xf8ff0000, 0x28010000, ARCOMPACT, 0, 0 ,0,0},
3089  { "lsr%.f %A,%B,%u%F", 0xf8ff0000, 0x28410000, ARCOMPACT, 0, 0 ,0,0},
3090  { "lsr%.f %#,%B,%K%F", 0xf8ff0000, 0x28810000, ARCOMPACT, 0, 0 ,0,0},
3091  { "lsr%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x28010f80, ARCOMPACT, 0, 0 ,0,0},
3092  { "lsr%.f%Q %A,%L,%C%F", 0xffff7000, 0x2e017000, ARCOMPACT, 0, 0 ,0,0},
3093  { "lsr%.f%Q %A,%L,%u%F", 0xffff7000, 0x2e417000, ARCOMPACT, 0, 0 ,0,0},
3094  { "lsr%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x2e017f80, ARCOMPACT, 0, 0 ,0,0},
3095  { "lsr%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x28c10000, ARCOMPACT, 0, 0 ,0,0},
3096  { "lsr%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x28c10020, ARCOMPACT, 0, 0 ,0,0},
3097  { "lsr%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x28c10f80, ARCOMPACT, 0, 0 ,0,0},
3098  { "lsr%.f 0,%B,%C%F", 0xf8ff003f, 0x2801003e, ARCOMPACT, 0, 0 ,0,0},
3099  { "lsr%.f 0,%B,%u%F", 0xf8ff003f, 0x2841003e, ARCOMPACT, 0, 0 ,0,0},
3100  { "lsr%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x28010fbe, ARCOMPACT, 0, 0 ,0,0},
3101  { "lsr%.f%Q 0,%L,%C%F", 0xffff703f, 0x2e01703e, ARCOMPACT, 0, 0 ,0,0},
3102  { "lsr%.f%Q 0,%L,%u%F", 0xffff703f, 0x2e41703e, ARCOMPACT, 0, 0 ,0,0},
3103  { "lsr%.f%Q 0,%L,%K%F", 0xffff003f, 0x2e817000, ARCOMPACT, 0, 0 ,0,0},
3104  { "lsr%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x2ec17000, ARCOMPACT, 0, 0 ,0,0},
3105  { "lsr%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x2ec17020, ARCOMPACT, 0, 0 ,0,0},
3106  { "lsr%.q%.f%Q 0,%L,%L%F", 0xffff7fe0, 0x2ec17f80, ARCOMPACT, 0, 0 ,0,0},
3107  { "lsr%.f %#,%C%F", 0xf8ff003f, 0x202f0002, ARCOMPACT, 0, 0 ,0,0},
3108  { "lsr%.f %#,%u%F", 0xf8ff003f, 0x206f0002, ARCOMPACT, 0, 0 ,0,0},
3109  { "lsr%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f82, ARCOMPACT, 0, 0 ,0,0},
3110  { "lsr%.f 0,%C%F", 0xffff703f, 0x262f7002, ARCOMPACT, 0, 0 ,0,0},
3111  { "lsr%.f 0,%u%F", 0xffff703f, 0x266f7002, ARCOMPACT, 0, 0 ,0,0},
3112  { "lsr%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f82, ARCOMPACT, 0, 0 ,0,0},
3113  { "max%.f %A,%B,%C%F", 0xf8ff0000, 0x20080000, ARCOMPACT, 0, 0 ,0,0},
3114  { "max%.f %A,%B,%u%F", 0xf8ff0000, 0x20480000, ARCOMPACT, 0, 0 ,0,0},
3115  { "max%.f %#,%B,%K%F", 0xf8ff0000, 0x20880000, ARCOMPACT, 0, 0 ,0,0},
3116  { "max%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20080f80, ARCOMPACT, 0, 0 ,0,0},
3117  { "max%.f%Q %A,%L,%C%F", 0xffff7000, 0x26087000, ARCOMPACT, 0, 0 ,0,0},
3118  { "max%.f%Q %A,%L,%u%F", 0xffff7000, 0x26487000, ARCOMPACT, 0, 0 ,0,0},
3119  { "max%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26087f80, ARCOMPACT, 0, 0 ,0,0},
3120  { "max%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c80000, ARCOMPACT, 0, 0 ,0,0},
3121  { "max%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c80020, ARCOMPACT, 0, 0 ,0,0},
3122  { "max%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c80f80, ARCOMPACT, 0, 0 ,0,0},
3123  { "max%.f 0,%B,%C%F", 0xf8ff003f, 0x2008003e, ARCOMPACT, 0, 0 ,0,0},
3124  { "max%.f 0,%B,%u%F", 0xf8ff003f, 0x2048003e, ARCOMPACT, 0, 0 ,0,0},
3125  { "max%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20080fbe, ARCOMPACT, 0, 0 ,0,0},
3126  { "max%.f%Q 0,%L,%C%F", 0xffff703f, 0x2608703e, ARCOMPACT, 0, 0 ,0,0},
3127  { "max%.f%Q 0,%L,%u%F", 0xffff703f, 0x2648703e, ARCOMPACT, 0, 0 ,0,0},
3128  { "max%.f%Q 0,%L,%K%F", 0xffff7fff, 0x26887000, ARCOMPACT, 0, 0 ,0,0},
3129  { "max%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c87000, ARCOMPACT, 0, 0 ,0,0},
3130  { "max%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c87020, ARCOMPACT, 0, 0 ,0,0},
3131  { "max%.q%.f%Q 0,%L,%K%F", 0xffff7fe0, 0x26c87f80, ARCOMPACT, 0, 0 ,0,0},
3132  { "min%.f %A,%B,%C%F", 0xf8ff0000, 0x20090000, ARCOMPACT, 0, 0 ,0,0},
3133  { "min%.f %A,%B,%u%F", 0xf8ff0000, 0x20490000, ARCOMPACT, 0, 0 ,0,0},
3134  { "min%.f %#,%B,%K%F", 0xf8ff0000, 0x20890000, ARCOMPACT, 0, 0 ,0,0},
3135  { "min%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20090f80, ARCOMPACT, 0, 0 ,0,0},
3136  { "min%.f%Q %A,%L,%C%F", 0xffff7000, 0x26097000, ARCOMPACT, 0, 0 ,0,0},
3137  { "min%.f%Q %A,%L,%u%F", 0xffff7000, 0x26497000, ARCOMPACT, 0, 0 ,0,0},
3138  { "min%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26097f80, ARCOMPACT, 0, 0 ,0,0},
3139  { "min%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c90000, ARCOMPACT, 0, 0 ,0,0},
3140  { "min%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c90020, ARCOMPACT, 0, 0 ,0,0},
3141  { "min%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c90f80, ARCOMPACT, 0, 0 ,0,0},
3142  { "min%.f 0,%B,%C%F", 0xf8ff003f, 0x2009003e, ARCOMPACT, 0, 0 ,0,0},
3143  { "min%.f 0,%B,%u%F", 0xf8ff003f, 0x2049003e, ARCOMPACT, 0, 0 ,0,0},
3144  { "min%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20090fbe, ARCOMPACT, 0, 0 ,0,0},
3145  { "min%.f%Q 0,%L,%C%F", 0xffff703f, 0x2609703e, ARCOMPACT, 0, 0 ,0,0},
3146  { "min%.f%Q 0,%L,%u%F", 0xffff703f, 0x2649703e, ARCOMPACT, 0, 0 ,0,0},
3147  { "min%.f%Q 0,%L,%K%F", 0xffff003f, 0x26897000, ARCOMPACT, 0, 0 ,0,0},
3148  { "min%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c97000, ARCOMPACT, 0, 0 ,0,0},
3149  { "min%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c97020, ARCOMPACT, 0, 0 ,0,0},
3150  { "min%.q%.f%Q 0,%L,%K%F", 0xffff7fe0, 0x26c97f80, ARCOMPACT, 0, 0 ,0,0},
3151 
3152  { "mov%.f %#,%C%F", 0xf8ff003f, 0x200A0000, ARCOMPACT, 0, 0 ,0,0},
3153  { "mov%.f %#,%u%F", 0xf8ff003f, 0x204a0000, ARCOMPACT, 0, 0 ,0,0},
3154  { "mov%.f %#,%K%F", 0xf8ff0000, 0x208a0000, ARCOMPACT, 0, 0 ,0,0},
3155  { "mov%.f%Q %#,%L%F", 0xf8ff0fff, 0x200a0f80, ARCOMPACT, 0, 0 ,0,0},
3156  { "mov%.q%.f %#,%C%F", 0xf8ff0020, 0x20ca0000, ARCOMPACT, 0, 0 ,0,0},
3157  { "mov%.q%.f %#,%u%F", 0xf8ff0020, 0x20ca0020, ARCOMPACT, 0, 0 ,0,0},
3158  { "mov%.q%.f%Q %#,%L%F", 0xf8ff0fe0, 0x20ca0f80, ARCOMPACT, 0, 0 ,0,0},
3159  { "mov%.f 0,%C%F", 0xffff703f, 0x260a7000, ARCOMPACT, 0, 0 ,0,0},
3160  { "mov%.f 0,%u%F", 0xffff703f, 0x264a7000, ARCOMPACT, 0, 0 ,0,0},
3161  { "mov%.f 0,%K%F", 0xffff7000, 0x268a7000, ARCOMPACT, 0, 0 ,0,0},
3162  { "mov%.f%Q 0,%L%F", 0xffff7fff, 0x260a7f80, ARCOMPACT, 0, 0 ,0,0},
3163  { "mov%.q%.f 0,%C%F", 0xffff7020, 0x26ca7000, ARCOMPACT, 0, 0 ,0,0},
3164  { "mov%.q%.f 0,%u%F", 0xffff7020, 0x26ca7020, ARCOMPACT, 0, 0 ,0,0},
3165  { "mov%.q%.f%Q 0,%L%F", 0xffff7fe0, 0x26ca7f80, ARCOMPACT, 0, 0 ,0,0},
3166 
3167  { "neg%.f %A,%B%F", 0xf8ff0000, 0x204e0000, ARCOMPACT, 0, 0 ,0,0},
3168  { "neg%.q%.f %#,%B%F", 0xf8ff0020, 0x20ce0020, ARCOMPACT, 0, 0 ,0,0},
3169 
3170  { "norm%.f %#,%C%F", 0xf8ff003f, 0x282f0001, ARC_MACH_ARC7, 0, 0 ,0,0},
3171  { "norm%.f %#,%u%F", 0xf8ff003f, 0x286f0001, ARC_MACH_ARC7, 0, 0 ,0,0},
3172  { "norm%.f%Q %#,%L%F", 0xf8ff0fff, 0x282f0f81, ARC_MACH_ARC7, 0, 0 ,0,0},
3173  { "norm%.f 0,%C%F", 0xffff703f, 0x2e2f7001, ARC_MACH_ARC7, 0, 0 ,0,0},
3174  { "norm%.f 0,%u%F", 0xffff703f, 0x2e6f7001, ARC_MACH_ARC7, 0, 0 ,0,0},
3175  { "norm%.f%Q 0,%L%F", 0xffff7fff, 0x2e2f7f81, ARC_MACH_ARC7, 0, 0 ,0,0},
3176  { "normw%.f %#,%C%F", 0xf8ff003f, 0x282f0008, ARC_MACH_ARC7, 0, 0 ,0,0},
3177  { "normw%.f %#,%u%F", 0xf8ff003f, 0x286f0008, ARC_MACH_ARC7, 0, 0 ,0,0},
3178  { "normw%.f%Q %#,%L%F", 0xf8ff0fff, 0x282f0f88, ARC_MACH_ARC7, 0, 0 ,0,0},
3179  { "normw%.f 0,%C%F", 0xffff703f, 0x2e2f7008, ARC_MACH_ARC7, 0, 0 ,0,0},
3180  { "normw%.f 0,%u%F", 0xffff703f, 0x2e6f7008, ARC_MACH_ARC7, 0, 0 ,0,0},
3181  { "normw%.f%Q 0,%L%F", 0xffff7fff, 0x2e2f7f88, ARC_MACH_ARC7, 0, 0 ,0,0},
3182  { "not%.f %#,%C%F", 0xf8ff003f, 0x202f000a, ARCOMPACT, 0, 0 ,0,0},
3183  { "not%.f %#,%u%F", 0xf8ff003f, 0x206f000a, ARCOMPACT, 0, 0 ,0,0},
3184  { "not%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f8a, ARCOMPACT, 0, 0 ,0,0},
3185  { "not%.f 0,%C%F", 0xffff703f, 0x262f700a, ARCOMPACT, 0, 0 ,0,0},
3186  { "not%.f 0,%u%F", 0xffff703f, 0x266f700a, ARCOMPACT, 0, 0 ,0,0},
3187  { "not%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f8a, ARCOMPACT, 0, 0 ,0,0},
3188  { "or%.f %A,%B,%C%F", 0xf8ff0000, 0x20050000, ARCOMPACT, 0, 0 ,0,0},
3189  { "or%.f %A,%B,%u%F", 0xf8ff0000, 0x20450000, ARCOMPACT, 0, 0 ,0,0},
3190  { "or%.f %#,%B,%K%F", 0xf8ff0000, 0x20850000, ARCOMPACT, 0, 0 ,0,0},
3191  { "or%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20050f80, ARCOMPACT, 0, 0 ,0,0},
3192  { "or%.f%Q %A,%L,%C%F", 0xffff7000, 0x26057000, ARCOMPACT, 0, 0 ,0,0},
3193  { "or%.f%Q %A,%L,%u%F", 0xffff7000, 0x26457000, ARCOMPACT, 0, 0 ,0,0},
3194  { "or%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26057f80, ARCOMPACT, 0, 0 ,0,0},
3195  { "or%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c50000, ARCOMPACT, 0, 0 ,0,0},
3196  { "or%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20c50000, ARCOMPACT, 0, 0 ,0,0},
3197  { "or%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c50020, ARCOMPACT, 0, 0 ,0,0},
3198  { "or%.q%.f %#,%u,%B%F", 0xf8ff0020, 0x20c50020, ARCOMPACT, 0, 0 ,0,0},
3199  { "or%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c50f80, ARCOMPACT, 0, 0 ,0,0},
3200  { "or%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20c50f80, ARCOMPACT, 0, 0 ,0,0},
3201  { "or%.f 0,%B,%C%F", 0xf8ff003f, 0x2005003e, ARCOMPACT, 0, 0 ,0,0},
3202  { "or%.f 0,%B,%u%F", 0xf8ff003f, 0x2045003e, ARCOMPACT, 0, 0 ,0,0},
3203  { "or%.f%Q 0,%B,%L%F", 0xf8ff8fff, 0x20050fbe, ARCOMPACT, 0, 0 ,0,0},
3204  { "or%.f%Q 0,%L,%C%F", 0xffff703f, 0x2605703e, ARCOMPACT, 0, 0 ,0,0},
3205  { "or%.f%Q 0,%L,%u%F", 0xffff703f, 0x2645703e, ARCOMPACT, 0, 0 ,0,0},
3206  { "or%.f%Q 0,%L,%K%F", 0xffff7fff, 0x26857000, ARCOMPACT, 0, 0 ,0,0},
3207  { "or%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c57000, ARCOMPACT, 0, 0 ,0,0},
3208  { "or%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c57020, ARCOMPACT, 0, 0 ,0,0},
3209  { "or%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c57f80, ARCOMPACT, 0, 0 ,0,0},
3210  { "rcmp %B,%C", 0xf8ff803f, 0x200d8000, ARCOMPACT, 0, 0 ,0,0},
3211  { "rcmp %B,%u", 0xf8ff803f, 0x204d8000, ARCOMPACT, 0, 0 ,0,0},
3212  { "rcmp %B,%K", 0xf8ff8000, 0x208d8000, ARCOMPACT, 0, 0 ,0,0},
3213  { "rcmp%Q %B,%L", 0xf8ff8000, 0x200d8f80, ARCOMPACT, 0, 0 ,0,0},
3214  { "rcmp%Q %L,%C", 0xfffff03f, 0x260df000, ARCOMPACT, 0, 0 ,0,0},
3215  { "rcmp%Q %L,%u", 0xfffff03f, 0x264df000, ARCOMPACT, 0, 0 ,0,0},
3216  { "rcmp%Q %L,%K", 0xfffff000, 0x268df000, ARCOMPACT, 0, 0 ,0,0},
3217  { "rcmp%.q %B,%C", 0xf8ff8020, 0x20cd8000, ARCOMPACT, 0, 0 ,0,0},
3218  { "rcmp%.q %B,%u", 0xf8ff8020, 0x20cd8020, ARCOMPACT, 0, 0 ,0,0},
3219  { "rcmp%.q%.f %B,%C", 0xf8ff8020, 0x20cd8000, ARCOMPACT, 0, 0 ,0,0},
3220  { "rcmp%.q%.f %B,%u", 0xf8ff8020, 0x20cd8020, ARCOMPACT, 0, 0 ,0,0},
3221  { "rcmp%.q%Q %B,%L", 0xf8ff8fe0, 0x20cd8f80, ARCOMPACT, 0, 0 ,0,0},
3222  { "rcmp%.q%Q %L,%C", 0xfffff020, 0x26cdf000, ARCOMPACT, 0, 0 ,0,0},
3223  { "rcmp%.q%Q %L,%u", 0xfffff020, 0x26cdf020, ARCOMPACT, 0, 0 ,0,0},
3224  { "rcmp%.q%Q %L,%L", 0xffffffff, 0x26cdff80, ARCOMPACT, 0, 0 ,0,0},
3225  { "rcmp%.q%.f%Q %B,%L", 0xf8ff8fe0, 0x20cd8f80, ARCOMPACT, 0, 0 ,0,0},
3226  { "rcmp%.q%.f%Q %L,%C", 0xfffff020, 0x26cdf000, ARCOMPACT, 0, 0 ,0,0},
3227  { "rcmp%.q%.f%Q %L,%u", 0xfffff020, 0x26cdf020, ARCOMPACT, 0, 0 ,0,0},
3228  { "rcmp%.q%.f%Q %L,%L", 0xffffffff, 0x268df780, ARCOMPACT, 0, 0 ,0,0},
3229 
3230  { "rlc%.f %#,%C%F", 0xf8ff003f, 0x202f000b, ARCOMPACT, 0, 0 ,0,0},
3231  { "rlc%.f %#,%u%F", 0xf8ff003f, 0x206f000b, ARCOMPACT, 0, 0 ,0,0},
3232  { "rlc%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f8b, ARCOMPACT, 0, 0 ,0,0},
3233  { "rlc%.f 0,%C%F", 0xffff703f, 0x262f700b, ARCOMPACT, 0, 0 ,0,0},
3234  { "rlc%.f 0,%u%F", 0xffff703f, 0x266f700b, ARCOMPACT, 0, 0 ,0,0},
3235  { "rlc%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f8b, ARCOMPACT, 0, 0 ,0,0},
3236  { "ror%.f %A,%B,%C%F", 0xf8ff0000, 0x28030000, ARCOMPACT, 0, 0 ,0,0},
3237  { "ror%.f %A,%B,%u%F", 0xf8ff0000, 0x28430000, ARCOMPACT, 0, 0 ,0,0},
3238  { "ror%.f %#,%B,%K%F", 0xf8ff0000, 0x28830000, ARCOMPACT, 0, 0 ,0,0},
3239  { "ror%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x28030f80, ARCOMPACT, 0, 0 ,0,0},
3240  { "ror%.f%Q %A,%L,%C%F", 0xffff7000, 0x2e037000, ARCOMPACT, 0, 0 ,0,0},
3241  { "ror%.f%Q %A,%L,%u%F", 0xffff7000, 0x2e437000, ARCOMPACT, 0, 0 ,0,0},
3242  { "ror%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x2e037f80, ARCOMPACT, 0, 0 ,0,0},
3243  { "ror%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x28c30000, ARCOMPACT, 0, 0 ,0,0},
3244  { "ror%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x28c30020, ARCOMPACT, 0, 0 ,0,0},
3245  { "ror%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x28c30f80, ARCOMPACT, 0, 0 ,0,0},
3246  { "ror%.f 0,%B,%C%F", 0xf8ff003f, 0x2803003e, ARCOMPACT, 0, 0 ,0,0},
3247  { "ror%.f 0,%B,%u%F", 0xf8ff003f, 0x2843003e, ARCOMPACT, 0, 0 ,0,0},
3248  { "ror%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x28030fbe, ARCOMPACT, 0, 0 ,0,0},
3249  { "ror%.f%Q 0,%L,%C%F", 0xffff703f, 0x2e03703e, ARCOMPACT, 0, 0 ,0,0},
3250  { "ror%.f%Q 0,%L,%u%F", 0xffff703f, 0x2e43703e, ARCOMPACT, 0, 0 ,0,0},
3251  { "ror%.f%Q 0,%L,%K%F", 0xffff0000, 0x2e837000, ARCOMPACT, 0, 0 ,0,0},
3252  { "ror%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x2ec37000, ARCOMPACT, 0, 0 ,0,0},
3253  { "ror%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x2ec37020, ARCOMPACT, 0, 0 ,0,0},
3254  { "ror%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x2ec37f80, ARCOMPACT, 0, 0 ,0,0},
3255  { "ror%.f %#,%C%F", 0xf8ff003f, 0x202f0003, ARCOMPACT, 0, 0 ,0,0},
3256  { "ror%.f %#,%u%F", 0xf8ff003f, 0x206f0003, ARCOMPACT, 0, 0 ,0,0},
3257  { "ror%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f83, ARCOMPACT, 0, 0 ,0,0},
3258  { "ror%.f 0,%C%F", 0xffff703f, 0x262f7003, ARCOMPACT, 0, 0 ,0,0},
3259  { "ror%.f 0,%u%F", 0xffff703f, 0x266f7003, ARCOMPACT, 0, 0 ,0,0},
3260  { "ror%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f83, ARCOMPACT, 0, 0 ,0,0},
3261  { "rrc%.f %#,%C%F", 0xf8ff003f, 0x202f0004, ARCOMPACT, 0, 0 ,0,0},
3262  { "rrc%.f %#,%u%F", 0xf8ff003f, 0x206f0004, ARCOMPACT, 0, 0 ,0,0},
3263  { "rrc%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f84, ARCOMPACT, 0, 0 ,0,0},
3264  { "rrc%.f 0,%C%F", 0xffff703f, 0x262f7004, ARCOMPACT, 0, 0 ,0,0},
3265  { "rrc%.f 0,%u%F", 0xffff703f, 0x266f7004, ARCOMPACT, 0, 0 ,0,0},
3266  { "rrc%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f84, ARCOMPACT, 0, 0 ,0,0},
3267  { "rsub%.f %A,%B,%C%F", 0xf8ff0000, 0x200e0000, ARCOMPACT, 0, 0 ,0,0},
3268  { "rsub%.f %A,%B,%u%F", 0xf8ff0000, 0x204e0000, ARCOMPACT, 0, 0 ,0,0},
3269  { "rsub%.f %#,%B,%K%F", 0xf8ff0000, 0x208e0000, ARCOMPACT, 0, 0 ,0,0},
3270  { "rsub%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x200e0f80, ARCOMPACT, 0, 0 ,0,0},
3271  { "rsub%.f%Q %A,%L,%C%F", 0xffff7000, 0x260e7000, ARCOMPACT, 0, 0 ,0,0},
3272  { "rsub%.f%Q %A,%L,%u%F", 0xffff7000, 0x264e7000, ARCOMPACT, 0, 0 ,0,0},
3273  { "rsub%.f%Q %A,%L,%L%F", 0xffff7000, 0x260e7f80, ARCOMPACT, 0, 0 ,0,0},
3274  { "rsub%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20ce0000, ARCOMPACT, 0, 0 ,0,0},
3275  { "rsub%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20ce0020, ARCOMPACT, 0, 0 ,0,0},
3276  { "rsub%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20ce0f80, ARCOMPACT, 0, 0 ,0,0},
3277 /* commute sub to do the following three operations */
3278  { "rsub%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20c20000, ARCOMPACT, 0, 0 ,0,0},
3279  { "rsub%.q%.f %#,%u,%B%F", 0xf8ff0020, 0x20c20020, ARCOMPACT, 0, 0 ,0,0},
3280  { "rsub%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20c20f80, ARCOMPACT, 0, 0 ,0,0},
3281  { "rsub%.f 0,%B,%C%F", 0xf8ff003f, 0x200e003e, ARCOMPACT, 0, 0 ,0,0},
3282  { "rsub%.f 0,%B,%u%F", 0xf8ff003f, 0x204e003e, ARCOMPACT, 0, 0 ,0,0},
3283  { "rsub%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x200e0fbe, ARCOMPACT, 0, 0 ,0,0},
3284  { "rsub%.f%Q 0,%L,%C%F", 0xffff703f, 0x260e703e, ARCOMPACT, 0, 0 ,0,0},
3285  { "rsub%.f%Q 0,%L,%u%F", 0xffff703f, 0x264e703e, ARCOMPACT, 0, 0 ,0,0},
3286  { "rsub%.f%Q 0,%L,%K%F", 0xffff7000, 0x268e7000, ARCOMPACT, 0, 0 ,0,0},
3287  { "rsub%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26ce7000, ARCOMPACT, 0, 0 ,0,0},
3288  { "rsub%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26ce7020, ARCOMPACT, 0, 0 ,0,0},
3289  { "rsub%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26ce7f80, ARCOMPACT, 0, 0 ,0,0},
3290 
3291  /* Return from Interrupt or Exception .New A700 instruction */
3292  { "rtie",0xffffffff,0x242F003F,ARC_MACH_ARC7,0,0,0,0},
3293 
3294  { "sbc%.f %A,%B,%C%F", 0xf8ff0000, 0x20030000, ARCOMPACT, 0, 0 ,0,0},
3295  { "sbc%.f %A,%B,%u%F", 0xf8ff0000, 0x20430000, ARCOMPACT, 0, 0 ,0,0},
3296  { "sbc%.f %#,%B,%K%F", 0xf8ff0000, 0x20830000, ARCOMPACT, 0, 0 ,0,0},
3297  { "sbc%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20030f80, ARCOMPACT, 0, 0 ,0,0},
3298  { "sbc%.f%Q %A,%L,%C%F", 0xffff7000, 0x26037000, ARCOMPACT, 0, 0 ,0,0},
3299  { "sbc%.f%Q %A,%L,%u%F", 0xffff7000, 0x26437000, ARCOMPACT, 0, 0 ,0,0},
3300  { "sbc%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26837f80, ARCOMPACT, 0, 0 ,0,0},
3301  { "sbc%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c30000, ARCOMPACT, 0, 0 ,0,0},
3302  { "sbc%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c30020, ARCOMPACT, 0, 0 ,0,0},
3303  { "sbc%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c30f80, ARCOMPACT, 0, 0 ,0,0},
3304  { "sbc%.f 0,%B,%C%F", 0xf8ff003f, 0x2003003e, ARCOMPACT, 0, 0 ,0,0},
3305  { "sbc%.f 0,%B,%u%F", 0xf8ff003f, 0x2043003e, ARCOMPACT, 0, 0 ,0,0},
3306  { "sbc%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20030fbe, ARCOMPACT, 0, 0 ,0,0},
3307  { "sbc%.f%Q 0,%L,%C%F", 0xffff703f, 0x2603703e, ARCOMPACT, 0, 0 ,0,0},
3308  { "sbc%.f%Q 0,%L,%u%F", 0xffff703f, 0x2643703e, ARCOMPACT, 0, 0 ,0,0},
3309  { "sbc%.f%Q 0,%L,%K%F", 0xffff7000, 0x26837000, ARCOMPACT, 0, 0 ,0,0},
3310  { "sbc%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c37000, ARCOMPACT, 0, 0 ,0,0},
3311  { "sbc%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c37020, ARCOMPACT, 0, 0 ,0,0},
3312  { "sbc%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c37f80, ARCOMPACT, 0, 0 ,0,0},
3313  { "sexb%.f %#,%C%F", 0xf8ff003f, 0x202f0005, ARCOMPACT, 0, 0 ,0,0},
3314  { "sexb%.f %#,%u%F", 0xf8ff003f, 0x206f0005, ARCOMPACT, 0, 0 ,0,0},
3315  { "sexb%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f85, ARCOMPACT, 0, 0 ,0,0},
3316  { "sexb%.f 0,%C%F", 0xffff703f, 0x262f7005, ARCOMPACT, 0, 0 ,0,0},
3317  { "sexb%.f 0,%u%F", 0xffff703f, 0x266f7005, ARCOMPACT, 0, 0 ,0,0},
3318  { "sexb%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f85, ARCOMPACT, 0, 0 ,0,0},
3319  { "sexw%.f %#,%C%F", 0xf8ff003f, 0x202f0006, ARCOMPACT, 0, 0 ,0,0},
3320  { "sexw%.f %#,%u%F", 0xf8ff003f, 0x206f0006, ARCOMPACT, 0, 0 ,0,0},
3321  { "sexw%.f%Q %#,%L%F", 0xf8ff0fff, 0x202f0f86, ARCOMPACT, 0, 0 ,0,0},
3322  { "sexw%.f 0,%C%F", 0xffff703f, 0x262f7006, ARCOMPACT, 0, 0 ,0,0},
3323  { "sexw%.f 0,%u%F", 0xffff703f, 0x266f7006, ARCOMPACT, 0, 0 ,0,0},
3324  { "sexw%.f%Q 0,%L%F", 0xffff7fff, 0x262f7f86, ARCOMPACT, 0, 0 ,0,0},
3325 
3326  /* ARC700 sleep instruction */
3327  { "sleep %u", 0xfffff03f, 0x216f003f, ARC_MACH_ARC7, 0, 0,0,0},
3328  { "sleep %C", 0xfffff03f, 0x212f003f, ARC_MACH_ARC5 | ARC_MACH_ARC6 | ARC_MACH_ARC601, 0, 0 ,0,0},
3329  { "sleep %u", 0xfffff03f, 0x216f003f, ARC_MACH_ARC5 | ARC_MACH_ARC6 | ARC_MACH_ARC601, 0, 0 ,0,0},
3330  { "sleep %L", 0xffffffff, 0x212f0fbf, ARC_MACH_ARC5 | ARC_MACH_ARC6 | ARC_MACH_ARC601, 0, 0 ,0,0},
3331  { "sleep", 0xffffffff, 0x216f003f, ARCOMPACT, 0, 0 ,0,0},
3332 
3333  { "sr %B,[%C]", 0xf8ff803f, 0x202b0000, ARCOMPACT, 0, 0 ,0,0},
3334  { "sr %B,[%u]", 0xf8ff8000, 0x206b0000, ARCOMPACT, 0, 0 ,0,0},
3335  { "sr %B,[%K]", 0xf8ff8000, 0x20ab0000, ARCOMPACT, 0, 0 ,0,0},
3336  { "sr %B,[%GC]", 0xf8ff8000, 0x20ab0000, ARCOMPACT, 0, 0 ,0,0},
3337  { "sr%Q %B,[%L]", 0xf8ff8fff, 0x202b0f80, ARCOMPACT, 0, 0 ,0,0},
3338  { "sr%Q %L,[%C]", 0xfffff03f, 0x262b7000, ARCOMPACT, 0, 0 ,0,0},
3339  { "sr%Q %L,[%u]", 0xfffff000, 0x266b7000, ARCOMPACT, 0, 0 ,0,0},
3340  { "sr%Q %L,[%K]", 0xfffff000, 0x26ab7000, ARCOMPACT, 0, 0 ,0,0},
3341  { "sr%Q %L,[%GC]", 0xfffff000, 0x26ab7000, ARCOMPACT, 0, 0 ,0,0},
3342  { "st%z%.w%.D %C,[%g]%0", 0xf8ff8001, 0x18000000, ARCOMPACT, 0, 0 ,0,0},
3343  { "st%z%.w%.D %C,[%g,%[L]%0", 0xf8000001, 0x18000000, ARCOMPACT, 0, 0 ,0,0},
3344  { "st%z%.w%.D %C,[%g,%o]%0", 0xf8000001, 0x18000000, ARCOMPACT, 0, 0 ,0,0},
3345  { "st%z%.D%Q %C,[%L,%o]%0", 0xff007001, 0x1e007000, ARCOMPACT, 0, 0 ,0,0},
3346  { "st%z%.D%Q %C,[%L]%0", 0xfffff001, 0x1e007000, ARCOMPACT, 0, 0 ,0,0},
3347  { "st%z%.w%.D%Q %L,[%g]%0", 0xf8ff8fc1, 0x18000f80, ARCOMPACT, 0, 0 ,0,0},
3348  { "st%z%.w%.D%Q %L,[%g,%o]%0", 0xf8000fc1, 0x18000f80, ARCOMPACT, 0, 0 ,0,0},
3349  { "st%z%.D%Q %L,[%L,%o]%0", 0xff007fc1, 0x1e007f80, ARCOMPACT, 0, 0 ,0,0},
3350  { "st%z%.D%Q %L,[%L]%0", 0xff007fc1, 0x1e007f80, ARCOMPACT, 0, 0 ,0,0},
3351  { "sub%.f %A,%B,%C%F", 0xf8ff0000, 0x20020000, ARCOMPACT, 0, 0 ,0,0},
3352  { "sub%.f %A,%B,%u%F", 0xf8ff0000, 0x20420000, ARCOMPACT, 0, 0 ,0,0},
3353  { "sub%.f %#,%B,%K%F", 0xf8ff0000, 0x20820000, ARCOMPACT, 0, 0 ,0,0},
3354  { "sub%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20020f80, ARCOMPACT, 0, 0 ,0,0},
3355  { "sub%.f%Q %A,%L,%C%F", 0xffff7000, 0x26027000, ARCOMPACT, 0, 0 ,0,0},
3356  { "sub%.f%Q %A,%L,%u%F", 0xffff7000, 0x26427000, ARCOMPACT, 0, 0 ,0,0},
3357  { "sub%.f%Q %A,%L,%L%F", 0xffff7000, 0x26027f80, ARCOMPACT, 0, 0 ,0,0},
3358  { "sub%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c20000, ARCOMPACT, 0, 0 ,0,0},
3359  { "sub%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c20020, ARCOMPACT, 0, 0 ,0,0},
3360  { "sub%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c20f80, ARCOMPACT, 0, 0 ,0,0},
3361 /* commute rsub to do the following three operations */
3362  { "sub%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20ce0000, ARCOMPACT, 0, 0 ,0,0},
3363  { "sub%.q%.f %#,%u,%B%F", 0xf8ff0020, 0x20ce0020, ARCOMPACT, 0, 0 ,0,0},
3364  { "sub%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20ce0f80, ARCOMPACT, 0, 0 ,0,0},
3365  { "sub%.f 0,%B,%C%F", 0xf8ff003f, 0x2002003e, ARCOMPACT, 0, 0 ,0,0},
3366  { "sub%.f 0,%B,%u%F", 0xf8ff003f, 0x2042003e, ARCOMPACT, 0, 0 ,0,0},
3367  { "sub%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20020fbe, ARCOMPACT, 0, 0 ,0,0},
3368  { "sub%.f%Q 0,%L,%C%F", 0xffff703f, 0x2602703e, ARCOMPACT, 0, 0 ,0,0},
3369  { "sub%.f%Q 0,%L,%u%F", 0xffff703f, 0x2642703e, ARCOMPACT, 0, 0 ,0,0},
3370  { "sub%.f%Q 0,%L,%K%F", 0xffff7fff, 0x26827000, ARCOMPACT, 0, 0 ,0,0},
3371  { "sub%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c27000, ARCOMPACT, 0, 0 ,0,0},
3372  { "sub%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c27020, ARCOMPACT, 0, 0 ,0,0},
3373  { "sub%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c27f80, ARCOMPACT, 0, 0 ,0,0},
3374 
3375  { "sub1%.f %A,%B,%C%F", 0xf8ff0000, 0x20170000, ARCOMPACT, 0, 0 ,0,0},
3376  { "sub1%.f %A,%B,%u%F", 0xf8ff0000, 0x20570000, ARCOMPACT, 0, 0 ,0,0},
3377  { "sub1%.f %#,%B,%K%F", 0xf8ff0000, 0x20970000, ARCOMPACT, 0, 0 ,0,0},
3378  { "sub1%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20170f80, ARCOMPACT, 0, 0 ,0,0},
3379  { "sub1%.f%Q %A,%L,%C%F", 0xffff7000, 0x26177000, ARCOMPACT, 0, 0 ,0,0},
3380  { "sub1%.f%Q %A,%L,%u%F", 0xffff7000, 0x26577000, ARCOMPACT, 0, 0 ,0,0},
3381  { "sub1%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d70000, ARCOMPACT, 0, 0 ,0,0},
3382  { "sub1%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20d70020, ARCOMPACT, 0, 0 ,0,0},
3383  { "sub1%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20d70f80, ARCOMPACT, 0, 0 ,0,0},
3384  { "sub1%.f 0,%B,%C%F", 0xf8ff003f, 0x2017003e, ARCOMPACT, 0, 0 ,0,0},
3385  { "sub1%.f 0,%B,%u%F", 0xf8ff003f, 0x2057003e, ARCOMPACT, 0, 0 ,0,0},
3386  { "sub1%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20170fbe, ARCOMPACT, 0, 0 ,0,0},
3387  { "sub1%.f%Q 0,%L,%C%F", 0xffff703f, 0x2617703e, ARCOMPACT, 0, 0 ,0,0},
3388  { "sub1%.f%Q 0,%L,%u%F", 0xffff703f, 0x2657703e, ARCOMPACT, 0, 0 ,0,0},
3389  { "sub1%.f%Q 0,%L,%K%F", 0xffff7fff, 0x26977000, ARCOMPACT, 0, 0 ,0,0},
3390  { "sub1%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d77000, ARCOMPACT, 0, 0 ,0,0},
3391  { "sub1%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d77020, ARCOMPACT, 0, 0 ,0,0},
3392  { "sub1%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26d77f80, ARCOMPACT, 0, 0 ,0,0},
3393  { "sub2%.f %A,%B,%C%F", 0xf8ff0000, 0x20180000, ARCOMPACT, 0, 0 ,0,0},
3394  { "sub2%.f %A,%B,%u%F", 0xf8ff0000, 0x20580000, ARCOMPACT, 0, 0 ,0,0},
3395  { "sub2%.f %#,%B,%K%F", 0xf8ff0000, 0x20980000, ARCOMPACT, 0, 0 ,0,0},
3396  { "sub2%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20180f80, ARCOMPACT, 0, 0 ,0,0},
3397  { "sub2%.f%Q %A,%L,%C%F", 0xffff7000, 0x26187000, ARCOMPACT, 0, 0 ,0,0},
3398  { "sub2%.f%Q %A,%L,%u%F", 0xffff7000, 0x26587000, ARCOMPACT, 0, 0 ,0,0},
3399  { "sub2%.f%Q %A,%L,%L%F", 0xffff7000, 0x26180000, ARCOMPACT, 0, 0 ,0,0},
3400  { "sub2%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d80000, ARCOMPACT, 0, 0 ,0,0},
3401  { "sub2%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20d80020, ARCOMPACT, 0, 0 ,0,0},
3402  { "sub2%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20d80f80, ARCOMPACT, 0, 0 ,0,0},
3403  { "sub2%.f 0,%B,%C%F", 0xf8ff003f, 0x2018003e, ARCOMPACT, 0, 0 ,0,0},
3404  { "sub2%.f 0,%B,%u%F", 0xf8ff003f, 0x2058003e, ARCOMPACT, 0, 0 ,0,0},
3405  { "sub2%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20180fbe, ARCOMPACT, 0, 0 ,0,0},
3406  { "sub2%.f%Q 0,%L,%C%F", 0xffff703f, 0x2618703e, ARCOMPACT, 0, 0 ,0,0},
3407  { "sub2%.f%Q 0,%L,%u%F", 0xffff703f, 0x2658703e, ARCOMPACT, 0, 0 ,0,0},
3408  { "sub2%.f%Q 0,%L,%K%F", 0xffff7000, 0x26987000, ARCOMPACT, 0, 0 ,0,0},
3409  { "sub2%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d87000, ARCOMPACT, 0, 0 ,0,0},
3410  { "sub2%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d87020, ARCOMPACT, 0, 0 ,0,0},
3411  { "sub2%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26d87f80, ARCOMPACT, 0, 0 ,0,0},
3412  { "sub3%.f %A,%B,%C%F", 0xf8ff0000, 0x20190000, ARCOMPACT, 0, 0 ,0,0},
3413  { "sub3%.f %A,%B,%u%F", 0xf8ff0000, 0x20590000, ARCOMPACT, 0, 0 ,0,0},
3414  { "sub3%.f %#,%B,%K%F", 0xf8ff0000, 0x20990000, ARCOMPACT, 0, 0 ,0,0},
3415  { "sub3%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20190f80, ARCOMPACT, 0, 0 ,0,0},
3416  { "sub3%.f%Q %A,%L,%C%F", 0xffff7000, 0x26197000, ARCOMPACT, 0, 0 ,0,0},
3417  { "sub3%.f%Q %A,%L,%u%F", 0xffff7000, 0x26597000, ARCOMPACT, 0, 0 ,0,0},
3418  { "sub3%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20d90000, ARCOMPACT, 0, 0 ,0,0},
3419  { "sub3%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20d90020, ARCOMPACT, 0, 0 ,0,0},
3420  { "sub3%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20d90f80, ARCOMPACT, 0, 0 ,0,0},
3421  { "sub3%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20190fbe, ARCOMPACT, 0, 0 ,0 ,0},
3422  { "sub3%.f%Q 0,%L,%C%F", 0xffff703f, 0x2619703e, ARCOMPACT, 0, 0 ,0 ,0},
3423  { "sub3%.f%Q 0,%L,%u%F", 0xffff703f, 0x2659703e, ARCOMPACT, 0, 0 ,0 ,0},
3424  { "sub3%.f%Q 0,%L,%K%F", 0xffff7000, 0x26997000, ARCOMPACT, 0, 0 ,0,0},
3425  { "sub3%.f 0,%B,%C%F", 0xf8ff003f, 0x2019003e, ARCOMPACT, 0, 0 ,0,0},
3426  { "sub3%.f 0,%B,%u%F", 0xf8ff703f, 0x2957703e, ARCOMPACT, 0, 0 ,0,0},
3427  { "sub3%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26d97000, ARCOMPACT, 0, 0 ,0,0},
3428  { "sub3%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26d97020, ARCOMPACT, 0, 0 ,0,0},
3429  { "sub3%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26d97f80, ARCOMPACT, 0, 0 ,0,0},
3430  { "swap%.f %#,%C%F", 0xf8ff003f, 0x282f0000, ARC_MACH_ARC7, 0, 0 ,0,0},
3431  { "swap%.f %#,%u%F", 0xf8ff003f, 0x286f0000, ARC_MACH_ARC7, 0, 0 ,0,0},
3432  { "swap%.f%Q %#,%L%F", 0xf8ff0fff, 0x282f0f80, ARC_MACH_ARC7, 0, 0 ,0,0},
3433  { "swap%.f 0,%C%F", 0xffff703f, 0x2e2f7000, ARC_MACH_ARC7, 0, 0 ,0,0},
3434  { "swap%.f 0,%u%F", 0xffff703f, 0x2e6f7000, ARC_MACH_ARC7, 0, 0 ,0,0},
3435  { "swap%.f%Q 0,%L%F", 0xffff7fff, 0x2e2f7f80, ARC_MACH_ARC7, 0, 0 ,0,0},
3436  { "swi", 0xffffffff, 0x226f003f, (ARC_MACH_ARC5 | ARC_MACH_ARC6 | ARC_MACH_ARC601), 0, 0 ,0,0},
3437 
3438  /* New A700 Instructions */
3439  { "sync", 0xffffffff, 0x236f003f,ARC_MACH_ARC7,0,0,0,0},
3440  { "trap0", 0xffffffff, 0x226f003f, ARC_MACH_ARC7, 0, 0 ,0,0},
3441 
3442  { "tst %B,%C%F", 0xf8ff803f, 0x200b8000, ARCOMPACT, 0, 0 ,0,0},
3443  { "tst.f %B,%C%F", 0xf8ff803f, 0x200b8000, ARCOMPACT, 0, 0 ,0,0},
3444  { "tst %B,%u%F", 0xf8ff803f, 0x204b8000, ARCOMPACT, 0, 0 ,0,0},
3445  { "tst.f %B,%u%F", 0xf8ff803f, 0x204b8000, ARCOMPACT, 0, 0 ,0,0},
3446  { "tst %B,%K%F", 0xf8ff8000, 0x208b8000, ARCOMPACT, 0, 0 ,0,0},
3447  { "tst.f %B,%K%F", 0xf8ff8000, 0x208b8000, ARCOMPACT, 0, 0 ,0,0},
3448  { "tst %B,%L%F", 0xf8ff8fff, 0x200b8f80, ARCOMPACT, 0, 0 ,0,0},
3449  { "tst.f %B,%L%F", 0xf8ff8fff, 0x200b8f80, ARCOMPACT, 0, 0 ,0,0},
3450  { "tst%Q %L,%C", 0xfffff03f, 0x260bf000, ARCOMPACT, 0, 0 ,0,0},
3451  { "tst.f%Q %L,%C", 0xfffff03f, 0x260bf000, ARCOMPACT, 0, 0 ,0,0},
3452  { "tst%Q %L,%u", 0xfffff03f, 0x264bf000, ARCOMPACT, 0, 0 ,0,0},
3453  { "tst.f%Q %L,%u", 0xfffff03f, 0x264bf000, ARCOMPACT, 0, 0 ,0,0},
3454  { "tst%Q %L,%L", 0xffffffff, 0x260bff80, ARCOMPACT, 0, 0 ,0,0},
3455  { "tst.f%Q %L,%L", 0xffffffff, 0x260bff80, ARCOMPACT, 0, 0 ,0,0},
3456  { "tst%.q %B,%C", 0xf8ff8020, 0x20cb8000, ARCOMPACT, 0, 0 ,0,0},
3457  { "tst%.q.f %B,%C", 0xf8ff8020, 0x20cb8000, ARCOMPACT, 0, 0 ,0,0},
3458  { "tst%.q %B,%u", 0xf8ff8020, 0x20cb8020, ARCOMPACT, 0, 0 ,0,0},
3459  { "tst%.q.f %B,%u", 0xf8ff8020, 0x20cb8020, ARCOMPACT, 0, 0 ,0,0},
3460  { "tst%.q%Q %B,%L", 0xf8ff8fe0, 0x20cb8f80, ARCOMPACT, 0, 0 ,0,0},
3461  { "tst%.q.f%Q %B,%L", 0xf8ff8fe0, 0x20cb8f80, ARCOMPACT, 0, 0 ,0,0},
3462  { "tst%.q%Q %L,%C", 0xfffff020, 0x26cbf000, ARCOMPACT, 0, 0 ,0,0},
3463  { "tst%.q.f%Q %L,%C", 0xfffff020, 0x26cbf000, ARCOMPACT, 0, 0 ,0,0},
3464  { "tst%.q%Q %L,%u", 0xfffff020, 0x26cbf020, ARCOMPACT, 0, 0 ,0,0},
3465  { "tst%.q.f%Q %L,%u", 0xfffff020, 0x26cbf020, ARCOMPACT, 0, 0 ,0,0},
3466  { "tst%.q%Q %L,%L", 0xffffffe0, 0x26cbff80, ARCOMPACT, 0, 0 ,0,0},
3467  { "tst%.q.f%Q %L,%L", 0xffffffe0, 0x26cbff80, ARCOMPACT, 0, 0 ,0,0},
3468  { "xor%.f %A,%B,%C%F", 0xf8ff0000, 0x20070000, ARCOMPACT, 0, 0 ,0,0},
3469  { "xor%.f %A,%B,%u%F", 0xf8ff0000, 0x20470000, ARCOMPACT, 0, 0 ,0,0},
3470  { "xor%.f %#,%B,%K%F", 0xf8ff0000, 0x20870000, ARCOMPACT, 0, 0 ,0,0},
3471  { "xor%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x20070f80, ARCOMPACT, 0, 0 ,0,0},
3472  { "xor%.f%Q %A,%L,%C%F", 0xffff7000, 0x26077000, ARCOMPACT, 0, 0 ,0,0},
3473  { "xor%.f%Q %A,%L,%u%F", 0xffff7000, 0x26477000, ARCOMPACT, 0, 0 ,0,0},
3474  { "xor%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x26077f80, ARCOMPACT, 0, 0 ,0,0},
3475  { "xor%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20c70000, ARCOMPACT, 0, 0 ,0,0},
3476  { "xor%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20c70000, ARCOMPACT, 0, 0 ,0,0},
3477  { "xor%.q%.f %#,%B,%u%F", 0xf8ff0020, 0x20c70020, ARCOMPACT, 0, 0 ,0,0},
3478  { "xor%.q%.f %#,%u,%B%F", 0xf8ff0020, 0x20c70020, ARCOMPACT, 0, 0 ,0,0},
3479  { "xor%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20c70f80, ARCOMPACT, 0, 0 ,0,0},
3480  { "xor%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20c70f80, ARCOMPACT, 0, 0 ,0,0},
3481  { "xor%.f 0,%B,%C%F", 0xf8ff003f, 0x2007003e, ARCOMPACT, 0, 0 ,0,0},
3482  { "xor%.f 0,%B,%u%F", 0xf8ff003f, 0x2047003e, ARCOMPACT, 0, 0 ,0,0},
3483  { "xor%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x20070fbe, ARCOMPACT, 0, 0 ,0,0},
3484  { "xor%.f%Q 0,%L,%C%F", 0xffff703f, 0x2607703e, ARCOMPACT, 0, 0 ,0,0},
3485  { "xor%.f%Q 0,%L,%u%F", 0xffff703f, 0x2647703e, ARCOMPACT, 0, 0 ,0,0},
3486  { "xor%.f%Q 0,%L,%K%F", 0xffff7000, 0x26877000, ARCOMPACT, 0, 0 ,0,0},
3487  { "xor%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26c77000, ARCOMPACT, 0, 0 ,0,0},
3488  { "xor%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26c77020, ARCOMPACT, 0, 0 ,0,0},
3489  { "xor%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26c77f80, ARCOMPACT, 0, 0 ,0,0},
3490 
3491  /* ARCompact 16-bit instructions */
3492 
3493 /* abs_s b,c; 01111 bbb ccc 10001 */
3494  { "abs_s %b,%c", 0xf81f, 0x7811, ARCOMPACT, 0, 0 ,0,0},
3495 
3496 /* add_s a,b,c; 01100 bbb ccc 11 aaa */
3497  { "add_s %a,%b,%c", 0xf818, 0x6018, ARCOMPACT, 0, 0 ,0,0},
3498 /* add_s b,b,h; 01110 bbb hhh 00 hhh */
3499  { "add_s %b,%b,%U", 0xf818, 0x7000, ARCOMPACT, 0, 0 ,0,0},
3500 /* add_s c,b,u3; 01101 bbb ccc 00 uuu */
3501  { "add_s %c,%b,%e", 0xf818, 0x6800, ARCOMPACT, 0, 0 ,0,0},
3502 /* add_s b,b,u7; 11100 bbb 0 uuuuuuu */
3503  { "add_s %b,%b,%j", 0xf880, 0xe000, ARCOMPACT, 0, 0 ,0,0},
3504 /* add_s b,b,limm; 01110 bbb 110 00 111 [L] */
3505  { "add_s%Q %b,%b,%L", 0xf8ff, 0x70c7, ARCOMPACT, 0, 0 ,0,0},
3506 /* add_s b,sp,u7; 11000 bbb 100 uuuuu */
3507  { "add_s %b,%6,%l", 0xf8e0, 0xc080, ARCOMPACT, 0, 0 ,0,0},
3508 /* add_s sp,sp,u7; 11000 000 101 uuuuu */
3509  { "add_s %6,%6,%l", 0xffe0, 0xc0a0, ARCOMPACT, 0, 0 ,0,0},
3510 /* add_s r0,gp,s11; 11001 11 sssssssss */
3511  { "add_s %4,%5,%R", 0xfe00, 0xce00, ARCOMPACT, 0, 0 ,0,0},
3512  // { "add_s %4,%5,%[L", 0xfe00, 0xce00, ARCOMPACT, 0, 0 ,0,0},
3513 
3514 /* add1_s b,b,c; 01111 bbb ccc 10100 */
3515  { "add1_s %b,%b,%c", 0xf81f, 0x7814, ARCOMPACT, 0, 0 ,0,0},
3516 
3517 /* add2_s b,b,c; 01111 bbb ccc 10101 */
3518  { "add2_s %b,%b,%c", 0xf81f, 0x7815, ARCOMPACT, 0, 0 ,0,0},
3519 
3520 /* add3_s b,b,c; 01111 bbb ccc 10110 */
3521  { "add3_s %b,%b,%c", 0xf81f, 0x7816, ARCOMPACT, 0, 0 ,0,0},
3522 
3523 /* and_s b,b,c; 01111 bbb ccc 00100 */
3524  { "and_s %b,%b,%c", 0xf81f, 0x7804, ARCOMPACT, 0, 0 ,0,0},
3525 
3526 /* asl_s b,b,c; 01111 bbb ccc 11000 */
3527  { "asl_s %b,%b,%c", 0xf81f, 0x7818, ARCOMPACT, 0, 0 ,0,0},
3528 /* asl_s c,b,u3; 01101 bbb ccc 10 uuu */
3529  { "asl_s %c,%b,%e", 0xf818, 0x6810, ARCOMPACT, 0, 0 ,0,0},
3530 /* asl_s b,b,u5; 10111 bbb 000 uuuuu */
3531  { "asl_s %b,%b,%E", 0xf8e0, 0xb800, ARCOMPACT, 0, 0 ,0,0},
3532 /* asl_s b,c; 01111 bbb ccc 11011 */
3533  { "asl_s %b,%c", 0xf81f, 0x781b, ARCOMPACT, 0, 0 ,0,0},
3534 
3535 /* asr_s b,b,c; 01111 bbb ccc 11010 */
3536  { "asr_s %b,%b,%c", 0xf81f, 0x781a, ARCOMPACT, 0, 0 ,0,0},
3537 /* asr_s c,b,u3; 01101 bbb ccc 11 uuu */
3538  { "asr_s %c,%b,%e", 0xf818, 0x6818, ARCOMPACT, 0, 0 ,0,0},
3539 /* asr_s b,b,u5; 10111 bbb 010 uuuuu */
3540  { "asr_s %b,%b,%E", 0xf8e0, 0xb840, ARCOMPACT, 0, 0 ,0,0},
3541 /* asr_s b,c; 01111 bbb ccc 11100 */
3542  { "asr_s %b,%c", 0xf81f, 0x781c, ARCOMPACT, 0, 0 ,0,0},
3543 
3544 /* b_s d10; 11110 00 sssssssss */
3545  { "b_s %Z", 0xfe00, 0xf000, ARCOMPACT, 0, 0 ,0,0},
3546 /* beq_s d10; 11110 01 sssssssss */
3547  { "beq_s %Z", 0xfe00, 0xf200, ARCOMPACT, 0, 0 ,0,0},
3548 /* bne_s d10; 11110 10 sssssssss */
3549  { "bne_s %Z", 0xfe00, 0xf400, ARCOMPACT, 0, 0 ,0,0},
3550 /* bgt_s d7; 11110 11 000 ssssss */
3551  { "bgt_s %s", 0xffc0, 0xf600, ARCOMPACT, 0, 0 ,0,0},
3552 /* bge_s d7; 11110 11 001 ssssss */
3553  { "bge_s %s", 0xffc0, 0xf640, ARCOMPACT, 0, 0 ,0,0},
3554 /* blt_s d7; 11110 11 010 ssssss */
3555  { "blt_s %s", 0xffc0, 0xf680, ARCOMPACT, 0, 0 ,0,0},
3556 /* ble_s d7; 11110 11 011 ssssss */
3557  { "ble_s %s", 0xffc0, 0xf6c0, ARCOMPACT, 0, 0 ,0,0},
3558 /* bhi_s d7; 11110 11 100 ssssss */
3559  { "bhi_s %s", 0xffc0, 0xf700, ARCOMPACT, 0, 0 ,0,0},
3560 /* bhs_s d7; 11110 11 101 ssssss */
3561  { "bhs_s %s", 0xffc0, 0xf740, ARCOMPACT, 0, 0 ,0,0},
3562 /* blo_s d7; 11110 11 110 ssssss */
3563  { "blo_s %s", 0xffc0, 0xf780, ARCOMPACT, 0, 0 ,0,0},
3564 /* bls_s d7; 11110 11 111 ssssss */
3565  { "bls_s %s", 0xffc0, 0xf7c0, ARCOMPACT, 0, 0 ,0,0},
3566 
3567 /* bclr_s b,b,u5; 10111 bbb 101 uuuuu */
3568  { "bclr_s %b,%b,%E", 0xf8e0, 0xb8a0, ARCOMPACT, 0, 0 ,0,0},
3569 
3570 /* bic_s b,b,c; 01111 bbb ccc 00110 */
3571  { "bic_s %b,%b,%c", 0xf81f, 0x7806, ARCOMPACT, 0, 0 ,0,0},
3572 
3573 /* bl_s d11; 11111 sssssssssss */
3574  { "bl_s %W", 0xf800, 0xf800, ARCOMPACT, 0, 0 ,0,0},
3575 
3576 /* bmsk_s b,b,u5; 10111 bbb 110 uuuuu */
3577  { "bmsk_s %b,%b,%E", 0xf8e0, 0xb8c0, ARCOMPACT, 0, 0 ,0,0},
3578 
3579 /* breq_s b,0,d8; 11101 bbb 0 sssssss */
3580  { "breq_s %b,0,%S", 0xf880, 0xe800, ARCOMPACT, 0, 0 ,0,0},
3581 /* brne_s b,0,d8; 11101 bbb 1 sssssss */
3582  { "brne_s %b,0,%S", 0xf880, 0xe880, ARCOMPACT, 0, 0 ,0,0},
3583 
3584 /* brk_s ; 01111 111 111 11111 */
3585  { "brk_s", 0xffff, 0x7fff, ARCOMPACT, 0, 0 ,0,0},
3586 
3587 /* bset_s b,b,u5; 10111 bbb 100 uuuuu */
3588  { "bset_s %b,%b,%E", 0xf8e0, 0xb880, ARCOMPACT, 0, 0 ,0,0},
3589 
3590 /* btst_s b,u5; 10111 bbb 111 uuuuu */
3591  { "btst_s %b,%E", 0xf8e0, 0xb8e0, ARCOMPACT, 0, 0 ,0,0},
3592 
3593 /* cmp_s b,h; 01110 bbb hhh 10 hhh */
3594  { "cmp_s %b,%U", 0xf818, 0x7010, ARCOMPACT, 0, 0 ,0,0},
3595 /* cmp_s b,u7; 11100 bbb 1 uuuuuuu */
3596  { "cmp_s %b,%j", 0xf880, 0xe080, ARCOMPACT, 0, 0 ,0,0},
3597 /* cmp_s b,limm; 01110 bbb 110 10 111 [L] */
3598  { "cmp_s%Q %b,%L", 0xf8ff, 0x70d7, ARCOMPACT, 0, 0 ,0,0},
3599 
3600 /* extb_s b,c; 01111 bbb ccc 01111 */
3601  { "extb_s %b,%c", 0xf81f, 0x780f, ARCOMPACT, 0, 0 ,0,0},
3602 
3603 /* extw_s b,c; 01111 bbb ccc 10000 */
3604  { "extw_s %b,%c", 0xf81f, 0x7810, ARCOMPACT, 0, 0 ,0,0},
3605 
3606 /* j_s [b]; 01111 bbb 000 00000 */
3607  { "j_s [%b]", 0xf8ff, 0x7800, ARCOMPACT, 0, 0 ,0,0},
3608  { "j_s.nd [%b]", 0xf8ff, 0x7800, ARCOMPACT, 0, 0 ,0,0},
3609 /* j_s.d [b]; 01111 bbb 001 00000 */
3610  { "j_s.d [%b]", 0xf8ff, 0x7820, ARCOMPACT, 0, 0 ,0,0},
3611 /* j_s [blink]; 01111 110 111 00000 */
3612  { "j_s [%9]", 0xffff, 0x7ee0, ARCOMPACT, 0, 0 ,0,0},
3613  { "j_s.nd [%9]", 0xffff, 0x7ee0, ARCOMPACT, 0, 0 ,0,0},
3614 /* j_s.d [blink]; 01111 111 111 00000 */
3615  { "j_s.d [%9]", 0xffff, 0x7fe0, ARCOMPACT, 0, 0 ,0,0},
3616 /* jeq_s [blink]; 01111 100 111 00000 */
3617  { "jeq_s [%9]", 0xffff, 0x7ce0, ARCOMPACT, 0, 0 ,0,0},
3618 /* jne_s [blink]; 01111 101 111 00000 */
3619  { "jne_s [%9]", 0xffff, 0x7de0, ARCOMPACT, 0, 0 ,0,0},
3620 
3621 /* jl_s [b]; 01111 bbb 010 00000 */
3622  { "jl_s [%b]", 0xf8ff, 0x7840, ARCOMPACT, 0, 0 ,0,0},
3623  { "jl_s.nd [%b]", 0xf8ff, 0x7840, ARCOMPACT, 0, 0 ,0,0},
3624 /* jl_s.d [b]; 01111 bbb 011 00000 */
3625  { "jl_s.d [%b]", 0xf8ff, 0x7860, ARCOMPACT, 0, 0 ,0,0},
3626 
3627 /* ld_s a,[b,c]; 01100 bbb ccc 00 aaa */
3628  { "ld_s %a,[%b,%c]", 0xf818, 0x6000, ARCOMPACT, 0, 0 ,0,0},
3629 /* ldb_s a,[b,c]; 01100 bbb ccc 01 aaa */
3630  { "ldb_s %a,[%b,%c]", 0xf818, 0x6008, ARCOMPACT, 0, 0 ,0,0},
3631 /* ldw_s a,[b,c]; 01100 bbb ccc 10 aaa */
3632  { "ldw_s %a,[%b,%c]", 0xf818, 0x6010, ARCOMPACT, 0, 0 ,0,0},
3633 /* ld_s c,[b,u7]; 10000 bbb ccc uuuuu */
3634  { "ld_s %c,[%b,%l]", 0xf800, 0x8000, ARCOMPACT, 0, 0 ,0,0},
3635  { "ld_s %c,[%b]", 0xf800, 0x8000, ARCOMPACT, 0, 0 ,0,0},
3636 /* ldb_s c,[b,u5]; 10001 bbb ccc uuuuu */
3637  { "ldb_s %c,[%b,%E]", 0xf800, 0x8800, ARCOMPACT, 0, 0 ,0,0},
3638  { "ldb_s %c,[%b]", 0xf800, 0x8800, ARCOMPACT, 0, 0 ,0,0},
3639 /* ldw_s c,[b,u6]; 10010 bbb ccc uuuuu */
3640  { "ldw_s %c,[%b,%k]", 0xf800, 0x9000, ARCOMPACT, 0, 0 ,0,0},
3641  { "ldw_s %c,[%b]", 0xf800, 0x9000, ARCOMPACT, 0, 0 ,0,0},
3642 /* ldw_s.x c,[b,u6]; 10011 bbb ccc uuuuu */
3643  { "ldw_s.x %c,[%b,%k]", 0xf800, 0x9800, ARCOMPACT, 0, 0 ,0,0},
3644  { "ldw_s.x %c,[%b]", 0xf800, 0x9800, ARCOMPACT, 0, 0 ,0,0},
3645 /* ld_s b,[sp,u7]; 11000 bbb 000 uuuuu */
3646  { "ld_s %b,[%6,%l]", 0xf8e0, 0xc000, ARCOMPACT, 0, 0 ,0,0},
3647  { "ld_s %b,[%6]", 0xf8e0, 0xc000, ARCOMPACT, 0, 0 ,0,0},
3648 /* ldb_s b,[sp,u7]; 11000 bbb 001 uuuuu */
3649  { "ldb_s %b,[%6,%l]", 0xf8e0, 0xc020, ARCOMPACT, 0, 0 ,0,0},
3650  { "ldb_s %b,[%6]", 0xf8e0, 0xc020, ARCOMPACT, 0, 0 ,0,0},
3651 /* ld_s r0,[gp,s11]; 11001 00 sssssssss */
3652  { "ld_s %4,[%5,%[L]", 0xfe00, 0xc800, ARCOMPACT, 0, 0 ,0,0},
3653  { "ld_s %4,[%5,%R]", 0xfe00, 0xc800, ARCOMPACT, 0, 0 ,0,0},
3654  { "ld_s %4,[%5]", 0xfe00, 0xc800, ARCOMPACT, 0, 0 ,0,0},
3655 /* ldb_s r0,[gp,s9]; 11001 01 sssssssss */
3656  { "ldb_s %4,[%5,%[L]", 0xfe00, 0xca00, ARCOMPACT, 0, 0 ,0,0},
3657  { "ldb_s %4,[%5,%M]", 0xfe00, 0xca00, ARCOMPACT, 0, 0 ,0,0},
3658  { "ldb_s %4,[%5]", 0xfe00, 0xca00, ARCOMPACT, 0, 0 ,0,0},
3659 /* ldw_s r0,[gp,s10]; 11001 10 sssssssss */
3660  { "ldw_s %4,[%5,%[L]", 0xfe00, 0xcc00, ARCOMPACT, 0, 0 ,0,0},
3661  { "ldw_s %4,[%5,%O]", 0xfe00, 0xcc00, ARCOMPACT, 0, 0 ,0,0},
3662  { "ldw_s %4,[%5]", 0xfe00, 0xcc00, ARCOMPACT, 0, 0 ,0,0},
3663 /* ld_s b,[pcl,u10]; 11010 bbb uuuuuuuu */
3664  { "ld_s %b,[%!,%m]", 0xf800, 0xd000, ARCOMPACT, 0, 0 ,0,0},
3665  { "ld_s %b,[%!]", 0xf800, 0xd000, ARCOMPACT, 0, 0 ,0,0},
3666 
3667 /* lsl_s b,b,c; 01111 bbb ccc 11000 */
3668  { "lsl_s %b,%b,%c", 0xf81f, 0x7818, ARCOMPACT, 0, 0 ,0,0},
3669 /* lsl_s c,b,u3; 01101 bbb ccc 10 uuu */
3670  { "lsl_s %c,%b,%e", 0xf818, 0x6810, ARCOMPACT, 0, 0 ,0,0},
3671 /* lsl_s b,b,u5; 10111 bbb 000 uuuuu */
3672  { "lsl_s %b,%b,%E", 0xf8e0, 0xb800, ARCOMPACT, 0, 0 ,0,0},
3673 /* lsl_s b,c; 01111 bbb ccc 11011 */
3674  { "lsl_s %b,%c", 0xf81f, 0x781b, ARCOMPACT, 0, 0 ,0,0},
3675 
3676 /* lsr_s b,b,c; 01111 bbb ccc 11001 */
3677  { "lsr_s %b,%b,%c", 0xf81f, 0x7819, ARCOMPACT, 0, 0 ,0,0},
3678 /* lsr_s b,b,u5; 10111 bbb 001 uuuuu */
3679  { "lsr_s %b,%b,%E", 0xf8e0, 0xb820, ARCOMPACT, 0, 0 ,0,0},
3680 /* lsr_s b,c; 01111 bbb ccc 11101 */
3681  { "lsr_s %b,%c", 0xf81f, 0x781d, ARCOMPACT, 0, 0 ,0,0},
3682 
3683 /* mov_s b,h; 01110 bbb hhh 01 hhh */
3684  { "mov_s %b,%U", 0xf818, 0x7008, ARCOMPACT, 0, 0 ,0,0},
3685 /* mov_s b,u8; 11011 bbb uuuuuuuu */
3686  { "mov_s %b,%J", 0xf800, 0xd800, ARCOMPACT, 0, 0 ,0,0},
3687 /* mov_s b,limm; 01110 bbb 110 01 111 [L] */
3688  { "mov_s%Q %b,%L", 0xf8ff, 0x70cf, ARCOMPACT, 0, 0 ,0,0},
3689 /* mov_s h,b; 01110 bbb hhh 11 hhh */
3690  { "mov_s %U,%b", 0xf818, 0x7018, ARCOMPACT, 0, 0 ,0,0},
3691 /* mov_s 0,b; 01110 bbb 110 11 111 */
3692  { "mov_s 0,%b", 0xf8ff, 0x70df, ARCOMPACT, 0, 0 ,0,0},
3693 
3694 /* mul64_s 0,b,c; 01111 bbb ccc 01100 */
3695  { "mul64_s 0,%b,%c", 0xf81f, 0x780c, ARCOMPACT, 0, 0 ,0,0},
3696 
3697 /* neg_s b,c; 01111 bbb ccc 10011 */
3698  { "neg_s %b,%c", 0xf81f, 0x7813, ARCOMPACT, 0, 0 ,0,0},
3699 
3700 /* not_s b,c; 01111 bbb ccc 10010 */
3701  { "not_s %b,%c", 0xf81f, 0x7812, ARCOMPACT, 0, 0 ,0,0},
3702 
3703 /* nop_s ; 01111 000 111 00000 */
3704  { "nop_s", 0xffff, 0x78e0, ARCOMPACT, 0, 0 ,0,0},
3705 
3706 /* unimp_s ; 01111 001 111 00000 */
3707 /* ARC700 addition */
3708  { "unimp_s", 0xffff, 0x79e0, ARC_MACH_ARC7, 0, 0 ,0,0},
3709 
3710 /* or_s b,b,c; 01111 bbb ccc 00101 */
3711  { "or_s %b,%b,%c", 0xf81f, 0x7805, ARCOMPACT, 0, 0 ,0,0},
3712 
3713 /* pop_s b; 11000 bbb 110 00001 */
3714  { "pop_s %b", 0xf8ff, 0xc0c1, ARCOMPACT, 0, 0 ,0,0},
3715 /* pop_s blink; 11000 rrr 110 10001 */
3716  { "pop_s %9", 0xffff, 0xc0d1, ARCOMPACT, 0, 0 ,0,0},
3717 
3718 /* push_s b; 11000 bbb 111 00001 */
3719  { "push_s %b", 0xf8ff, 0xc0e1, ARCOMPACT, 0, 0 ,0,0},
3720 /* push_s blink; 11000 rrr 111 10001 */
3721  { "push_s %9", 0xffff, 0xc0f1, ARCOMPACT, 0, 0 ,0,0},
3722 
3723 /* sexb_s b,c; 01111 bbb ccc 01101 */
3724  { "sexb_s %b,%c", 0xf81f, 0x780d, ARCOMPACT, 0, 0 ,0,0},
3725 
3726 /* sexw_s b,c; 01111 bbb ccc 01110 */
3727  { "sexw_s %b,%c", 0xf81f, 0x780e, ARCOMPACT, 0, 0 ,0,0},
3728 
3729 /* st_s b,[sp,u7]; 11000 bbb 010 uuuuu */
3730  { "st_s %b,[%6,%l]", 0xf8e0, 0xc040, ARCOMPACT, 0, 0 ,0,0},
3731  { "st_s %b,[%6]", 0xf8e0, 0xc040, ARCOMPACT, 0, 0 ,0,0},
3732 /* stb_s b,[sp,u7]; 11000 bbb 011 uuuuu */
3733  { "stb_s %b,[%6,%l]", 0xf8e0, 0xc060, ARCOMPACT, 0, 0 ,0,0},
3734  { "stb_s %b,[%6]", 0xf8e0, 0xc060, ARCOMPACT, 0, 0 ,0,0},
3735 /* st_s c,[b,u7]; 10100 bbb ccc uuuuu */
3736  { "st_s %c,[%b,%l]", 0xf800, 0xa000, ARCOMPACT, 0, 0 ,0,0},
3737  { "st_s %c,[%b]", 0xf800, 0xa000, ARCOMPACT, 0, 0 ,0,0},
3738 /* stb_s c,[b,u5]; 10101 bbb ccc uuuuu */
3739  { "stb_s %c,[%b,%E]", 0xf800, 0xa800, ARCOMPACT, 0, 0 ,0,0},
3740  { "stb_s %c,[%b]", 0xf800, 0xa800, ARCOMPACT, 0, 0 ,0,0},
3741 /* stw_s c,[b,u6]; 10110 bbb ccc uuuuu */
3742  { "stw_s %c,[%b,%k]", 0xf800, 0xb000, ARCOMPACT, 0, 0 ,0,0},
3743  { "stw_s %c,[%b]", 0xf800, 0xb000, ARCOMPACT, 0, 0 ,0,0},
3744 
3745 /* sub_s b,b,c; 01111 bbb ccc 00010 */
3746  { "sub_s %b,%b,%c", 0xf81f, 0x7802, ARCOMPACT, 0, 0 ,0,0},
3747 /* sub_s c,b,u3; 01101 bbb ccc 01 uuu */
3748  { "sub_s %c,%b,%e", 0xf818, 0x6808, ARCOMPACT, 0, 0 ,0,0},
3749 /* sub_s b,b,u5; 10111 bbb 011 uuuuu */
3750  { "sub_s %b,%b,%E", 0xf8e0, 0xb860, ARCOMPACT, 0, 0 ,0,0},
3751 /* sub_s sp,sp,u7; 11000 001 101 uuuuu */
3752  { "sub_s %6,%6,%l", 0xffe0, 0xc1a0, ARCOMPACT, 0, 0 ,0,0},
3753 /* sub_s.ne b,b,b; 01111 bbb 110 00000 */
3754  { "sub_s.ne %b,%b,%b", 0xf8ff, 0x78c0, ARCOMPACT, 0, 0 ,0,0},
3755 
3756 /* trap_s unsigned 6 ; ARC A700 new instruction 01111 1uuuuuu 11110*/
3757  { "trap_s %@", 0xffff, 0x781E, ARC_MACH_ARC7, 0, 0 ,0,0},
3758 
3759 /* tst_s b,c; 01111 bbb ccc 01011 */
3760  { "tst_s %b,%c", 0xf81f, 0x780b, ARCOMPACT, 0, 0 ,0,0},
3761 
3762 /* xor_s b,b,c; 01111 bbb ccc 00111 */
3763  { "xor_s %b,%b,%c", 0xf81f, 0x7807, ARCOMPACT, 0, 0 ,0,0},
3764 
3765  { "nop", 0xffffffff, 0x264a7000, ARCOMPACT, 0, 0 ,0,0},
3766 
3767 /* MPYW & MPYUW -- 16-bit multiply instructions. */
3768  { "mpyw%.f %A,%B,%C%F", 0xf8ff0000, 0x201e0000, ARCOMPACT, 0, 0 ,0, 0},
3769  { "mpyw%.f %A,%B,%u%F", 0xf8ff0000, 0x205e0000, ARCOMPACT, 0, 0 ,0, 0},
3770  { "mpyw%.f %#,%B,%K%F", 0xf8ff0000, 0x209e0000, ARCOMPACT, 0, 0 ,0, 0},
3771  { "mpyw%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x201e0f80, ARCOMPACT, 0, 0 ,0, 0},
3772  { "mpyw%.f%Q %A,%L,%C%F", 0xffff7000, 0x261e7000, ARCOMPACT, 0, 0 ,0, 0},
3773  { "mpyw%.f%Q %A,%L,%u%F", 0xffff7000, 0x265e7000, ARCOMPACT, 0, 0 ,0, 0},
3774  { "mpyw%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x261e7f80, ARCOMPACT, 0, 0 ,0, 0},
3775  { "mpyw%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20de0000, ARCOMPACT, 0, 0 ,0, 0},
3776  { "mpyw%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20de0000, ARCOMPACT, 0, 0 ,0, 0},
3777  { "mpyw%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20de0020, ARCOMPACT, 0, 0 ,0, 0},
3778  { "mpyw%.q%.f %#,%u,%B%F", 0xf8ff00f0, 0x20de0020, ARCOMPACT, 0, 0 ,0, 0},
3779  { "mpyw%.q%.f%Q %#,%B,%L%F", 0xf8ff0fe0, 0x20de0f80, ARCOMPACT, 0, 0 ,0, 0},
3780  { "mpyw%.q%.f%Q %#,%L,%B%F", 0xf8ff0fe0, 0x20de0f80, ARCOMPACT, 0, 0 ,0, 0},
3781  { "mpyw%.f 0,%B,%C%F", 0xf8ff003f, 0x201e003e, ARCOMPACT, 0, 0 ,0, 0},
3782  { "mpyw%.f 0,%B,%u%F", 0xf8ff003f, 0x205e003e, ARCOMPACT, 0, 0 ,0, 0},
3783  { "mpyw%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x201e0fbe, ARCOMPACT, 0, 0 ,0, 0},
3784  { "mpyw%.f%Q 0,%L,%C%F", 0xffff703f, 0x261e703e, ARCOMPACT, 0, 0 ,0, 0},
3785  { "mpyw%.f%Q 0,%L,%u%F", 0xffff703f, 0x265e703e, ARCOMPACT, 0, 0 ,0, 0},
3786  { "mpyw%.f%Q 0,%L,%K%F", 0xffff7000, 0x269e7000, ARCOMPACT, 0, 0 ,0, 0},
3787  { "mpyw%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26de7000, ARCOMPACT, 0, 0 ,0, 0},
3788  { "mpyw%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26de7020, ARCOMPACT, 0, 0 ,0, 0},
3789  { "mpyw%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26de7f80, ARCOMPACT, 0, 0 ,0, 0},
3790 
3791  { "mpyuw%.f %A,%B,%C%F", 0xf8ff0000, 0x201f0000, ARCOMPACT, 0, 0 ,0, 0},
3792  { "mpyuw%.f %A,%B,%u%F", 0xf8ff0000, 0x205f0000, ARCOMPACT, 0, 0 ,0, 0},
3793  { "mpyuw%.f %#,%B,%K%F", 0xf8ff0000, 0x209f0000, ARCOMPACT, 0, 0 ,0, 0},
3794  { "mpyuw%.f%Q %A,%B,%L%F", 0xf8ff0fc0, 0x201f0f80, ARCOMPACT, 0, 0 ,0, 0},
3795  { "mpyuw%.f%Q %A,%L,%C%F", 0xffff7000, 0x261f7000, ARCOMPACT, 0, 0 ,0, 0},
3796  { "mpyuw%.f%Q %A,%L,%u%F", 0xffff7000, 0x265f7000, ARCOMPACT, 0, 0 ,0, 0},
3797  { "mpyuw%.f%Q %A,%L,%L%F", 0xffff7fc0, 0x261f7f80, ARCOMPACT, 0, 0 ,0, 0},
3798  { "mpyuw%.q%.f %#,%B,%C%F", 0xf8ff0020, 0x20df0000, ARCOMPACT, 0, 0 ,0, 0},
3799  { "mpyuw%.q%.f %#,%C,%B%F", 0xf8ff0020, 0x20df0000, ARCOMPACT, 0, 0 ,0, 0},
3800  { "mpyuw%.q%.f %#,%B,%u%F", 0xf8ff00f0, 0x20df0020, ARCOMPACT, 0, 0 ,0, 0},
3801  { "mpyuw%.q%.f %#,%u,%B%F", 0xf8ff00f0, 0x20df0020, ARCOMPACT, 0, 0 ,0, 0},
3802  { "mpyuw%.q%.f%Q %#,%B,%L%F",0xf8ff0fe0, 0x20df0f80, ARCOMPACT, 0, 0 ,0, 0},
3803  { "mpyuw%.q%.f%Q %#,%L,%B%F",0xf8ff0fe0, 0x20df0f80, ARCOMPACT, 0, 0 ,0, 0},
3804  { "mpyuw%.f 0,%B,%C%F", 0xf8ff003f, 0x201f003e, ARCOMPACT, 0, 0 ,0, 0},
3805  { "mpyuw%.f 0,%B,%u%F", 0xf8ff003f, 0x205f003e, ARCOMPACT, 0, 0 ,0, 0},
3806  { "mpyuw%.f%Q 0,%B,%L%F", 0xf8ff0fff, 0x201f0fbe, ARCOMPACT, 0, 0 ,0, 0},
3807  { "mpyuw%.f%Q 0,%L,%C%F", 0xffff703f, 0x261f703e, ARCOMPACT, 0, 0 ,0, 0},
3808  { "mpyuw%.f%Q 0,%L,%u%F", 0xffff703f, 0x265f703e, ARCOMPACT, 0, 0 ,0, 0},
3809  { "mpyuw%.f%Q 0,%L,%K%F", 0xffff7000, 0x269f7000, ARCOMPACT, 0, 0 ,0, 0},
3810  { "mpyuw%.q%.f%Q 0,%L,%C%F", 0xffff7020, 0x26df7000, ARCOMPACT, 0, 0 ,0, 0},
3811  { "mpyuw%.q%.f%Q 0,%L,%u%F", 0xffff7020, 0x26df7020, ARCOMPACT, 0, 0 ,0, 0},
3812  { "mpyuw%.q%.f%Q 0,%L,%L%F", 0xffff7fff, 0x26df7f80, ARCOMPACT, 0, 0 ,0, 0},
3813 };
3814 
3815 
3816 /* Register names table for ARCtangent-A4 */
3817 
3818 static const struct arc_operand_value arc_reg_names_a4[] =
3819 {
3820  /* Sort this so that the first 61 entries are sequential.
3821  IE: For each i (i<61), arc_reg_names[i].value == i. */
3822 
3823  { "r0", 0, REG, 0 }, { "r1", 1, REG, 0 }, { "r2", 2, REG, 0 },
3824  { "r3", 3, REG, 0 }, { "r4", 4, REG, 0 }, { "r5", 5, REG, 0 },
3825  { "r6", 6, REG, 0 }, { "r7", 7, REG, 0 }, { "r8", 8, REG, 0 },
3826  { "r9", 9, REG, 0 },
3827  { "r10", 10, REG, 0 }, { "r11", 11, REG, 0 }, { "r12", 12, REG, 0 },
3828  { "r13", 13, REG, 0 }, { "r14", 14, REG, 0 }, { "r15", 15, REG, 0 },
3829  { "r16", 16, REG, 0 }, { "r17", 17, REG, 0 }, { "r18", 18, REG, 0 },
3830  { "r19", 19, REG, 0 }, { "r20", 20, REG, 0 }, { "r21", 21, REG, 0 },
3831  { "r22", 22, REG, 0 }, { "r23", 23, REG, 0 }, { "r24", 24, REG, 0 },
3832  { "r25", 25, REG, 0 }, { "r26", 26, REG, 0 }, { "r27", 27, REG, 0 },
3833  { "r28", 28, REG, 0 }, { "r29", 29, REG, 0 }, { "r30", 30, REG, 0 },
3834  { "r31", 31, REG, 0 },
3835  { "r60", 60, REG, 0 },
3836  { "fp", 27, REG, 0 }, { "sp", 28, REG, 0 },
3837  { "ilink1", 29, REG, 0 }, { "ilink2", 30, REG, 0 }, { "blink", 31, REG, 0 },
3838  { "lp_count", 60, REG, 0 },
3839 
3840  /* Standard auxiliary registers. */
3841  { "status", 0x00, AUXREG, ARC_REGISTER_READONLY },
3842  { "semaphore", 0x01, AUXREG, 0 },
3843  { "lp_start", 0x02, AUXREG, 0 },
3844  { "lp_end", 0x03, AUXREG, 0 },
3845  { "identity", 0x04, AUXREG, ARC_REGISTER_READONLY },
3846  { "debug", 0x05, AUXREG, 0 },
3847  /* Extension auxilary registers */
3848  { "ivic", 0x10, AUXREG, ARC_REGISTER_WRITEONLY },
3849  { "ch_mode_ctl", 0x11, AUXREG, 0 },
3850  { "lockline", 0x13, AUXREG, 0 },
3851  { "code_ram", 0x14, AUXREG, 0 },
3852  { "tag_addr_mask", 0x15, AUXREG, 0 },
3853  { "tag_data_mask", 0x16, AUXREG, 0 },
3854  { "line_length_mask", 0x17, AUXREG, 0 },
3855  { "local_ram", 0x18, AUXREG, 0 },
3856  { "unlockline", 0x19, AUXREG, 0 },
3857  { "sram_seq", 0x20, AUXREG, 0 },
3858  { "timer", 0x21, AUXREG, 0 },
3859  { "tcontrol", 0x22, AUXREG, 0 },
3860  { "hint", 0x23, AUXREG, ARC_REGISTER_WRITEONLY },
3861  { "pcport", 0x24, AUXREG, ARC_REGISTER_WRITEONLY },
3862  { "sp1_ctrl", 0x30, AUXREG, 0 },
3863  { "sp1_val", 0x31, AUXREG, 0 },
3864  { "sp2_ctrl", 0x32, AUXREG, 0 },
3865  { "sp2_val", 0x33, AUXREG, 0 },
3866  { "sp3_ctrl", 0x34, AUXREG, 0 },
3867  { "sp3_val", 0x35, AUXREG, 0 },
3868  { "burst_size", 0x38, AUXREG, 0 },
3869  { "scratch_a", 0x39, AUXREG, 0 },
3870  { "load_a", 0x3A, AUXREG, 0 },
3871  { "store_a", 0x3B, AUXREG, 0 },
3872  { "bm_status", 0x3C, AUXREG, ARC_REGISTER_READONLY },
3873  { "xtp_newval", 0x40, AUXREG, 0 },
3874  { "macmode", 0x41, AUXREG, 0 },
3875  { "lsp_newval", 0x42, AUXREG, 0 },
3876  { "status32", 0xa, AUXREG, ARC_REGISTER_READONLY },
3877  { "status32_l1", 0xb, AUXREG, 0 },
3878  { "status32_l2", 0xc, AUXREG, 0 },
3879  { "int_vector_base",0x25, AUXREG, 0 }
3880 };
3881 
3882 
3883 /* Register names table for ARC A500 and A600*/
3884 static const struct arc_operand_value arc_reg_names_a500600[] =
3885 {
3886  /* Sort this so that the first 61 entries are sequential.
3887  IE: For each i (i<61), arc_reg_names[i].value == i. */
3888 
3889  { "r0", 0, REG_AC, 0 }, { "r1", 1, REG_AC, 0 }, { "r2", 2, REG_AC, 0 },
3890  { "r3", 3, REG_AC, 0 }, { "r4", 4, REG_AC, 0 }, { "r5", 5, REG_AC, 0 },
3891  { "r6", 6, REG_AC, 0 }, { "r7", 7, REG_AC, 0 }, { "r8", 8, REG_AC, 0 },
3892  { "r9", 9, REG_AC, 0 },
3893  { "r10", 10, REG_AC, 0 }, { "r11", 11, REG_AC, 0 }, { "r12", 12, REG_AC, 0 },
3894  { "r13", 13, REG_AC, 0 }, { "r14", 14, REG_AC, 0 }, { "r15", 15, REG_AC, 0 },
3895  { "r16", 16, REG_AC, 0 }, { "r17", 17, REG_AC, 0 }, { "r18", 18, REG_AC, 0 },
3896  { "r19", 19, REG_AC, 0 }, { "r20", 20, REG_AC, 0 }, { "r21", 21, REG_AC, 0 },
3897  { "r22", 22, REG_AC, 0 }, { "r23", 23, REG_AC, 0 }, { "r24", 24, REG_AC, 0 },
3898  { "r25", 25, REG_AC, 0 }, { "r26", 26, REG_AC, 0 }, { "r27", 27, REG_AC, 0 },
3899  { "r28", 28, REG_AC, 0 }, { "r29", 29, REG_AC, 0 }, { "r30", 30, REG_AC, 0 },
3900  { "r31", 31, REG_AC, 0 },
3901  { "gp", 26, REG_AC, 0 }, { "fp", 27, REG_AC, 0 }, { "sp", 28, REG_AC, 0 },
3902  { "ilink1", 29, REG_AC, 0 },
3903  { "ilink2", 30, REG_AC, 0 },
3904  { "blink", 31, REG_AC, 0 },
3905  { "lp_count", 60, REG_AC, 0 }, { "r60", 60, REG_AC, 0 },
3906  { "pcl", 63, REG_AC, ARC_REGISTER_READONLY },
3907  { "r63", 63, REG_AC, ARC_REGISTER_READONLY },
3908 
3909  /* General Purpose Registers for ARCompact 16-bit insns */
3910 
3911  { "r0", 0, REG_AC, ARC_REGISTER_16 }, { "r1", 1, REG_AC, ARC_REGISTER_16 },
3912  { "r2", 2, REG_AC, ARC_REGISTER_16 }, { "r3", 3, REG_AC, ARC_REGISTER_16 },
3913  { "r12", 4, REG_AC, ARC_REGISTER_16 }, { "r13", 5, REG_AC, ARC_REGISTER_16 },
3914  { "r14", 6, REG_AC, ARC_REGISTER_16 }, { "r15", 7, REG_AC, ARC_REGISTER_16 },
3915 
3916  /* Standard auxiliary registers. */
3917  { "status", 0x00, AUXREG_AC, ARC_REGISTER_READONLY },
3918  { "semaphore", 0x01, AUXREG_AC, 0 },
3919  { "lp_start", 0x02, AUXREG_AC, 0 },
3920  { "lp_end", 0x03, AUXREG_AC, 0 },
3921  { "identity", 0x04, AUXREG_AC, ARC_REGISTER_READONLY },
3922  { "debug", 0x05, AUXREG_AC, ARC_REGISTER_READONLY },
3923  { "pc", 0x06, AUXREG_AC, ARC_REGISTER_READONLY },
3924  { "status32", 0xa, AUXREG_AC, ARC_REGISTER_READONLY },
3925  { "status32_l1", 0xb, AUXREG_AC, 0 },
3926  { "status32_l2", 0xc, AUXREG_AC, 0 },
3927  { "int_vector_base",0x25, AUXREG_AC, 0 },
3928  /* Optional extension auxiliary registers */
3929  { "multiply_build", 0x7b, AUXREG_AC, ARC_REGISTER_READONLY },
3930  { "swap_build", 0x7c, AUXREG_AC, ARC_REGISTER_READONLY },
3931  { "norm_build", 0x7d, AUXREG_AC, ARC_REGISTER_READONLY },
3932  { "barrel_build", 0x7f, AUXREG_AC, ARC_REGISTER_READONLY },
3933 };
3934 
3935 
3936 /* Register names table for ARC 700 */
3937 static const struct arc_operand_value arc_reg_names_a700[] =
3938 {
3939  /* Sort this so that the first 61 entries are sequential.
3940  IE: For each i (i<61), arc_reg_names[i].value == i. */
3941 
3942  { "r0", 0, REG_AC, 0 }, { "r1", 1, REG_AC, 0 }, { "r2", 2, REG_AC, 0 },
3943  { "r3", 3, REG_AC, 0 }, { "r4", 4, REG_AC, 0 }, { "r5", 5, REG_AC, 0 },
3944  { "r6", 6, REG_AC, 0 }, { "r7", 7, REG_AC, 0 }, { "r8", 8, REG_AC, 0 },
3945  { "r9", 9, REG_AC, 0 },
3946  { "r10", 10, REG_AC, 0 }, { "r11", 11, REG_AC, 0 }, { "r12", 12, REG_AC, 0 },
3947  { "r13", 13, REG_AC, 0 }, { "r14", 14, REG_AC, 0 }, { "r15", 15, REG_AC, 0 },
3948  { "r16", 16, REG_AC, 0 }, { "r17", 17, REG_AC, 0 }, { "r18", 18, REG_AC, 0 },
3949  { "r19", 19, REG_AC, 0 }, { "r20", 20, REG_AC, 0 }, { "r21", 21, REG_AC, 0 },
3950  { "r22", 22, REG_AC, 0 }, { "r23", 23, REG_AC, 0 }, { "r24", 24, REG_AC, 0 },
3951  { "r25", 25, REG_AC, 0 }, { "r26", 26, REG_AC, 0 }, { "r27", 27, REG_AC, 0 },
3952  { "r28", 28, REG_AC, 0 }, { "r29", 29, REG_AC, 0 }, { "r30", 30, REG_AC, 0 },
3953  { "r31", 31, REG_AC, 0 },
3954  { "gp", 26, REG_AC, 0 }, { "fp", 27, REG_AC, 0 }, { "sp", 28, REG_AC, 0 },
3955  { "ilink1", 29, REG_AC, 0 },
3956  { "ilink2", 30, REG_AC, 0 },
3957  { "blink", 31, REG_AC, 0 },
3958  { "lp_count", 60, REG_AC, 0 }, { "r60", 60, REG_AC, 0 },
3959  { "pcl", 63, REG_AC, ARC_REGISTER_READONLY },
3960  { "r63", 63, REG_AC, ARC_REGISTER_READONLY },
3961 
3962  /* General Purpose Registers for ARCompact 16-bit insns */
3963 
3964  { "r0", 0, REG_AC, ARC_REGISTER_16 }, { "r1", 1, REG_AC, ARC_REGISTER_16 },
3965  { "r2", 2, REG_AC, ARC_REGISTER_16 }, { "r3", 3, REG_AC, ARC_REGISTER_16 },
3966  { "r12", 4, REG_AC, ARC_REGISTER_16 }, { "r13", 5, REG_AC, ARC_REGISTER_16 },
3967  { "r14", 6, REG_AC, ARC_REGISTER_16 }, { "r15", 7, REG_AC, ARC_REGISTER_16 },
3968 
3969 
3970  /* Standard auxiliary registers. */
3971  { "status", 0x00, AUXREG_AC, ARC_REGISTER_READONLY },
3972  { "semaphore", 0x01, AUXREG_AC, 0 },
3973  { "lp_start", 0x02, AUXREG_AC, 0 },
3974  { "lp_end", 0x03, AUXREG_AC, 0 },
3975  { "identity", 0x04, AUXREG_AC, ARC_REGISTER_READONLY },
3976  { "debug", 0x05, AUXREG_AC, ARC_REGISTER_READONLY },
3977  { "pc", 0x06, AUXREG_AC, ARC_REGISTER_READONLY },
3978  { "status32", 0xa, AUXREG_AC, ARC_REGISTER_READONLY },
3979  { "status32_l1", 0xb, AUXREG_AC, 0 },
3980  { "status32_l2", 0xc, AUXREG_AC, 0 },
3981  { "int_vector_base",0x25, AUXREG_AC, 0 },
3982  { "aux_irq_lv12" , 0x43, AUXREG_AC, 0 },
3983  /* Optional extension auxiliary registers */
3984  /* START ARC LOCAL */
3985  /* Data Cache Flush */
3986  { "dc_startr", 0x4d, AUXREG_AC, 0 },
3987  { "dc_endr", 0x4e, AUXREG_AC, 0 },
3988  /* Time Stamp Counter */
3989  { "tsch", 0x58, AUXREG_AC, 0 },
3990  /* END ARC LOCAL */
3991  { "multiply_build", 0x7b, AUXREG_AC, ARC_REGISTER_READONLY },
3992  { "swap_build", 0x7c, AUXREG_AC, ARC_REGISTER_READONLY },
3993  { "norm_build", 0x7d, AUXREG_AC, ARC_REGISTER_READONLY },
3994  { "barrel_build", 0x7f, AUXREG_AC, ARC_REGISTER_READONLY },
3995  { "aux_irq_lev", 0x200,AUXREG_AC,0 },
3996  { "aux_irq_hint",0x201,AUXREG_AC, 0 },
3997  /* Some Tazer specific auxillary registers */
3998  { "eret", 0x400, AUXREG_AC, 0 }, /* Exception Return Address */
3999  { "erbta", 0x401, AUXREG_AC, 0}, /* Exception Return Branch Target Address */
4000  { "erstatus", 0x402,AUXREG_AC, 0},/* Exception Return Status */
4001  { "ecr" , 0x403, AUXREG_AC, 0 } , /* Exception Cause Register */
4002  { "efa" , 0x404, AUXREG_AC, 0 } , /* Exception Fault Address */
4003  /* Level 1 Interrupt Cause */
4004  { "icause1", 0x40A, AUXREG_AC, ARC_REGISTER_READONLY } ,
4005  /* Level 2 Interrupt Cause */
4006  { "icause2", 0x40B, AUXREG_AC, ARC_REGISTER_READONLY } ,
4007 
4008  { "auxienable",0x40C, AUXREG_AC, 0 } , /* Interrupt Mask Programming */
4009  { "auxitrigger",0x40D, AUXREG_AC, 0} , /* Interrupt Sensitivity Programming */
4010  { "xpu" , 0x410, AUXREG_AC, 0 } , /* User Mode Extension Enables */
4011  { "xpk" , 0x411, AUXREG_AC, 0 } , /* Kernel Mode Extension Enables */
4012  { "bta_l1" , 0x413, AUXREG_AC, 0} , /* Level 1 Return Branch Target */
4013  { "bta_l2" ,0x414, AUXREG_AC, 0 } , /* Level 2 Return Branch Target */
4014  /* Interrupt Edge Cancel */
4015  { "aux_irq_edge_cancel",0x415,AUXREG_AC, ARC_REGISTER_WRITEONLY } ,
4016  /* Interrupt Pending Cancel */
4017  { "aux_irq_pending" , 0x416,AUXREG_AC, ARC_REGISTER_READONLY},
4018 
4019  /* Build Control Registers */
4020  /* DCCM BCR */
4021  { "dccm_base_build_bcr", 0x61, AUXREG_AC, ARC_REGISTER_READONLY},
4022  { "DCCM_BASE_BUILD_BCR", 0x61, AUXREG_AC, ARC_REGISTER_READONLY},
4023  /* CRC Build BCR */
4024  { "crc_build_bcr", 0x62, AUXREG_AC, ARC_REGISTER_READONLY},
4025  { "CRC_BUILD_BCR", 0x62, AUXREG_AC, ARC_REGISTER_READONLY},
4026  /* BTA Build BCR Signifies the presence of BTA_L1/ L2 registers */
4027  { "bta_link_build", 0x63,AUXREG_AC, ARC_REGISTER_READONLY},
4028  { "BTA_LINK_BUILD", 0x63,AUXREG_AC, ARC_REGISTER_READONLY},
4029  /* Dual Viterbi Butterfly BCR . Signifies presence of that instruction*/
4030  { "DVBF_BUILD",0x64,AUXREG_AC, ARC_REGISTER_READONLY},
4031  { "dvbf_build",0x64,AUXREG_AC, ARC_REGISTER_READONLY},
4032  /* Extended Arithmetic Instructions are present */
4033  { "tel_instr_build",0x65,AUXREG_AC, ARC_REGISTER_READONLY},
4034  { "TEL_INSTR_BUILD",0x65,AUXREG_AC, ARC_REGISTER_READONLY},
4035  /* Memory Subsystem BCR Information regarding the endian-ness etc. */
4036  { "memsubsys",0x67,AUXREG_AC, ARC_REGISTER_READONLY},
4037  { "MEMSUBSYS",0x67,AUXREG_AC, ARC_REGISTER_READONLY},
4038  /* Interrupt vector base register */
4039  {"vecbase_ac_build",0x68,AUXREG_AC, ARC_REGISTER_READONLY},
4040  {"VECBASE_AC_BUILD",0x68,AUXREG_AC, ARC_REGISTER_READONLY},
4041  /* Peripheral base address register */
4042  { "p_base_addr",0x69,AUXREG_AC, ARC_REGISTER_READONLY},
4043  { "P_BASE_ADDR",0x69,AUXREG_AC, ARC_REGISTER_READONLY},
4044  /* MMU BCR . Specifies the associativity of the TLB etc. */
4045  {"mmu_build",0x6F,AUXREG_AC, ARC_REGISTER_READONLY},
4046  {"MMU_BUILD",0x6F,AUXREG_AC, ARC_REGISTER_READONLY},
4047  /* ARC Angel BCR . Specifies the version of the ARC Angel Dev. Board */
4048  { "arcangel_build",0x70,AUXREG_AC, ARC_REGISTER_READONLY},
4049  { "ARCANGEL_BUILD",0x70,AUXREG_AC, ARC_REGISTER_READONLY},
4050  /* Data Cache BCR . Associativity/Line Size/ size of the Data Cache etc. */
4051  {"dcache_build",0x72,AUXREG_AC, ARC_REGISTER_READONLY},
4052  {"DCACHE_BUILD",0x72,AUXREG_AC, ARC_REGISTER_READONLY},
4053  /* Information regarding multiple arc debug interfaces */
4054  {"madi_build",0x73,AUXREG_AC, ARC_REGISTER_READONLY},
4055  {"MADI_BUILD",0x73,AUXREG_AC, ARC_REGISTER_READONLY},
4056  /* BCR for data closely coupled memory */
4057  {"dccm_build",0x74,AUXREG_AC, ARC_REGISTER_READONLY},
4058  {"DCCM_BUILD",0x74,AUXREG_AC, ARC_REGISTER_READONLY},
4059  /* BCR for timers */
4060  {"timer_build",0x75,AUXREG_AC, ARC_REGISTER_READONLY},
4061  {"TIMER_BUILD",0x75,AUXREG_AC, ARC_REGISTER_READONLY},
4062  /* Actionpoints build */
4063  {"ap_build",0x76,AUXREG_AC, ARC_REGISTER_READONLY},
4064  {"AP_BUILD",0x76,AUXREG_AC, ARC_REGISTER_READONLY},
4065  /* Instruction Cache BCR */
4066  {"icache_build",0x77,AUXREG_AC, ARC_REGISTER_READONLY},
4067  {"ICACHE_BUILD",0x77,AUXREG_AC, ARC_REGISTER_READONLY},
4068  /* BCR for Instruction Closely Coupled Memory.
4069  Used to be BCR for Saturated ADD/SUB.
4070  */
4071  {"iccm_build",0x78,AUXREG_AC, ARC_REGISTER_READONLY},
4072  {"ICCM_BUILD",0x78,AUXREG_AC, ARC_REGISTER_READONLY},
4073  /* BCR for X/Y Memory */
4074  {"dspram_build",0x79,AUXREG_AC, ARC_REGISTER_READONLY},
4075  {"DSPRAM_BUILD",0x79,AUXREG_AC, ARC_REGISTER_READONLY},
4076  /* BCR for MAC / MUL */
4077  {"mac_build",0x7A,AUXREG_AC, ARC_REGISTER_READONLY},
4078  {"MAC_BUILD",0x7A,AUXREG_AC, ARC_REGISTER_READONLY},
4079  /* BCR for old 32 * 32 Multiply */
4080  {"multiply_build",0x7B,AUXREG_AC, ARC_REGISTER_READONLY},
4081  {"MULTIPLY_BUILD",0x7B,AUXREG_AC, ARC_REGISTER_READONLY},
4082 
4083  /* BCR for swap */
4084  {"swap_build",0x7C,AUXREG_AC, ARC_REGISTER_READONLY},
4085  {"SWAP_BUILD",0x7C,AUXREG_AC, ARC_REGISTER_READONLY},
4086  /* BCR For Norm */
4087  {"norm_build",0x7D,AUXREG_AC, ARC_REGISTER_READONLY},
4088  {"NORM_BUILD",0x7D,AUXREG_AC, ARC_REGISTER_READONLY},
4089  /* BCR for Min / Max instructions */
4090  {"minmax_build",0x7E,AUXREG_AC, ARC_REGISTER_READONLY},
4091  {"MINMAX_BUILD",0x7E,AUXREG_AC, ARC_REGISTER_READONLY},
4092  /* BCR for barrel shifter */
4093  {"barrel_build",0x7F,AUXREG_AC, ARC_REGISTER_READONLY},
4094  {"BARREL_BUILD",0x7F,AUXREG_AC, ARC_REGISTER_READONLY}
4095 
4096 };
4097 
4098 
4099 
4102 
4103 
4104 
4105 /* The suffix table for ARCtangent-A4.
4106  Operands with the same name must be stored together. */
4107 
4108 static const struct arc_operand_value arc_suffixes_a4[] =
4109 {
4110  /* Entry 0 is special, default values aren't printed by the disassembler. */
4111  { "", 0, -1, 0 },
4112  { "al", 0, COND, 0 },
4113  { "ra", 0, COND, 0 },
4114  { "eq", 1, COND, 0 },
4115  { "z", 1, COND, 0 },
4116  { "ne", 2, COND, 0 },
4117  { "nz", 2, COND, 0 },
4118  { "p", 3, COND, 0 },
4119  { "pl", 3, COND, 0 },
4120  { "n", 4, COND, 0 },
4121  { "mi", 4, COND, 0 },
4122  { "c", 5, COND, 0 },
4123  { "cs", 5, COND, 0 },
4124  { "lo", 5, COND, 0 },
4125  { "nc", 6, COND, 0 },
4126  { "cc", 6, COND, 0 },
4127  { "hs", 6, COND, 0 },
4128  { "v", 7, COND, 0 },
4129  { "vs", 7, COND, 0 },
4130  { "nv", 8, COND, 0 },
4131  { "vc", 8, COND, 0 },
4132  { "gt", 9, COND, 0 },
4133  { "ge", 10, COND, 0 },
4134  { "lt", 11, COND, 0 },
4135  { "le", 12, COND, 0 },
4136  { "hi", 13, COND, 0 },
4137  { "ls", 14, COND, 0 },
4138  { "pnz", 15, COND, 0 },
4139  { "f", 1, FLAG, 0 },
4140  { "nd", ARC_DELAY_NONE, DELAY, 0 },
4141  { "d", ARC_DELAY_NORMAL, DELAY, 0 },
4142  { "jd", ARC_DELAY_JUMP, DELAY, 0 },
4143 /*{ "b", 7, SIZEEXT },*/
4144 /*{ "b", 5, SIZESEX },*/
4145  { "b", 1, SIZE1, 0 },
4146  { "b", 1, SIZE10, 0 },
4147  { "b", 1, SIZE22, 0 },
4148 /*{ "w", 8, SIZEEXT },*/
4149 /*{ "w", 6, SIZESEX },*/
4150  { "w", 2, SIZE1, 0 },
4151  { "w", 2, SIZE10, 0 },
4152  { "w", 2, SIZE22, 0 },
4153  { "x", 1, SIGN0, 0 },
4154  { "x", 1, SIGN9, 0 },
4155  { "a", 1, ADDRESS3, 0 },
4156  { "a", 1, ADDRESS12, 0 },
4157  { "a", 1, ADDRESS24, 0 },
4158  { "cc16", 16, COND, 0 },
4159  { "16", 16, COND, 0 },
4160  { "cc17", 17, COND, 0 },
4161  { "17", 17, COND, 0 },
4162  { "cc18", 18, COND, 0 },
4163  { "18", 18, COND, 0 },
4164  { "cc19", 19, COND, 0 },
4165  { "19", 19, COND, 0 },
4166  { "cc20", 20, COND, 0 },
4167  { "20", 20, COND, 0 },
4168  { "cc21", 21, COND, 0 },
4169  { "21", 21, COND, 0 },
4170  { "cc22", 22, COND, 0 },
4171  { "22", 22, COND, 0 },
4172  { "cc23", 23, COND, 0 },
4173  { "23", 23, COND, 0 },
4174  { "cc24", 24, COND, 0 },
4175  { "24", 24, COND, 0 },
4176  { "cc25", 25, COND, 0 },
4177  { "25", 25, COND, 0 },
4178  { "cc26", 26, COND, 0 },
4179  { "26", 26, COND, 0 },
4180  { "cc27", 27, COND, 0 },
4181  { "27", 27, COND, 0 },
4182  { "cc28", 28, COND, 0 },
4183  { "28", 28, COND, 0 },
4184  { "cc29", 29, COND, 0 },
4185  { "29", 29, COND, 0 },
4186  { "cc30", 30, COND, 0 },
4187  { "30", 30, COND, 0 },
4188  { "cc31", 31, COND, 0 },
4189  { "31", 31, COND, 0 },
4190  { "di", 1, CACHEBYPASS5, 0 },
4191  { "di", 1, CACHEBYPASS14, 0 },
4192  { "di", 1, CACHEBYPASS26, 0 },
4193 };
4194 
4195 
4196 /* The suffix table for ARCompact.
4197  Operands with the same name must be stored together. */
4198 
4199 static const struct arc_operand_value arc_suffixes_ac[] =
4200 {
4201  /* Entry 0 is special, default values aren't printed by the disassembler. */
4202  { "", 0, -1, 0 },
4203  { "al", 0, COND_AC, 0 },
4204  { "ra", 0, COND_AC, 0 },
4205  { "eq", 1, COND_AC, 0 },
4206  { "z", 1, COND_AC, 0 },
4207  { "ne", 2, COND_AC, 0 },
4208  { "nz", 2, COND_AC, 0 },
4209  { "p", 3, COND_AC, 0 },
4210  { "pl", 3, COND_AC, 0 },
4211  { "n", 4, COND_AC, 0 },
4212  { "mi", 4, COND_AC, 0 },
4213  { "c", 5, COND_AC, 0 },
4214  { "cs", 5, COND_AC, 0 },
4215  { "lo", 5, COND_AC, 0 },
4216  { "nc", 6, COND_AC, 0 },
4217  { "cc", 6, COND_AC, 0 },
4218  { "hs", 6, COND_AC, 0 },
4219  { "v", 7, COND_AC, 0 },
4220  { "vs", 7, COND_AC, 0 },
4221  { "nv", 8, COND_AC, 0 },
4222  { "vc", 8, COND_AC, 0 },
4223  { "gt", 9, COND_AC, 0 },
4224  { "ge", 10, COND_AC, 0 },
4225  { "lt", 11, COND_AC, 0 },
4226  { "le", 12, COND_AC, 0 },
4227  { "hi", 13, COND_AC, 0 },
4228  { "ls", 14, COND_AC, 0 },
4229  { "pnz", 15, COND_AC, 0 },
4230  { "ss" , 16, COND_AC, 0 },
4231  { "sc" , 17, COND_AC, 0 },
4232  { "f", 1, FLAG_AC, 0 },
4233  { "nd", ARC_DELAY_NONE, DELAY_AC, 0 },
4234  { "nd", ARC_DELAY_NONE, JUMP_DELAY_AC, 0 },
4235  { "d", ARC_DELAY_NORMAL, DELAY_AC, 0 },
4236  { "d", ARC_DELAY_NORMAL, JUMP_DELAY_AC, 0 },
4237  { "b", 1, SIZE1_AC, 0 },
4238  { "b", 1, SIZE7_AC, 0 },
4239  { "b", 1, SIZE17_AC, 0 },
4240  { "w", 2, SIZE1_AC, 0 },
4241  { "w", 2, SIZE7_AC, 0 },
4242  { "w", 2, SIZE17_AC, 0 },
4243  { "x", 1, SIGN6_AC, 0 },
4244  { "x", 1, SIGN16_AC, 0 },
4245  { "a", 1, ADDRESS3_AC, 0 },
4246  { "a", 1, ADDRESS9_AC, 0 },
4247  { "a", 1, ADDRESS22_AC, 0 },
4248  { "aw", 1, ADDRESS3_AC, 0 }, /* This is to handle the st instr */
4249  { "aw", 1, ADDRESS9_AC, 0 },
4250  { "aw", 1, ADDRESS22_AC, 0 },
4251  { "ab", 2, ADDRESS3_AC, 0 },
4252  { "ab", 2, ADDRESS9_AC, 0 },
4253  { "ab", 2, ADDRESS22_AC, 0 },
4254  { "as", 3, ADDRESS3_AC, 0 },
4255  { "as", 3, ADDRESS9_AC, 0 },
4256  { "as", 3, ADDRESS22_AC, 0 },
4257  { "as", 3, ADDRESS22S_AC, 0 },
4258  { "di", 1, CACHEBYPASS5_AC, 0 },
4259  { "di", 1, CACHEBYPASS11_AC, 0 },
4260  { "di", 1, CACHEBYPASS15_AC, 0 }
4261 };
4262 
4263 
4266 
4267 /* Indexed by first letter of opcode. Points to chain of opcodes with same
4268  first letter. */
4269 static struct arc_opcode *opcode_map[26 + 1];
4270 
4271 /* Indexed by insn code. Points to chain of opcodes with same insn code. */
4272 static struct arc_opcode *icode_map[32];
4273 
4274 
4275 /* -------------------------------------------------------------------------- */
4276 /* externally visible functions */
4277 /* -------------------------------------------------------------------------- */
4278 
4279 /* Translate a bfd_mach_arc_xxx value to a ARC_MACH_XXX value. */
4280 
4281 int
4282 arc_get_opcode_mach (int bfd_mach, int big_p)
4283 {
4284  static int mach_type_map[] =
4285  {
4286  ARC_MACH_ARC4,
4287  ARC_MACH_ARC5,
4288  ARC_MACH_ARC6,
4289  ARC_MACH_ARC7,
4291  };
4292 
4293  return mach_type_map[bfd_mach] | (big_p ? ARC_MACH_BIG : 0);
4294 }
4295 
4296 
4297 /* Initialize any tables that need it.
4298  Must be called once at start up (or when first needed).
4299 
4300  FLAGS is a set of bits that say what version of the cpu we have,
4301  and in particular at least (one of) ARC_MACH_XXX. */
4302 
4303 void
4305 {
4306  static int init_p = 0;
4307 
4308  /* If initialization was already done but current cpu type is different
4309  from the one for which initialization was done earlier, then do
4310  initialization again */
4311  if (init_p && cpu_type != flags) {
4312  init_p = 0;
4313  }
4314 
4315  cpu_type = flags;
4316 
4317  /* We may be intentionally called more than once (for example gdb will call
4318  us each time the user switches cpu). These tables only need to be init'd
4319  once though. */
4320  /* ??? We can remove the need for arc_opcode_supported by taking it into
4321  account here, but I'm not sure I want to do that yet (if ever). */
4322  if (!init_p)
4323  {
4324  int i;
4325 
4326  if (arc_mach_a4)
4327  {
4328  /* Initialize operand map table for ARCtanget-A4 */
4330 
4331  for (i = 0; i < (int)ELEMENTS_IN (arc_operands_a4); i++) {
4333  }
4334 
4335  /* Set the pointers to operand table, operand map table */
4342  }
4343  else
4344  {
4345  /* Initialize operand map table for ARCompact */
4347 
4348  for (i = 0; i < (int)ELEMENTS_IN (arc_operands_ac); i++) {
4350  }
4351 
4352  /* Set the pointers to operand table, operand map table */
4355 
4356  /* Codito :: Ideally all the checking should be on this
4357  basis and not on flags shared across the libraries as seems
4358  to be the case for A4. Would have to check that and test
4359  it at some point in time.
4360  */
4362  {
4365  }
4366  else
4367  {
4370  }
4373  }
4374 
4375  memset (opcode_map, 0, sizeof (opcode_map));
4376  memset (icode_map, 0, sizeof (icode_map));
4377 
4378  /* Scan the table backwards so macros appear at the front. */
4379  for (i = ELEMENTS_IN(arc_opcodes) - 1; i >= 0; --i)
4380  {
4381  int opcode_hash = ARC_HASH_OPCODE (arc_opcodes[i].syntax);
4382  int icode_hash = ARC_HASH_ICODE (arc_opcodes[i].value);
4383 
4384  arc_opcodes[i].next_asm = opcode_map[opcode_hash];
4385  opcode_map[opcode_hash] = &arc_opcodes[i];
4386 
4387  arc_opcodes[i].next_dis = icode_map[icode_hash];
4388  icode_map[icode_hash] = &arc_opcodes[i];
4389  }
4390 
4391  init_p = 1;
4392  }
4393 }
4394 
4395 
4396 /* Return non-zero if OPCODE is supported on the specified cpu.
4397  Cpu selection is made when calling `arc_opcode_init_tables'. */
4398 
4399 int
4400 arc_opcode_supported (const struct arc_opcode *opcode)
4401 {
4402  if (ARC_OPCODE_CPU (opcode->flags) == 0) {
4403  return 1;
4404  }
4405  if (ARC_OPCODE_CPU (opcode->flags) & ARC_HAVE_CPU (cpu_type)) {
4406  return 1;
4407  }
4408  return 0;
4409 }
4410 
4411 
4412 /* Return non-zero if OPVAL is supported on the specified cpu.
4413  Cpu selection is made when calling `arc_opcode_init_tables'. */
4414 
4415 int
4417 {
4418 #if 0 /* I'm leaving this is a place holder, we don't discrimnate */
4419  if (ARC_OPVAL_CPU (opval->flags) == 0)
4420  return 1;
4421  if (ARC_OPVAL_CPU (opval->flags) & ARC_HAVE_CPU (cpu_type))
4422  return 1;
4423  return 0;
4424 #endif
4425  return(1);
4426 }
4427 
4428 
4429 /* Return the first insn in the chain for assembling INSN. */
4430 
4431 const struct arc_opcode *
4432 arc_opcode_lookup_asm (const char *insn)
4433 {
4434  return opcode_map[ARC_HASH_OPCODE (insn)];
4435 }
4436 
4437 
4438 /* Return the first insn in the chain for disassembling INSN. */
4439 
4440 const struct arc_opcode *
4441 arc_opcode_lookup_dis (unsigned int insn)
4442 {
4443  return icode_map[ARC_HASH_ICODE (insn)];
4444 }
4445 
4446 /* START ARC LOCAL */
4447 int
4449 {
4450  return addrwb_p;
4451 }
4452 /* END ARC LOCAL */
4453 
4454 /* Called by the assembler before parsing an instruction. */
4455 
4456 void
4458 {
4459  int i;
4460 
4461  for (i = 0; i < OPERANDS; i++) {
4462  ls_operand[i] = OP_NONE;
4463  }
4464 
4465  flag_p = 0;
4466  flagshimm_handled_p = 0;
4467  arc_cond_p = 0;
4468  addrwb_p = 0;
4469  shimm_p = 0;
4470  limm_p = 0;
4471  jumpflags_p = 0;
4472  nullify_p = 0;
4473  nullify = 0; /* The default is important. */
4474 }
4475 
4476 
4477 /* Called by the assembler to see if the insn has a limm operand.
4478  Also called by the disassembler to see if the insn contains a limm. */
4479 
4480 int
4481 arc_opcode_limm_p (long *limmp)
4482 {
4483  if (limmp) {
4484  *limmp = limm;
4485  }
4486  return limm_p;
4487 }
4488 
4489 
4490 /* Utility for the extraction functions to return the index into
4491  `arc_suffixes'. */
4492 
4493 const struct arc_operand_value *
4495 {
4496  const struct arc_operand_value *v,*end;
4497  struct arc_ext_operand_value *ext_oper = arc_ext_operands;
4498  while (ext_oper)
4499  {
4500  if (type == &arc_operands[ext_oper->operand.type] && value == ext_oper->operand.value) {
4501  return (&ext_oper->operand);
4502  }
4503  ext_oper = ext_oper->next;
4504  }
4505 
4506  /* ??? This is a little slow and can be speeded up. */
4507  for (v = arc_suffixes, end = arc_suffixes + arc_suffixes_count; v < end; ++v) {
4508  if (type == &arc_operands[v->type] && value == v->value) {
4509  return v;
4510  }
4511  }
4512  return 0;
4513 }
4514 
4515 
4516 
4517 /* Ravi: warning: function declaration isn't a prototype */
4518 int arc_insn_is_j(arc_insn);
4519 int ac_lpcc_insn(arc_insn insn);
4523 int arc_insn_not_jl(arc_insn insn);
4524 int arc_insn_is_j(arc_insn insn);
4525 int a4_brk_insn(arc_insn insn);
4526 int ac_brk_s_insn(arc_insn insn);
4527 int ac_branch_or_jump_insn(arc_insn insn, int compact_insn_16);
4528 int ARC700_rtie_insn(arc_insn insn);
4529 
4530 
4531 int
4533 {
4534  return (insn & (I(-1))) == I(0x7);
4535 }
4536 
4537 
4538 int
4540 {
4541  return ((insn & (I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1)))
4542  != (I(0x7) | R(-1,9,1)));
4543 }
4544 
4545 
4546 /* Returns true if insn being encoded is a brk insn
4547  It can be used only for A4 architecture */
4548 int
4550 
4551 {
4552  return insn == 0x1ffffe00;
4553 }
4554 
4555 
4556 /* Returns true if insn being encoded is a brk_s insn
4557  It can be used only for ARCompact architecture */
4558 int
4560 {
4561  return insn == 0x7fff;
4562 }
4563 
4564 
4565 /* Returns 1 if insn being encoded is either branch or jump insn.
4566  It can be used only for ARCompact architecture */
4567 
4568 int
4569 ac_branch_or_jump_insn(arc_insn insn, int compact_insn_16)
4570 {
4571 
4572  return ((!compact_insn_16 && ((insn & I(-1)) == I(0x4)) &&
4573  (((insn >> 18) & 0xf) == 0x8)) ||
4574  (compact_insn_16 && ((insn & I(-1)) == I(0xf))) ||
4575  (!compact_insn_16 && ((insn & I(-1)) == I(0x1))) ||
4576  (compact_insn_16 && ((insn & I(-1)) == I(0x1f))) ||
4577  (!compact_insn_16 && ((insn & I(-1)) == I(0x0))) ||
4578  (compact_insn_16 && ((insn & I(-1)) == I(0x1e))));
4579 }
4580 
4581 
4582 /* This function returns true if insn being encoded is an lpcc insn.
4583  Ideally, we should be doing this and the other checks using the opcode
4584  tables. */
4585 int
4587 {
4588  return ( ((insn & 0xfffff000) == 0x20a80000) ||
4589  ((insn & 0xfffff020) == 0x20a80020));
4590 }
4591 
4592 
4593 /* This function returns true if insn being encoded is an add a,b,var@sda insn */
4594 int
4596 {
4597  return ((insn & 0xf8ff0fc0) == 0x20000f80);
4598 }
4599 
4600 
4601 /* This function returns true if insn being encoded is an rtie insn. */
4602 int
4604 {
4605  return insn == 0x242f003f;
4606 }
4607 
4608 
4609 /* This function returns the following values for the given insns
4610  Insn Returns
4611  ---- -------
4612  ld.as r0, [gp, var@sda] 0
4613  ld/ldb/ldw r0, [gp, var@sda] 1
4614  ldw.as r0, [gp, var@sda] 2
4615 
4616  ld_s r0, [gp, var@sda] 10
4617  ldb_ r0, [gp, var@sda] 11
4618  ldw_s r0, [gp, var@sda] 12
4619 
4620  Any other insn -1
4621 
4622  compact_insn_16 => insn is a 16-bit ARCompact insn
4623 */
4624 int
4625 ac_get_load_sdasym_insn_type (arc_insn insn, int compact_insn_16)
4626 {
4627  int load_type = -1;
4628 
4629  /* ld[b/w]_s */
4630  if (compact_insn_16)
4631  {
4632  switch (insn & 0xfe00)
4633  {
4634  /* ld_s */
4635  case 0xc800:
4636  load_type = 10;
4637  break;
4638 
4639  /* ldb_s */
4640  case 0xca00:
4641  load_type = 11;
4642  break;
4643 
4644  /* ldw_s */
4645  case 0xcc00:
4646  load_type = 12;
4647  break;
4648  }
4649  }
4650  else
4651  {
4652  /* ld/ldw/ldb */
4653  switch (insn & 0xf8000180)
4654  {
4655  /* ld */
4656  case 0x10000000:
4657  if (((insn >> 9) & 3) == 3) {
4658  load_type = 0;
4659  } else {
4660  load_type = 1;
4661  }
4662  break;
4663 
4664  /* ldw */
4665  case 0x10000100:
4666  if (((insn >> 9) & 3) == 3) {
4667  load_type = 2;
4668  } else {
4669  load_type = 1;
4670  }
4671  break;
4672 
4673  /* ldb */
4674  case 0x10000080:
4675  load_type = 1;
4676  break;
4677 
4678  }
4679  }
4680 
4681  return load_type;
4682 }
4683 
4684 
4685 /* This function returns the following values for the given insns
4686  Insn Returns
4687  ---- -------
4688  st.as r0, [gp, var@sda] 0
4689  st/stb/stw r0, [gp, var@sda] 1
4690  stw.as r0, [gp, var@sda] 2
4691 
4692  Any other insn -1
4693 
4694  compact_insn_16 => insn is a 16-bit ARCompact insn
4695 */
4696 int
4698  int compact_insn_16 ATTRIBUTE_UNUSED)
4699 {
4700  int store_type = -1;
4701 
4702  /* st/stw/stb */
4703  switch (insn & 0xf8000007)
4704  {
4705  /* st */
4706  case 0x18000000:
4707  if (((insn >> 3) & 3) == 3) {
4708  store_type = 0;
4709  } else {
4710  store_type = 1;
4711  }
4712  break;
4713 
4714  /* stw */
4715  case 0x18000004:
4716  if (((insn >> 3) & 3) == 3) {
4717  store_type = 2;
4718  } else {
4719  store_type = 1;
4720  }
4721  break;
4722 
4723  /* stb */
4724  case 0x18000002:
4725  store_type = 1;
4726  break;
4727 
4728  }
4729 
4730  return store_type;
4731 }
4732 
4733 
4734 /* Returns 1 if the given operand is a valid constant operand for
4735  ARCompact ISA. It can be used only for ARCompact architecture */
4736 int
4738 {
4739  switch (op->fmt)
4740  {
4741  case '@': /* This is valid only for A700 . The checks in the instruction patterns would take care of other checks.*/
4742 
4743  case 'u':
4744  case 'K':
4745  case 'L':
4746  case 'o':
4747  case 'e':
4748  case 'E':
4749  case 'j':
4750  case 'J':
4751  case 'k':
4752  case 'l':
4753  case 'm':
4754  case 'M':
4755  case 'O':
4756  case 'R':
4757  /* Operands for the Aurora SIMD ISA*/
4758  case '?':
4759  case '\14':
4760  case '\20':
4761  case '\21':
4762  case '\22':
4763  case '\23':
4764  case '\24':
4765  case '\25':
4766 
4767  return 1;
4768  }
4769  return 0;
4770 }
4771 
4772 
4773 /* Returns non-zero if the given operand is a valid register operand for
4774  the Aurora SIMD operand. */
4775 int
4777 {
4778  switch (fmt)
4779  {
4780  case '*':
4781  case '(':
4782  case ')':
4783  return 1; /*If the operand belongs to the Vector register(Vrxx) set*/
4784  case '<':
4785  case '>':
4786  return 2; /*If the operand belongs to the DMA registers (DRxx) set*/
4787  case '\13':
4788  case '{':
4789  case '}':
4790  return 3; /*If the operand belongs to the Scalar register (Ixx) set*/
4791  case '\15':
4792  case '\16':
4793  case '\17':
4794  return 4; /*If the operand belongs to the Scalar register (Kxx) set*/
4795  }
4796  return 0;
4797 }
4798 
4799 
4800 /* Returns 1 if the given operand is a valid register operand for
4801  ARCompact ISA. It can be used only for ARCompact architecture */
4802 int
4804 {
4805  switch (op->fmt)
4806  {
4807  case 'a':
4808  case 'b':
4809  case 'c':
4810  case 'A':
4811  case 'B':
4812  case '#':
4813  case 'C':
4814  case 'U':
4815  case 'g':
4816  case 'G':
4817  case 'r':
4818  case '4':
4819  case '5':
4820  case '6':
4821  case '7':
4822  case '8':
4823  case '9':
4824  case '!':
4825  return 1;
4826  }
4827  return 0;
4828 }
4829 
4830 
4831 /* Returns 1 if the given operand is a valid symbol operand for ARCompact ISA */
4832 int
4834 {
4835  switch (op->fmt)
4836  {
4837  case 'L':
4838  case 'd':
4839  case 'h':
4840  case 'H':
4841  case 'i':
4842  case 'I':
4843  case 'y':
4844  case 'Y':
4845  case 's':
4846  case 'S':
4847  case 'Z':
4848  case 'W':
4849  return 1;
4850  }
4851  return 0;
4852 }
4853 
4854 
4855 int
4856 arc_operand_type (int opertype)
4857 {
4858  switch (opertype)
4859  {
4860  case 0:
4861  return (arc_mach_a4 ? COND : COND_AC);
4862  case 1:
4863  return (arc_mach_a4 ? REG : REG_AC);
4864  case 2:
4865  return (arc_mach_a4 ? AUXREG : AUXREG_AC);
4866  default:
4867  return 0; // abort
4868  }
4869 }
4870 
4871 
4872 struct arc_operand_value *
4873 get_ext_suffix (char *s, char field)
4874 {
4876  char ctype = 0;
4877 
4878  switch(field){
4879  case 'e' :
4880  ctype = arc_mach_a4 ? CACHEBYPASS5 : 0;
4881  break;
4882  case 'f' :
4883  ctype = arc_mach_a4 ? FLAG : FLAG_AC;
4884  break;
4885  case 'j' :
4886  ctype = arc_mach_a4 ? JUMPFLAGS : 0;
4887  break;
4888  case 'p' :
4889  ctype = arc_mach_a4 ? 0 : ADDRESS9_AC;
4890  break;
4891  case 'q' :
4892  ctype = arc_mach_a4 ? COND : COND_AC;
4893  break;
4894  case 't' :
4895  ctype = arc_mach_a4 ? 0 : SIZE7_AC;
4896  break;
4897  case 'v' :
4899  break;
4900  case 'w' :
4901  ctype = arc_mach_a4 ? ADDRESS3 : ADDRESS3_AC;
4902  break;
4903  case 'x' :
4904  ctype = arc_mach_a4 ? SIGN0 : SIGN6_AC;
4905  break;
4906  case 'y' :
4907  ctype = arc_mach_a4 ? SIZE22 : 0;
4908  break;
4909  case 'z' :
4910  ctype = arc_mach_a4 ? SIZE1 : SIZE1_AC;
4911  break;
4912  case 'D' :
4914  break;
4915  case 'E' :
4916  ctype = arc_mach_a4 ? CACHEBYPASS14 : 0;
4917  break;
4918  case 'P' :
4919  ctype = arc_mach_a4 ? 0 : ADDRESS22_AC;
4920  break;
4921  case 'T' :
4922  ctype = arc_mach_a4 ? 0 : SIZE17_AC;
4923  break;
4924  case 'V' :
4925  ctype = arc_mach_a4 ? 0 : CACHEBYPASS15_AC;
4926  break;
4927  case 'W' :
4928  ctype = arc_mach_a4 ? ADDRESS12 : 0;
4929  break;
4930  case 'X' :
4931  ctype = arc_mach_a4 ? SIGN9 : SIGN16_AC;
4932  break;
4933  case 'Z' :
4934  ctype = arc_mach_a4 ? SIZE10 : 0;
4935  break;
4936  case '&' :
4937  ctype = arc_mach_a4 ? 0 : ADDRESS22S_AC;
4938  break;
4939  default :
4940  ctype = arc_mach_a4 ? COND : COND_AC;
4941  break;
4942  } /* end switch(field) */
4943  if (ctype == 0) {
4944  ctype = arc_mach_a4 ? COND : COND_AC;
4945  }
4946  while (suffix) {
4947  if ((suffix->operand.type == ctype) && !strcmp (s, suffix->operand.name)) {
4948  return (&suffix->operand);
4949  }
4950  suffix = suffix->next;
4951  } /* end while(suffix) */
4952 
4953  return NULL;
4954 }
4955 
4956 
4957 int
4959 {
4960  return ARC_REGISTER_NOSHORT_CUT;
4961 }
4962 
4963 
4964 char *
4965 arc_aux_reg_name (int regVal)
4966 {
4967  int i;
4968 
4969  for (i= arc_reg_names_count ; i > 0 ; i--)
4970  {
4971  if ((arc_reg_names[i].type == AUXREG_AC) && (arc_reg_names[i].value == regVal)) {
4972  return arc_reg_names[i].name;
4973  }
4974  }
4975 
4976  return NULL;
4977 }
#define ARC_REG_LIMM
Definition: analysis_arc.c:13
lzma_index ** i
Definition: index.h:629
#define JUMP_DELAY_AC
int arc_operand_type(int opertype)
Definition: arc-opc.c:4856
static int cpu_type
Definition: arc-opc.c:143
#define LS_VALUE
Definition: arc-opc.c:882
static struct arc_opcode * opcode_map[26+1]
Definition: arc-opc.c:4269
#define LD_SYNTAX(D, B, O)
#define ADDRESS3
int ARC700_rtie_insn(arc_insn insn)
Definition: arc-opc.c:4603
#define SIGN6_AC
#define LS_OFFSET
Definition: arc-opc.c:885
int ac_register_operand(const struct arc_operand *op)
Definition: arc-opc.c:4803
#define SIGN0
static int flagshimm_handled_p
Definition: arc-opc.c:110
int ac_lpcc_insn(arc_insn insn)
Definition: arc-opc.c:4586
static long extract_flag(arc_insn *insn, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval, int *invalid ATTRIBUTE_UNUSED)
Definition: arc-opc.c:2292
#define ADDRESS24
int ac_get_store_sdasym_insn_type(arc_insn, int)
static long extract_ld_syntax(arc_insn *insn, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval ATTRIBUTE_UNUSED, int *invalid)
Definition: arc-opc.c:1846
static arc_insn insert_reladdr(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value, const char **errmsg)
Definition: arc-opc.c:1979
static arc_insn insert_uu16(arc_insn insn, long *ex, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1003
#define ADDRESS22_AC
int arc_limm_fixup_adjust(arc_insn insn)
Definition: arc-opc.c:1658
static unsigned char arc_operand_map_ac[256]
Definition: arc-opc.c:149
#define ELEMENTS_IN(arr)
Definition: arc-opc.c:46
static int addrwb_p
Definition: arc-opc.c:113
static struct arc_opcode arc_opcodes[]
Definition: arc-opc.c:2487
int ac_add_reg_sdasym_insn(arc_insn)
Definition: arc-opc.c:4595
static long extract_reladdr(arc_insn *insn, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED)
Definition: arc-opc.c:2353
#define CACHEBYPASS5_AC
static const struct arc_operand_value arc_reg_names_a4[]
Definition: arc-opc.c:3818
static arc_insn insert_ex_syntax(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg)
Definition: arc-opc.c:1867
int arc_opcode_limm_p(long *limmp)
Definition: arc-opc.c:4481
int ac_get_load_sdasym_insn_type(arc_insn, int)
Definition: arc-opc.c:4625
static const struct arc_operand_value arc_reg_names_a700[]
Definition: arc-opc.c:3937
static arc_insn insert_limmfinish(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1923
#define SIZE17_AC
#define LS_BASE
Definition: arc-opc.c:884
int arc_get_noshortcut_flag(void)
Definition: arc-opc.c:4958
char * arc_aux_reg_name(int regVal)
Definition: arc-opc.c:4965
static arc_insn insert_flag(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1344
static const struct arc_operand_value arc_suffixes_a4[]
Definition: arc-opc.c:4108
static int flag_p
Definition: arc-opc.c:107
int arc_reg_names_count
Definition: arc-opc.c:4101
#define CACHEBYPASS11_AC
static enum operand ls_operand[OPERANDS]
Definition: arc-opc.c:154
static arc_insn insert_u16(arc_insn insn, long *ex, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:970
int arc_insn_is_j(arc_insn)
Definition: arc-opc.c:4532
#define ADDRESS3_AC
static arc_insn insert_nullify(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1361
static arc_insn insert_base(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods, const struct arc_operand_value *reg, long value, const char **errmsg)
Definition: arc-opc.c:1450
static arc_insn insert_addr_wb(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1430
static arc_insn insert_ul16(arc_insn insn, long *ex, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1033
static long limm
Definition: arc-opc.c:137
const struct arc_opcode * arc_opcode_lookup_asm(const char *insn)
Definition: arc-opc.c:4432
static long extract_st_syntax(arc_insn *insn, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval ATTRIBUTE_UNUSED, int *invalid)
Definition: arc-opc.c:1640
static arc_insn insert_reg(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods, const struct arc_operand_value *reg, long value, const char **errmsg)
Definition: arc-opc.c:1107
#define ST_SYNTAX(V, B, O)
static arc_insn insert_s12(arc_insn insn, long *ex, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:937
int arc_mach_a4
Definition: arc-opc.c:866
#define DELAY
const struct arc_opcode * arc_opcode_lookup_dis(unsigned int insn)
Definition: arc-opc.c:4441
#define SIZE1
void arc_opcode_init_insert(void)
Definition: arc-opc.c:4457
const struct arc_operand_value * arc_reg_names
Definition: arc-opc.c:4100
#define SIZE1_AC
int ac_brk_s_insn(arc_insn insn)
Definition: arc-opc.c:4559
#define COND
#define INSERT_FN(fn)
Definition: arc-opc.c:55
static int nullify_p
Definition: arc-opc.c:116
#define EXTRACT_FN(fn)
Definition: arc-opc.c:60
int arc_insn_not_jl(arc_insn insn)
Definition: arc-opc.c:4539
#define ADDRESS12
int ac_constant_operand(const struct arc_operand *op)
Definition: arc-opc.c:4737
int arc_suffixes_count
Definition: arc-opc.c:4265
const struct arc_operand * arc_operands
Definition: arc-opc.c:893
struct arc_ext_operand_value * arc_ext_operands
Definition: arc-opc.c:880
#define CACHEBYPASS26
int ac_branch_or_jump_insn(arc_insn insn, int compact_insn_16)
Definition: arc-opc.c:4569
int arc_get_opcode_mach(int bfd_mach, int big_p)
Definition: arc-opc.c:4282
static int limm_p
Definition: arc-opc.c:133
static struct arc_opcode * icode_map[32]
Definition: arc-opc.c:4272
#define SIGN16_AC
static long extract_jumpflags(arc_insn *insn, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval ATTRIBUTE_UNUSED, int *invalid)
Definition: arc-opc.c:2372
#define SIGN9
static int nullify
Definition: arc-opc.c:119
void arc_opcode_init_extract(void)
Definition: arc-opc.c:2131
const struct arc_operand_value * arc_opcode_lookup_suffix(const struct arc_operand *type, int value)
Definition: arc-opc.c:4494
static arc_insn insert_absaddr(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg)
Definition: arc-opc.c:2099
#define OPERANDS
Definition: arc-opc.c:152
#define LS_DEST
Definition: arc-opc.c:883
int arc_user_mode_only
Definition: arc-opc.c:878
#define CACHEBYPASS5
int a4_brk_insn(arc_insn insn)
Definition: arc-opc.c:4549
#define CACHEBYPASS15_AC
static long extract_st_offset(arc_insn *insn, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval ATTRIBUTE_UNUSED, int *invalid)
Definition: arc-opc.c:2389
int arc_opcode_supported(const struct arc_opcode *opcode)
Definition: arc-opc.c:4400
int ARC700_register_simd_operand(char fmt)
Definition: arc-opc.c:4776
static arc_insn insert_s15(arc_insn insn, long *ex, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1064
static arc_insn insert_ld_syntax(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg)
Definition: arc-opc.c:1767
static long extract_cond(arc_insn *insn, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval, int *invalid ATTRIBUTE_UNUSED)
Definition: arc-opc.c:2325
#define ADDRESS22S_AC
static long extract_unopmacro(arc_insn *insn, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value **opval ATTRIBUTE_UNUSED, int *invalid)
Definition: arc-opc.c:2447
void arc_opcode_init_tables(int flags)
Definition: arc-opc.c:4304
static unsigned char arc_operand_map_a4[256]
Definition: arc-opc.c:148
#define REG
struct arc_operand_value * get_ext_suffix(char *s, char field)
Definition: arc-opc.c:4873
operand
Definition: arc-opc.c:39
@ OP_LIMM
Definition: arc-opc.c:39
@ OP_NONE
Definition: arc-opc.c:39
@ OP_REG
Definition: arc-opc.c:39
@ OP_SHIMM
Definition: arc-opc.c:39
#define SIZE7_AC
static arc_insn insert_cond(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1398
int arc_opval_supported(const struct arc_operand_value *opval ATTRIBUTE_UNUSED)
Definition: arc-opc.c:4416
#define CACHEBYPASS14
#define X(x, b, m)
static int shimm
Definition: arc-opc.c:129
static int shimm_p
Definition: arc-opc.c:125
#define SIZE10
static arc_insn insert_shimmfinish(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1897
const struct arc_operand_value * arc_suffixes
Definition: arc-opc.c:4264
static const struct arc_operand_value * lookup_register(int type, long regno)
Definition: arc-opc.c:2137
static arc_insn insert_jumpflags(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value, const char **errmsg)
Definition: arc-opc.c:1934
#define AUXREG_AC
static const struct arc_operand arc_operands_ac[]
Definition: arc-opc.c:489
unsigned long arc_ld_ext_mask
Definition: arc-opc.c:876
unsigned char * arc_operand_map
Definition: arc-opc.c:889
static arc_insn insert_offset(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods, const struct arc_operand_value *reg, long value, const char **errmsg)
Definition: arc-opc.c:1505
static long extract_ld_offset(arc_insn *insn, const struct arc_operand *operand, int mods, const struct arc_operand_value **opval, int *invalid)
Definition: arc-opc.c:2416
#define REG_AC
static arc_insn insert_forcelimm(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1418
static long extract_reg(arc_insn *insn, const struct arc_operand *operand, int mods, const struct arc_operand_value **opval, int *invalid ATTRIBUTE_UNUSED)
Definition: arc-opc.c:2172
static const struct arc_operand_value arc_reg_names_a500600[]
Definition: arc-opc.c:3884
int arc_test_wb(void)
Definition: arc-opc.c:4448
static int jumpflags_p
Definition: arc-opc.c:122
#define JUMPFLAGS
static arc_insn insert_unopmacro(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1965
#define AUXREG
#define FLAG_AC
#define SIZE22
#define COND_AC
static arc_insn insert_null(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1090
static const struct arc_operand arc_operands_a4[]
Definition: arc-opc.c:207
#define DELAY_AC
#define ADDRESS9_AC
static arc_insn insert_flagfinish(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:1379
static arc_insn insert_st_syntax(arc_insn insn, long *ex ATTRIBUTE_UNUSED, const struct arc_operand *operand ATTRIBUTE_UNUSED, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg)
Definition: arc-opc.c:1678
int arc_cond_p
Definition: arc-opc.c:858
#define FLAG
static arc_insn insert_u8(arc_insn insn, long *insn2 ATTRIBUTE_UNUSED, const struct arc_operand *operand, int mods ATTRIBUTE_UNUSED, const struct arc_operand_value *reg ATTRIBUTE_UNUSED, long value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
Definition: arc-opc.c:904
static const struct arc_operand_value arc_suffixes_ac[]
Definition: arc-opc.c:4199
int ac_symbol_operand(const struct arc_operand *op)
Definition: arc-opc.c:4833
#define ARC_MOD_DOT
Definition: arc.h:290
#define ARC_SHIMM_CONST_P(x)
Definition: arc.h:430
#define ARC_OPCODE_COND_BRANCH
Definition: arc.h:80
#define ARC_MASK_REG
Definition: arc.h:422
#define ARC_MACH_ARC4
Definition: arc.h:41
#define ARC_OPERAND_FAKE
Definition: arc.h:263
#define ARC_DELAY_NORMAL
Definition: arc.h:426
#define ARC_OPERAND_LOAD
Definition: arc.h:274
#define ARC_REGISTER_NOSHORT_CUT
Definition: arc.h:311
#define ARC_HASH_ICODE(insn)
Definition: arc.h:179
#define ARC_SHIFT_REGB_LOW_AC
Definition: arc.h:419
#define ARC_REG_SHIMM_UPDATE
Definition: arc.h:407
#define ARC_OPERAND_UNSIGNED
Definition: arc.h:280
#define A(x)
Definition: arc.h:165
#define ARC_SHIFT_REGA_AC
Definition: arc.h:418
#define ARC_SHIFT_REGA
Definition: arc.h:415
#define ARC_OPERAND_ERROR
Definition: arc.h:271
#define ARC_REGISTER_16
Definition: arc.h:314
#define ARC_MACH_ARC7
Definition: arc.h:44
#define ARC_OPCODE_CPU(bits)
Definition: arc.h:73
#define ARC_OPERAND_SIGNED
Definition: arc.h:247
#define ARC_MOD_REG
Definition: arc.h:293
#define I(x)
Definition: arc.h:164
#define ARC_INCR_U6
Definition: arc.h:323
#define R(x, b, m)
Definition: arc.h:168
#define ARC_SHIFT_REGC_AC
Definition: arc.h:421
#define ARC_OPERAND_STORE
Definition: arc.h:277
#define ARC_DELAY_NONE
Definition: arc.h:425
#define ARC_HASH_OPCODE(string)
Definition: arc.h:177
#define ARC_OPERAND_ABSOLUTE_BRANCH
Definition: arc.h:237
#define B(x)
Definition: arc.h:166
#define ARC_REG_SHIMM
Definition: arc.h:408
#define ARC_OPERAND_LIMM
Definition: arc.h:244
#define ARC_OPERAND_4BYTE_ALIGNED
Definition: arc.h:286
#define ARC_MACH_ARC5
Definition: arc.h:42
#define ARC_HAVE_CPU(bits)
Definition: arc.h:402
#define ARC_MACH_ARC6
Definition: arc.h:43
#define ARC_OPERAND_ADDRESS
Definition: arc.h:241
#define ARC_DELAY_JUMP
Definition: arc.h:427
#define ARC_SHIFT_REGB
Definition: arc.h:416
unsigned int arc_insn
Definition: arc.h:62
#define ARC_OPERAND_SUFFIX
Definition: arc.h:229
#define ARCOMPACT
Definition: arc.h:54
#define ARC_OPERAND_JUMPFLAGS
Definition: arc.h:266
#define ARC_MOD_AUXREG
Definition: arc.h:296
#define C(x)
Definition: arc.h:167
#define ARC_MACH_BIG
Definition: arc.h:51
#define ARC_OPVAL_CPU(bits)
Definition: arc.h:198
#define ARC_OPERAND_2BYTE_ALIGNED
Definition: arc.h:283
#define ARC_REGISTER_WRITEONLY
Definition: arc.h:310
#define ARC_OPERAND_RELATIVE_BRANCH
Definition: arc.h:233
#define ARC_SHIFT_REGB_HIGH_AC
Definition: arc.h:420
#define ARC_REGISTER_READONLY
Definition: arc.h:309
#define ARC_REG_CONSTANT_P(REG)
Definition: arc.h:412
#define ARC_MACH_ARC601
Definition: arc.h:45
#define ARC_SHIFT_REGC
Definition: arc.h:417
#define ARC_MOD_SDASYM
Definition: arc.h:299
ut16 val
Definition: armass64_const.h:6
int bits(struct state *s, int need)
Definition: blast.c:72
const lzma_allocator const uint8_t size_t uint8_t * out
Definition: block.h:528
static int value
Definition: cmd_api.c:93
#define NULL
Definition: cris-opc.c:27
#define r
Definition: crypto_rc6.c:12
const char * v
Definition: dsignal.c:12
unsigned char suffix[65536]
Definition: gun.c:164
voidpf void * buf
Definition: ioapi.h:138
sprintf
Definition: kernel.h:365
#define reg(n)
return memset(p, 0, total)
#define ATTRIBUTE_UNUSED
Definition: ansidecl.h:288
int type
Definition: mipsasm.c:17
-lz4-versions
#define _(String)
Definition: opintl.h:53
static RzSocket * s
Definition: rtr.c:28
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
static int
Definition: sfsocketcall.h:114
#define f(i)
Definition: sha256.c:46
#define cond(bop, top, mask, flags)
struct arc_ext_operand_value * next
Definition: arc.h:204
struct arc_operand_value operand
Definition: arc.h:205
Definition: arc.h:64
struct arc_opcode * next_asm
Definition: arc.h:173
int flags
Definition: arc.h:67
struct arc_opcode * next_dis
Definition: arc.h:174
char * name
Definition: arc.h:190
short value
Definition: arc.h:191
unsigned char type
Definition: arc.h:192
unsigned char fmt
Definition: arc.h:214
unsigned char shift
Definition: arc.h:221
Definition: dis.c:32
if(dbg->bits==RZ_SYS_BITS_64)
Definition: windows-arm64.h:4
static xnu_exception_info ex
static int addr
Definition: z80asm.c:58