1 /* Instruction printing code for the ARM
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
3 Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
4 Modification by James G. Smith (jsmith@cygnus.co.uk)
6 This file is part of libopcodes.
8 This library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 It is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
26 #include "disassemble.h"
27 #include "opcode/arm.h"
29 #include "safe-ctype.h"
30 #include "libiberty.h"
31 #include "floatformat.h"
33 /* FIXME: This shouldn't be done here. */
34 #include "coff/internal.h"
38 #include "elf/internal.h"
42 /* FIXME: Belongs in global header. */
44 #define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
47 /* Cached mapping symbol state. */
55 struct arm_private_data
57 /* The features to use when disassembling optional instructions. */
58 arm_feature_set features;
60 /* Track the last type (although this doesn't seem to be useful) */
61 enum map_type last_type;
63 /* Tracking symbol table information */
66 /* The end range of the current range being disassembled. */
67 bfd_vma last_stop_offset;
68 bfd_vma last_mapping_addr;
121 MVE_VSTRB_SCATTER_T1,
122 MVE_VSTRH_SCATTER_T2,
123 MVE_VSTRW_SCATTER_T3,
124 MVE_VSTRD_SCATTER_T4,
125 MVE_VSTRW_SCATTER_T5,
126 MVE_VSTRD_SCATTER_T6,
128 MVE_VCVT_BETWEEN_FP_INT,
130 MVE_VCVT_FROM_FP_TO_INT,
133 MVE_VMOV_GP_TO_VEC_LANE,
136 MVE_VMOV2_VEC_LANE_TO_GP,
137 MVE_VMOV2_GP_TO_VEC_LANE,
138 MVE_VMOV_VEC_LANE_TO_GP,
259 enum mve_unpredictable
261 UNPRED_IT_BLOCK, /* Unpredictable because mve insn in it block.
263 UNPRED_FCA_0_FCB_1, /* Unpredictable because fcA = 0 and
265 UNPRED_R13, /* Unpredictable because r13 (sp) or
267 UNPRED_R15, /* Unpredictable because r15 (pc) is used. */
268 UNPRED_Q_GT_4, /* Unpredictable because
269 vec reg start > 4 (vld4/st4). */
270 UNPRED_Q_GT_6, /* Unpredictable because
271 vec reg start > 6 (vld2/st2). */
272 UNPRED_R13_AND_WB, /* Unpredictable becase gp reg = r13
274 UNPRED_Q_REGS_EQUAL, /* Unpredictable because vector registers are
276 UNPRED_OS, /* Unpredictable because offset scaled == 1. */
277 UNPRED_GP_REGS_EQUAL, /* Unpredictable because gp registers are the
279 UNPRED_Q_REGS_EQ_AND_SIZE_1, /* Unpredictable because q regs equal and
281 UNPRED_Q_REGS_EQ_AND_SIZE_2, /* Unpredictable because q regs equal and
283 UNPRED_NONE /* No unpredictable behavior. */
288 UNDEF_SIZE, /* undefined size. */
289 UNDEF_SIZE_0, /* undefined because size == 0. */
290 UNDEF_SIZE_2, /* undefined because size == 2. */
291 UNDEF_SIZE_3, /* undefined because size == 3. */
292 UNDEF_SIZE_LE_1, /* undefined because size <= 1. */
293 UNDEF_SIZE_NOT_2, /* undefined because size != 2. */
294 UNDEF_SIZE_NOT_3, /* undefined because size != 3. */
295 UNDEF_NOT_UNS_SIZE_0, /* undefined because U == 0 and
297 UNDEF_NOT_UNS_SIZE_1, /* undefined because U == 0 and
299 UNDEF_NOT_UNSIGNED, /* undefined because U == 0. */
300 UNDEF_VCVT_IMM6, /* imm6 < 32. */
301 UNDEF_VCVT_FSI_IMM6, /* fsi = 0 and 32 >= imm6 <= 47. */
302 UNDEF_BAD_OP1_OP2, /* undefined with op2 = 2 and
304 UNDEF_BAD_U_OP1_OP2, /* undefined with U = 1 and
305 op2 == 0 and op1 == (0 or 1). */
306 UNDEF_OP_0_BAD_CMODE, /* undefined because op == 0 and cmode
308 UNDEF_XCHG_UNS, /* undefined because X == 1 and U == 1. */
309 UNDEF_NONE /* no undefined behavior. */
314 arm_feature_set arch; /* Architecture defining this insn. */
315 unsigned long value; /* If arch is 0 then value is a sentinel. */
316 unsigned long mask; /* Recognise insn if (op & mask) == value. */
317 const char * assembler; /* How to disassemble this insn. */
324 arm_feature_set arch; /* Architecture defining this insn. */
325 enum mve_instructions mve_op; /* Specific mve instruction for faster
327 unsigned long value; /* If arch is 0 then value is a sentinel. */
328 unsigned long mask; /* Recognise insn if (op & mask) == value. */
329 const char * assembler; /* How to disassemble this insn. */
339 /* Shared (between Arm and Thumb mode) opcode. */
342 enum isa isa; /* Execution mode instruction availability. */
343 arm_feature_set arch; /* Architecture defining this insn. */
344 unsigned long value; /* If arch is 0 then value is a sentinel. */
345 unsigned long mask; /* Recognise insn if (op & mask) == value. */
346 const char * assembler; /* How to disassemble this insn. */
351 arm_feature_set arch; /* Architecture defining this insn. */
352 unsigned short value, mask; /* Recognise insn if (op & mask) == value. */
353 const char *assembler; /* How to disassemble this insn. */
356 /* print_insn_coprocessor recognizes the following format control codes:
360 %c print condition code (always bits 28-31 in ARM mode)
361 %q print shifter argument
362 %u print condition code (unconditional in ARM mode,
363 UNPREDICTABLE if not AL in Thumb)
364 %A print address for ldc/stc/ldf/stf instruction
365 %B print vstm/vldm register list
366 %C print vscclrm register list
367 %I print cirrus signed shift immediate: bits 0..3|4..6
368 %J print register for VLDR instruction
369 %K print address for VLDR instruction
370 %F print the COUNT field of a LFM/SFM instruction.
371 %P print floating point precision in arithmetic insn
372 %Q print floating point precision in ldf/stf insn
373 %R print floating point rounding mode
375 %<bitfield>c print as a condition code (for vsel)
376 %<bitfield>r print as an ARM register
377 %<bitfield>R as %<>r but r15 is UNPREDICTABLE
378 %<bitfield>ru as %<>r but each u register must be unique.
379 %<bitfield>d print the bitfield in decimal
380 %<bitfield>k print immediate for VFPv3 conversion instruction
381 %<bitfield>x print the bitfield in hex
382 %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
383 %<bitfield>f print a floating point constant if >7 else a
384 floating point register
385 %<bitfield>w print as an iWMMXt width field - [bhwd]ss/us
386 %<bitfield>g print as an iWMMXt 64-bit register
387 %<bitfield>G print as an iWMMXt general purpose or control register
388 %<bitfield>D print as a NEON D register
389 %<bitfield>Q print as a NEON Q register
390 %<bitfield>V print as a NEON D or Q register
391 %<bitfield>E print a quarter-float immediate value
393 %y<code> print a single precision VFP reg.
394 Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
395 %z<code> print a double precision VFP reg
396 Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
398 %<bitfield>'c print specified char iff bitfield is all ones
399 %<bitfield>`c print specified char iff bitfield is all zeroes
400 %<bitfield>?ab... select from array of values in big endian order
402 %L print as an iWMMXt N/M width field.
403 %Z print the Immediate of a WSHUFH instruction.
404 %l like 'A' except use byte offsets for 'B' & 'H'
406 %i print 5-bit immediate in bits 8,3..0
408 %r print register offset address for wldt/wstr instruction. */
410 enum opcode_sentinel_enum
412 SENTINEL_IWMMXT_START = 1,
414 SENTINEL_GENERIC_START
417 #define UNDEFINED_INSTRUCTION "\t\t; <UNDEFINED> instruction: %0-31x"
418 #define UNKNOWN_INSTRUCTION_32BIT "\t\t; <UNDEFINED> instruction: %08x"
419 #define UNKNOWN_INSTRUCTION_16BIT "\t\t; <UNDEFINED> instruction: %04x"
420 #define UNPREDICTABLE_INSTRUCTION "\t; <UNPREDICTABLE>"
422 /* Common coprocessor opcodes shared between Arm and Thumb-2. */
424 static const struct sopcode32 coprocessor_opcodes[] =
426 /* XScale instructions. */
427 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
428 0x0e200010, 0x0fff0ff0,
429 "mia%c\tacc0, %0-3r, %12-15r"},
430 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
431 0x0e280010, 0x0fff0ff0,
432 "miaph%c\tacc0, %0-3r, %12-15r"},
433 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
434 0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\tacc0, %0-3r, %12-15r"},
435 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
436 0x0c400000, 0x0ff00fff, "mar%c\tacc0, %12-15r, %16-19r"},
437 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
438 0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, acc0"},
440 /* Intel Wireless MMX technology instructions. */
441 {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_IWMMXT_START, 0, "" },
442 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_IWMMXT),
443 0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
444 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
445 0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
446 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
447 0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, #%0-2d"},
448 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
449 0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, #%0-2d"},
450 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
451 0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, #%0-2d"},
452 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
453 0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
454 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
455 0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
456 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
457 0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
458 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
459 0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
460 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
461 0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
462 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
463 0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
464 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
465 0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
466 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
467 0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
468 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
469 0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
470 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
471 0x0e120190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
472 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
473 0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
474 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
475 0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
476 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
477 0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
478 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
479 0x0e2001a0, 0x0fb00ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
480 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
481 0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
482 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
483 0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, #%20-22d"},
484 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
485 0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
486 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
487 0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
488 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
489 0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
490 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
491 0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
492 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
493 0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
494 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
495 0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
496 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
497 0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
498 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
499 0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
500 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
501 0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
502 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
503 0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
504 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
505 0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
506 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
507 0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
508 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
509 0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
510 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
511 0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, #%21-23d"},
512 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
513 0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
514 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
515 0x0e800120, 0x0f800ff0,
516 "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
517 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
518 0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
519 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
520 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
521 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
522 0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
523 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
524 0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
525 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
526 0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
527 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
528 0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
529 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
530 0x0e8000a0, 0x0f800ff0,
531 "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
532 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
533 0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
534 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
535 0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
536 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
537 0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
538 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
539 0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
540 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
541 0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, #%i"},
542 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
543 0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
544 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
545 0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
546 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
547 0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
548 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
549 0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, #%Z"},
550 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
551 0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, #%i"},
552 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
553 0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
554 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
555 0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
556 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
557 0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, #%i"},
558 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
559 0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
560 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
561 0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
562 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
563 0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, #%i"},
564 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
565 0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
566 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
567 0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
568 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
569 0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
570 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
571 0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
572 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
573 0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
574 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
575 0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
576 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
577 0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
578 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
579 0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
580 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
581 0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
582 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
583 0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
584 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
585 0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
586 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
587 0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
588 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
589 0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
590 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
591 0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
592 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
593 0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
594 {ANY, ARM_FEATURE_CORE_LOW (0),
595 SENTINEL_IWMMXT_END, 0, "" },
597 /* Floating point coprocessor (FPA) instructions. */
598 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
599 0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
600 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
601 0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
602 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
603 0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
604 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
605 0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
606 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
607 0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
608 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
609 0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
610 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
611 0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
612 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
613 0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
614 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
615 0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
616 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
617 0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
618 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
619 0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
620 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
621 0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
622 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
623 0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
624 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
625 0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
626 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
627 0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
628 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
629 0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
630 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
631 0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
632 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
633 0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
634 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
635 0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
636 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
637 0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
638 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
639 0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
640 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
641 0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
642 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
643 0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
644 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
645 0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
646 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
647 0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
648 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
649 0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
650 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
651 0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
652 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
653 0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
654 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
655 0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
656 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
657 0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
658 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
659 0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
660 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
661 0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
662 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
663 0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
664 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
665 0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
666 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
667 0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
668 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
669 0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
670 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
671 0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
672 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
673 0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
674 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
675 0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
676 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
677 0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
678 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
679 0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
680 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
681 0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
682 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
683 0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
685 /* Armv8.1-M Mainline instructions. */
686 {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
687 0xec9f0b00, 0xffbf0f01, "vscclrm%c\t%C"},
688 {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
689 0xec9f0a00, 0xffbf0f00, "vscclrm%c\t%C"},
691 /* ARMv8-M Mainline Security Extensions instructions. */
692 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
693 0xec300a00, 0xfff0ffff, "vlldm\t%16-19r"},
694 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
695 0xec200a00, 0xfff0ffff, "vlstm\t%16-19r"},
697 /* Register load/store. */
698 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
699 0x0d2d0b00, 0x0fbf0f01, "vpush%c\t%B"},
700 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
701 0x0d200b00, 0x0fb00f01, "vstmdb%c\t%16-19r!, %B"},
702 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
703 0x0d300b00, 0x0fb00f01, "vldmdb%c\t%16-19r!, %B"},
704 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
705 0x0c800b00, 0x0f900f01, "vstmia%c\t%16-19r%21'!, %B"},
706 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
707 0x0cbd0b00, 0x0fbf0f01, "vpop%c\t%B"},
708 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
709 0x0c900b00, 0x0f900f01, "vldmia%c\t%16-19r%21'!, %B"},
710 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
711 0x0d000b00, 0x0f300f00, "vstr%c\t%12-15,22D, %A"},
712 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
713 0x0d100b00, 0x0f300f00, "vldr%c\t%12-15,22D, %A"},
714 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
715 0x0d2d0a00, 0x0fbf0f00, "vpush%c\t%y3"},
716 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
717 0x0d200a00, 0x0fb00f00, "vstmdb%c\t%16-19r!, %y3"},
718 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
719 0x0d300a00, 0x0fb00f00, "vldmdb%c\t%16-19r!, %y3"},
720 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
721 0x0c800a00, 0x0f900f00, "vstmia%c\t%16-19r%21'!, %y3"},
722 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
723 0x0cbd0a00, 0x0fbf0f00, "vpop%c\t%y3"},
724 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
725 0x0c900a00, 0x0f900f00, "vldmia%c\t%16-19r%21'!, %y3"},
726 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
727 0x0d000a00, 0x0f300f00, "vstr%c\t%y1, %A"},
728 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
729 0x0d100a00, 0x0f300f00, "vldr%c\t%y1, %A"},
730 {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
731 0xec100f80, 0xfe101f80, "vldr%c\t%J, %K"},
732 {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
733 0xec000f80, 0xfe101f80, "vstr%c\t%J, %K"},
735 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
736 0x0d200b01, 0x0fb00f01, "fstmdbx%c\t%16-19r!, %z3\t;@ Deprecated"},
737 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
738 0x0d300b01, 0x0fb00f01, "fldmdbx%c\t%16-19r!, %z3\t;@ Deprecated"},
739 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
740 0x0c800b01, 0x0f900f01, "fstmiax%c\t%16-19r%21'!, %z3\t;@ Deprecated"},
741 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
742 0x0c900b01, 0x0f900f01, "fldmiax%c\t%16-19r%21'!, %z3\t;@ Deprecated"},
744 /* Data transfer between ARM and NEON registers. */
745 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
746 0x0c400b10, 0x0ff00fd0, "vmov%c\t%0-3,5D, %12-15r, %16-19r"},
747 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
748 0x0c500b10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %0-3,5D"},
749 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
750 0x0e000b10, 0x0fd00f70, "vmov%c.32\t%16-19,7D[%21d], %12-15r"},
751 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
752 0x0e100b10, 0x0f500f70, "vmov%c.32\t%12-15r, %16-19,7D[%21d]"},
753 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
754 0x0e000b30, 0x0fd00f30, "vmov%c.16\t%16-19,7D[%6,21d], %12-15r"},
755 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
756 0x0e100b30, 0x0f500f30, "vmov%c.%23?us16\t%12-15r, %16-19,7D[%6,21d]"},
757 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
758 0x0e400b10, 0x0fd00f10, "vmov%c.8\t%16-19,7D[%5,6,21d], %12-15r"},
759 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
760 0x0e500b10, 0x0f500f10, "vmov%c.%23?us8\t%12-15r, %16-19,7D[%5,6,21d]"},
761 /* Half-precision conversion instructions. */
762 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
763 0x0eb20b40, 0x0fbf0f50, "vcvt%7?tb%c.f64.f16\t%z1, %y0"},
764 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
765 0x0eb30b40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f64\t%y1, %z0"},
766 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
767 0x0eb20a40, 0x0fbf0f50, "vcvt%7?tb%c.f32.f16\t%y1, %y0"},
768 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
769 0x0eb30a40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f32\t%y1, %y0"},
771 /* Floating point coprocessor (VFP) instructions. */
772 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
773 0x0ee00a10, 0x0fff0fff, "vmsr%c\tfpsid, %12-15r"},
774 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
775 0x0ee10a10, 0x0fff0fff, "vmsr%c\tfpscr, %12-15r"},
776 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
777 0x0ee60a10, 0x0fff0fff, "vmsr%c\tmvfr1, %12-15r"},
778 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
779 0x0ee70a10, 0x0fff0fff, "vmsr%c\tmvfr0, %12-15r"},
780 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
781 0x0ee50a10, 0x0fff0fff, "vmsr%c\tmvfr2, %12-15r"},
782 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
783 0x0ee80a10, 0x0fff0fff, "vmsr%c\tfpexc, %12-15r"},
784 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
785 0x0ee90a10, 0x0fff0fff, "vmsr%c\tfpinst, %12-15r\t@ Impl def"},
786 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
787 0x0eea0a10, 0x0fff0fff, "vmsr%c\tfpinst2, %12-15r\t@ Impl def"},
788 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
789 0x0ef00a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpsid"},
790 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
791 0x0ef1fa10, 0x0fffffff, "vmrs%c\tAPSR_nzcv, fpscr"},
792 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
793 0x0ef10a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpscr"},
794 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
795 0x0ef50a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr2"},
796 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
797 0x0ef60a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr1"},
798 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
799 0x0ef70a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr0"},
800 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
801 0x0ef80a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpexc"},
802 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
803 0x0ef90a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpinst\t@ Impl def"},
804 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
805 0x0efa0a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpinst2\t@ Impl def"},
806 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
807 0x0e000b10, 0x0fd00fff, "vmov%c.32\t%z2[%21d], %12-15r"},
808 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
809 0x0e100b10, 0x0fd00fff, "vmov%c.32\t%12-15r, %z2[%21d]"},
810 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
811 0x0ee00a10, 0x0ff00fff, "vmsr%c\t<impl def %16-19x>, %12-15r"},
812 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
813 0x0ef00a10, 0x0ff00fff, "vmrs%c\t%12-15r, <impl def %16-19x>"},
814 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
815 0x0e000a10, 0x0ff00f7f, "vmov%c\t%y2, %12-15r"},
816 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
817 0x0e100a10, 0x0ff00f7f, "vmov%c\t%12-15r, %y2"},
818 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
819 0x0eb50a40, 0x0fbf0f70, "vcmp%7'e%c.f32\t%y1, #0.0"},
820 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
821 0x0eb50b40, 0x0fbf0f70, "vcmp%7'e%c.f64\t%z1, #0.0"},
822 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
823 0x0eb00a40, 0x0fbf0fd0, "vmov%c.f32\t%y1, %y0"},
824 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
825 0x0eb00ac0, 0x0fbf0fd0, "vabs%c.f32\t%y1, %y0"},
826 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
827 0x0eb00b40, 0x0fbf0fd0, "vmov%c.f64\t%z1, %z0"},
828 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
829 0x0eb00bc0, 0x0fbf0fd0, "vabs%c.f64\t%z1, %z0"},
830 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
831 0x0eb10a40, 0x0fbf0fd0, "vneg%c.f32\t%y1, %y0"},
832 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
833 0x0eb10ac0, 0x0fbf0fd0, "vsqrt%c.f32\t%y1, %y0"},
834 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
835 0x0eb10b40, 0x0fbf0fd0, "vneg%c.f64\t%z1, %z0"},
836 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
837 0x0eb10bc0, 0x0fbf0fd0, "vsqrt%c.f64\t%z1, %z0"},
838 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
839 0x0eb70ac0, 0x0fbf0fd0, "vcvt%c.f64.f32\t%z1, %y0"},
840 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
841 0x0eb70bc0, 0x0fbf0fd0, "vcvt%c.f32.f64\t%y1, %z0"},
842 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
843 0x0eb80a40, 0x0fbf0f50, "vcvt%c.f32.%7?su32\t%y1, %y0"},
844 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
845 0x0eb80b40, 0x0fbf0f50, "vcvt%c.f64.%7?su32\t%z1, %y0"},
846 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
847 0x0eb40a40, 0x0fbf0f50, "vcmp%7'e%c.f32\t%y1, %y0"},
848 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
849 0x0eb40b40, 0x0fbf0f50, "vcmp%7'e%c.f64\t%z1, %z0"},
850 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
851 0x0eba0a40, 0x0fbe0f50, "vcvt%c.f32.%16?us%7?31%7?26\t%y1, %y1, #%5,0-3k"},
852 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
853 0x0eba0b40, 0x0fbe0f50, "vcvt%c.f64.%16?us%7?31%7?26\t%z1, %z1, #%5,0-3k"},
854 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
855 0x0ebc0a40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f32\t%y1, %y0"},
856 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
857 0x0ebc0b40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f64\t%y1, %z0"},
858 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
859 0x0ebe0a40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f32\t%y1, %y1, #%5,0-3k"},
860 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
861 0x0ebe0b40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f64\t%z1, %z1, #%5,0-3k"},
862 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
863 0x0c500b10, 0x0fb00ff0, "vmov%c\t%12-15r, %16-19r, %z0"},
864 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
865 0x0eb00a00, 0x0fb00ff0, "vmov%c.f32\t%y1, #%0-3,16-19E"},
866 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
867 0x0eb00b00, 0x0fb00ff0, "vmov%c.f64\t%z1, #%0-3,16-19E"},
868 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
869 0x0c400a10, 0x0ff00fd0, "vmov%c\t%y4, %12-15r, %16-19r"},
870 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
871 0x0c400b10, 0x0ff00fd0, "vmov%c\t%z0, %12-15r, %16-19r"},
872 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
873 0x0c500a10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %y4"},
874 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
875 0x0e000a00, 0x0fb00f50, "vmla%c.f32\t%y1, %y2, %y0"},
876 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
877 0x0e000a40, 0x0fb00f50, "vmls%c.f32\t%y1, %y2, %y0"},
878 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
879 0x0e000b00, 0x0fb00f50, "vmla%c.f64\t%z1, %z2, %z0"},
880 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
881 0x0e000b40, 0x0fb00f50, "vmls%c.f64\t%z1, %z2, %z0"},
882 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
883 0x0e100a00, 0x0fb00f50, "vnmls%c.f32\t%y1, %y2, %y0"},
884 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
885 0x0e100a40, 0x0fb00f50, "vnmla%c.f32\t%y1, %y2, %y0"},
886 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
887 0x0e100b00, 0x0fb00f50, "vnmls%c.f64\t%z1, %z2, %z0"},
888 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
889 0x0e100b40, 0x0fb00f50, "vnmla%c.f64\t%z1, %z2, %z0"},
890 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
891 0x0e200a00, 0x0fb00f50, "vmul%c.f32\t%y1, %y2, %y0"},
892 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
893 0x0e200a40, 0x0fb00f50, "vnmul%c.f32\t%y1, %y2, %y0"},
894 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
895 0x0e200b00, 0x0fb00f50, "vmul%c.f64\t%z1, %z2, %z0"},
896 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
897 0x0e200b40, 0x0fb00f50, "vnmul%c.f64\t%z1, %z2, %z0"},
898 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
899 0x0e300a00, 0x0fb00f50, "vadd%c.f32\t%y1, %y2, %y0"},
900 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
901 0x0e300a40, 0x0fb00f50, "vsub%c.f32\t%y1, %y2, %y0"},
902 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
903 0x0e300b00, 0x0fb00f50, "vadd%c.f64\t%z1, %z2, %z0"},
904 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
905 0x0e300b40, 0x0fb00f50, "vsub%c.f64\t%z1, %z2, %z0"},
906 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
907 0x0e800a00, 0x0fb00f50, "vdiv%c.f32\t%y1, %y2, %y0"},
908 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
909 0x0e800b00, 0x0fb00f50, "vdiv%c.f64\t%z1, %z2, %z0"},
911 /* Cirrus coprocessor instructions. */
912 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
913 0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
914 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
915 0x0c100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
916 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
917 0x0d500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
918 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
919 0x0c500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
920 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
921 0x0d100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
922 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
923 0x0c100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
924 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
925 0x0d500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
926 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
927 0x0c500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
928 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
929 0x0d000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
930 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
931 0x0c000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
932 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
933 0x0d400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
934 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
935 0x0c400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
936 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
937 0x0d000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
938 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
939 0x0c000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
940 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
941 0x0d400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
942 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
943 0x0c400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
944 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
945 0x0e000450, 0x0ff00ff0, "cfmvsr%c\tmvf%16-19d, %12-15r"},
946 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
947 0x0e100450, 0x0ff00ff0, "cfmvrs%c\t%12-15r, mvf%16-19d"},
948 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
949 0x0e000410, 0x0ff00ff0, "cfmvdlr%c\tmvd%16-19d, %12-15r"},
950 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
951 0x0e100410, 0x0ff00ff0, "cfmvrdl%c\t%12-15r, mvd%16-19d"},
952 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
953 0x0e000430, 0x0ff00ff0, "cfmvdhr%c\tmvd%16-19d, %12-15r"},
954 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
955 0x0e100430, 0x0ff00fff, "cfmvrdh%c\t%12-15r, mvd%16-19d"},
956 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
957 0x0e000510, 0x0ff00fff, "cfmv64lr%c\tmvdx%16-19d, %12-15r"},
958 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
959 0x0e100510, 0x0ff00fff, "cfmvr64l%c\t%12-15r, mvdx%16-19d"},
960 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
961 0x0e000530, 0x0ff00fff, "cfmv64hr%c\tmvdx%16-19d, %12-15r"},
962 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
963 0x0e100530, 0x0ff00fff, "cfmvr64h%c\t%12-15r, mvdx%16-19d"},
964 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
965 0x0e200440, 0x0ff00fff, "cfmval32%c\tmvax%12-15d, mvfx%16-19d"},
966 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
967 0x0e100440, 0x0ff00fff, "cfmv32al%c\tmvfx%12-15d, mvax%16-19d"},
968 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
969 0x0e200460, 0x0ff00fff, "cfmvam32%c\tmvax%12-15d, mvfx%16-19d"},
970 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
971 0x0e100460, 0x0ff00fff, "cfmv32am%c\tmvfx%12-15d, mvax%16-19d"},
972 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
973 0x0e200480, 0x0ff00fff, "cfmvah32%c\tmvax%12-15d, mvfx%16-19d"},
974 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
975 0x0e100480, 0x0ff00fff, "cfmv32ah%c\tmvfx%12-15d, mvax%16-19d"},
976 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
977 0x0e2004a0, 0x0ff00fff, "cfmva32%c\tmvax%12-15d, mvfx%16-19d"},
978 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
979 0x0e1004a0, 0x0ff00fff, "cfmv32a%c\tmvfx%12-15d, mvax%16-19d"},
980 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
981 0x0e2004c0, 0x0ff00fff, "cfmva64%c\tmvax%12-15d, mvdx%16-19d"},
982 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
983 0x0e1004c0, 0x0ff00fff, "cfmv64a%c\tmvdx%12-15d, mvax%16-19d"},
984 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
985 0x0e2004e0, 0x0fff0fff, "cfmvsc32%c\tdspsc, mvdx%12-15d"},
986 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
987 0x0e1004e0, 0x0fff0fff, "cfmv32sc%c\tmvdx%12-15d, dspsc"},
988 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
989 0x0e000400, 0x0ff00fff, "cfcpys%c\tmvf%12-15d, mvf%16-19d"},
990 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
991 0x0e000420, 0x0ff00fff, "cfcpyd%c\tmvd%12-15d, mvd%16-19d"},
992 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
993 0x0e000460, 0x0ff00fff, "cfcvtsd%c\tmvd%12-15d, mvf%16-19d"},
994 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
995 0x0e000440, 0x0ff00fff, "cfcvtds%c\tmvf%12-15d, mvd%16-19d"},
996 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
997 0x0e000480, 0x0ff00fff, "cfcvt32s%c\tmvf%12-15d, mvfx%16-19d"},
998 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
999 0x0e0004a0, 0x0ff00fff, "cfcvt32d%c\tmvd%12-15d, mvfx%16-19d"},
1000 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1001 0x0e0004c0, 0x0ff00fff, "cfcvt64s%c\tmvf%12-15d, mvdx%16-19d"},
1002 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1003 0x0e0004e0, 0x0ff00fff, "cfcvt64d%c\tmvd%12-15d, mvdx%16-19d"},
1004 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1005 0x0e100580, 0x0ff00fff, "cfcvts32%c\tmvfx%12-15d, mvf%16-19d"},
1006 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1007 0x0e1005a0, 0x0ff00fff, "cfcvtd32%c\tmvfx%12-15d, mvd%16-19d"},
1008 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1009 0x0e1005c0, 0x0ff00fff, "cftruncs32%c\tmvfx%12-15d, mvf%16-19d"},
1010 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1011 0x0e1005e0, 0x0ff00fff, "cftruncd32%c\tmvfx%12-15d, mvd%16-19d"},
1012 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1013 0x0e000550, 0x0ff00ff0, "cfrshl32%c\tmvfx%16-19d, mvfx%0-3d, %12-15r"},
1014 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1015 0x0e000570, 0x0ff00ff0, "cfrshl64%c\tmvdx%16-19d, mvdx%0-3d, %12-15r"},
1016 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1017 0x0e000500, 0x0ff00f10, "cfsh32%c\tmvfx%12-15d, mvfx%16-19d, #%I"},
1018 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1019 0x0e200500, 0x0ff00f10, "cfsh64%c\tmvdx%12-15d, mvdx%16-19d, #%I"},
1020 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1021 0x0e100490, 0x0ff00ff0, "cfcmps%c\t%12-15r, mvf%16-19d, mvf%0-3d"},
1022 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1023 0x0e1004b0, 0x0ff00ff0, "cfcmpd%c\t%12-15r, mvd%16-19d, mvd%0-3d"},
1024 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1025 0x0e100590, 0x0ff00ff0, "cfcmp32%c\t%12-15r, mvfx%16-19d, mvfx%0-3d"},
1026 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1027 0x0e1005b0, 0x0ff00ff0, "cfcmp64%c\t%12-15r, mvdx%16-19d, mvdx%0-3d"},
1028 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1029 0x0e300400, 0x0ff00fff, "cfabss%c\tmvf%12-15d, mvf%16-19d"},
1030 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1031 0x0e300420, 0x0ff00fff, "cfabsd%c\tmvd%12-15d, mvd%16-19d"},
1032 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1033 0x0e300440, 0x0ff00fff, "cfnegs%c\tmvf%12-15d, mvf%16-19d"},
1034 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1035 0x0e300460, 0x0ff00fff, "cfnegd%c\tmvd%12-15d, mvd%16-19d"},
1036 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1037 0x0e300480, 0x0ff00ff0, "cfadds%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
1038 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1039 0x0e3004a0, 0x0ff00ff0, "cfaddd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
1040 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1041 0x0e3004c0, 0x0ff00ff0, "cfsubs%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
1042 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1043 0x0e3004e0, 0x0ff00ff0, "cfsubd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
1044 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1045 0x0e100400, 0x0ff00ff0, "cfmuls%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
1046 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1047 0x0e100420, 0x0ff00ff0, "cfmuld%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
1048 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1049 0x0e300500, 0x0ff00fff, "cfabs32%c\tmvfx%12-15d, mvfx%16-19d"},
1050 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1051 0x0e300520, 0x0ff00fff, "cfabs64%c\tmvdx%12-15d, mvdx%16-19d"},
1052 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1053 0x0e300540, 0x0ff00fff, "cfneg32%c\tmvfx%12-15d, mvfx%16-19d"},
1054 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1055 0x0e300560, 0x0ff00fff, "cfneg64%c\tmvdx%12-15d, mvdx%16-19d"},
1056 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1057 0x0e300580, 0x0ff00ff0, "cfadd32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1058 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1059 0x0e3005a0, 0x0ff00ff0, "cfadd64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
1060 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1061 0x0e3005c0, 0x0ff00ff0, "cfsub32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1062 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1063 0x0e3005e0, 0x0ff00ff0, "cfsub64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
1064 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1065 0x0e100500, 0x0ff00ff0, "cfmul32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1066 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1067 0x0e100520, 0x0ff00ff0, "cfmul64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
1068 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1069 0x0e100540, 0x0ff00ff0, "cfmac32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1070 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1071 0x0e100560, 0x0ff00ff0, "cfmsc32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1072 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1073 0x0e000600, 0x0ff00f10,
1074 "cfmadd32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1075 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1076 0x0e100600, 0x0ff00f10,
1077 "cfmsub32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1078 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1079 0x0e200600, 0x0ff00f10,
1080 "cfmadda32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
1081 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1082 0x0e300600, 0x0ff00f10,
1083 "cfmsuba32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
1085 /* VFP Fused multiply add instructions. */
1086 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1087 0x0ea00a00, 0x0fb00f50, "vfma%c.f32\t%y1, %y2, %y0"},
1088 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1089 0x0ea00b00, 0x0fb00f50, "vfma%c.f64\t%z1, %z2, %z0"},
1090 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1091 0x0ea00a40, 0x0fb00f50, "vfms%c.f32\t%y1, %y2, %y0"},
1092 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1093 0x0ea00b40, 0x0fb00f50, "vfms%c.f64\t%z1, %z2, %z0"},
1094 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1095 0x0e900a40, 0x0fb00f50, "vfnma%c.f32\t%y1, %y2, %y0"},
1096 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1097 0x0e900b40, 0x0fb00f50, "vfnma%c.f64\t%z1, %z2, %z0"},
1098 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1099 0x0e900a00, 0x0fb00f50, "vfnms%c.f32\t%y1, %y2, %y0"},
1100 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1101 0x0e900b00, 0x0fb00f50, "vfnms%c.f64\t%z1, %z2, %z0"},
1104 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1105 0xfe000a00, 0xff800f50, "vsel%20-21c%u.f32\t%y1, %y2, %y0"},
1106 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1107 0xfe000b00, 0xff800f50, "vsel%20-21c%u.f64\t%z1, %z2, %z0"},
1108 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1109 0xfe800a00, 0xffb00f50, "vmaxnm%u.f32\t%y1, %y2, %y0"},
1110 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1111 0xfe800b00, 0xffb00f50, "vmaxnm%u.f64\t%z1, %z2, %z0"},
1112 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1113 0xfe800a40, 0xffb00f50, "vminnm%u.f32\t%y1, %y2, %y0"},
1114 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1115 0xfe800b40, 0xffb00f50, "vminnm%u.f64\t%z1, %z2, %z0"},
1116 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1117 0xfebc0a40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f32\t%y1, %y0"},
1118 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1119 0xfebc0b40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f64\t%y1, %z0"},
1120 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1121 0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32\t%y1, %y0"},
1122 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1123 0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64\t%z1, %z0"},
1124 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1125 0xfeb80a40, 0xffbc0fd0, "vrint%16-17?mpna%u.f32\t%y1, %y0"},
1126 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1127 0xfeb80b40, 0xffbc0fd0, "vrint%16-17?mpna%u.f64\t%z1, %z0"},
1129 /* Generic coprocessor instructions. */
1130 {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_GENERIC_START, 0, "" },
1131 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
1132 0x0c400000, 0x0ff00000, "mcrr%c\t%8-11d, %4-7d, %12-15R, %16-19r, cr%0-3d"},
1133 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
1134 0x0c500000, 0x0ff00000,
1135 "mrrc%c\t%8-11d, %4-7d, %12-15Ru, %16-19Ru, cr%0-3d"},
1136 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1137 0x0e000000, 0x0f000010,
1138 "cdp%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
1139 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1140 0x0e10f010, 0x0f10f010,
1141 "mrc%c\t%8-11d, %21-23d, APSR_nzcv, cr%16-19d, cr%0-3d, {%5-7d}"},
1142 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1143 0x0e100010, 0x0f100010,
1144 "mrc%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
1145 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1146 0x0e000010, 0x0f100010,
1147 "mcr%c\t%8-11d, %21-23d, %12-15R, cr%16-19d, cr%0-3d, {%5-7d}"},
1148 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1149 0x0c000000, 0x0e100000, "stc%22'l%c\t%8-11d, cr%12-15d, %A"},
1150 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1151 0x0c100000, 0x0e100000, "ldc%22'l%c\t%8-11d, cr%12-15d, %A"},
1153 /* V6 coprocessor instructions. */
1154 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
1155 0xfc500000, 0xfff00000,
1156 "mrrc2%c\t%8-11d, %4-7d, %12-15Ru, %16-19Ru, cr%0-3d"},
1157 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
1158 0xfc400000, 0xfff00000,
1159 "mcrr2%c\t%8-11d, %4-7d, %12-15R, %16-19R, cr%0-3d"},
1161 /* ARMv8.3 AdvSIMD instructions in the space of coprocessor 8. */
1162 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1163 0xfc800800, 0xfeb00f10, "vcadd%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%24?29%24'70"},
1164 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1165 0xfc900800, 0xfeb00f10, "vcadd%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%24?29%24'70"},
1166 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1167 0xfc200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%23'90"},
1168 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1169 0xfd200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%23?21%23?780"},
1170 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1171 0xfc300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%23'90"},
1172 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1173 0xfd300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%23?21%23?780"},
1174 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1175 0xfe000800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3D[%5?10], #%20'90"},
1176 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1177 0xfe200800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3D[%5?10], #%20?21%20?780"},
1178 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1179 0xfe800800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5D[0], #%20'90"},
1180 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1181 0xfea00800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5D[0], #%20?21%20?780"},
1183 /* Dot Product instructions in the space of coprocessor 13. */
1184 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
1185 0xfc200d00, 0xffb00f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3,5V"},
1186 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
1187 0xfe000d00, 0xff000f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3D[%5?10]"},
1189 /* ARMv8.2 FMAC Long instructions in the space of coprocessor 8. */
1190 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1191 0xfc200810, 0xffb00f50, "vfmal.f16\t%12-15,22D, s%7,16-19d, s%5,0-3d"},
1192 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1193 0xfca00810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, s%7,16-19d, s%5,0-3d"},
1194 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1195 0xfc200850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, d%16-19,7d, d%0-3,5d"},
1196 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1197 0xfca00850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, d%16-19,7d, d%0-3,5d"},
1198 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1199 0xfe000810, 0xffb00f50, "vfmal.f16\t%12-15,22D, s%7,16-19d, s%5,0-2d[%3d]"},
1200 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1201 0xfe100810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, s%7,16-19d, s%5,0-2d[%3d]"},
1202 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1203 0xfe000850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, d%16-19,7d, d%0-2d[%3,5d]"},
1204 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1205 0xfe100850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, d%16-19,7d, d%0-2d[%3,5d]"},
1207 /* V5 coprocessor instructions. */
1208 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1209 0xfc100000, 0xfe100000, "ldc2%22'l%c\t%8-11d, cr%12-15d, %A"},
1210 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1211 0xfc000000, 0xfe100000, "stc2%22'l%c\t%8-11d, cr%12-15d, %A"},
1212 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1213 0xfe000000, 0xff000010,
1214 "cdp2%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
1215 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1216 0xfe000010, 0xff100010,
1217 "mcr2%c\t%8-11d, %21-23d, %12-15R, cr%16-19d, cr%0-3d, {%5-7d}"},
1218 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1219 0xfe100010, 0xff100010,
1220 "mrc2%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
1222 /* ARMv8.2 half-precision Floating point coprocessor 9 (VFP) instructions.
1223 cp_num: bit <11:8> == 0b1001.
1224 cond: bit <31:28> == 0b1110, otherwise, it's UNPREDICTABLE. */
1225 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1226 0x0eb009c0, 0x0fbf0fd0, "vabs%c.f16\t%y1, %y0"},
1227 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1228 0x0e300900, 0x0fb00f50, "vadd%c.f16\t%y1, %y2, %y0"},
1229 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1230 0x0eb40940, 0x0fbf0f50, "vcmp%7'e%c.f16\t%y1, %y0"},
1231 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1232 0x0eb50940, 0x0fbf0f70, "vcmp%7'e%c.f16\t%y1, #0.0"},
1233 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1234 0x0eba09c0, 0x0fbe0fd0, "vcvt%c.f16.%16?us%7?31%7?26\t%y1, %y1, #%5,0-3k"},
1235 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1236 0x0ebe09c0, 0x0fbe0fd0, "vcvt%c.%16?us%7?31%7?26.f16\t%y1, %y1, #%5,0-3k"},
1237 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1238 0x0ebc0940, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f16\t%y1, %y0"},
1239 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1240 0x0eb80940, 0x0fbf0f50, "vcvt%c.f16.%7?su32\t%y1, %y0"},
1241 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1242 0xfebc0940, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f16\t%y1, %y0"},
1243 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1244 0x0e800900, 0x0fb00f50, "vdiv%c.f16\t%y1, %y2, %y0"},
1245 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1246 0x0ea00900, 0x0fb00f50, "vfma%c.f16\t%y1, %y2, %y0"},
1247 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1248 0x0ea00940, 0x0fb00f50, "vfms%c.f16\t%y1, %y2, %y0"},
1249 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1250 0x0e900940, 0x0fb00f50, "vfnma%c.f16\t%y1, %y2, %y0"},
1251 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1252 0x0e900900, 0x0fb00f50, "vfnms%c.f16\t%y1, %y2, %y0"},
1253 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1254 0xfeb00ac0, 0xffbf0fd0, "vins.f16\t%y1, %y0"},
1255 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1256 0xfeb00a40, 0xffbf0fd0, "vmovx%c.f16\t%y1, %y0"},
1257 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1258 0x0d100900, 0x0f300f00, "vldr%c.16\t%y1, %A"},
1259 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1260 0x0d000900, 0x0f300f00, "vstr%c.16\t%y1, %A"},
1261 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1262 0xfe800900, 0xffb00f50, "vmaxnm%c.f16\t%y1, %y2, %y0"},
1263 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1264 0xfe800940, 0xffb00f50, "vminnm%c.f16\t%y1, %y2, %y0"},
1265 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1266 0x0e000900, 0x0fb00f50, "vmla%c.f16\t%y1, %y2, %y0"},
1267 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1268 0x0e000940, 0x0fb00f50, "vmls%c.f16\t%y1, %y2, %y0"},
1269 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1270 0x0e100910, 0x0ff00f7f, "vmov%c.f16\t%12-15r, %y2"},
1271 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1272 0x0e000910, 0x0ff00f7f, "vmov%c.f16\t%y2, %12-15r"},
1273 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1274 0xeb00900, 0x0fb00ff0, "vmov%c.f16\t%y1, #%0-3,16-19E"},
1275 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1276 0x0e200900, 0x0fb00f50, "vmul%c.f16\t%y1, %y2, %y0"},
1277 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1278 0x0eb10940, 0x0fbf0fd0, "vneg%c.f16\t%y1, %y0"},
1279 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1280 0x0e100940, 0x0fb00f50, "vnmla%c.f16\t%y1, %y2, %y0"},
1281 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1282 0x0e100900, 0x0fb00f50, "vnmls%c.f16\t%y1, %y2, %y0"},
1283 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1284 0x0e200940, 0x0fb00f50, "vnmul%c.f16\t%y1, %y2, %y0"},
1285 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1286 0x0eb60940, 0x0fbe0f50, "vrint%7,16??xzr%c.f16\t%y1, %y0"},
1287 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1288 0xfeb80940, 0xffbc0fd0, "vrint%16-17?mpna%u.f16\t%y1, %y0"},
1289 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1290 0xfe000900, 0xff800f50, "vsel%20-21c%u.f16\t%y1, %y2, %y0"},
1291 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1292 0x0eb109c0, 0x0fbf0fd0, "vsqrt%c.f16\t%y1, %y0"},
1293 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1294 0x0e300940, 0x0fb00f50, "vsub%c.f16\t%y1, %y2, %y0"},
1296 /* ARMv8.3 javascript conversion instruction. */
1297 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1298 0x0eb90bc0, 0x0fbf0fd0, "vjcvt%c.s32.f64\t%y1, %z0"},
1300 {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
1303 /* Neon opcode table: This does not encode the top byte -- that is
1304 checked by the print_insn_neon routine, as it depends on whether we are
1305 doing thumb32 or arm32 disassembly. */
1307 /* print_insn_neon recognizes the following format control codes:
1311 %c print condition code
1312 %u print condition code (unconditional in ARM mode,
1313 UNPREDICTABLE if not AL in Thumb)
1314 %A print v{st,ld}[1234] operands
1315 %B print v{st,ld}[1234] any one operands
1316 %C print v{st,ld}[1234] single->all operands
1318 %E print vmov, vmvn, vorr, vbic encoded constant
1319 %F print vtbl,vtbx register list
1321 %<bitfield>r print as an ARM register
1322 %<bitfield>d print the bitfield in decimal
1323 %<bitfield>e print the 2^N - bitfield in decimal
1324 %<bitfield>D print as a NEON D register
1325 %<bitfield>Q print as a NEON Q register
1326 %<bitfield>R print as a NEON D or Q register
1327 %<bitfield>Sn print byte scaled width limited by n
1328 %<bitfield>Tn print short scaled width limited by n
1329 %<bitfield>Un print long scaled width limited by n
1331 %<bitfield>'c print specified char iff bitfield is all ones
1332 %<bitfield>`c print specified char iff bitfield is all zeroes
1333 %<bitfield>?ab... select from array of values in big endian order. */
1335 static const struct opcode32 neon_opcodes[] =
1338 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1339 0xf2b00840, 0xffb00850,
1340 "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
1341 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1342 0xf2b00000, 0xffb00810,
1343 "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
1345 /* Data transfer between ARM and NEON registers. */
1346 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1347 0x0e800b10, 0x1ff00f70, "vdup%c.32\t%16-19,7D, %12-15r"},
1348 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1349 0x0e800b30, 0x1ff00f70, "vdup%c.16\t%16-19,7D, %12-15r"},
1350 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1351 0x0ea00b10, 0x1ff00f70, "vdup%c.32\t%16-19,7Q, %12-15r"},
1352 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1353 0x0ea00b30, 0x1ff00f70, "vdup%c.16\t%16-19,7Q, %12-15r"},
1354 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1355 0x0ec00b10, 0x1ff00f70, "vdup%c.8\t%16-19,7D, %12-15r"},
1356 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1357 0x0ee00b10, 0x1ff00f70, "vdup%c.8\t%16-19,7Q, %12-15r"},
1359 /* Move data element to all lanes. */
1360 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1361 0xf3b40c00, 0xffb70f90, "vdup%c.32\t%12-15,22R, %0-3,5D[%19d]"},
1362 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1363 0xf3b20c00, 0xffb30f90, "vdup%c.16\t%12-15,22R, %0-3,5D[%18-19d]"},
1364 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1365 0xf3b10c00, 0xffb10f90, "vdup%c.8\t%12-15,22R, %0-3,5D[%17-19d]"},
1368 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1369 0xf3b00800, 0xffb00c50, "vtbl%c.8\t%12-15,22D, %F, %0-3,5D"},
1370 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1371 0xf3b00840, 0xffb00c50, "vtbx%c.8\t%12-15,22D, %F, %0-3,5D"},
1373 /* Half-precision conversions. */
1374 {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
1375 0xf3b60600, 0xffbf0fd0, "vcvt%c.f16.f32\t%12-15,22D, %0-3,5Q"},
1376 {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
1377 0xf3b60700, 0xffbf0fd0, "vcvt%c.f32.f16\t%12-15,22Q, %0-3,5D"},
1379 /* NEON fused multiply add instructions. */
1380 {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
1381 0xf2000c10, 0xffb00f10, "vfma%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1382 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1383 0xf2100c10, 0xffb00f10, "vfma%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1384 {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
1385 0xf2200c10, 0xffb00f10, "vfms%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1386 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1387 0xf2300c10, 0xffb00f10, "vfms%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1389 /* Two registers, miscellaneous. */
1390 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1391 0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32\t%12-15,22R, %0-3,5R"},
1392 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1393 0xf3b60400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f16\t%12-15,22R, %0-3,5R"},
1394 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1395 0xf3bb0000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us32.f32\t%12-15,22R, %0-3,5R"},
1396 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1397 0xf3b70000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us16.f16\t%12-15,22R, %0-3,5R"},
1398 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1399 0xf3b00300, 0xffbf0fd0, "aese%u.8\t%12-15,22Q, %0-3,5Q"},
1400 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1401 0xf3b00340, 0xffbf0fd0, "aesd%u.8\t%12-15,22Q, %0-3,5Q"},
1402 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1403 0xf3b00380, 0xffbf0fd0, "aesmc%u.8\t%12-15,22Q, %0-3,5Q"},
1404 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1405 0xf3b003c0, 0xffbf0fd0, "aesimc%u.8\t%12-15,22Q, %0-3,5Q"},
1406 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1407 0xf3b902c0, 0xffbf0fd0, "sha1h%u.32\t%12-15,22Q, %0-3,5Q"},
1408 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1409 0xf3ba0380, 0xffbf0fd0, "sha1su1%u.32\t%12-15,22Q, %0-3,5Q"},
1410 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1411 0xf3ba03c0, 0xffbf0fd0, "sha256su0%u.32\t%12-15,22Q, %0-3,5Q"},
1412 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1413 0xf2880a10, 0xfebf0fd0, "vmovl%c.%24?us8\t%12-15,22Q, %0-3,5D"},
1414 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1415 0xf2900a10, 0xfebf0fd0, "vmovl%c.%24?us16\t%12-15,22Q, %0-3,5D"},
1416 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1417 0xf2a00a10, 0xfebf0fd0, "vmovl%c.%24?us32\t%12-15,22Q, %0-3,5D"},
1418 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1419 0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
1420 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1421 0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
1422 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1423 0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
1424 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1425 0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
1426 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1427 0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
1428 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1429 0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
1430 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1431 0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
1432 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1433 0xf3b20300, 0xffb30fd0,
1434 "vshll%c.i%18-19S2\t%12-15,22Q, %0-3,5D, #%18-19S2"},
1435 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1436 0xf3bb0400, 0xffbf0e90, "vrecpe%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
1437 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1438 0xf3b70400, 0xffbf0e90, "vrecpe%c.%8?fu16\t%12-15,22R, %0-3,5R"},
1439 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1440 0xf3bb0480, 0xffbf0e90, "vrsqrte%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
1441 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1442 0xf3b70480, 0xffbf0e90, "vrsqrte%c.%8?fu16\t%12-15,22R, %0-3,5R"},
1443 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1444 0xf3b00000, 0xffb30f90, "vrev64%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1445 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1446 0xf3b00080, 0xffb30f90, "vrev32%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1447 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1448 0xf3b00100, 0xffb30f90, "vrev16%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1449 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1450 0xf3b00400, 0xffb30f90, "vcls%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
1451 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1452 0xf3b00480, 0xffb30f90, "vclz%c.i%18-19S2\t%12-15,22R, %0-3,5R"},
1453 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1454 0xf3b00700, 0xffb30f90, "vqabs%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
1455 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1456 0xf3b00780, 0xffb30f90, "vqneg%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
1457 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1458 0xf3b20080, 0xffb30f90, "vtrn%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1459 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1460 0xf3b20100, 0xffb30f90, "vuzp%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1461 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1462 0xf3b20180, 0xffb30f90, "vzip%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1463 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1464 0xf3b10000, 0xffb30b90, "vcgt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1465 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1466 0xf3b10080, 0xffb30b90, "vcge%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1467 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1468 0xf3b10100, 0xffb30b90, "vceq%c.%10?fi%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1469 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1470 0xf3b10180, 0xffb30b90, "vcle%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1471 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1472 0xf3b10200, 0xffb30b90, "vclt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1473 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1474 0xf3b10300, 0xffb30b90, "vabs%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
1475 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1476 0xf3b10380, 0xffb30b90, "vneg%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
1477 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1478 0xf3b00200, 0xffb30f10, "vpaddl%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
1479 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1480 0xf3b00600, 0xffb30f10, "vpadal%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
1481 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1482 0xf3bb0600, 0xffbf0e10,
1483 "vcvt%c.%7-8?usff%18-19Sa.%7-8?ffus%18-19Sa\t%12-15,22R, %0-3,5R"},
1484 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1485 0xf3b70600, 0xffbf0e10,
1486 "vcvt%c.%7-8?usff16.%7-8?ffus16\t%12-15,22R, %0-3,5R"},
1488 /* Three registers of the same length. */
1489 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1490 0xf2000c40, 0xffb00f50, "sha1c%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1491 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1492 0xf2100c40, 0xffb00f50, "sha1p%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1493 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1494 0xf2200c40, 0xffb00f50, "sha1m%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1495 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1496 0xf2300c40, 0xffb00f50, "sha1su0%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1497 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1498 0xf3000c40, 0xffb00f50, "sha256h%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1499 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1500 0xf3100c40, 0xffb00f50, "sha256h2%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1501 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1502 0xf3200c40, 0xffb00f50, "sha256su1%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1503 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1504 0xf3000f10, 0xffb00f10, "vmaxnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1505 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1506 0xf3100f10, 0xffb00f10, "vmaxnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1507 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1508 0xf3200f10, 0xffb00f10, "vminnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1509 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1510 0xf3300f10, 0xffb00f10, "vminnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1511 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1512 0xf2000110, 0xffb00f10, "vand%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1513 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1514 0xf2100110, 0xffb00f10, "vbic%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1515 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1516 0xf2200110, 0xffb00f10, "vorr%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1517 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1518 0xf2300110, 0xffb00f10, "vorn%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1519 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1520 0xf3000110, 0xffb00f10, "veor%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1521 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1522 0xf3100110, 0xffb00f10, "vbsl%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1523 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1524 0xf3200110, 0xffb00f10, "vbit%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1525 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1526 0xf3300110, 0xffb00f10, "vbif%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1527 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1528 0xf2000d00, 0xffb00f10, "vadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1529 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1530 0xf2100d00, 0xffb00f10, "vadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1531 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1532 0xf2000d10, 0xffb00f10, "vmla%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1533 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1534 0xf2100d10, 0xffb00f10, "vmla%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1535 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1536 0xf2000e00, 0xffb00f10, "vceq%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1537 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1538 0xf2100e00, 0xffb00f10, "vceq%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1539 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1540 0xf2000f00, 0xffb00f10, "vmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1541 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1542 0xf2100f00, 0xffb00f10, "vmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1543 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1544 0xf2000f10, 0xffb00f10, "vrecps%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1545 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1546 0xf2100f10, 0xffb00f10, "vrecps%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1547 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1548 0xf2200d00, 0xffb00f10, "vsub%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1549 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1550 0xf2300d00, 0xffb00f10, "vsub%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1551 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1552 0xf2200d10, 0xffb00f10, "vmls%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1553 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1554 0xf2300d10, 0xffb00f10, "vmls%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1555 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1556 0xf2200f00, 0xffb00f10, "vmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1557 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1558 0xf2300f00, 0xffb00f10, "vmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1559 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1560 0xf2200f10, 0xffb00f10, "vrsqrts%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1561 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1562 0xf2300f10, 0xffb00f10, "vrsqrts%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1563 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1564 0xf3000d00, 0xffb00f10, "vpadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1565 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1566 0xf3100d00, 0xffb00f10, "vpadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1567 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1568 0xf3000d10, 0xffb00f10, "vmul%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1569 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1570 0xf3100d10, 0xffb00f10, "vmul%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1571 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1572 0xf3000e00, 0xffb00f10, "vcge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1573 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1574 0xf3100e00, 0xffb00f10, "vcge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1575 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1576 0xf3000e10, 0xffb00f10, "vacge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1577 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1578 0xf3100e10, 0xffb00f10, "vacge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1579 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1580 0xf3000f00, 0xffb00f10, "vpmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1581 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1582 0xf3100f00, 0xffb00f10, "vpmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1583 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1584 0xf3200d00, 0xffb00f10, "vabd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1585 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1586 0xf3300d00, 0xffb00f10, "vabd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1587 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1588 0xf3200e00, 0xffb00f10, "vcgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1589 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1590 0xf3300e00, 0xffb00f10, "vcgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1591 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1592 0xf3200e10, 0xffb00f10, "vacgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1593 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1594 0xf3300e10, 0xffb00f10, "vacgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1595 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1596 0xf3200f00, 0xffb00f10, "vpmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1597 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1598 0xf3300f00, 0xffb00f10, "vpmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1599 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1600 0xf2000800, 0xff800f10, "vadd%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1601 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1602 0xf2000810, 0xff800f10, "vtst%c.%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1603 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1604 0xf2000900, 0xff800f10, "vmla%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1605 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1606 0xf2000b00, 0xff800f10,
1607 "vqdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1608 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1609 0xf2000b10, 0xff800f10,
1610 "vpadd%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1611 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1612 0xf3000800, 0xff800f10, "vsub%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1613 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1614 0xf3000810, 0xff800f10, "vceq%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1615 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1616 0xf3000900, 0xff800f10, "vmls%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1617 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1618 0xf3000b00, 0xff800f10,
1619 "vqrdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1620 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1621 0xf2000000, 0xfe800f10,
1622 "vhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1623 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1624 0xf2000010, 0xfe800f10,
1625 "vqadd%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1626 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1627 0xf2000100, 0xfe800f10,
1628 "vrhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1629 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1630 0xf2000200, 0xfe800f10,
1631 "vhsub%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1632 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1633 0xf2000210, 0xfe800f10,
1634 "vqsub%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1635 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1636 0xf2000300, 0xfe800f10,
1637 "vcgt%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1638 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1639 0xf2000310, 0xfe800f10,
1640 "vcge%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1641 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1642 0xf2000400, 0xfe800f10,
1643 "vshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1644 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1645 0xf2000410, 0xfe800f10,
1646 "vqshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1647 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1648 0xf2000500, 0xfe800f10,
1649 "vrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1650 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1651 0xf2000510, 0xfe800f10,
1652 "vqrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1653 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1654 0xf2000600, 0xfe800f10,
1655 "vmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1656 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1657 0xf2000610, 0xfe800f10,
1658 "vmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1659 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1660 0xf2000700, 0xfe800f10,
1661 "vabd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1662 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1663 0xf2000710, 0xfe800f10,
1664 "vaba%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1665 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1666 0xf2000910, 0xfe800f10,
1667 "vmul%c.%24?pi%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1668 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1669 0xf2000a00, 0xfe800f10,
1670 "vpmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1671 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1672 0xf2000a10, 0xfe800f10,
1673 "vpmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1674 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1675 0xf3000b10, 0xff800f10,
1676 "vqrdmlah%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1677 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1678 0xf3000c10, 0xff800f10,
1679 "vqrdmlsh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1681 /* One register and an immediate value. */
1682 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1683 0xf2800e10, 0xfeb80fb0, "vmov%c.i8\t%12-15,22R, %E"},
1684 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1685 0xf2800e30, 0xfeb80fb0, "vmov%c.i64\t%12-15,22R, %E"},
1686 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1687 0xf2800f10, 0xfeb80fb0, "vmov%c.f32\t%12-15,22R, %E"},
1688 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1689 0xf2800810, 0xfeb80db0, "vmov%c.i16\t%12-15,22R, %E"},
1690 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1691 0xf2800830, 0xfeb80db0, "vmvn%c.i16\t%12-15,22R, %E"},
1692 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1693 0xf2800910, 0xfeb80db0, "vorr%c.i16\t%12-15,22R, %E"},
1694 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1695 0xf2800930, 0xfeb80db0, "vbic%c.i16\t%12-15,22R, %E"},
1696 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1697 0xf2800c10, 0xfeb80eb0, "vmov%c.i32\t%12-15,22R, %E"},
1698 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1699 0xf2800c30, 0xfeb80eb0, "vmvn%c.i32\t%12-15,22R, %E"},
1700 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1701 0xf2800110, 0xfeb809b0, "vorr%c.i32\t%12-15,22R, %E"},
1702 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1703 0xf2800130, 0xfeb809b0, "vbic%c.i32\t%12-15,22R, %E"},
1704 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1705 0xf2800010, 0xfeb808b0, "vmov%c.i32\t%12-15,22R, %E"},
1706 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1707 0xf2800030, 0xfeb808b0, "vmvn%c.i32\t%12-15,22R, %E"},
1709 /* Two registers and a shift amount. */
1710 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1711 0xf2880810, 0xffb80fd0, "vshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1712 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1713 0xf2880850, 0xffb80fd0, "vrshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1714 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1715 0xf2880810, 0xfeb80fd0, "vqshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1716 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1717 0xf2880850, 0xfeb80fd0, "vqrshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1718 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1719 0xf2880910, 0xfeb80fd0, "vqshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1720 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1721 0xf2880950, 0xfeb80fd0,
1722 "vqrshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1723 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1724 0xf2880a10, 0xfeb80fd0, "vshll%c.%24?us8\t%12-15,22Q, %0-3,5D, #%16-18d"},
1725 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1726 0xf2900810, 0xffb00fd0, "vshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1727 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1728 0xf2900850, 0xffb00fd0, "vrshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1729 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1730 0xf2880510, 0xffb80f90, "vshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
1731 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1732 0xf3880410, 0xffb80f90, "vsri%c.8\t%12-15,22R, %0-3,5R, #%16-18e"},
1733 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1734 0xf3880510, 0xffb80f90, "vsli%c.8\t%12-15,22R, %0-3,5R, #%16-18d"},
1735 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1736 0xf3880610, 0xffb80f90, "vqshlu%c.s8\t%12-15,22R, %0-3,5R, #%16-18d"},
1737 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1738 0xf2900810, 0xfeb00fd0, "vqshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1739 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1740 0xf2900850, 0xfeb00fd0, "vqrshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1741 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1742 0xf2900910, 0xfeb00fd0, "vqshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1743 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1744 0xf2900950, 0xfeb00fd0,
1745 "vqrshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1746 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1747 0xf2900a10, 0xfeb00fd0, "vshll%c.%24?us16\t%12-15,22Q, %0-3,5D, #%16-19d"},
1748 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1749 0xf2880010, 0xfeb80f90, "vshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1750 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1751 0xf2880110, 0xfeb80f90, "vsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1752 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1753 0xf2880210, 0xfeb80f90, "vrshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1754 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1755 0xf2880310, 0xfeb80f90, "vrsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1756 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1757 0xf2880710, 0xfeb80f90, "vqshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
1758 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1759 0xf2a00810, 0xffa00fd0, "vshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1760 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1761 0xf2a00850, 0xffa00fd0, "vrshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1762 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1763 0xf2900510, 0xffb00f90, "vshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
1764 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1765 0xf3900410, 0xffb00f90, "vsri%c.16\t%12-15,22R, %0-3,5R, #%16-19e"},
1766 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1767 0xf3900510, 0xffb00f90, "vsli%c.16\t%12-15,22R, %0-3,5R, #%16-19d"},
1768 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1769 0xf3900610, 0xffb00f90, "vqshlu%c.s16\t%12-15,22R, %0-3,5R, #%16-19d"},
1770 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1771 0xf2a00a10, 0xfea00fd0, "vshll%c.%24?us32\t%12-15,22Q, %0-3,5D, #%16-20d"},
1772 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1773 0xf2900010, 0xfeb00f90, "vshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1774 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1775 0xf2900110, 0xfeb00f90, "vsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1776 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1777 0xf2900210, 0xfeb00f90, "vrshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1778 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1779 0xf2900310, 0xfeb00f90, "vrsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1780 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1781 0xf2900710, 0xfeb00f90, "vqshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
1782 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1783 0xf2a00810, 0xfea00fd0, "vqshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1784 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1785 0xf2a00850, 0xfea00fd0, "vqrshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1786 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1787 0xf2a00910, 0xfea00fd0, "vqshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1788 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1789 0xf2a00950, 0xfea00fd0,
1790 "vqrshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1791 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1792 0xf2a00510, 0xffa00f90, "vshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
1793 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1794 0xf3a00410, 0xffa00f90, "vsri%c.32\t%12-15,22R, %0-3,5R, #%16-20e"},
1795 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1796 0xf3a00510, 0xffa00f90, "vsli%c.32\t%12-15,22R, %0-3,5R, #%16-20d"},
1797 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1798 0xf3a00610, 0xffa00f90, "vqshlu%c.s32\t%12-15,22R, %0-3,5R, #%16-20d"},
1799 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1800 0xf2a00010, 0xfea00f90, "vshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1801 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1802 0xf2a00110, 0xfea00f90, "vsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1803 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1804 0xf2a00210, 0xfea00f90, "vrshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1805 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1806 0xf2a00310, 0xfea00f90, "vrsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1807 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1808 0xf2a00710, 0xfea00f90, "vqshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
1809 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1810 0xf2800590, 0xff800f90, "vshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
1811 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1812 0xf3800490, 0xff800f90, "vsri%c.64\t%12-15,22R, %0-3,5R, #%16-21e"},
1813 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1814 0xf3800590, 0xff800f90, "vsli%c.64\t%12-15,22R, %0-3,5R, #%16-21d"},
1815 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1816 0xf3800690, 0xff800f90, "vqshlu%c.s64\t%12-15,22R, %0-3,5R, #%16-21d"},
1817 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1818 0xf2800090, 0xfe800f90, "vshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1819 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1820 0xf2800190, 0xfe800f90, "vsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1821 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1822 0xf2800290, 0xfe800f90, "vrshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1823 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1824 0xf2800390, 0xfe800f90, "vrsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1825 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1826 0xf2800790, 0xfe800f90, "vqshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
1827 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1828 0xf2a00e10, 0xfea00e90,
1829 "vcvt%c.%24,8?usff32.%24,8?ffus32\t%12-15,22R, %0-3,5R, #%16-20e"},
1830 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1831 0xf2a00c10, 0xfea00e90,
1832 "vcvt%c.%24,8?usff16.%24,8?ffus16\t%12-15,22R, %0-3,5R, #%16-20e"},
1834 /* Three registers of different lengths. */
1835 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1836 0xf2a00e00, 0xfeb00f50, "vmull%c.p64\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1837 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1838 0xf2800e00, 0xfea00f50, "vmull%c.p%20S0\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1839 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1840 0xf2800400, 0xff800f50,
1841 "vaddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1842 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1843 0xf2800600, 0xff800f50,
1844 "vsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1845 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1846 0xf2800900, 0xff800f50,
1847 "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1848 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1849 0xf2800b00, 0xff800f50,
1850 "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1851 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1852 0xf2800d00, 0xff800f50,
1853 "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1854 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1855 0xf3800400, 0xff800f50,
1856 "vraddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1857 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1858 0xf3800600, 0xff800f50,
1859 "vrsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1860 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1861 0xf2800000, 0xfe800f50,
1862 "vaddl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1863 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1864 0xf2800100, 0xfe800f50,
1865 "vaddw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
1866 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1867 0xf2800200, 0xfe800f50,
1868 "vsubl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1869 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1870 0xf2800300, 0xfe800f50,
1871 "vsubw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
1872 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1873 0xf2800500, 0xfe800f50,
1874 "vabal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1875 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1876 0xf2800700, 0xfe800f50,
1877 "vabdl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1878 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1879 0xf2800800, 0xfe800f50,
1880 "vmlal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1881 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1882 0xf2800a00, 0xfe800f50,
1883 "vmlsl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1884 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1885 0xf2800c00, 0xfe800f50,
1886 "vmull%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1888 /* Two registers and a scalar. */
1889 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1890 0xf2800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1891 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1892 0xf2800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
1893 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1894 0xf2900140, 0xffb00f50, "vmla%c.f16\t%12-15,22D, %16-19,7D, %D"},
1895 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1896 0xf2800340, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1897 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1898 0xf2800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1899 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1900 0xf2800540, 0xff900f50, "vmls%c.f%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1901 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1902 0xf2900540, 0xffb00f50, "vmls%c.f16\t%12-15,22D, %16-19,7D, %D"},
1903 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1904 0xf2800740, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1905 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1906 0xf2800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1907 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1908 0xf2800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
1909 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1910 0xf2900940, 0xffb00f50, "vmul%c.f16\t%12-15,22D, %16-19,7D, %D"},
1911 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1912 0xf2800b40, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1913 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1914 0xf2800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1915 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1916 0xf2800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1917 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1918 0xf3800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1919 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1920 0xf3800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
1921 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1922 0xf3900140, 0xffb00f50, "vmla%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
1923 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1924 0xf3800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1925 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1926 0xf3800540, 0xff900f50, "vmls%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
1927 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1928 0xf3900540, 0xffb00f50, "vmls%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
1929 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1930 0xf3800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1931 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1932 0xf3800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
1933 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1934 0xf3900940, 0xffb00f50, "vmul%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
1935 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1936 0xf3800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1937 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1938 0xf3800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1939 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1940 0xf2800240, 0xfe800f50,
1941 "vmlal%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1942 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1943 0xf2800640, 0xfe800f50,
1944 "vmlsl%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1945 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1946 0xf2800a40, 0xfe800f50,
1947 "vmull%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1948 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1949 0xf2800e40, 0xff800f50,
1950 "vqrdmlah%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1951 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1952 0xf2800f40, 0xff800f50,
1953 "vqrdmlsh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1954 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1955 0xf3800e40, 0xff800f50,
1956 "vqrdmlah%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1957 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1958 0xf3800f40, 0xff800f50,
1959 "vqrdmlsh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"
1962 /* Element and structure load/store. */
1963 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1964 0xf4a00fc0, 0xffb00fc0, "vld4%c.32\t%C"},
1965 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1966 0xf4a00c00, 0xffb00f00, "vld1%c.%6-7S2\t%C"},
1967 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1968 0xf4a00d00, 0xffb00f00, "vld2%c.%6-7S2\t%C"},
1969 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1970 0xf4a00e00, 0xffb00f00, "vld3%c.%6-7S2\t%C"},
1971 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1972 0xf4a00f00, 0xffb00f00, "vld4%c.%6-7S2\t%C"},
1973 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1974 0xf4000200, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1975 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1976 0xf4000300, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
1977 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1978 0xf4000400, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
1979 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1980 0xf4000500, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
1981 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1982 0xf4000600, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1983 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1984 0xf4000700, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1985 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1986 0xf4000800, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
1987 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1988 0xf4000900, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
1989 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1990 0xf4000a00, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1991 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1992 0xf4000000, 0xff900e00, "v%21?ls%21?dt4%c.%6-7S2\t%A"},
1993 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1994 0xf4800000, 0xff900300, "v%21?ls%21?dt1%c.%10-11S2\t%B"},
1995 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1996 0xf4800100, 0xff900300, "v%21?ls%21?dt2%c.%10-11S2\t%B"},
1997 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1998 0xf4800200, 0xff900300, "v%21?ls%21?dt3%c.%10-11S2\t%B"},
1999 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2000 0xf4800300, 0xff900300, "v%21?ls%21?dt4%c.%10-11S2\t%B"},
2002 {ARM_FEATURE_CORE_LOW (0), 0 ,0, 0}
2005 /* mve opcode table. */
2007 /* print_insn_mve recognizes the following format control codes:
2011 %a print '+' or '-' or imm offset in vldr[bhwd] and
2013 %c print condition code
2014 %d print addr mode of MVE vldr[bhw] and vstr[bhw]
2015 %u print 'U' (unsigned) or 'S' for various mve instructions
2016 %i print MVE predicate(s) for vpt and vpst
2017 %m print rounding mode for vcvt and vrint
2018 %n print vector comparison code for predicated instruction
2019 %s print size for various vcvt instructions
2020 %v print vector predicate for instruction in predicated
2022 %o print offset scaled for vldr[hwd] and vstr[hwd]
2023 %w print writeback mode for MVE v{st,ld}[24]
2024 %B print v{st,ld}[24] any one operands
2025 %E print vmov, vmvn, vorr, vbic encoded constant
2026 %N print generic index for vmov
2027 %T print bottom ('b') or top ('t') of source register
2028 %X print exchange field in vmla* instructions
2030 %<bitfield>r print as an ARM register
2031 %<bitfield>d print the bitfield in decimal
2032 %<bitfield>A print accumulate or not
2033 %<bitfield>Q print as a MVE Q register
2034 %<bitfield>F print as a MVE S register
2035 %<bitfield>Z as %<>r but r15 is ZR instead of PC and r13 is
2037 %<bitfield>s print size for vector predicate & non VMOV instructions
2038 %<bitfield>I print carry flag or not
2039 %<bitfield>i print immediate for vstr/vldr reg +/- imm
2040 %<bitfield>h print high half of 64-bit destination reg
2041 %<bitfield>k print immediate for vector conversion instruction
2042 %<bitfield>l print low half of 64-bit destination reg
2043 %<bitfield>o print rotate value for vcmul
2044 %<bitfield>u print immediate value for vddup/vdwdup
2045 %<bitfield>x print the bitfield in hex.
2048 static const struct mopcode32 mve_opcodes[] =
2052 {ARM_FEATURE_COPROC (FPU_MVE),
2054 0xfe310f4d, 0xffbf1fff,
2058 /* Floating point VPT T1. */
2059 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2061 0xee310f00, 0xefb10f50,
2062 "vpt%i.f%28s\t%n, %17-19Q, %1-3,5Q"},
2063 /* Floating point VPT T2. */
2064 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2066 0xee310f40, 0xefb10f50,
2067 "vpt%i.f%28s\t%n, %17-19Q, %0-3Z"},
2069 /* Vector VPT T1. */
2070 {ARM_FEATURE_COPROC (FPU_MVE),
2072 0xfe010f00, 0xff811f51,
2073 "vpt%i.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
2074 /* Vector VPT T2. */
2075 {ARM_FEATURE_COPROC (FPU_MVE),
2077 0xfe010f01, 0xff811f51,
2078 "vpt%i.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
2079 /* Vector VPT T3. */
2080 {ARM_FEATURE_COPROC (FPU_MVE),
2082 0xfe011f00, 0xff811f50,
2083 "vpt%i.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
2084 /* Vector VPT T4. */
2085 {ARM_FEATURE_COPROC (FPU_MVE),
2087 0xfe010f40, 0xff811f70,
2088 "vpt%i.i%20-21s\t%n, %17-19Q, %0-3Z"},
2089 /* Vector VPT T5. */
2090 {ARM_FEATURE_COPROC (FPU_MVE),
2092 0xfe010f60, 0xff811f70,
2093 "vpt%i.u%20-21s\t%n, %17-19Q, %0-3Z"},
2094 /* Vector VPT T6. */
2095 {ARM_FEATURE_COPROC (FPU_MVE),
2097 0xfe011f40, 0xff811f50,
2098 "vpt%i.s%20-21s\t%n, %17-19Q, %0-3Z"},
2100 /* Vector VBIC immediate. */
2101 {ARM_FEATURE_COPROC (FPU_MVE),
2103 0xef800070, 0xefb81070,
2104 "vbic%v.i%8-11s\t%13-15,22Q, %E"},
2106 /* Vector VBIC register. */
2107 {ARM_FEATURE_COPROC (FPU_MVE),
2109 0xef100150, 0xffb11f51,
2110 "vbic%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2113 {ARM_FEATURE_COPROC (FPU_MVE),
2115 0xee800f01, 0xefc10f51,
2116 "vabav%v.%u%20-21s\t%12-15r, %17-19,7Q, %1-3,5Q"},
2118 /* Vector VABD floating point. */
2119 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2121 0xff200d40, 0xffa11f51,
2122 "vabd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2125 {ARM_FEATURE_COPROC (FPU_MVE),
2127 0xef000740, 0xef811f51,
2128 "vabd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2130 /* Vector VABS floating point. */
2131 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2133 0xFFB10740, 0xFFB31FD1,
2134 "vabs%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
2136 {ARM_FEATURE_COPROC (FPU_MVE),
2138 0xffb10340, 0xffb31fd1,
2139 "vabs%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2141 /* Vector VADD floating point T1. */
2142 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2144 0xef000d40, 0xffa11f51,
2145 "vadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2146 /* Vector VADD floating point T2. */
2147 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2149 0xee300f40, 0xefb11f70,
2150 "vadd%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2151 /* Vector VADD T1. */
2152 {ARM_FEATURE_COPROC (FPU_MVE),
2154 0xef000840, 0xff811f51,
2155 "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2156 /* Vector VADD T2. */
2157 {ARM_FEATURE_COPROC (FPU_MVE),
2159 0xee010f40, 0xff811f70,
2160 "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2162 /* Vector VADDLV. */
2163 {ARM_FEATURE_COPROC (FPU_MVE),
2165 0xee890f00, 0xef8f1fd1,
2166 "vaddlv%5A%v.%u32\t%13-15l, %20-22h, %1-3Q"},
2169 {ARM_FEATURE_COPROC (FPU_MVE),
2171 0xeef10f00, 0xeff31fd1,
2172 "vaddv%5A%v.%u%18-19s\t%13-15l, %1-3Q"},
2175 {ARM_FEATURE_COPROC (FPU_MVE),
2177 0xee300f00, 0xffb10f51,
2178 "vadc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2181 {ARM_FEATURE_COPROC (FPU_MVE),
2183 0xef000150, 0xffb11f51,
2184 "vand%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2186 /* Vector VBRSR register. */
2187 {ARM_FEATURE_COPROC (FPU_MVE),
2189 0xfe011e60, 0xff811f70,
2190 "vbrsr%v.%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2192 /* Vector VCADD floating point. */
2193 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2195 0xfc800840, 0xfea11f51,
2196 "vcadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%24o"},
2199 {ARM_FEATURE_COPROC (FPU_MVE),
2201 0xfe000f00, 0xff810f51,
2202 "vcadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%12o"},
2205 {ARM_FEATURE_COPROC (FPU_MVE),
2207 0xffb00440, 0xffb31fd1,
2208 "vcls%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2211 {ARM_FEATURE_COPROC (FPU_MVE),
2213 0xffb004c0, 0xffb31fd1,
2214 "vclz%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
2217 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2219 0xfc200840, 0xfe211f51,
2220 "vcmla%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%23-24o"},
2222 /* Vector VCMP floating point T1. */
2223 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2225 0xee310f00, 0xeff1ef50,
2226 "vcmp%v.f%28s\t%n, %17-19Q, %1-3,5Q"},
2228 /* Vector VCMP floating point T2. */
2229 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2231 0xee310f40, 0xeff1ef50,
2232 "vcmp%v.f%28s\t%n, %17-19Q, %0-3Z"},
2234 /* Vector VCMP T1. */
2235 {ARM_FEATURE_COPROC (FPU_MVE),
2237 0xfe010f00, 0xffc1ff51,
2238 "vcmp%v.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
2239 /* Vector VCMP T2. */
2240 {ARM_FEATURE_COPROC (FPU_MVE),
2242 0xfe010f01, 0xffc1ff51,
2243 "vcmp%v.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
2244 /* Vector VCMP T3. */
2245 {ARM_FEATURE_COPROC (FPU_MVE),
2247 0xfe011f00, 0xffc1ff50,
2248 "vcmp%v.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
2249 /* Vector VCMP T4. */
2250 {ARM_FEATURE_COPROC (FPU_MVE),
2252 0xfe010f40, 0xffc1ff70,
2253 "vcmp%v.i%20-21s\t%n, %17-19Q, %0-3Z"},
2254 /* Vector VCMP T5. */
2255 {ARM_FEATURE_COPROC (FPU_MVE),
2257 0xfe010f60, 0xffc1ff70,
2258 "vcmp%v.u%20-21s\t%n, %17-19Q, %0-3Z"},
2259 /* Vector VCMP T6. */
2260 {ARM_FEATURE_COPROC (FPU_MVE),
2262 0xfe011f40, 0xffc1ff50,
2263 "vcmp%v.s%20-21s\t%n, %17-19Q, %0-3Z"},
2266 {ARM_FEATURE_COPROC (FPU_MVE),
2268 0xeea00b10, 0xffb10f5f,
2269 "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
2272 {ARM_FEATURE_COPROC (FPU_MVE),
2274 0xff000150, 0xffd11f51,
2275 "veor%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2277 /* Vector VFMA, vector * scalar. */
2278 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2280 0xee310e40, 0xefb11f70,
2281 "vfma%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2283 /* Vector VFMA floating point. */
2284 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2286 0xef000c50, 0xffa11f51,
2287 "vfma%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2289 /* Vector VFMS floating point. */
2290 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2292 0xef200c50, 0xffa11f51,
2293 "vfms%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2295 /* Vector VFMAS, vector * scalar. */
2296 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2297 MVE_VFMAS_FP_SCALAR,
2298 0xee311e40, 0xefb11f70,
2299 "vfmas%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2301 /* Vector VHADD T1. */
2302 {ARM_FEATURE_COPROC (FPU_MVE),
2304 0xef000040, 0xef811f51,
2305 "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2307 /* Vector VHADD T2. */
2308 {ARM_FEATURE_COPROC (FPU_MVE),
2310 0xee000f40, 0xef811f70,
2311 "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2313 /* Vector VHSUB T1. */
2314 {ARM_FEATURE_COPROC (FPU_MVE),
2316 0xef000240, 0xef811f51,
2317 "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2319 /* Vector VHSUB T2. */
2320 {ARM_FEATURE_COPROC (FPU_MVE),
2322 0xee001f40, 0xef811f70,
2323 "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2326 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2328 0xee300e00, 0xefb10f50,
2329 "vcmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%0,12o"},
2332 {ARM_FEATURE_COPROC (FPU_MVE),
2334 0xf000e801, 0xffc0ffff,
2335 "vctp%v.%20-21s\t%16-19r"},
2338 {ARM_FEATURE_COPROC (FPU_MVE),
2340 0xeea00b10, 0xffb10f5f,
2341 "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
2343 /* Vector VRHADD. */
2344 {ARM_FEATURE_COPROC (FPU_MVE),
2346 0xef000140, 0xef811f51,
2347 "vrhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2350 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2351 MVE_VCVT_FP_FIX_VEC,
2352 0xef800c50, 0xef801cd1,
2353 "vcvt%v.%s\t%13-15,22Q, %1-3,5Q, #%16-21k"},
2356 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2357 MVE_VCVT_BETWEEN_FP_INT,
2358 0xffb30640, 0xffb31e51,
2359 "vcvt%v.%s\t%13-15,22Q, %1-3,5Q"},
2361 /* Vector VCVT between single and half-precision float, bottom half. */
2362 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2363 MVE_VCVT_FP_HALF_FP,
2364 0xee3f0e01, 0xefbf1fd1,
2365 "vcvtb%v.%s\t%13-15,22Q, %1-3,5Q"},
2367 /* Vector VCVT between single and half-precision float, top half. */
2368 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2369 MVE_VCVT_FP_HALF_FP,
2370 0xee3f1e01, 0xefbf1fd1,
2371 "vcvtt%v.%s\t%13-15,22Q, %1-3,5Q"},
2374 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2375 MVE_VCVT_FROM_FP_TO_INT,
2376 0xffb30040, 0xffb31c51,
2377 "vcvt%m%v.%s\t%13-15,22Q, %1-3,5Q"},
2380 {ARM_FEATURE_COPROC (FPU_MVE),
2382 0xee011f6e, 0xff811f7e,
2383 "vddup%v.u%20-21s\t%13-15,22Q, %17-19l, #%0,7u"},
2385 /* Vector VDWDUP. */
2386 {ARM_FEATURE_COPROC (FPU_MVE),
2388 0xee011f60, 0xff811f70,
2389 "vdwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, #%0,7u"},
2391 /* Vector VHCADD. */
2392 {ARM_FEATURE_COPROC (FPU_MVE),
2394 0xee000f00, 0xff810f51,
2395 "vhcadd%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%12o"},
2397 /* Vector VIWDUP. */
2398 {ARM_FEATURE_COPROC (FPU_MVE),
2400 0xee010f60, 0xff811f70,
2401 "viwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, #%0,7u"},
2404 {ARM_FEATURE_COPROC (FPU_MVE),
2406 0xee010f6e, 0xff811f7e,
2407 "vidup%v.u%20-21s\t%13-15,22Q, %17-19l, #%0,7u"},
2410 {ARM_FEATURE_COPROC (FPU_MVE),
2412 0xfc901e00, 0xff901e5f,
2413 "vld2%5d.%7-8s\t%B, [%16-19r]%w"},
2416 {ARM_FEATURE_COPROC (FPU_MVE),
2418 0xfc901e01, 0xff901e1f,
2419 "vld4%5-6d.%7-8s\t%B, [%16-19r]%w"},
2421 /* Vector VLDRB gather load. */
2422 {ARM_FEATURE_COPROC (FPU_MVE),
2423 MVE_VLDRB_GATHER_T1,
2424 0xec900e00, 0xefb01e50,
2425 "vldrb%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
2427 /* Vector VLDRH gather load. */
2428 {ARM_FEATURE_COPROC (FPU_MVE),
2429 MVE_VLDRH_GATHER_T2,
2430 0xec900e10, 0xefb01e50,
2431 "vldrh%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
2433 /* Vector VLDRW gather load. */
2434 {ARM_FEATURE_COPROC (FPU_MVE),
2435 MVE_VLDRW_GATHER_T3,
2436 0xfc900f40, 0xffb01fd0,
2437 "vldrw%v.u32\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
2439 /* Vector VLDRD gather load. */
2440 {ARM_FEATURE_COPROC (FPU_MVE),
2441 MVE_VLDRD_GATHER_T4,
2442 0xec900fd0, 0xefb01fd0,
2443 "vldrd%v.u64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
2445 /* Vector VLDRW gather load. */
2446 {ARM_FEATURE_COPROC (FPU_MVE),
2447 MVE_VLDRW_GATHER_T5,
2448 0xfd101e00, 0xff111f00,
2449 "vldrw%v.u32\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
2451 /* Vector VLDRD gather load, variant T6. */
2452 {ARM_FEATURE_COPROC (FPU_MVE),
2453 MVE_VLDRD_GATHER_T6,
2454 0xfd101f00, 0xff111f00,
2455 "vldrd%v.u64\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
2458 {ARM_FEATURE_COPROC (FPU_MVE),
2460 0xec100e00, 0xee581e00,
2461 "vldrb%v.%u%7-8s\t%13-15Q, %d"},
2464 {ARM_FEATURE_COPROC (FPU_MVE),
2466 0xec180e00, 0xee581e00,
2467 "vldrh%v.%u%7-8s\t%13-15Q, %d"},
2469 /* Vector VLDRB unsigned, variant T5. */
2470 {ARM_FEATURE_COPROC (FPU_MVE),
2472 0xec101e00, 0xfe101f80,
2473 "vldrb%v.u8\t%13-15,22Q, %d"},
2475 /* Vector VLDRH unsigned, variant T6. */
2476 {ARM_FEATURE_COPROC (FPU_MVE),
2478 0xec101e80, 0xfe101f80,
2479 "vldrh%v.u16\t%13-15,22Q, %d"},
2481 /* Vector VLDRW unsigned, variant T7. */
2482 {ARM_FEATURE_COPROC (FPU_MVE),
2484 0xec101f00, 0xfe101f80,
2485 "vldrw%v.u32\t%13-15,22Q, %d"},
2488 {ARM_FEATURE_COPROC (FPU_MVE),
2490 0xef000640, 0xef811f51,
2491 "vmax%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2494 {ARM_FEATURE_COPROC (FPU_MVE),
2496 0xee330e81, 0xffb31fd1,
2497 "vmaxa%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2499 /* Vector VMAXNM floating point. */
2500 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2502 0xff000f50, 0xffa11f51,
2503 "vmaxnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2505 /* Vector VMAXNMA floating point. */
2506 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2508 0xee3f0e81, 0xefbf1fd1,
2509 "vmaxnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
2511 /* Vector VMAXNMV floating point. */
2512 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2514 0xeeee0f00, 0xefff0fd1,
2515 "vmaxnmv%v.f%28s\t%12-15r, %1-3,5Q"},
2517 /* Vector VMAXNMAV floating point. */
2518 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2520 0xeeec0f00, 0xefff0fd1,
2521 "vmaxnmav%v.f%28s\t%12-15r, %1-3,5Q"},
2524 {ARM_FEATURE_COPROC (FPU_MVE),
2526 0xeee20f00, 0xeff30fd1,
2527 "vmaxv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
2529 /* Vector VMAXAV. */
2530 {ARM_FEATURE_COPROC (FPU_MVE),
2532 0xeee00f00, 0xfff30fd1,
2533 "vmaxav%v.s%18-19s\t%12-15r, %1-3,5Q"},
2536 {ARM_FEATURE_COPROC (FPU_MVE),
2538 0xef000650, 0xef811f51,
2539 "vmin%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2542 {ARM_FEATURE_COPROC (FPU_MVE),
2544 0xee331e81, 0xffb31fd1,
2545 "vmina%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2547 /* Vector VMINNM floating point. */
2548 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2550 0xff200f50, 0xffa11f51,
2551 "vminnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2553 /* Vector VMINNMA floating point. */
2554 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2556 0xee3f1e81, 0xefbf1fd1,
2557 "vminnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
2559 /* Vector VMINNMV floating point. */
2560 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2562 0xeeee0f80, 0xefff0fd1,
2563 "vminnmv%v.f%28s\t%12-15r, %1-3,5Q"},
2565 /* Vector VMINNMAV floating point. */
2566 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2568 0xeeec0f80, 0xefff0fd1,
2569 "vminnmav%v.f%28s\t%12-15r, %1-3,5Q"},
2572 {ARM_FEATURE_COPROC (FPU_MVE),
2574 0xeee20f80, 0xeff30fd1,
2575 "vminv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
2577 /* Vector VMINAV. */
2578 {ARM_FEATURE_COPROC (FPU_MVE),
2580 0xeee00f80, 0xfff30fd1,
2581 "vminav%v.s%18-19s\t%12-15r, %1-3,5Q"},
2584 {ARM_FEATURE_COPROC (FPU_MVE),
2586 0xee010e40, 0xef811f70,
2587 "vmla%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2589 /* Vector VMLALDAV. Note must appear before VMLADAV due to instruction
2591 {ARM_FEATURE_COPROC (FPU_MVE),
2593 0xee801e00, 0xef801f51,
2594 "vmlaldav%5Ax%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2596 {ARM_FEATURE_COPROC (FPU_MVE),
2598 0xee800e00, 0xef801f51,
2599 "vmlalv%5A%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2601 /* Vector VMLAV T1 variant, same as VMLADAV but with X == 0. */
2602 {ARM_FEATURE_COPROC (FPU_MVE),
2604 0xeef00e00, 0xeff01f51,
2605 "vmlav%5A%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
2607 /* Vector VMLAV T2 variant, same as VMLADAV but with X == 0. */
2608 {ARM_FEATURE_COPROC (FPU_MVE),
2610 0xeef00f00, 0xeff11f51,
2611 "vmlav%5A%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
2613 /* Vector VMLADAV T1 variant. */
2614 {ARM_FEATURE_COPROC (FPU_MVE),
2616 0xeef01e00, 0xeff01f51,
2617 "vmladav%5Ax%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
2619 /* Vector VMLADAV T2 variant. */
2620 {ARM_FEATURE_COPROC (FPU_MVE),
2622 0xeef01f00, 0xeff11f51,
2623 "vmladav%5Ax%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
2626 {ARM_FEATURE_COPROC (FPU_MVE),
2628 0xee011e40, 0xef811f70,
2629 "vmlas%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2631 /* Vector VRMLSLDAVH. Note must appear before VMLSDAV due to instruction
2633 {ARM_FEATURE_COPROC (FPU_MVE),
2635 0xfe800e01, 0xff810f51,
2636 "vrmlsldavh%5A%X%v.s32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2638 /* Vector VMLSLDAV. Note must appear before VMLSDAV due to instruction
2640 {ARM_FEATURE_COPROC (FPU_MVE),
2642 0xee800e01, 0xff800f51,
2643 "vmlsldav%5A%X%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2645 /* Vector VMLSDAV T1 Variant. */
2646 {ARM_FEATURE_COPROC (FPU_MVE),
2648 0xeef00e01, 0xfff00f51,
2649 "vmlsdav%5A%X%v.s%16s\t%13-15l, %17-19,7Q, %1-3Q"},
2651 /* Vector VMLSDAV T2 Variant. */
2652 {ARM_FEATURE_COPROC (FPU_MVE),
2654 0xfef00e01, 0xfff10f51,
2655 "vmlsdav%5A%X%v.s8\t%13-15l, %17-19,7Q, %1-3Q"},
2657 /* Vector VMOV between gpr and half precision register, op == 0. */
2658 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2660 0xee000910, 0xfff00f7f,
2661 "vmov.f16\t%7,16-19F, %12-15r"},
2663 /* Vector VMOV between gpr and half precision register, op == 1. */
2664 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2666 0xee100910, 0xfff00f7f,
2667 "vmov.f16\t%12-15r, %7,16-19F"},
2669 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2670 MVE_VMOV_GP_TO_VEC_LANE,
2671 0xee000b10, 0xff900f1f,
2672 "vmov%c.%5-6,21-22s\t%17-19,7Q[%N], %12-15r"},
2674 /* Vector VORR immediate to vector.
2675 NOTE: MVE_VORR_IMM must appear in the table
2676 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2677 {ARM_FEATURE_COPROC (FPU_MVE),
2679 0xef800050, 0xefb810f0,
2680 "vorr%v.i%8-11s\t%13-15,22Q, %E"},
2682 /* Vector VQSHL T2 Variant.
2683 NOTE: MVE_VQSHL_T2 must appear in the table before
2684 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2685 {ARM_FEATURE_COPROC (FPU_MVE),
2687 0xef800750, 0xef801fd1,
2688 "vqshl%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2690 /* Vector VQSHLU T3 Variant
2691 NOTE: MVE_VQSHL_T2 must appear in the table before
2692 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2694 {ARM_FEATURE_COPROC (FPU_MVE),
2696 0xff800650, 0xff801fd1,
2697 "vqshlu%v.s%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2700 NOTE: MVE_VRSHR must appear in the table before
2701 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2702 {ARM_FEATURE_COPROC (FPU_MVE),
2704 0xef800250, 0xef801fd1,
2705 "vrshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2708 NOTE: MVE_VSHL must appear in the table before
2709 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2710 {ARM_FEATURE_COPROC (FPU_MVE),
2712 0xef800550, 0xff801fd1,
2713 "vshl%v.i%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2716 NOTE: MVE_VSHR must appear in the table before
2717 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2718 {ARM_FEATURE_COPROC (FPU_MVE),
2720 0xef800050, 0xef801fd1,
2721 "vshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2724 NOTE: MVE_VSLI must appear in the table before
2725 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2726 {ARM_FEATURE_COPROC (FPU_MVE),
2728 0xff800550, 0xff801fd1,
2729 "vsli%v.%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2732 NOTE: MVE_VSRI must appear in the table before
2733 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2734 {ARM_FEATURE_COPROC (FPU_MVE),
2736 0xff800450, 0xff801fd1,
2737 "vsri%v.%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2739 /* Vector VMOV immediate to vector,
2740 cmode == 11x1 -> VMVN which is UNDEFINED
2741 for such a cmode. */
2742 {ARM_FEATURE_COPROC (FPU_MVE),
2743 MVE_VMVN_IMM, 0xef800d50, 0xefb81dd0, UNDEFINED_INSTRUCTION},
2745 /* Vector VMOV immediate to vector. */
2746 {ARM_FEATURE_COPROC (FPU_MVE),
2747 MVE_VMOV_IMM_TO_VEC,
2748 0xef800050, 0xefb810d0,
2749 "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
2751 /* Vector VMOV two 32-bit lanes to two gprs, idx = 0. */
2752 {ARM_FEATURE_COPROC (FPU_MVE),
2753 MVE_VMOV2_VEC_LANE_TO_GP,
2754 0xec000f00, 0xffb01ff0,
2755 "vmov%c\t%0-3r, %16-19r, %13-15,22Q[2], %13-15,22Q[0]"},
2757 /* Vector VMOV two 32-bit lanes to two gprs, idx = 1. */
2758 {ARM_FEATURE_COPROC (FPU_MVE),
2759 MVE_VMOV2_VEC_LANE_TO_GP,
2760 0xec000f10, 0xffb01ff0,
2761 "vmov%c\t%0-3r, %16-19r, %13-15,22Q[3], %13-15,22Q[1]"},
2763 /* Vector VMOV Two gprs to two 32-bit lanes, idx = 0. */
2764 {ARM_FEATURE_COPROC (FPU_MVE),
2765 MVE_VMOV2_GP_TO_VEC_LANE,
2766 0xec100f00, 0xffb01ff0,
2767 "vmov%c\t%13-15,22Q[2], %13-15,22Q[0], %0-3r, %16-19r"},
2769 /* Vector VMOV Two gprs to two 32-bit lanes, idx = 1. */
2770 {ARM_FEATURE_COPROC (FPU_MVE),
2771 MVE_VMOV2_GP_TO_VEC_LANE,
2772 0xec100f10, 0xffb01ff0,
2773 "vmov%c\t%13-15,22Q[2], %13-15,22Q[0], %0-3r, %16-19r"},
2775 /* Vector VMOV Vector lane to gpr. */
2776 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2777 MVE_VMOV_VEC_LANE_TO_GP,
2778 0xee100b10, 0xff100f1f,
2779 "vmov%c.%u%5-6,21-22s\t%12-15r, %17-19,7Q[%N]"},
2781 /* Vector VSHLL T1 Variant. Note: VSHLL T1 must appear before MVE_VMOVL due
2782 to instruction opcode aliasing. */
2783 {ARM_FEATURE_COPROC (FPU_MVE),
2785 0xeea00f40, 0xefa00fd1,
2786 "vshll%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2788 /* Vector VMOVL long. */
2789 {ARM_FEATURE_COPROC (FPU_MVE),
2791 0xeea00f40, 0xefa70fd1,
2792 "vmovl%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q"},
2794 /* Vector VMOV and narrow. */
2795 {ARM_FEATURE_COPROC (FPU_MVE),
2797 0xfe310e81, 0xffb30fd1,
2798 "vmovn%T%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
2800 /* Floating point move extract. */
2801 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2803 0xfeb00a40, 0xffbf0fd0,
2804 "vmovx.f16\t%22,12-15F, %5,0-3F"},
2806 /* Vector VMUL floating-point T1 variant. */
2807 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2809 0xff000d50, 0xffa11f51,
2810 "vmul%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2812 /* Vector VMUL floating-point T2 variant. */
2813 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2815 0xee310e60, 0xefb11f70,
2816 "vmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2818 /* Vector VMUL T1 variant. */
2819 {ARM_FEATURE_COPROC (FPU_MVE),
2821 0xef000950, 0xff811f51,
2822 "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2824 /* Vector VMUL T2 variant. */
2825 {ARM_FEATURE_COPROC (FPU_MVE),
2827 0xee011e60, 0xff811f70,
2828 "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2831 {ARM_FEATURE_COPROC (FPU_MVE),
2833 0xee010e01, 0xef811f51,
2834 "vmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2836 /* Vector VRMULH. */
2837 {ARM_FEATURE_COPROC (FPU_MVE),
2839 0xee011e01, 0xef811f51,
2840 "vrmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2842 /* Vector VMULL integer. */
2843 {ARM_FEATURE_COPROC (FPU_MVE),
2845 0xee010e00, 0xef810f51,
2846 "vmull%T%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2848 /* Vector VMULL polynomial. */
2849 {ARM_FEATURE_COPROC (FPU_MVE),
2851 0xee310e00, 0xefb10f51,
2852 "vmull%T%v.%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2854 /* Vector VMVN immediate to vector. */
2855 {ARM_FEATURE_COPROC (FPU_MVE),
2857 0xef800070, 0xefb810f0,
2858 "vmvn%v.i%8-11s\t%13-15,22Q, %E"},
2860 /* Vector VMVN register. */
2861 {ARM_FEATURE_COPROC (FPU_MVE),
2863 0xffb005c0, 0xffbf1fd1,
2864 "vmvn%v\t%13-15,22Q, %1-3,5Q"},
2866 /* Vector VNEG floating point. */
2867 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2869 0xffb107c0, 0xffb31fd1,
2870 "vneg%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
2873 {ARM_FEATURE_COPROC (FPU_MVE),
2875 0xffb103c0, 0xffb31fd1,
2876 "vneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2878 /* Vector VORN, vector bitwise or not. */
2879 {ARM_FEATURE_COPROC (FPU_MVE),
2881 0xef300150, 0xffb11f51,
2882 "vorn%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2884 /* Vector VORR register. */
2885 {ARM_FEATURE_COPROC (FPU_MVE),
2887 0xef200150, 0xffb11f51,
2888 "vorr%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2890 /* Vector VQDMULL T1 variant. */
2891 {ARM_FEATURE_COPROC (FPU_MVE),
2893 0xee300f01, 0xefb10f51,
2894 "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2896 /* Vector VQDMULL T2 variant. */
2897 {ARM_FEATURE_COPROC (FPU_MVE),
2899 0xee300f60, 0xefb10f70,
2900 "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2902 /* Vector VQMOVN. */
2903 {ARM_FEATURE_COPROC (FPU_MVE),
2905 0xee330e01, 0xefb30fd1,
2906 "vqmovn%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q"},
2908 /* Vector VQMOVUN. */
2909 {ARM_FEATURE_COPROC (FPU_MVE),
2911 0xee310e81, 0xffb30fd1,
2912 "vqmovun%T%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2914 /* Vector VQDMLADH. */
2915 {ARM_FEATURE_COPROC (FPU_MVE),
2917 0xee000e00, 0xff810f51,
2918 "vqdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2920 /* Vector VQRDMLADH. */
2921 {ARM_FEATURE_COPROC (FPU_MVE),
2923 0xee000e01, 0xff810f51,
2924 "vqrdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2926 /* Vector VQDMLAH. */
2927 {ARM_FEATURE_COPROC (FPU_MVE),
2929 0xee000e60, 0xef811f70,
2930 "vqdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2932 /* Vector VQRDMLAH. */
2933 {ARM_FEATURE_COPROC (FPU_MVE),
2935 0xee000e40, 0xef811f70,
2936 "vqrdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2938 /* Vector VQDMLASH. */
2939 {ARM_FEATURE_COPROC (FPU_MVE),
2941 0xee001e60, 0xef811f70,
2942 "vqdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2944 /* Vector VQRDMLASH. */
2945 {ARM_FEATURE_COPROC (FPU_MVE),
2947 0xee001e40, 0xef811f70,
2948 "vqrdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2950 /* Vector VQDMLSDH. */
2951 {ARM_FEATURE_COPROC (FPU_MVE),
2953 0xfe000e00, 0xff810f51,
2954 "vqdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2956 /* Vector VQRDMLSDH. */
2957 {ARM_FEATURE_COPROC (FPU_MVE),
2959 0xfe000e01, 0xff810f51,
2960 "vqrdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2962 /* Vector VQDMULH T1 variant. */
2963 {ARM_FEATURE_COPROC (FPU_MVE),
2965 0xef000b40, 0xff811f51,
2966 "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2968 /* Vector VQRDMULH T2 variant. */
2969 {ARM_FEATURE_COPROC (FPU_MVE),
2971 0xff000b40, 0xff811f51,
2972 "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2974 /* Vector VQDMULH T3 variant. */
2975 {ARM_FEATURE_COPROC (FPU_MVE),
2977 0xee010e60, 0xff811f70,
2978 "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2980 /* Vector VQRDMULH T4 variant. */
2981 {ARM_FEATURE_COPROC (FPU_MVE),
2983 0xfe010e60, 0xff811f70,
2984 "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2986 /* Vector VQRSHL T1 variant. */
2987 {ARM_FEATURE_COPROC (FPU_MVE),
2989 0xef000550, 0xef811f51,
2990 "vqrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
2992 /* Vector VQRSHL T2 variant. */
2993 {ARM_FEATURE_COPROC (FPU_MVE),
2995 0xee331ee0, 0xefb31ff0,
2996 "vqrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
2998 /* Vector VQRSHRN. */
2999 {ARM_FEATURE_COPROC (FPU_MVE),
3001 0xee800f41, 0xefa00fd1,
3002 "vqrshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3004 /* Vector VQRSHRUN. */
3005 {ARM_FEATURE_COPROC (FPU_MVE),
3007 0xfe800fc0, 0xffa00fd1,
3008 "vqrshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3010 /* Vector VQSHL T1 Variant. */
3011 {ARM_FEATURE_COPROC (FPU_MVE),
3013 0xee311ee0, 0xefb31ff0,
3014 "vqshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3016 /* Vector VQSHL T4 Variant. */
3017 {ARM_FEATURE_COPROC (FPU_MVE),
3019 0xef000450, 0xef811f51,
3020 "vqshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3022 /* Vector VQSHRN. */
3023 {ARM_FEATURE_COPROC (FPU_MVE),
3025 0xee800f40, 0xefa00fd1,
3026 "vqshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3028 /* Vector VQSHRUN. */
3029 {ARM_FEATURE_COPROC (FPU_MVE),
3031 0xee800fc0, 0xffa00fd1,
3032 "vqshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3034 /* Vector VRINT floating point. */
3035 {ARM_FEATURE_COPROC (FPU_MVE_FP),
3037 0xffb20440, 0xffb31c51,
3038 "vrint%m%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
3040 /* Vector VRMLALDAVH. */
3041 {ARM_FEATURE_COPROC (FPU_MVE),
3043 0xee800f00, 0xef811f51,
3044 "vrmlalvh%5A%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
3046 /* Vector VRMLALDAVH. */
3047 {ARM_FEATURE_COPROC (FPU_MVE),
3049 0xee801f00, 0xef811f51,
3050 "vrmlaldavh%5Ax%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
3052 /* Vector VRSHL T1 Variant. */
3053 {ARM_FEATURE_COPROC (FPU_MVE),
3055 0xef000540, 0xef811f51,
3056 "vrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3058 /* Vector VRSHL T2 Variant. */
3059 {ARM_FEATURE_COPROC (FPU_MVE),
3061 0xee331e60, 0xefb31ff0,
3062 "vrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3064 /* Vector VRSHRN. */
3065 {ARM_FEATURE_COPROC (FPU_MVE),
3067 0xfe800fc1, 0xffa00fd1,
3068 "vrshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3071 {ARM_FEATURE_COPROC (FPU_MVE),
3073 0xfe300f00, 0xffb10f51,
3074 "vsbc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3076 /* Vector VSHL T2 Variant. */
3077 {ARM_FEATURE_COPROC (FPU_MVE),
3079 0xee311e60, 0xefb31ff0,
3080 "vshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3082 /* Vector VSHL T3 Variant. */
3083 {ARM_FEATURE_COPROC (FPU_MVE),
3085 0xef000440, 0xef811f51,
3086 "vshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3089 {ARM_FEATURE_COPROC (FPU_MVE),
3091 0xeea00fc0, 0xffa01ff0,
3092 "vshlc%v\t%13-15,22Q, %0-3r, #%16-20d"},
3094 /* Vector VSHLL T2 Variant. */
3095 {ARM_FEATURE_COPROC (FPU_MVE),
3097 0xee310e01, 0xefb30fd1,
3098 "vshll%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q, #%18-19d"},
3101 {ARM_FEATURE_COPROC (FPU_MVE),
3103 0xee800fc1, 0xffa00fd1,
3104 "vshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3106 /* Vector VST2 no writeback. */
3107 {ARM_FEATURE_COPROC (FPU_MVE),
3109 0xfc801e00, 0xffb01e5f,
3110 "vst2%5d.%7-8s\t%B, [%16-19r]"},
3112 /* Vector VST2 writeback. */
3113 {ARM_FEATURE_COPROC (FPU_MVE),
3115 0xfca01e00, 0xffb01e5f,
3116 "vst2%5d.%7-8s\t%B, [%16-19r]!"},
3118 /* Vector VST4 no writeback. */
3119 {ARM_FEATURE_COPROC (FPU_MVE),
3121 0xfc801e01, 0xffb01e1f,
3122 "vst4%5-6d.%7-8s\t%B, [%16-19r]"},
3124 /* Vector VST4 writeback. */
3125 {ARM_FEATURE_COPROC (FPU_MVE),
3127 0xfca01e01, 0xffb01e1f,
3128 "vst4%5-6d.%7-8s\t%B, [%16-19r]!"},
3130 /* Vector VSTRB scatter store, T1 variant. */
3131 {ARM_FEATURE_COPROC (FPU_MVE),
3132 MVE_VSTRB_SCATTER_T1,
3133 0xec800e00, 0xffb01e50,
3134 "vstrb%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
3136 /* Vector VSTRH scatter store, T2 variant. */
3137 {ARM_FEATURE_COPROC (FPU_MVE),
3138 MVE_VSTRH_SCATTER_T2,
3139 0xec800e10, 0xffb01e50,
3140 "vstrh%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
3142 /* Vector VSTRW scatter store, T3 variant. */
3143 {ARM_FEATURE_COPROC (FPU_MVE),
3144 MVE_VSTRW_SCATTER_T3,
3145 0xec800e40, 0xffb01e50,
3146 "vstrw%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
3148 /* Vector VSTRD scatter store, T4 variant. */
3149 {ARM_FEATURE_COPROC (FPU_MVE),
3150 MVE_VSTRD_SCATTER_T4,
3151 0xec800fd0, 0xffb01fd0,
3152 "vstrd%v.64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
3154 /* Vector VSTRW scatter store, T5 variant. */
3155 {ARM_FEATURE_COPROC (FPU_MVE),
3156 MVE_VSTRW_SCATTER_T5,
3157 0xfd001e00, 0xff111f00,
3158 "vstrw%v.32\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
3160 /* Vector VSTRD scatter store, T6 variant. */
3161 {ARM_FEATURE_COPROC (FPU_MVE),
3162 MVE_VSTRD_SCATTER_T6,
3163 0xfd001f00, 0xff111f00,
3164 "vstrd%v.64\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
3167 {ARM_FEATURE_COPROC (FPU_MVE),
3169 0xec000e00, 0xfe581e00,
3170 "vstrb%v.%7-8s\t%13-15Q, %d"},
3173 {ARM_FEATURE_COPROC (FPU_MVE),
3175 0xec080e00, 0xfe581e00,
3176 "vstrh%v.%7-8s\t%13-15Q, %d"},
3178 /* Vector VSTRB variant T5. */
3179 {ARM_FEATURE_COPROC (FPU_MVE),
3181 0xec001e00, 0xfe101f80,
3182 "vstrb%v.8\t%13-15,22Q, %d"},
3184 /* Vector VSTRH variant T6. */
3185 {ARM_FEATURE_COPROC (FPU_MVE),
3187 0xec001e80, 0xfe101f80,
3188 "vstrh%v.16\t%13-15,22Q, %d"},
3190 /* Vector VSTRW variant T7. */
3191 {ARM_FEATURE_COPROC (FPU_MVE),
3193 0xec001f00, 0xfe101f80,
3194 "vstrw%v.32\t%13-15,22Q, %d"},
3196 /* Vector VSUB floating point T1 variant. */
3197 {ARM_FEATURE_COPROC (FPU_MVE_FP),
3199 0xef200d40, 0xffa11f51,
3200 "vsub%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3202 /* Vector VSUB floating point T2 variant. */
3203 {ARM_FEATURE_COPROC (FPU_MVE_FP),
3205 0xee301f40, 0xefb11f70,
3206 "vsub%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3208 /* Vector VSUB T1 variant. */
3209 {ARM_FEATURE_COPROC (FPU_MVE),
3211 0xff000840, 0xff811f51,
3212 "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3214 /* Vector VSUB T2 variant. */
3215 {ARM_FEATURE_COPROC (FPU_MVE),
3217 0xee011f40, 0xff811f70,
3218 "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3220 {ARM_FEATURE_CORE_LOW (0),
3222 0x00000000, 0x00000000, 0}
3225 /* Opcode tables: ARM, 16-bit Thumb, 32-bit Thumb. All three are partially
3226 ordered: they must be searched linearly from the top to obtain a correct
3229 /* print_insn_arm recognizes the following format control codes:
3233 %a print address for ldr/str instruction
3234 %s print address for ldr/str halfword/signextend instruction
3235 %S like %s but allow UNPREDICTABLE addressing
3236 %b print branch destination
3237 %c print condition code (always bits 28-31)
3238 %m print register mask for ldm/stm instruction
3239 %o print operand2 (immediate or register + shift)
3240 %p print 'p' iff bits 12-15 are 15
3241 %t print 't' iff bit 21 set and bit 24 clear
3242 %B print arm BLX(1) destination
3243 %C print the PSR sub type.
3244 %U print barrier type.
3245 %P print address for pli instruction.
3247 %<bitfield>r print as an ARM register
3248 %<bitfield>T print as an ARM register + 1
3249 %<bitfield>R as %r but r15 is UNPREDICTABLE
3250 %<bitfield>{r|R}u as %{r|R} but if matches the other %u field then is UNPREDICTABLE
3251 %<bitfield>{r|R}U as %{r|R} but if matches the other %U field then is UNPREDICTABLE
3252 %<bitfield>d print the bitfield in decimal
3253 %<bitfield>W print the bitfield plus one in decimal
3254 %<bitfield>x print the bitfield in hex
3255 %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
3257 %<bitfield>'c print specified char iff bitfield is all ones
3258 %<bitfield>`c print specified char iff bitfield is all zeroes
3259 %<bitfield>?ab... select from array of values in big endian order
3261 %e print arm SMI operand (bits 0..7,8..19).
3262 %E print the LSB and WIDTH fields of a BFI or BFC instruction.
3263 %V print the 16-bit immediate field of a MOVT or MOVW instruction.
3264 %R print the SPSR/CPSR or banked register of an MRS. */
3266 static const struct opcode32 arm_opcodes[] =
3268 /* ARM instructions. */
3269 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3270 0xe1a00000, 0xffffffff, "nop\t\t\t; (mov r0, r0)"},
3271 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3272 0xe7f000f0, 0xfff000f0, "udf\t#%e"},
3274 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T | ARM_EXT_V5),
3275 0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
3276 {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
3277 0x00000090, 0x0fe000f0, "mul%20's%c\t%16-19R, %0-3R, %8-11R"},
3278 {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
3279 0x00200090, 0x0fe000f0, "mla%20's%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3280 {ARM_FEATURE_CORE_LOW (ARM_EXT_V2S),
3281 0x01000090, 0x0fb00ff0, "swp%22'b%c\t%12-15RU, %0-3Ru, [%16-19RuU]"},
3282 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
3283 0x00800090, 0x0fa000f0,
3284 "%22?sumull%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3285 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
3286 0x00a00090, 0x0fa000f0,
3287 "%22?sumlal%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3289 /* V8.2 RAS extension instructions. */
3290 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
3291 0xe320f010, 0xffffffff, "esb"},
3293 /* V8 instructions. */
3294 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
3295 0x0320f005, 0x0fffffff, "sevl"},
3296 /* Defined in V8 but is in NOP space so available to all arch. */
3297 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3298 0xe1000070, 0xfff000f0, "hlt\t0x%16-19X%12-15X%8-11X%0-3X"},
3299 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_ATOMICS),
3300 0x01800e90, 0x0ff00ff0, "stlex%c\t%12-15r, %0-3r, [%16-19R]"},
3301 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3302 0x01900e9f, 0x0ff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
3303 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
3304 0x01a00e90, 0x0ff00ff0, "stlexd%c\t%12-15r, %0-3r, %0-3T, [%16-19R]"},
3305 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
3306 0x01b00e9f, 0x0ff00fff, "ldaexd%c\t%12-15r, %12-15T, [%16-19R]"},
3307 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3308 0x01c00e90, 0x0ff00ff0, "stlexb%c\t%12-15r, %0-3r, [%16-19R]"},
3309 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3310 0x01d00e9f, 0x0ff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
3311 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3312 0x01e00e90, 0x0ff00ff0, "stlexh%c\t%12-15r, %0-3r, [%16-19R]"},
3313 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3314 0x01f00e9f, 0x0ff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
3315 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3316 0x0180fc90, 0x0ff0fff0, "stl%c\t%0-3r, [%16-19R]"},
3317 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3318 0x01900c9f, 0x0ff00fff, "lda%c\t%12-15r, [%16-19R]"},
3319 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3320 0x01c0fc90, 0x0ff0fff0, "stlb%c\t%0-3r, [%16-19R]"},
3321 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3322 0x01d00c9f, 0x0ff00fff, "ldab%c\t%12-15r, [%16-19R]"},
3323 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3324 0x01e0fc90, 0x0ff0fff0, "stlh%c\t%0-3r, [%16-19R]"},
3325 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3326 0x01f00c9f, 0x0ff00fff, "ldah%c\t%12-15r, [%16-19R]"},
3327 /* CRC32 instructions. */
3328 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3329 0xe1000040, 0xfff00ff0, "crc32b\t%12-15R, %16-19R, %0-3R"},
3330 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3331 0xe1200040, 0xfff00ff0, "crc32h\t%12-15R, %16-19R, %0-3R"},
3332 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3333 0xe1400040, 0xfff00ff0, "crc32w\t%12-15R, %16-19R, %0-3R"},
3334 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3335 0xe1000240, 0xfff00ff0, "crc32cb\t%12-15R, %16-19R, %0-3R"},
3336 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3337 0xe1200240, 0xfff00ff0, "crc32ch\t%12-15R, %16-19R, %0-3R"},
3338 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3339 0xe1400240, 0xfff00ff0, "crc32cw\t%12-15R, %16-19R, %0-3R"},
3341 /* Privileged Access Never extension instructions. */
3342 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),
3343 0xf1100000, 0xfffffdff, "setpan\t#%9-9d"},
3345 /* Virtualization Extension instructions. */
3346 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x0160006e, 0x0fffffff, "eret%c"},
3347 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x01400070, 0x0ff000f0, "hvc%c\t%e"},
3349 /* Integer Divide Extension instructions. */
3350 {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
3351 0x0710f010, 0x0ff0f0f0, "sdiv%c\t%16-19r, %0-3r, %8-11r"},
3352 {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
3353 0x0730f010, 0x0ff0f0f0, "udiv%c\t%16-19r, %0-3r, %8-11r"},
3355 /* MP Extension instructions. */
3356 {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf410f000, 0xfc70f000, "pldw\t%a"},
3358 /* Speculation Barriers. */
3359 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xe320f014, 0xffffffff, "csdb"},
3360 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff040, 0xffffffff, "ssbb"},
3361 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff044, 0xffffffff, "pssbb"},
3363 /* V7 instructions. */
3364 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf450f000, 0xfd70f000, "pli\t%P"},
3365 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0x0320f0f0, 0x0ffffff0, "dbg%c\t#%0-3d"},
3366 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff051, 0xfffffff3, "dmb\t%U"},
3367 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff041, 0xfffffff3, "dsb\t%U"},
3368 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff050, 0xfffffff0, "dmb\t%U"},
3369 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff040, 0xfffffff0, "dsb\t%U"},
3370 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff060, 0xfffffff0, "isb\t%U"},
3371 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
3372 0x0320f000, 0x0fffffff, "nop%c\t{%0-7d}"},
3374 /* ARM V6T2 instructions. */
3375 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3376 0x07c0001f, 0x0fe0007f, "bfc%c\t%12-15R, %E"},
3377 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3378 0x07c00010, 0x0fe00070, "bfi%c\t%12-15R, %0-3r, %E"},
3379 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3380 0x00600090, 0x0ff000f0, "mls%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3381 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3382 0x002000b0, 0x0f3000f0, "strht%c\t%12-15R, %S"},
3384 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3385 0x00300090, 0x0f3000f0, UNDEFINED_INSTRUCTION },
3386 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3387 0x00300090, 0x0f300090, "ldr%6's%5?hbt%c\t%12-15R, %S"},
3389 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
3390 0x03000000, 0x0ff00000, "movw%c\t%12-15R, %V"},
3391 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
3392 0x03400000, 0x0ff00000, "movt%c\t%12-15R, %V"},
3393 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3394 0x06ff0f30, 0x0fff0ff0, "rbit%c\t%12-15R, %0-3R"},
3395 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3396 0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, #%7-11d, #%16-20W"},
3398 /* ARM Security extension instructions. */
3399 {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),
3400 0x01600070, 0x0ff000f0, "smc%c\t%e"},
3402 /* ARM V6K instructions. */
3403 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3404 0xf57ff01f, 0xffffffff, "clrex"},
3405 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3406 0x01d00f9f, 0x0ff00fff, "ldrexb%c\t%12-15R, [%16-19R]"},
3407 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3408 0x01b00f9f, 0x0ff00fff, "ldrexd%c\t%12-15r, [%16-19R]"},
3409 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3410 0x01f00f9f, 0x0ff00fff, "ldrexh%c\t%12-15R, [%16-19R]"},
3411 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3412 0x01c00f90, 0x0ff00ff0, "strexb%c\t%12-15R, %0-3R, [%16-19R]"},
3413 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3414 0x01a00f90, 0x0ff00ff0, "strexd%c\t%12-15R, %0-3r, [%16-19R]"},
3415 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3416 0x01e00f90, 0x0ff00ff0, "strexh%c\t%12-15R, %0-3R, [%16-19R]"},
3418 /* ARMv8.5-A instructions. */
3419 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf57ff070, 0xffffffff, "sb"},
3421 /* ARM V6K NOP hints. */
3422 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3423 0x0320f001, 0x0fffffff, "yield%c"},
3424 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3425 0x0320f002, 0x0fffffff, "wfe%c"},
3426 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3427 0x0320f003, 0x0fffffff, "wfi%c"},
3428 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3429 0x0320f004, 0x0fffffff, "sev%c"},
3430 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3431 0x0320f000, 0x0fffff00, "nop%c\t{%0-7d}"},
3433 /* ARM V6 instructions. */
3434 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3435 0xf1080000, 0xfffffe3f, "cpsie\t%8'a%7'i%6'f"},
3436 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3437 0xf10a0000, 0xfffffe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"},
3438 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3439 0xf10C0000, 0xfffffe3f, "cpsid\t%8'a%7'i%6'f"},
3440 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3441 0xf10e0000, 0xfffffe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"},
3442 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3443 0xf1000000, 0xfff1fe20, "cps\t#%0-4d"},
3444 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3445 0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15R, %16-19R, %0-3R"},
3446 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3447 0x06800010, 0x0ff00070, "pkhbt%c\t%12-15R, %16-19R, %0-3R, lsl #%7-11d"},
3448 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3449 0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15R, %16-19R, %0-3R, asr #32"},
3450 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3451 0x06800050, 0x0ff00070, "pkhtb%c\t%12-15R, %16-19R, %0-3R, asr #%7-11d"},
3452 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3453 0x01900f9f, 0x0ff00fff, "ldrex%c\tr%12-15d, [%16-19R]"},
3454 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3455 0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15R, %16-19R, %0-3R"},
3456 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3457 0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15R, %16-19R, %0-3R"},
3458 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3459 0x06200f30, 0x0ff00ff0, "qasx%c\t%12-15R, %16-19R, %0-3R"},
3460 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3461 0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15R, %16-19R, %0-3R"},
3462 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3463 0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15R, %16-19R, %0-3R"},
3464 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3465 0x06200f50, 0x0ff00ff0, "qsax%c\t%12-15R, %16-19R, %0-3R"},
3466 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3467 0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15R, %16-19R, %0-3R"},
3468 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3469 0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15R, %16-19R, %0-3R"},
3470 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3471 0x06100f30, 0x0ff00ff0, "sasx%c\t%12-15R, %16-19R, %0-3R"},
3472 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3473 0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15R, %16-19R, %0-3R"},
3474 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3475 0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15R, %16-19R, %0-3R"},
3476 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3477 0x06300f30, 0x0ff00ff0, "shasx%c\t%12-15R, %16-19R, %0-3R"},
3478 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3479 0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15R, %16-19R, %0-3R"},
3480 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3481 0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15R, %16-19R, %0-3R"},
3482 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3483 0x06300f50, 0x0ff00ff0, "shsax%c\t%12-15R, %16-19R, %0-3R"},
3484 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3485 0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15R, %16-19R, %0-3R"},
3486 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3487 0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15R, %16-19R, %0-3R"},
3488 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3489 0x06100f50, 0x0ff00ff0, "ssax%c\t%12-15R, %16-19R, %0-3R"},
3490 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3491 0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15R, %16-19R, %0-3R"},
3492 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3493 0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15R, %16-19R, %0-3R"},
3494 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3495 0x06500f30, 0x0ff00ff0, "uasx%c\t%12-15R, %16-19R, %0-3R"},
3496 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3497 0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15R, %16-19R, %0-3R"},
3498 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3499 0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15R, %16-19R, %0-3R"},
3500 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3501 0x06700f30, 0x0ff00ff0, "uhasx%c\t%12-15R, %16-19R, %0-3R"},
3502 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3503 0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15R, %16-19R, %0-3R"},
3504 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3505 0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15R, %16-19R, %0-3R"},
3506 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3507 0x06700f50, 0x0ff00ff0, "uhsax%c\t%12-15R, %16-19R, %0-3R"},
3508 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3509 0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15R, %16-19R, %0-3R"},
3510 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3511 0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15R, %16-19R, %0-3R"},
3512 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3513 0x06600f30, 0x0ff00ff0, "uqasx%c\t%12-15R, %16-19R, %0-3R"},
3514 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3515 0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15R, %16-19R, %0-3R"},
3516 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3517 0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15R, %16-19R, %0-3R"},
3518 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3519 0x06600f50, 0x0ff00ff0, "uqsax%c\t%12-15R, %16-19R, %0-3R"},
3520 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3521 0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15R, %16-19R, %0-3R"},
3522 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3523 0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15R, %16-19R, %0-3R"},
3524 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3525 0x06500f50, 0x0ff00ff0, "usax%c\t%12-15R, %16-19R, %0-3R"},
3526 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3527 0x06bf0f30, 0x0fff0ff0, "rev%c\t%12-15R, %0-3R"},
3528 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3529 0x06bf0fb0, 0x0fff0ff0, "rev16%c\t%12-15R, %0-3R"},
3530 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3531 0x06ff0fb0, 0x0fff0ff0, "revsh%c\t%12-15R, %0-3R"},
3532 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3533 0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t%16-19r%21'!"},
3534 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3535 0x06bf0070, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R"},
3536 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3537 0x06bf0470, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #8"},
3538 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3539 0x06bf0870, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #16"},
3540 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3541 0x06bf0c70, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #24"},
3542 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3543 0x068f0070, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R"},
3544 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3545 0x068f0470, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #8"},
3546 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3547 0x068f0870, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #16"},
3548 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3549 0x068f0c70, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #24"},
3550 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3551 0x06af0070, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R"},
3552 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3553 0x06af0470, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #8"},
3554 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3555 0x06af0870, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #16"},
3556 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3557 0x06af0c70, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #24"},
3558 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3559 0x06ff0070, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R"},
3560 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3561 0x06ff0470, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #8"},
3562 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3563 0x06ff0870, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #16"},
3564 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3565 0x06ff0c70, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #24"},
3566 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3567 0x06cf0070, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R"},
3568 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3569 0x06cf0470, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #8"},
3570 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3571 0x06cf0870, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #16"},
3572 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3573 0x06cf0c70, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #24"},
3574 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3575 0x06ef0070, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R"},
3576 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3577 0x06ef0470, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #8"},
3578 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3579 0x06ef0870, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #16"},
3580 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3581 0x06ef0c70, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #24"},
3582 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3583 0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R"},
3584 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3585 0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3586 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3587 0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3588 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3589 0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3590 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3591 0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R"},
3592 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3593 0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3594 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3595 0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3596 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3597 0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3598 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3599 0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R"},
3600 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3601 0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3602 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3603 0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3604 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3605 0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3606 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3607 0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R"},
3608 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3609 0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3610 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3611 0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3612 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3613 0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3614 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3615 0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R"},
3616 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3617 0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3618 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3619 0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3620 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3621 0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ROR #24"},
3622 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3623 0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R"},
3624 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3625 0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3626 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3627 0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3628 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3629 0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3630 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3631 0x06800fb0, 0x0ff00ff0, "sel%c\t%12-15R, %16-19R, %0-3R"},
3632 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3633 0xf1010000, 0xfffffc00, "setend\t%9?ble"},
3634 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3635 0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19R, %0-3R, %8-11R"},
3636 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3637 0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19R, %0-3R, %8-11R"},
3638 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3639 0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3640 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3641 0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3642 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3643 0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3644 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3645 0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3646 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3647 0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19R, %0-3R, %8-11R"},
3648 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3649 0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3650 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3651 0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3652 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3653 0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t%16-19r%21'!, #%0-4d"},
3654 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3655 0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15R, #%16-20W, %0-3R"},
3656 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3657 0x06a00010, 0x0fe00070, "ssat%c\t%12-15R, #%16-20W, %0-3R, lsl #%7-11d"},
3658 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3659 0x06a00050, 0x0fe00070, "ssat%c\t%12-15R, #%16-20W, %0-3R, asr #%7-11d"},
3660 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3661 0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, #%16-19W, %0-3r"},
3662 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3663 0x01800f90, 0x0ff00ff0, "strex%c\t%12-15R, %0-3R, [%16-19R]"},
3664 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3665 0x00400090, 0x0ff000f0, "umaal%c\t%12-15R, %16-19R, %0-3R, %8-11R"},
3666 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3667 0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19R, %0-3R, %8-11R"},
3668 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3669 0x07800010, 0x0ff000f0, "usada8%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3670 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3671 0x06e00010, 0x0fe00ff0, "usat%c\t%12-15R, #%16-20d, %0-3R"},
3672 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3673 0x06e00010, 0x0fe00070, "usat%c\t%12-15R, #%16-20d, %0-3R, lsl #%7-11d"},
3674 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3675 0x06e00050, 0x0fe00070, "usat%c\t%12-15R, #%16-20d, %0-3R, asr #%7-11d"},
3676 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3677 0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15R, #%16-19d, %0-3R"},
3679 /* V5J instruction. */
3680 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5J),
3681 0x012fff20, 0x0ffffff0, "bxj%c\t%0-3R"},
3683 /* V5 Instructions. */
3684 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3685 0xe1200070, 0xfff000f0,
3686 "bkpt\t0x%16-19X%12-15X%8-11X%0-3X"},
3687 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3688 0xfa000000, 0xfe000000, "blx\t%B"},
3689 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3690 0x012fff30, 0x0ffffff0, "blx%c\t%0-3R"},
3691 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3692 0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15R, %0-3R"},
3694 /* V5E "El Segundo" Instructions. */
3695 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
3696 0x000000d0, 0x0e1000f0, "ldrd%c\t%12-15r, %s"},
3697 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
3698 0x000000f0, 0x0e1000f0, "strd%c\t%12-15r, %s"},
3699 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
3700 0xf450f000, 0xfc70f000, "pld\t%a"},
3701 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3702 0x01000080, 0x0ff000f0, "smlabb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3703 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3704 0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3705 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3706 0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3707 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3708 0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11R, %12-15R"},
3710 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3711 0x01200080, 0x0ff000f0, "smlawb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3712 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3713 0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19R, %0-3r, %8-11R, %12-15R"},
3715 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3716 0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3717 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3718 0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3719 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3720 0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3721 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3722 0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3724 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3725 0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19R, %0-3R, %8-11R"},
3726 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3727 0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19R, %0-3R, %8-11R"},
3728 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3729 0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19R, %0-3R, %8-11R"},
3730 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3731 0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19R, %0-3R, %8-11R"},
3733 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3734 0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19R, %0-3R, %8-11R"},
3735 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3736 0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19R, %0-3R, %8-11R"},
3738 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3739 0x01000050, 0x0ff00ff0, "qadd%c\t%12-15R, %0-3R, %16-19R"},
3740 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3741 0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15R, %0-3R, %16-19R"},
3742 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3743 0x01200050, 0x0ff00ff0, "qsub%c\t%12-15R, %0-3R, %16-19R"},
3744 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3745 0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15R, %0-3R, %16-19R"},
3747 /* ARM Instructions. */
3748 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3749 0x052d0004, 0x0fff0fff, "push%c\t{%12-15r}\t\t; (str%c %12-15r, %a)"},
3751 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3752 0x04400000, 0x0e500000, "strb%t%c\t%12-15R, %a"},
3753 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3754 0x04000000, 0x0e500000, "str%t%c\t%12-15r, %a"},
3755 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3756 0x06400000, 0x0e500ff0, "strb%t%c\t%12-15R, %a"},
3757 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3758 0x06000000, 0x0e500ff0, "str%t%c\t%12-15r, %a"},
3759 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3760 0x04400000, 0x0c500010, "strb%t%c\t%12-15R, %a"},
3761 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3762 0x04000000, 0x0c500010, "str%t%c\t%12-15r, %a"},
3764 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3765 0x04400000, 0x0e500000, "strb%c\t%12-15R, %a"},
3766 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3767 0x06400000, 0x0e500010, "strb%c\t%12-15R, %a"},
3768 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3769 0x004000b0, 0x0e5000f0, "strh%c\t%12-15R, %s"},
3770 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3771 0x000000b0, 0x0e500ff0, "strh%c\t%12-15R, %s"},
3773 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3774 0x00500090, 0x0e5000f0, UNDEFINED_INSTRUCTION},
3775 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3776 0x00500090, 0x0e500090, "ldr%6's%5?hb%c\t%12-15R, %s"},
3777 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3778 0x00100090, 0x0e500ff0, UNDEFINED_INSTRUCTION},
3779 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3780 0x00100090, 0x0e500f90, "ldr%6's%5?hb%c\t%12-15R, %s"},
3782 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3783 0x02000000, 0x0fe00000, "and%20's%c\t%12-15r, %16-19r, %o"},
3784 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3785 0x00000000, 0x0fe00010, "and%20's%c\t%12-15r, %16-19r, %o"},
3786 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3787 0x00000010, 0x0fe00090, "and%20's%c\t%12-15R, %16-19R, %o"},
3789 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3790 0x02200000, 0x0fe00000, "eor%20's%c\t%12-15r, %16-19r, %o"},
3791 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3792 0x00200000, 0x0fe00010, "eor%20's%c\t%12-15r, %16-19r, %o"},
3793 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3794 0x00200010, 0x0fe00090, "eor%20's%c\t%12-15R, %16-19R, %o"},
3796 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3797 0x02400000, 0x0fe00000, "sub%20's%c\t%12-15r, %16-19r, %o"},
3798 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3799 0x00400000, 0x0fe00010, "sub%20's%c\t%12-15r, %16-19r, %o"},
3800 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3801 0x00400010, 0x0fe00090, "sub%20's%c\t%12-15R, %16-19R, %o"},
3803 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3804 0x02600000, 0x0fe00000, "rsb%20's%c\t%12-15r, %16-19r, %o"},
3805 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3806 0x00600000, 0x0fe00010, "rsb%20's%c\t%12-15r, %16-19r, %o"},
3807 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3808 0x00600010, 0x0fe00090, "rsb%20's%c\t%12-15R, %16-19R, %o"},
3810 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3811 0x02800000, 0x0fe00000, "add%20's%c\t%12-15r, %16-19r, %o"},
3812 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3813 0x00800000, 0x0fe00010, "add%20's%c\t%12-15r, %16-19r, %o"},
3814 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3815 0x00800010, 0x0fe00090, "add%20's%c\t%12-15R, %16-19R, %o"},
3817 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3818 0x02a00000, 0x0fe00000, "adc%20's%c\t%12-15r, %16-19r, %o"},
3819 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3820 0x00a00000, 0x0fe00010, "adc%20's%c\t%12-15r, %16-19r, %o"},
3821 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3822 0x00a00010, 0x0fe00090, "adc%20's%c\t%12-15R, %16-19R, %o"},
3824 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3825 0x02c00000, 0x0fe00000, "sbc%20's%c\t%12-15r, %16-19r, %o"},
3826 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3827 0x00c00000, 0x0fe00010, "sbc%20's%c\t%12-15r, %16-19r, %o"},
3828 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3829 0x00c00010, 0x0fe00090, "sbc%20's%c\t%12-15R, %16-19R, %o"},
3831 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3832 0x02e00000, 0x0fe00000, "rsc%20's%c\t%12-15r, %16-19r, %o"},
3833 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3834 0x00e00000, 0x0fe00010, "rsc%20's%c\t%12-15r, %16-19r, %o"},
3835 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3836 0x00e00010, 0x0fe00090, "rsc%20's%c\t%12-15R, %16-19R, %o"},
3838 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT),
3839 0x0120f200, 0x0fb0f200, "msr%c\t%C, %0-3r"},
3840 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
3841 0x0120f000, 0x0db0f000, "msr%c\t%C, %o"},
3842 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
3843 0x01000000, 0x0fb00cff, "mrs%c\t%12-15R, %R"},
3845 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3846 0x03000000, 0x0fe00000, "tst%p%c\t%16-19r, %o"},
3847 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3848 0x01000000, 0x0fe00010, "tst%p%c\t%16-19r, %o"},
3849 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3850 0x01000010, 0x0fe00090, "tst%p%c\t%16-19R, %o"},
3852 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3853 0x03300000, 0x0ff00000, "teq%p%c\t%16-19r, %o"},
3854 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3855 0x01300000, 0x0ff00010, "teq%p%c\t%16-19r, %o"},
3856 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3857 0x01300010, 0x0ff00010, "teq%p%c\t%16-19R, %o"},
3859 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3860 0x03400000, 0x0fe00000, "cmp%p%c\t%16-19r, %o"},
3861 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3862 0x01400000, 0x0fe00010, "cmp%p%c\t%16-19r, %o"},
3863 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3864 0x01400010, 0x0fe00090, "cmp%p%c\t%16-19R, %o"},
3866 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3867 0x03600000, 0x0fe00000, "cmn%p%c\t%16-19r, %o"},
3868 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3869 0x01600000, 0x0fe00010, "cmn%p%c\t%16-19r, %o"},
3870 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3871 0x01600010, 0x0fe00090, "cmn%p%c\t%16-19R, %o"},
3873 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3874 0x03800000, 0x0fe00000, "orr%20's%c\t%12-15r, %16-19r, %o"},
3875 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3876 0x01800000, 0x0fe00010, "orr%20's%c\t%12-15r, %16-19r, %o"},
3877 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3878 0x01800010, 0x0fe00090, "orr%20's%c\t%12-15R, %16-19R, %o"},
3880 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3881 0x03a00000, 0x0fef0000, "mov%20's%c\t%12-15r, %o"},
3882 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3883 0x01a00000, 0x0def0ff0, "mov%20's%c\t%12-15r, %0-3r"},
3884 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3885 0x01a00000, 0x0def0060, "lsl%20's%c\t%12-15R, %q"},
3886 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3887 0x01a00020, 0x0def0060, "lsr%20's%c\t%12-15R, %q"},
3888 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3889 0x01a00040, 0x0def0060, "asr%20's%c\t%12-15R, %q"},
3890 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3891 0x01a00060, 0x0def0ff0, "rrx%20's%c\t%12-15r, %0-3r"},
3892 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3893 0x01a00060, 0x0def0060, "ror%20's%c\t%12-15R, %q"},
3895 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3896 0x03c00000, 0x0fe00000, "bic%20's%c\t%12-15r, %16-19r, %o"},
3897 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3898 0x01c00000, 0x0fe00010, "bic%20's%c\t%12-15r, %16-19r, %o"},
3899 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3900 0x01c00010, 0x0fe00090, "bic%20's%c\t%12-15R, %16-19R, %o"},
3902 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3903 0x03e00000, 0x0fe00000, "mvn%20's%c\t%12-15r, %o"},
3904 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3905 0x01e00000, 0x0fe00010, "mvn%20's%c\t%12-15r, %o"},
3906 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3907 0x01e00010, 0x0fe00090, "mvn%20's%c\t%12-15R, %o"},
3909 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3910 0x06000010, 0x0e000010, UNDEFINED_INSTRUCTION},
3911 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3912 0x049d0004, 0x0fff0fff, "pop%c\t{%12-15r}\t\t; (ldr%c %12-15r, %a)"},
3914 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3915 0x04500000, 0x0c500000, "ldrb%t%c\t%12-15R, %a"},
3917 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3918 0x04300000, 0x0d700000, "ldrt%c\t%12-15R, %a"},
3919 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3920 0x04100000, 0x0c500000, "ldr%c\t%12-15r, %a"},
3922 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3923 0x092d0001, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3924 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3925 0x092d0002, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3926 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3927 0x092d0004, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3928 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3929 0x092d0008, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3930 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3931 0x092d0010, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3932 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3933 0x092d0020, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3934 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3935 0x092d0040, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3936 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3937 0x092d0080, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3938 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3939 0x092d0100, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3940 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3941 0x092d0200, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3942 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3943 0x092d0400, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3944 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3945 0x092d0800, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3946 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3947 0x092d1000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3948 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3949 0x092d2000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3950 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3951 0x092d4000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3952 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3953 0x092d8000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
3954 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3955 0x092d0000, 0x0fff0000, "push%c\t%m"},
3956 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3957 0x08800000, 0x0ff00000, "stm%c\t%16-19R%21'!, %m%22'^"},
3958 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3959 0x08000000, 0x0e100000, "stm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
3961 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3962 0x08bd0001, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3963 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3964 0x08bd0002, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3965 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3966 0x08bd0004, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3967 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3968 0x08bd0008, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3969 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3970 0x08bd0010, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3971 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3972 0x08bd0020, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3973 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3974 0x08bd0040, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3975 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3976 0x08bd0080, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3977 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3978 0x08bd0100, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3979 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3980 0x08bd0200, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3981 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3982 0x08bd0400, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3983 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3984 0x08bd0800, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3985 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3986 0x08bd1000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3987 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3988 0x08bd2000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3989 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3990 0x08bd4000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3991 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3992 0x08bd8000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
3993 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3994 0x08bd0000, 0x0fff0000, "pop%c\t%m"},
3995 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3996 0x08900000, 0x0f900000, "ldm%c\t%16-19R%21'!, %m%22'^"},
3997 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3998 0x08100000, 0x0e100000, "ldm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
4000 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4001 0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
4002 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4003 0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
4006 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
4007 0x03200000, 0x0fff00ff, "nop%c\t{%0-7d}" UNPREDICTABLE_INSTRUCTION},
4008 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4009 0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
4010 {ARM_FEATURE_CORE_LOW (0),
4011 0x00000000, 0x00000000, 0}
4014 /* print_insn_thumb16 recognizes the following format control codes:
4016 %S print Thumb register (bits 3..5 as high number if bit 6 set)
4017 %D print Thumb register (bits 0..2 as high number if bit 7 set)
4018 %<bitfield>I print bitfield as a signed decimal
4019 (top bit of range being the sign bit)
4020 %N print Thumb register mask (with LR)
4021 %O print Thumb register mask (with PC)
4022 %M print Thumb register mask
4023 %b print CZB's 6-bit unsigned branch destination
4024 %s print Thumb right-shift immediate (6..10; 0 == 32).
4025 %c print the condition code
4026 %C print the condition code, or "s" if not conditional
4027 %x print warning if conditional an not at end of IT block"
4028 %X print "\t; unpredictable <IT:code>" if conditional
4029 %I print IT instruction suffix and operands
4030 %W print Thumb Writeback indicator for LDMIA
4031 %<bitfield>r print bitfield as an ARM register
4032 %<bitfield>d print bitfield as a decimal
4033 %<bitfield>H print (bitfield * 2) as a decimal
4034 %<bitfield>W print (bitfield * 4) as a decimal
4035 %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
4036 %<bitfield>B print Thumb branch destination (signed displacement)
4037 %<bitfield>c print bitfield as a condition code
4038 %<bitnum>'c print specified char iff bit is one
4039 %<bitnum>?ab print a if bit is one else print b. */
4041 static const struct opcode16 thumb_opcodes[] =
4043 /* Thumb instructions. */
4045 /* ARMv8-M Security Extensions instructions. */
4046 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4784, 0xff87, "blxns\t%3-6r"},
4047 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4704, 0xff87, "bxns\t%3-6r"},
4049 /* ARM V8 instructions. */
4050 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xbf50, 0xffff, "sevl%c"},
4051 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xba80, 0xffc0, "hlt\t%0-5x"},
4052 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN), 0xb610, 0xfff7, "setpan\t#%3-3d"},
4054 /* ARM V6K no-argument instructions. */
4055 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xffff, "nop%c"},
4056 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf10, 0xffff, "yield%c"},
4057 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf20, 0xffff, "wfe%c"},
4058 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf30, 0xffff, "wfi%c"},
4059 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf40, 0xffff, "sev%c"},
4060 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xff0f, "nop%c\t{%4-7d}"},
4062 /* ARM V6T2 instructions. */
4063 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4064 0xb900, 0xfd00, "cbnz\t%0-2r, %b%X"},
4065 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4066 0xb100, 0xfd00, "cbz\t%0-2r, %b%X"},
4067 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xbf00, 0xff00, "it%I%X"},
4070 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f%X"},
4071 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f%X"},
4072 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0x4600, 0xffc0, "mov%c\t%0-2r, %3-5r"},
4073 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba00, 0xffc0, "rev%c\t%0-2r, %3-5r"},
4074 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba40, 0xffc0, "rev16%c\t%0-2r, %3-5r"},
4075 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xbac0, 0xffc0, "revsh%c\t%0-2r, %3-5r"},
4076 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb650, 0xfff7, "setend\t%3?ble%X"},
4077 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb200, 0xffc0, "sxth%c\t%0-2r, %3-5r"},
4078 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb240, 0xffc0, "sxtb%c\t%0-2r, %3-5r"},
4079 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb280, 0xffc0, "uxth%c\t%0-2r, %3-5r"},
4080 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb2c0, 0xffc0, "uxtb%c\t%0-2r, %3-5r"},
4082 /* ARM V5 ISA extends Thumb. */
4083 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
4084 0xbe00, 0xff00, "bkpt\t%0-7x"}, /* Is always unconditional. */
4085 /* This is BLX(2). BLX(1) is a 32-bit instruction. */
4086 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
4087 0x4780, 0xff87, "blx%c\t%3-6r%x"}, /* note: 4 bit register number. */
4088 /* ARM V4T ISA (Thumb v1). */
4089 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4090 0x46C0, 0xFFFF, "nop%c\t\t\t; (mov r8, r8)"},
4092 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4000, 0xFFC0, "and%C\t%0-2r, %3-5r"},
4093 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4040, 0xFFC0, "eor%C\t%0-2r, %3-5r"},
4094 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4080, 0xFFC0, "lsl%C\t%0-2r, %3-5r"},
4095 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x40C0, 0xFFC0, "lsr%C\t%0-2r, %3-5r"},
4096 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4100, 0xFFC0, "asr%C\t%0-2r, %3-5r"},
4097 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4140, 0xFFC0, "adc%C\t%0-2r, %3-5r"},
4098 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4180, 0xFFC0, "sbc%C\t%0-2r, %3-5r"},
4099 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x41C0, 0xFFC0, "ror%C\t%0-2r, %3-5r"},
4100 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4200, 0xFFC0, "tst%c\t%0-2r, %3-5r"},
4101 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4240, 0xFFC0, "neg%C\t%0-2r, %3-5r"},
4102 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4280, 0xFFC0, "cmp%c\t%0-2r, %3-5r"},
4103 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x42C0, 0xFFC0, "cmn%c\t%0-2r, %3-5r"},
4104 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4300, 0xFFC0, "orr%C\t%0-2r, %3-5r"},
4105 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4340, 0xFFC0, "mul%C\t%0-2r, %3-5r"},
4106 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4380, 0xFFC0, "bic%C\t%0-2r, %3-5r"},
4107 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x43C0, 0xFFC0, "mvn%C\t%0-2r, %3-5r"},
4109 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB000, 0xFF80, "add%c\tsp, #%0-6W"},
4110 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB080, 0xFF80, "sub%c\tsp, #%0-6W"},
4112 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4700, 0xFF80, "bx%c\t%S%x"},
4113 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4400, 0xFF00, "add%c\t%D, %S"},
4114 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4500, 0xFF00, "cmp%c\t%D, %S"},
4115 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4600, 0xFF00, "mov%c\t%D, %S"},
4117 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB400, 0xFE00, "push%c\t%N"},
4118 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xBC00, 0xFE00, "pop%c\t%O"},
4120 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4121 0x1800, 0xFE00, "add%C\t%0-2r, %3-5r, %6-8r"},
4122 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4123 0x1A00, 0xFE00, "sub%C\t%0-2r, %3-5r, %6-8r"},
4124 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4125 0x1C00, 0xFE00, "add%C\t%0-2r, %3-5r, #%6-8d"},
4126 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4127 0x1E00, 0xFE00, "sub%C\t%0-2r, %3-5r, #%6-8d"},
4129 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4130 0x5200, 0xFE00, "strh%c\t%0-2r, [%3-5r, %6-8r]"},
4131 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4132 0x5A00, 0xFE00, "ldrh%c\t%0-2r, [%3-5r, %6-8r]"},
4133 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4134 0x5600, 0xF600, "ldrs%11?hb%c\t%0-2r, [%3-5r, %6-8r]"},
4136 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4137 0x5000, 0xFA00, "str%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
4138 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4139 0x5800, 0xFA00, "ldr%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
4141 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0000, 0xFFC0, "mov%C\t%0-2r, %3-5r"},
4142 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4143 0x0000, 0xF800, "lsl%C\t%0-2r, %3-5r, #%6-10d"},
4144 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0800, 0xF800, "lsr%C\t%0-2r, %3-5r, %s"},
4145 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x1000, 0xF800, "asr%C\t%0-2r, %3-5r, %s"},
4147 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2000, 0xF800, "mov%C\t%8-10r, #%0-7d"},
4148 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2800, 0xF800, "cmp%c\t%8-10r, #%0-7d"},
4149 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3000, 0xF800, "add%C\t%8-10r, #%0-7d"},
4150 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3800, 0xF800, "sub%C\t%8-10r, #%0-7d"},
4152 /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
4153 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4155 "ldr%c\t%8-10r, [pc, #%0-7W]\t; (%0-7a)"},
4157 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4158 0x6000, 0xF800, "str%c\t%0-2r, [%3-5r, #%6-10W]"},
4159 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4160 0x6800, 0xF800, "ldr%c\t%0-2r, [%3-5r, #%6-10W]"},
4161 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4162 0x7000, 0xF800, "strb%c\t%0-2r, [%3-5r, #%6-10d]"},
4163 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4164 0x7800, 0xF800, "ldrb%c\t%0-2r, [%3-5r, #%6-10d]"},
4166 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4167 0x8000, 0xF800, "strh%c\t%0-2r, [%3-5r, #%6-10H]"},
4168 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4169 0x8800, 0xF800, "ldrh%c\t%0-2r, [%3-5r, #%6-10H]"},
4171 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4172 0x9000, 0xF800, "str%c\t%8-10r, [sp, #%0-7W]"},
4173 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4174 0x9800, 0xF800, "ldr%c\t%8-10r, [sp, #%0-7W]"},
4176 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4177 0xA000, 0xF800, "add%c\t%8-10r, pc, #%0-7W\t; (adr %8-10r, %0-7a)"},
4178 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4179 0xA800, 0xF800, "add%c\t%8-10r, sp, #%0-7W"},
4181 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC000, 0xF800, "stmia%c\t%8-10r!, %M"},
4182 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC800, 0xF800, "ldmia%c\t%8-10r%W, %M"},
4184 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDF00, 0xFF00, "svc%c\t%0-7d"},
4186 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFF00, "udf%c\t#%0-7d"},
4187 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFE00, UNDEFINED_INSTRUCTION},
4188 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xD000, 0xF000, "b%8-11c.n\t%0-7B%X"},
4190 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xE000, 0xF800, "b%c.n\t%0-10B%x"},
4192 /* The E800 .. FFFF range is unconditionally redirected to the
4193 32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
4194 are processed via that table. Thus, we can never encounter a
4195 bare "second half of BL/BLX(1)" instruction here. */
4196 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1), 0x0000, 0x0000, UNDEFINED_INSTRUCTION},
4197 {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
4200 /* Thumb32 opcodes use the same table structure as the ARM opcodes.
4201 We adopt the convention that hw1 is the high 16 bits of .value and
4202 .mask, hw2 the low 16 bits.
4204 print_insn_thumb32 recognizes the following format control codes:
4208 %I print a 12-bit immediate from hw1[10],hw2[14:12,7:0]
4209 %M print a modified 12-bit immediate (same location)
4210 %J print a 16-bit immediate from hw1[3:0,10],hw2[14:12,7:0]
4211 %K print a 16-bit immediate from hw2[3:0],hw1[3:0],hw2[11:4]
4212 %H print a 16-bit immediate from hw2[3:0],hw1[11:0]
4213 %S print a possibly-shifted Rm
4215 %L print address for a ldrd/strd instruction
4216 %a print the address of a plain load/store
4217 %w print the width and signedness of a core load/store
4218 %m print register mask for ldm/stm
4219 %n print register mask for clrm
4221 %E print the lsb and width fields of a bfc/bfi instruction
4222 %F print the lsb and width fields of a sbfx/ubfx instruction
4223 %G print a fallback offset for Branch Future instructions
4224 %W print an offset for BF instruction
4225 %Y print an offset for BFL instruction
4226 %Z print an offset for BFCSEL instruction
4227 %Q print an offset for Low Overhead Loop instructions
4228 %P print an offset for Low Overhead Loop end instructions
4229 %b print a conditional branch offset
4230 %B print an unconditional branch offset
4231 %s print the shift field of an SSAT instruction
4232 %R print the rotation field of an SXT instruction
4233 %U print barrier type.
4234 %P print address for pli instruction.
4235 %c print the condition code
4236 %x print warning if conditional an not at end of IT block"
4237 %X print "\t; unpredictable <IT:code>" if conditional
4239 %<bitfield>d print bitfield in decimal
4240 %<bitfield>D print bitfield plus one in decimal
4241 %<bitfield>W print bitfield*4 in decimal
4242 %<bitfield>r print bitfield as an ARM register
4243 %<bitfield>R as %<>r but r15 is UNPREDICTABLE
4244 %<bitfield>S as %<>r but r13 and r15 is UNPREDICTABLE
4245 %<bitfield>c print bitfield as a condition code
4247 %<bitfield>'c print specified char iff bitfield is all ones
4248 %<bitfield>`c print specified char iff bitfield is all zeroes
4249 %<bitfield>?ab... select from array of values in big endian order
4251 With one exception at the bottom (done because BL and BLX(1) need
4252 to come dead last), this table was machine-sorted first in
4253 decreasing order of number of bits set in the mask, then in
4254 increasing numeric order of mask, then in increasing numeric order
4255 of opcode. This order is not the clearest for a human reader, but
4256 is guaranteed never to catch a special-case bit pattern with a more
4257 general mask, which is important, because this instruction encoding
4258 makes heavy use of special-case bit patterns. */
4259 static const struct opcode32 thumb32_opcodes[] =
4261 /* Armv8.1-M Mainline and Armv8.1-M Mainline Security Extensions
4263 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4264 0xf00fe001, 0xffffffff, "lctp%c"},
4265 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4266 0xf02fc001, 0xfffff001, "le\t%P"},
4267 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4268 0xf00fc001, 0xfffff001, "le\tlr, %P"},
4269 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4270 0xf01fc001, 0xfffff001, "letp\tlr, %P"},
4271 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4272 0xf040c001, 0xfff0f001, "wls\tlr, %16-19S, %Q"},
4273 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4274 0xf000c001, 0xffc0f001, "wlstp.%20-21s\tlr, %16-19S, %Q"},
4275 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4276 0xf040e001, 0xfff0ffff, "dls\tlr, %16-19S"},
4277 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4278 0xf000e001, 0xffc0ffff, "dlstp.%20-21s\tlr, %16-19S"},
4280 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4281 0xf040e001, 0xf860f001, "bf%c\t%G, %W"},
4282 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4283 0xf060e001, 0xf8f0f001, "bfx%c\t%G, %16-19S"},
4284 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4285 0xf000c001, 0xf800f001, "bfl%c\t%G, %Y"},
4286 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4287 0xf070e001, 0xf8f0f001, "bflx%c\t%G, %16-19S"},
4288 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4289 0xf000e001, 0xf840f001, "bfcsel\t%G, %Z, %18-21c"},
4291 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4292 0xe89f0000, 0xffff2000, "clrm%c\t%n"},
4294 /* ARMv8-M and ARMv8-M Security Extensions instructions. */
4295 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0xe97fe97f, 0xffffffff, "sg"},
4296 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4297 0xe840f000, 0xfff0f0ff, "tt\t%8-11r, %16-19r"},
4298 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4299 0xe840f040, 0xfff0f0ff, "ttt\t%8-11r, %16-19r"},
4300 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4301 0xe840f080, 0xfff0f0ff, "tta\t%8-11r, %16-19r"},
4302 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4303 0xe840f0c0, 0xfff0f0ff, "ttat\t%8-11r, %16-19r"},
4305 /* ARM V8.2 RAS extension instructions. */
4306 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
4307 0xf3af8010, 0xffffffff, "esb"},
4309 /* V8 instructions. */
4310 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4311 0xf3af8005, 0xffffffff, "sevl%c.w"},
4312 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4313 0xf78f8000, 0xfffffffc, "dcps%0-1d"},
4314 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4315 0xe8c00f8f, 0xfff00fff, "stlb%c\t%12-15r, [%16-19R]"},
4316 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4317 0xe8c00f9f, 0xfff00fff, "stlh%c\t%12-15r, [%16-19R]"},
4318 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4319 0xe8c00faf, 0xfff00fff, "stl%c\t%12-15r, [%16-19R]"},
4320 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4321 0xe8c00fc0, 0xfff00ff0, "stlexb%c\t%0-3r, %12-15r, [%16-19R]"},
4322 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4323 0xe8c00fd0, 0xfff00ff0, "stlexh%c\t%0-3r, %12-15r, [%16-19R]"},
4324 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4325 0xe8c00fe0, 0xfff00ff0, "stlex%c\t%0-3r, %12-15r, [%16-19R]"},
4326 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4327 0xe8c000f0, 0xfff000f0, "stlexd%c\t%0-3r, %12-15r, %8-11r, [%16-19R]"},
4328 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4329 0xe8d00f8f, 0xfff00fff, "ldab%c\t%12-15r, [%16-19R]"},
4330 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4331 0xe8d00f9f, 0xfff00fff, "ldah%c\t%12-15r, [%16-19R]"},
4332 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4333 0xe8d00faf, 0xfff00fff, "lda%c\t%12-15r, [%16-19R]"},
4334 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4335 0xe8d00fcf, 0xfff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
4336 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4337 0xe8d00fdf, 0xfff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
4338 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4339 0xe8d00fef, 0xfff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
4340 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4341 0xe8d000ff, 0xfff000ff, "ldaexd%c\t%12-15r, %8-11r, [%16-19R]"},
4343 /* CRC32 instructions. */
4344 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4345 0xfac0f080, 0xfff0f0f0, "crc32b\t%8-11R, %16-19R, %0-3R"},
4346 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4347 0xfac0f090, 0xfff0f0f0, "crc32h\t%9-11R, %16-19R, %0-3R"},
4348 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4349 0xfac0f0a0, 0xfff0f0f0, "crc32w\t%8-11R, %16-19R, %0-3R"},
4350 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4351 0xfad0f080, 0xfff0f0f0, "crc32cb\t%8-11R, %16-19R, %0-3R"},
4352 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4353 0xfad0f090, 0xfff0f0f0, "crc32ch\t%8-11R, %16-19R, %0-3R"},
4354 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4355 0xfad0f0a0, 0xfff0f0f0, "crc32cw\t%8-11R, %16-19R, %0-3R"},
4357 /* Speculation Barriers. */
4358 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8014, 0xffffffff, "csdb"},
4359 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f40, 0xffffffff, "ssbb"},
4360 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f44, 0xffffffff, "pssbb"},
4362 /* V7 instructions. */
4363 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf910f000, 0xff70f000, "pli%c\t%a"},
4364 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3af80f0, 0xfffffff0, "dbg%c\t#%0-3d"},
4365 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f51, 0xfffffff3, "dmb%c\t%U"},
4366 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f41, 0xfffffff3, "dsb%c\t%U"},
4367 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f50, 0xfffffff0, "dmb%c\t%U"},
4368 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f40, 0xfffffff0, "dsb%c\t%U"},
4369 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f60, 0xfffffff0, "isb%c\t%U"},
4370 {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
4371 0xfb90f0f0, 0xfff0f0f0, "sdiv%c\t%8-11r, %16-19r, %0-3r"},
4372 {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
4373 0xfbb0f0f0, 0xfff0f0f0, "udiv%c\t%8-11r, %16-19r, %0-3r"},
4375 /* Virtualization Extension instructions. */
4376 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0xf7e08000, 0xfff0f000, "hvc%c\t%V"},
4377 /* We skip ERET as that is SUBS pc, lr, #0. */
4379 /* MP Extension instructions. */
4380 {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf830f000, 0xff70f000, "pldw%c\t%a"},
4382 /* Security extension instructions. */
4383 {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC), 0xf7f08000, 0xfff0f000, "smc%c\t%K"},
4385 /* ARMv8.5-A instructions. */
4386 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf3bf8f70, 0xffffffff, "sb"},
4388 /* Instructions defined in the basic V6T2 set. */
4389 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8000, 0xffffffff, "nop%c.w"},
4390 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8001, 0xffffffff, "yield%c.w"},
4391 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8002, 0xffffffff, "wfe%c.w"},
4392 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8003, 0xffffffff, "wfi%c.w"},
4393 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8004, 0xffffffff, "sev%c.w"},
4394 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4395 0xf3af8000, 0xffffff00, "nop%c.w\t{%0-7d}"},
4396 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf7f0a000, 0xfff0f000, "udf%c.w\t%H"},
4398 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4399 0xf3bf8f2f, 0xffffffff, "clrex%c"},
4400 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4401 0xf3af8400, 0xffffff1f, "cpsie.w\t%7'a%6'i%5'f%X"},
4402 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4403 0xf3af8600, 0xffffff1f, "cpsid.w\t%7'a%6'i%5'f%X"},
4404 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4405 0xf3c08f00, 0xfff0ffff, "bxj%c\t%16-19r%x"},
4406 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4407 0xe810c000, 0xffd0ffff, "rfedb%c\t%16-19r%21'!"},
4408 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4409 0xe990c000, 0xffd0ffff, "rfeia%c\t%16-19r%21'!"},
4410 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4411 0xf3e08000, 0xffe0f000, "mrs%c\t%8-11r, %D"},
4412 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4413 0xf3af8100, 0xffffffe0, "cps\t#%0-4d%X"},
4414 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4415 0xe8d0f000, 0xfff0fff0, "tbb%c\t[%16-19r, %0-3r]%x"},
4416 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4417 0xe8d0f010, 0xfff0fff0, "tbh%c\t[%16-19r, %0-3r, lsl #1]%x"},
4418 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4419 0xf3af8500, 0xffffff00, "cpsie\t%7'a%6'i%5'f, #%0-4d%X"},
4420 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4421 0xf3af8700, 0xffffff00, "cpsid\t%7'a%6'i%5'f, #%0-4d%X"},
4422 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4423 0xf3de8f00, 0xffffff00, "subs%c\tpc, lr, #%0-7d"},
4424 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4425 0xf3808000, 0xffe0f000, "msr%c\t%C, %16-19r"},
4426 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4427 0xe8500f00, 0xfff00fff, "ldrex%c\t%12-15r, [%16-19r]"},
4428 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4429 0xe8d00f4f, 0xfff00fef, "ldrex%4?hb%c\t%12-15r, [%16-19r]"},
4430 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4431 0xe800c000, 0xffd0ffe0, "srsdb%c\t%16-19r%21'!, #%0-4d"},
4432 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4433 0xe980c000, 0xffd0ffe0, "srsia%c\t%16-19r%21'!, #%0-4d"},
4434 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4435 0xfa0ff080, 0xfffff0c0, "sxth%c.w\t%8-11r, %0-3r%R"},
4436 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4437 0xfa1ff080, 0xfffff0c0, "uxth%c.w\t%8-11r, %0-3r%R"},
4438 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4439 0xfa2ff080, 0xfffff0c0, "sxtb16%c\t%8-11r, %0-3r%R"},
4440 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4441 0xfa3ff080, 0xfffff0c0, "uxtb16%c\t%8-11r, %0-3r%R"},
4442 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4443 0xfa4ff080, 0xfffff0c0, "sxtb%c.w\t%8-11r, %0-3r%R"},
4444 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4445 0xfa5ff080, 0xfffff0c0, "uxtb%c.w\t%8-11r, %0-3r%R"},
4446 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4447 0xe8400000, 0xfff000ff, "strex%c\t%8-11r, %12-15r, [%16-19r]"},
4448 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4449 0xe8d0007f, 0xfff000ff, "ldrexd%c\t%12-15r, %8-11r, [%16-19r]"},
4450 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4451 0xfa80f000, 0xfff0f0f0, "sadd8%c\t%8-11r, %16-19r, %0-3r"},
4452 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4453 0xfa80f010, 0xfff0f0f0, "qadd8%c\t%8-11r, %16-19r, %0-3r"},
4454 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4455 0xfa80f020, 0xfff0f0f0, "shadd8%c\t%8-11r, %16-19r, %0-3r"},
4456 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4457 0xfa80f040, 0xfff0f0f0, "uadd8%c\t%8-11r, %16-19r, %0-3r"},
4458 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4459 0xfa80f050, 0xfff0f0f0, "uqadd8%c\t%8-11r, %16-19r, %0-3r"},
4460 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4461 0xfa80f060, 0xfff0f0f0, "uhadd8%c\t%8-11r, %16-19r, %0-3r"},
4462 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4463 0xfa80f080, 0xfff0f0f0, "qadd%c\t%8-11r, %0-3r, %16-19r"},
4464 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4465 0xfa80f090, 0xfff0f0f0, "qdadd%c\t%8-11r, %0-3r, %16-19r"},
4466 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4467 0xfa80f0a0, 0xfff0f0f0, "qsub%c\t%8-11r, %0-3r, %16-19r"},
4468 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4469 0xfa80f0b0, 0xfff0f0f0, "qdsub%c\t%8-11r, %0-3r, %16-19r"},
4470 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4471 0xfa90f000, 0xfff0f0f0, "sadd16%c\t%8-11r, %16-19r, %0-3r"},
4472 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4473 0xfa90f010, 0xfff0f0f0, "qadd16%c\t%8-11r, %16-19r, %0-3r"},
4474 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4475 0xfa90f020, 0xfff0f0f0, "shadd16%c\t%8-11r, %16-19r, %0-3r"},
4476 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4477 0xfa90f040, 0xfff0f0f0, "uadd16%c\t%8-11r, %16-19r, %0-3r"},
4478 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4479 0xfa90f050, 0xfff0f0f0, "uqadd16%c\t%8-11r, %16-19r, %0-3r"},
4480 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4481 0xfa90f060, 0xfff0f0f0, "uhadd16%c\t%8-11r, %16-19r, %0-3r"},
4482 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4483 0xfa90f080, 0xfff0f0f0, "rev%c.w\t%8-11r, %16-19r"},
4484 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4485 0xfa90f090, 0xfff0f0f0, "rev16%c.w\t%8-11r, %16-19r"},
4486 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4487 0xfa90f0a0, 0xfff0f0f0, "rbit%c\t%8-11r, %16-19r"},
4488 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4489 0xfa90f0b0, 0xfff0f0f0, "revsh%c.w\t%8-11r, %16-19r"},
4490 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4491 0xfaa0f000, 0xfff0f0f0, "sasx%c\t%8-11r, %16-19r, %0-3r"},
4492 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4493 0xfaa0f010, 0xfff0f0f0, "qasx%c\t%8-11r, %16-19r, %0-3r"},
4494 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4495 0xfaa0f020, 0xfff0f0f0, "shasx%c\t%8-11r, %16-19r, %0-3r"},
4496 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4497 0xfaa0f040, 0xfff0f0f0, "uasx%c\t%8-11r, %16-19r, %0-3r"},
4498 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4499 0xfaa0f050, 0xfff0f0f0, "uqasx%c\t%8-11r, %16-19r, %0-3r"},
4500 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4501 0xfaa0f060, 0xfff0f0f0, "uhasx%c\t%8-11r, %16-19r, %0-3r"},
4502 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4503 0xfaa0f080, 0xfff0f0f0, "sel%c\t%8-11r, %16-19r, %0-3r"},
4504 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4505 0xfab0f080, 0xfff0f0f0, "clz%c\t%8-11r, %16-19r"},
4506 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4507 0xfac0f000, 0xfff0f0f0, "ssub8%c\t%8-11r, %16-19r, %0-3r"},
4508 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4509 0xfac0f010, 0xfff0f0f0, "qsub8%c\t%8-11r, %16-19r, %0-3r"},
4510 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4511 0xfac0f020, 0xfff0f0f0, "shsub8%c\t%8-11r, %16-19r, %0-3r"},
4512 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4513 0xfac0f040, 0xfff0f0f0, "usub8%c\t%8-11r, %16-19r, %0-3r"},
4514 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4515 0xfac0f050, 0xfff0f0f0, "uqsub8%c\t%8-11r, %16-19r, %0-3r"},
4516 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4517 0xfac0f060, 0xfff0f0f0, "uhsub8%c\t%8-11r, %16-19r, %0-3r"},
4518 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4519 0xfad0f000, 0xfff0f0f0, "ssub16%c\t%8-11r, %16-19r, %0-3r"},
4520 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4521 0xfad0f010, 0xfff0f0f0, "qsub16%c\t%8-11r, %16-19r, %0-3r"},
4522 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4523 0xfad0f020, 0xfff0f0f0, "shsub16%c\t%8-11r, %16-19r, %0-3r"},
4524 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4525 0xfad0f040, 0xfff0f0f0, "usub16%c\t%8-11r, %16-19r, %0-3r"},
4526 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4527 0xfad0f050, 0xfff0f0f0, "uqsub16%c\t%8-11r, %16-19r, %0-3r"},
4528 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4529 0xfad0f060, 0xfff0f0f0, "uhsub16%c\t%8-11r, %16-19r, %0-3r"},
4530 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4531 0xfae0f000, 0xfff0f0f0, "ssax%c\t%8-11r, %16-19r, %0-3r"},
4532 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4533 0xfae0f010, 0xfff0f0f0, "qsax%c\t%8-11r, %16-19r, %0-3r"},
4534 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4535 0xfae0f020, 0xfff0f0f0, "shsax%c\t%8-11r, %16-19r, %0-3r"},
4536 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4537 0xfae0f040, 0xfff0f0f0, "usax%c\t%8-11r, %16-19r, %0-3r"},
4538 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4539 0xfae0f050, 0xfff0f0f0, "uqsax%c\t%8-11r, %16-19r, %0-3r"},
4540 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4541 0xfae0f060, 0xfff0f0f0, "uhsax%c\t%8-11r, %16-19r, %0-3r"},
4542 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4543 0xfb00f000, 0xfff0f0f0, "mul%c.w\t%8-11r, %16-19r, %0-3r"},
4544 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4545 0xfb70f000, 0xfff0f0f0, "usad8%c\t%8-11r, %16-19r, %0-3r"},
4546 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4547 0xfa00f000, 0xffe0f0f0, "lsl%20's%c.w\t%8-11R, %16-19R, %0-3R"},
4548 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4549 0xfa20f000, 0xffe0f0f0, "lsr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
4550 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4551 0xfa40f000, 0xffe0f0f0, "asr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
4552 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4553 0xfa60f000, 0xffe0f0f0, "ror%20's%c.w\t%8-11r, %16-19r, %0-3r"},
4554 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4555 0xe8c00f40, 0xfff00fe0, "strex%4?hb%c\t%0-3r, %12-15r, [%16-19r]"},
4556 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4557 0xf3200000, 0xfff0f0e0, "ssat16%c\t%8-11r, #%0-4D, %16-19r"},
4558 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4559 0xf3a00000, 0xfff0f0e0, "usat16%c\t%8-11r, #%0-4d, %16-19r"},
4560 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4561 0xfb20f000, 0xfff0f0e0, "smuad%4'x%c\t%8-11r, %16-19r, %0-3r"},
4562 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4563 0xfb30f000, 0xfff0f0e0, "smulw%4?tb%c\t%8-11r, %16-19r, %0-3r"},
4564 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4565 0xfb40f000, 0xfff0f0e0, "smusd%4'x%c\t%8-11r, %16-19r, %0-3r"},
4566 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4567 0xfb50f000, 0xfff0f0e0, "smmul%4'r%c\t%8-11r, %16-19r, %0-3r"},
4568 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4569 0xfa00f080, 0xfff0f0c0, "sxtah%c\t%8-11r, %16-19r, %0-3r%R"},
4570 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4571 0xfa10f080, 0xfff0f0c0, "uxtah%c\t%8-11r, %16-19r, %0-3r%R"},
4572 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4573 0xfa20f080, 0xfff0f0c0, "sxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
4574 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4575 0xfa30f080, 0xfff0f0c0, "uxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
4576 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4577 0xfa40f080, 0xfff0f0c0, "sxtab%c\t%8-11r, %16-19r, %0-3r%R"},
4578 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4579 0xfa50f080, 0xfff0f0c0, "uxtab%c\t%8-11r, %16-19r, %0-3r%R"},
4580 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4581 0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r"},
4582 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4583 0xf36f0000, 0xffff8020, "bfc%c\t%8-11r, %E"},
4584 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4585 0xea100f00, 0xfff08f00, "tst%c.w\t%16-19r, %S"},
4586 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4587 0xea900f00, 0xfff08f00, "teq%c\t%16-19r, %S"},
4588 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4589 0xeb100f00, 0xfff08f00, "cmn%c.w\t%16-19r, %S"},
4590 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4591 0xebb00f00, 0xfff08f00, "cmp%c.w\t%16-19r, %S"},
4592 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4593 0xf0100f00, 0xfbf08f00, "tst%c.w\t%16-19r, %M"},
4594 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4595 0xf0900f00, 0xfbf08f00, "teq%c\t%16-19r, %M"},
4596 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4597 0xf1100f00, 0xfbf08f00, "cmn%c.w\t%16-19r, %M"},
4598 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4599 0xf1b00f00, 0xfbf08f00, "cmp%c.w\t%16-19r, %M"},
4600 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4601 0xea4f0000, 0xffef8000, "mov%20's%c.w\t%8-11r, %S"},
4602 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4603 0xea6f0000, 0xffef8000, "mvn%20's%c.w\t%8-11r, %S"},
4604 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4605 0xe8c00070, 0xfff000f0, "strexd%c\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
4606 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4607 0xfb000000, 0xfff000f0, "mla%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
4608 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4609 0xfb000010, 0xfff000f0, "mls%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
4610 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4611 0xfb700000, 0xfff000f0, "usada8%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4612 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4613 0xfb800000, 0xfff000f0, "smull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4614 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4615 0xfba00000, 0xfff000f0, "umull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4616 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4617 0xfbc00000, 0xfff000f0, "smlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4618 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4619 0xfbe00000, 0xfff000f0, "umlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4620 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4621 0xfbe00060, 0xfff000f0, "umaal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4622 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4623 0xe8500f00, 0xfff00f00, "ldrex%c\t%12-15r, [%16-19r, #%0-7W]"},
4624 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4625 0xf04f0000, 0xfbef8000, "mov%20's%c.w\t%8-11r, %M"},
4626 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4627 0xf06f0000, 0xfbef8000, "mvn%20's%c.w\t%8-11r, %M"},
4628 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4629 0xf810f000, 0xff70f000, "pld%c\t%a"},
4630 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4631 0xfb200000, 0xfff000e0, "smlad%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4632 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4633 0xfb300000, 0xfff000e0, "smlaw%4?tb%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4634 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4635 0xfb400000, 0xfff000e0, "smlsd%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4636 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4637 0xfb500000, 0xfff000e0, "smmla%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4638 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4639 0xfb600000, 0xfff000e0, "smmls%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4640 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4641 0xfbc000c0, 0xfff000e0, "smlald%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4642 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4643 0xfbd000c0, 0xfff000e0, "smlsld%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4644 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4645 0xeac00000, 0xfff08030, "pkhbt%c\t%8-11r, %16-19r, %S"},
4646 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4647 0xeac00020, 0xfff08030, "pkhtb%c\t%8-11r, %16-19r, %S"},
4648 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4649 0xf3400000, 0xfff08020, "sbfx%c\t%8-11r, %16-19r, %F"},
4650 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4651 0xf3c00000, 0xfff08020, "ubfx%c\t%8-11r, %16-19r, %F"},
4652 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4653 0xf8000e00, 0xff900f00, "str%wt%c\t%12-15r, %a"},
4654 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4655 0xfb100000, 0xfff000c0,
4656 "smla%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
4657 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4658 0xfbc00080, 0xfff000c0,
4659 "smlal%5?tb%4?tb%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
4660 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4661 0xf3600000, 0xfff08020, "bfi%c\t%8-11r, %16-19r, %E"},
4662 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4663 0xf8100e00, 0xfe900f00, "ldr%wt%c\t%12-15r, %a"},
4664 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4665 0xf3000000, 0xffd08020, "ssat%c\t%8-11r, #%0-4D, %16-19r%s"},
4666 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4667 0xf3800000, 0xffd08020, "usat%c\t%8-11r, #%0-4d, %16-19r%s"},
4668 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4669 0xf2000000, 0xfbf08000, "addw%c\t%8-11r, %16-19r, %I"},
4670 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4671 0xf2400000, 0xfbf08000, "movw%c\t%8-11r, %J"},
4672 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4673 0xf2a00000, 0xfbf08000, "subw%c\t%8-11r, %16-19r, %I"},
4674 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4675 0xf2c00000, 0xfbf08000, "movt%c\t%8-11r, %J"},
4676 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4677 0xea000000, 0xffe08000, "and%20's%c.w\t%8-11r, %16-19r, %S"},
4678 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4679 0xea200000, 0xffe08000, "bic%20's%c.w\t%8-11r, %16-19r, %S"},
4680 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4681 0xea400000, 0xffe08000, "orr%20's%c.w\t%8-11r, %16-19r, %S"},
4682 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4683 0xea600000, 0xffe08000, "orn%20's%c\t%8-11r, %16-19r, %S"},
4684 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4685 0xea800000, 0xffe08000, "eor%20's%c.w\t%8-11r, %16-19r, %S"},
4686 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4687 0xeb000000, 0xffe08000, "add%20's%c.w\t%8-11r, %16-19r, %S"},
4688 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4689 0xeb400000, 0xffe08000, "adc%20's%c.w\t%8-11r, %16-19r, %S"},
4690 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4691 0xeb600000, 0xffe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %S"},
4692 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4693 0xeba00000, 0xffe08000, "sub%20's%c.w\t%8-11r, %16-19r, %S"},
4694 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4695 0xebc00000, 0xffe08000, "rsb%20's%c\t%8-11r, %16-19r, %S"},
4696 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4697 0xe8400000, 0xfff00000, "strex%c\t%8-11r, %12-15r, [%16-19r, #%0-7W]"},
4698 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4699 0xf0000000, 0xfbe08000, "and%20's%c.w\t%8-11r, %16-19r, %M"},
4700 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4701 0xf0200000, 0xfbe08000, "bic%20's%c.w\t%8-11r, %16-19r, %M"},
4702 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4703 0xf0400000, 0xfbe08000, "orr%20's%c.w\t%8-11r, %16-19r, %M"},
4704 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4705 0xf0600000, 0xfbe08000, "orn%20's%c\t%8-11r, %16-19r, %M"},
4706 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4707 0xf0800000, 0xfbe08000, "eor%20's%c.w\t%8-11r, %16-19r, %M"},
4708 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4709 0xf1000000, 0xfbe08000, "add%20's%c.w\t%8-11r, %16-19r, %M"},
4710 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4711 0xf1400000, 0xfbe08000, "adc%20's%c.w\t%8-11r, %16-19r, %M"},
4712 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4713 0xf1600000, 0xfbe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %M"},
4714 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4715 0xf1a00000, 0xfbe08000, "sub%20's%c.w\t%8-11r, %16-19r, %M"},
4716 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4717 0xf1c00000, 0xfbe08000, "rsb%20's%c\t%8-11r, %16-19r, %M"},
4718 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4719 0xe8800000, 0xffd00000, "stmia%c.w\t%16-19r%21'!, %m"},
4720 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4721 0xe8900000, 0xffd00000, "ldmia%c.w\t%16-19r%21'!, %m"},
4722 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4723 0xe9000000, 0xffd00000, "stmdb%c\t%16-19r%21'!, %m"},
4724 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4725 0xe9100000, 0xffd00000, "ldmdb%c\t%16-19r%21'!, %m"},
4726 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4727 0xe9c00000, 0xffd000ff, "strd%c\t%12-15r, %8-11r, [%16-19r]"},
4728 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4729 0xe9d00000, 0xffd000ff, "ldrd%c\t%12-15r, %8-11r, [%16-19r]"},
4730 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4731 0xe9400000, 0xff500000,
4732 "strd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!%L"},
4733 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4734 0xe9500000, 0xff500000,
4735 "ldrd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!%L"},
4736 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4737 0xe8600000, 0xff700000,
4738 "strd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W%L"},
4739 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4740 0xe8700000, 0xff700000,
4741 "ldrd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W%L"},
4742 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4743 0xf8000000, 0xff100000, "str%w%c.w\t%12-15r, %a"},
4744 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4745 0xf8100000, 0xfe100000, "ldr%w%c.w\t%12-15r, %a"},
4747 /* Filter out Bcc with cond=E or F, which are used for other instructions. */
4748 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4749 0xf3c08000, 0xfbc0d000, "undefined (bcc, cond=0xF)"},
4750 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4751 0xf3808000, 0xfbc0d000, "undefined (bcc, cond=0xE)"},
4752 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4753 0xf0008000, 0xf800d000, "b%22-25c.w\t%b%X"},
4754 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4755 0xf0009000, 0xf800d000, "b%c.w\t%B%x"},
4757 /* These have been 32-bit since the invention of Thumb. */
4758 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4759 0xf000c000, 0xf800d001, "blx%c\t%B%x"},
4760 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4761 0xf000d000, 0xf800d000, "bl%c\t%B%x"},
4764 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4765 0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
4766 {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
4769 static const char *const arm_conditional[] =
4770 {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
4771 "hi", "ls", "ge", "lt", "gt", "le", "al", "<und>", ""};
4773 static const char *const arm_fp_const[] =
4774 {"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
4776 static const char *const arm_shift[] =
4777 {"lsl", "lsr", "asr", "ror"};
4782 const char *description;
4783 const char *reg_names[16];
4787 static const arm_regname regnames[] =
4789 { "reg-names-raw", N_("Select raw register names"),
4790 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
4791 { "reg-names-gcc", N_("Select register names used by GCC"),
4792 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc" }},
4793 { "reg-names-std", N_("Select register names used in ARM's ISA documentation"),
4794 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc" }},
4795 { "force-thumb", N_("Assume all insns are Thumb insns"), {NULL} },
4796 { "no-force-thumb", N_("Examine preceding label to determine an insn's type"), {NULL} },
4797 { "reg-names-apcs", N_("Select register names used in the APCS"),
4798 { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl", "fp", "ip", "sp", "lr", "pc" }},
4799 { "reg-names-atpcs", N_("Select register names used in the ATPCS"),
4800 { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "IP", "SP", "LR", "PC" }},
4801 { "reg-names-special-atpcs", N_("Select special register names used in the ATPCS"),
4802 { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }}
4805 static const char *const iwmmxt_wwnames[] =
4806 {"b", "h", "w", "d"};
4808 static const char *const iwmmxt_wwssnames[] =
4809 {"b", "bus", "bc", "bss",
4810 "h", "hus", "hc", "hss",
4811 "w", "wus", "wc", "wss",
4812 "d", "dus", "dc", "dss"
4815 static const char *const iwmmxt_regnames[] =
4816 { "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7",
4817 "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"
4820 static const char *const iwmmxt_cregnames[] =
4821 { "wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved",
4822 "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"
4825 static const char *const vec_condnames[] =
4826 { "eq", "ne", "cs", "hi", "ge", "lt", "gt", "le"
4829 static const char *const mve_predicatenames[] =
4830 { "", "ttt", "tt", "tte", "t", "tee", "te", "tet", "",
4831 "eee", "ee", "eet", "e", "ett", "et", "ete"
4834 /* Names for 2-bit size field for mve vector isntructions. */
4835 static const char *const mve_vec_sizename[] =
4836 { "8", "16", "32", "64"};
4838 /* Indicates whether we are processing a then predicate,
4839 else predicate or none at all. */
4847 /* Information used to process a vpt block and subsequent instructions. */
4850 /* Are we in a vpt block. */
4851 bfd_boolean in_vpt_block;
4853 /* Next predicate state if in vpt block. */
4854 enum vpt_pred_state next_pred_state;
4856 /* Mask from vpt/vpst instruction. */
4857 long predicate_mask;
4859 /* Instruction number in vpt block. */
4860 long current_insn_num;
4862 /* Number of instructions in vpt block.. */
4866 static struct vpt_block vpt_block_state =
4875 /* Default to GCC register name set. */
4876 static unsigned int regname_selected = 1;
4878 #define NUM_ARM_OPTIONS ARRAY_SIZE (regnames)
4879 #define arm_regnames regnames[regname_selected].reg_names
4881 static bfd_boolean force_thumb = FALSE;
4883 /* Current IT instruction state. This contains the same state as the IT
4884 bits in the CPSR. */
4885 static unsigned int ifthen_state;
4886 /* IT state for the next instruction. */
4887 static unsigned int ifthen_next_state;
4888 /* The address of the insn for which the IT state is valid. */
4889 static bfd_vma ifthen_address;
4890 #define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
4891 /* Indicates that the current Conditional state is unconditional or outside
4893 #define COND_UNCOND 16
4897 /* Extract the predicate mask for a VPT or VPST instruction.
4898 The mask is composed of bits 13-15 (Mkl) and bit 22 (Mkh). */
4901 mve_extract_pred_mask (long given)
4903 return ((given & 0x00400000) >> 19) | ((given & 0xe000) >> 13);
4906 /* Return the number of instructions in a MVE predicate block. */
4908 num_instructions_vpt_block (long given)
4910 long mask = mve_extract_pred_mask (given);
4917 if ((mask & 7) == 4)
4920 if ((mask & 3) == 2)
4923 if ((mask & 1) == 1)
4930 mark_outside_vpt_block (void)
4932 vpt_block_state.in_vpt_block = FALSE;
4933 vpt_block_state.next_pred_state = PRED_NONE;
4934 vpt_block_state.predicate_mask = 0;
4935 vpt_block_state.current_insn_num = 0;
4936 vpt_block_state.num_pred_insn = 0;
4940 mark_inside_vpt_block (long given)
4942 vpt_block_state.in_vpt_block = TRUE;
4943 vpt_block_state.next_pred_state = PRED_THEN;
4944 vpt_block_state.predicate_mask = mve_extract_pred_mask (given);
4945 vpt_block_state.current_insn_num = 0;
4946 vpt_block_state.num_pred_insn = num_instructions_vpt_block (given);
4947 assert (vpt_block_state.num_pred_insn >= 1);
4950 static enum vpt_pred_state
4951 invert_next_predicate_state (enum vpt_pred_state astate)
4953 if (astate == PRED_THEN)
4955 else if (astate == PRED_ELSE)
4961 static enum vpt_pred_state
4962 update_next_predicate_state (void)
4964 long pred_mask = vpt_block_state.predicate_mask;
4965 long mask_for_insn = 0;
4967 switch (vpt_block_state.current_insn_num)
4985 if (pred_mask & mask_for_insn)
4986 return invert_next_predicate_state (vpt_block_state.next_pred_state);
4988 return vpt_block_state.next_pred_state;
4992 update_vpt_block_state (void)
4994 vpt_block_state.current_insn_num++;
4995 if (vpt_block_state.current_insn_num == vpt_block_state.num_pred_insn)
4997 /* No more instructions to process in vpt block. */
4998 mark_outside_vpt_block ();
5002 vpt_block_state.next_pred_state = update_next_predicate_state ();
5005 /* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
5006 Returns pointer to following character of the format string and
5007 fills in *VALUEP and *WIDTHP with the extracted value and number of
5008 bits extracted. WIDTHP can be NULL. */
5011 arm_decode_bitfield (const char *ptr,
5013 unsigned long *valuep,
5016 unsigned long value = 0;
5024 for (start = 0; *ptr >= '0' && *ptr <= '9'; ptr++)
5025 start = start * 10 + *ptr - '0';
5027 for (end = 0, ptr++; *ptr >= '0' && *ptr <= '9'; ptr++)
5028 end = end * 10 + *ptr - '0';
5034 value |= ((insn >> start) & ((2ul << bits) - 1)) << width;
5037 while (*ptr++ == ',');
5045 arm_decode_shift (long given, fprintf_ftype func, void *stream,
5046 bfd_boolean print_shift)
5048 func (stream, "%s", arm_regnames[given & 0xf]);
5050 if ((given & 0xff0) != 0)
5052 if ((given & 0x10) == 0)
5054 int amount = (given & 0xf80) >> 7;
5055 int shift = (given & 0x60) >> 5;
5061 func (stream, ", rrx");
5069 func (stream, ", %s #%d", arm_shift[shift], amount);
5071 func (stream, ", #%d", amount);
5073 else if ((given & 0x80) == 0x80)
5074 func (stream, "\t; <illegal shifter operand>");
5075 else if (print_shift)
5076 func (stream, ", %s %s", arm_shift[(given & 0x60) >> 5],
5077 arm_regnames[(given & 0xf00) >> 8]);
5079 func (stream, ", %s", arm_regnames[(given & 0xf00) >> 8]);
5083 /* Return TRUE if the MATCHED_INSN can be inside an IT block. */
5086 is_mve_okay_in_it (enum mve_instructions matched_insn)
5088 switch (matched_insn)
5090 case MVE_VMOV_GP_TO_VEC_LANE:
5091 case MVE_VMOV2_VEC_LANE_TO_GP:
5092 case MVE_VMOV2_GP_TO_VEC_LANE:
5093 case MVE_VMOV_VEC_LANE_TO_GP:
5101 is_mve_architecture (struct disassemble_info *info)
5103 struct arm_private_data *private_data = info->private_data;
5104 arm_feature_set allowed_arches = private_data->features;
5106 arm_feature_set arm_ext_v8_1m_main
5107 = ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
5109 if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
5110 && !ARM_CPU_IS_ANY (allowed_arches))
5117 is_vpt_instruction (long given)
5120 /* If mkh:mkl is '0000' then its not a vpt/vpst instruction. */
5121 if ((given & 0x0040e000) == 0)
5124 /* VPT floating point T1 variant. */
5125 if (((given & 0xefb10f50) == 0xee310f00 && ((given & 0x1001) != 0x1))
5126 /* VPT floating point T2 variant. */
5127 || ((given & 0xefb10f50) == 0xee310f40)
5128 /* VPT vector T1 variant. */
5129 || ((given & 0xff811f51) == 0xfe010f00)
5130 /* VPT vector T2 variant. */
5131 || ((given & 0xff811f51) == 0xfe010f01
5132 && ((given & 0x300000) != 0x300000))
5133 /* VPT vector T3 variant. */
5134 || ((given & 0xff811f50) == 0xfe011f00)
5135 /* VPT vector T4 variant. */
5136 || ((given & 0xff811f70) == 0xfe010f40)
5137 /* VPT vector T5 variant. */
5138 || ((given & 0xff811f70) == 0xfe010f60)
5139 /* VPT vector T6 variant. */
5140 || ((given & 0xff811f50) == 0xfe011f40)
5141 /* VPST vector T variant. */
5142 || ((given & 0xffbf1fff) == 0xfe310f4d))
5148 /* Decode a bitfield from opcode GIVEN, with starting bitfield = START
5149 and ending bitfield = END. END must be greater than START. */
5151 static unsigned long
5152 arm_decode_field (unsigned long given, unsigned int start, unsigned int end)
5154 int bits = end - start;
5159 return ((given >> start) & ((2ul << bits) - 1));
5162 /* Decode a bitfield from opcode GIVEN, with multiple bitfields:
5163 START:END and START2:END2. END/END2 must be greater than
5166 static unsigned long
5167 arm_decode_field_multiple (unsigned long given, unsigned int start,
5168 unsigned int end, unsigned int start2,
5171 int bits = end - start;
5172 int bits2 = end2 - start2;
5173 unsigned long value = 0;
5179 value = arm_decode_field (given, start, end);
5182 value |= ((given >> start2) & ((2ul << bits2) - 1)) << width;
5186 /* Return TRUE if the GIVEN encoding should not be decoded as MATCHED_INSN.
5187 This helps us decode instructions that change mnemonic depending on specific
5188 operand values/encodings. */
5191 is_mve_encoding_conflict (unsigned long given,
5192 enum mve_instructions matched_insn)
5194 switch (matched_insn)
5197 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5203 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5205 if ((arm_decode_field (given, 12, 12) == 0)
5206 && (arm_decode_field (given, 0, 0) == 1))
5211 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5213 if (arm_decode_field (given, 0, 3) == 0xd)
5217 case MVE_VPT_VEC_T1:
5218 case MVE_VPT_VEC_T2:
5219 case MVE_VPT_VEC_T3:
5220 case MVE_VPT_VEC_T4:
5221 case MVE_VPT_VEC_T5:
5222 case MVE_VPT_VEC_T6:
5223 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5225 if (arm_decode_field (given, 20, 21) == 3)
5229 case MVE_VCMP_FP_T1:
5230 if ((arm_decode_field (given, 12, 12) == 0)
5231 && (arm_decode_field (given, 0, 0) == 1))
5236 case MVE_VCMP_FP_T2:
5237 if (arm_decode_field (given, 0, 3) == 0xd)
5242 case MVE_VMUL_VEC_T2:
5249 case MVE_VADD_VEC_T2:
5250 case MVE_VSUB_VEC_T2:
5267 case MVE_VQDMULH_T3:
5268 case MVE_VQRDMULH_T4:
5274 case MVE_VCMP_VEC_T1:
5275 case MVE_VCMP_VEC_T2:
5276 case MVE_VCMP_VEC_T3:
5277 case MVE_VCMP_VEC_T4:
5278 case MVE_VCMP_VEC_T5:
5279 case MVE_VCMP_VEC_T6:
5280 if (arm_decode_field (given, 20, 21) == 3)
5289 if (arm_decode_field (given, 7, 8) == 3)
5296 if ((arm_decode_field (given, 24, 24) == 0)
5297 && (arm_decode_field (given, 21, 21) == 0))
5301 else if ((arm_decode_field (given, 7, 8) == 3))
5309 if ((arm_decode_field (given, 24, 24) == 0)
5310 && (arm_decode_field (given, 21, 21) == 0))
5317 case MVE_VCVT_FP_FIX_VEC:
5318 return (arm_decode_field (given, 16, 21) & 0x38) == 0;
5323 unsigned long cmode = arm_decode_field (given, 8, 11);
5325 if ((cmode & 1) == 0)
5327 else if ((cmode & 0xc) == 0xc)
5335 unsigned long cmode = arm_decode_field (given, 8, 11);
5337 if ((cmode & 9) == 1)
5339 else if ((cmode & 5) == 1)
5341 else if ((cmode & 0xe) == 0xe)
5347 case MVE_VMOV_IMM_TO_VEC:
5348 if ((arm_decode_field (given, 5, 5) == 1)
5349 && (arm_decode_field (given, 8, 11) != 0xe))
5356 unsigned long size = arm_decode_field (given, 19, 20);
5357 if ((size == 0) || (size == 3))
5378 if (arm_decode_field (given, 18, 19) == 3)
5384 case MVE_VRMLSLDAVH:
5387 if (arm_decode_field (given, 20, 22) == 7)
5392 case MVE_VRMLALDAVH:
5393 if ((arm_decode_field (given, 20, 22) & 6) == 6)
5400 if ((arm_decode_field (given, 20, 21) == 3)
5401 || (arm_decode_field (given, 1, 3) == 7))
5408 if (arm_decode_field (given, 16, 18) == 0)
5410 unsigned long sz = arm_decode_field (given, 19, 20);
5412 if ((sz == 1) || (sz == 2))
5427 if (arm_decode_field (given, 19, 21) == 0)
5433 if (arm_decode_field (given, 16, 19) == 0xf)
5439 case MVE_VADD_FP_T1:
5440 case MVE_VADD_FP_T2:
5441 case MVE_VADD_VEC_T1:
5448 print_mve_vld_str_addr (struct disassemble_info *info,
5449 unsigned long given,
5450 enum mve_instructions matched_insn)
5452 void *stream = info->stream;
5453 fprintf_ftype func = info->fprintf_func;
5455 unsigned long p, w, gpr, imm, add, mod_imm;
5457 imm = arm_decode_field (given, 0, 6);
5460 switch (matched_insn)
5464 gpr = arm_decode_field (given, 16, 18);
5469 gpr = arm_decode_field (given, 16, 18);
5475 gpr = arm_decode_field (given, 16, 19);
5481 gpr = arm_decode_field (given, 16, 19);
5487 gpr = arm_decode_field (given, 16, 19);
5494 p = arm_decode_field (given, 24, 24);
5495 w = arm_decode_field (given, 21, 21);
5497 add = arm_decode_field (given, 23, 23);
5501 /* Don't print anything for '+' as it is implied. */
5511 func (stream, "[%s, #%s%lu]", arm_regnames[gpr], add_sub, mod_imm);
5512 /* Pre-indexed mode. */
5514 func (stream, "[%s, #%s%lu]!", arm_regnames[gpr], add_sub, mod_imm);
5516 else if ((p == 0) && (w == 1))
5517 /* Post-index mode. */
5518 func (stream, "[%s], #%s%lu", arm_regnames[gpr], add_sub, mod_imm);
5521 /* Return FALSE if GIVEN is not an undefined encoding for MATCHED_INSN.
5522 Otherwise, return TRUE and set UNDEFINED_CODE to give a reason as to why
5523 this encoding is undefined. */
5526 is_mve_undefined (unsigned long given, enum mve_instructions matched_insn,
5527 enum mve_undefined *undefined_code)
5529 *undefined_code = UNDEF_NONE;
5531 switch (matched_insn)
5534 if (arm_decode_field_multiple (given, 5, 5, 22, 22) == 3)
5536 *undefined_code = UNDEF_SIZE_3;
5542 case MVE_VMUL_VEC_T1:
5544 case MVE_VADD_VEC_T1:
5545 case MVE_VSUB_VEC_T1:
5546 case MVE_VQDMULH_T1:
5547 case MVE_VQRDMULH_T2:
5551 if (arm_decode_field (given, 20, 21) == 3)
5553 *undefined_code = UNDEF_SIZE_3;
5560 if (arm_decode_field (given, 7, 8) == 3)
5562 *undefined_code = UNDEF_SIZE_3;
5569 if (arm_decode_field (given, 7, 8) <= 1)
5571 *undefined_code = UNDEF_SIZE_LE_1;
5578 if ((arm_decode_field (given, 7, 8) == 0))
5580 *undefined_code = UNDEF_SIZE_0;
5587 if ((arm_decode_field (given, 7, 8) <= 1))
5589 *undefined_code = UNDEF_SIZE_LE_1;
5595 case MVE_VLDRB_GATHER_T1:
5596 if (arm_decode_field (given, 7, 8) == 3)
5598 *undefined_code = UNDEF_SIZE_3;
5601 else if ((arm_decode_field (given, 28, 28) == 0)
5602 && (arm_decode_field (given, 7, 8) == 0))
5604 *undefined_code = UNDEF_NOT_UNS_SIZE_0;
5610 case MVE_VLDRH_GATHER_T2:
5611 if (arm_decode_field (given, 7, 8) == 3)
5613 *undefined_code = UNDEF_SIZE_3;
5616 else if ((arm_decode_field (given, 28, 28) == 0)
5617 && (arm_decode_field (given, 7, 8) == 1))
5619 *undefined_code = UNDEF_NOT_UNS_SIZE_1;
5622 else if (arm_decode_field (given, 7, 8) == 0)
5624 *undefined_code = UNDEF_SIZE_0;
5630 case MVE_VLDRW_GATHER_T3:
5631 if (arm_decode_field (given, 7, 8) != 2)
5633 *undefined_code = UNDEF_SIZE_NOT_2;
5636 else if (arm_decode_field (given, 28, 28) == 0)
5638 *undefined_code = UNDEF_NOT_UNSIGNED;
5644 case MVE_VLDRD_GATHER_T4:
5645 if (arm_decode_field (given, 7, 8) != 3)
5647 *undefined_code = UNDEF_SIZE_NOT_3;
5650 else if (arm_decode_field (given, 28, 28) == 0)
5652 *undefined_code = UNDEF_NOT_UNSIGNED;
5658 case MVE_VSTRB_SCATTER_T1:
5659 if (arm_decode_field (given, 7, 8) == 3)
5661 *undefined_code = UNDEF_SIZE_3;
5667 case MVE_VSTRH_SCATTER_T2:
5669 unsigned long size = arm_decode_field (given, 7, 8);
5672 *undefined_code = UNDEF_SIZE_3;
5677 *undefined_code = UNDEF_SIZE_0;
5684 case MVE_VSTRW_SCATTER_T3:
5685 if (arm_decode_field (given, 7, 8) != 2)
5687 *undefined_code = UNDEF_SIZE_NOT_2;
5693 case MVE_VSTRD_SCATTER_T4:
5694 if (arm_decode_field (given, 7, 8) != 3)
5696 *undefined_code = UNDEF_SIZE_NOT_3;
5702 case MVE_VCVT_FP_FIX_VEC:
5704 unsigned long imm6 = arm_decode_field (given, 16, 21);
5705 if ((imm6 & 0x20) == 0)
5707 *undefined_code = UNDEF_VCVT_IMM6;
5711 if ((arm_decode_field (given, 9, 9) == 0)
5712 && ((imm6 & 0x30) == 0x20))
5714 *undefined_code = UNDEF_VCVT_FSI_IMM6;
5723 case MVE_VCVT_BETWEEN_FP_INT:
5724 case MVE_VCVT_FROM_FP_TO_INT:
5726 unsigned long size = arm_decode_field (given, 18, 19);
5729 *undefined_code = UNDEF_SIZE_0;
5734 *undefined_code = UNDEF_SIZE_3;
5741 case MVE_VMOV_VEC_LANE_TO_GP:
5743 unsigned long op1 = arm_decode_field (given, 21, 22);
5744 unsigned long op2 = arm_decode_field (given, 5, 6);
5745 unsigned long u = arm_decode_field (given, 23, 23);
5747 if ((op2 == 0) && (u == 1))
5749 if ((op1 == 0) || (op1 == 1))
5751 *undefined_code = UNDEF_BAD_U_OP1_OP2;
5759 if ((op1 == 0) || (op1 == 1))
5761 *undefined_code = UNDEF_BAD_OP1_OP2;
5771 case MVE_VMOV_GP_TO_VEC_LANE:
5772 if (arm_decode_field (given, 5, 6) == 2)
5774 unsigned long op1 = arm_decode_field (given, 21, 22);
5775 if ((op1 == 0) || (op1 == 1))
5777 *undefined_code = UNDEF_BAD_OP1_OP2;
5786 case MVE_VMOV_IMM_TO_VEC:
5787 if (arm_decode_field (given, 5, 5) == 0)
5789 unsigned long cmode = arm_decode_field (given, 8, 11);
5791 if (((cmode & 9) == 1) || ((cmode & 5) == 1))
5793 *undefined_code = UNDEF_OP_0_BAD_CMODE;
5804 if (arm_decode_field (given, 18, 19) == 2)
5806 *undefined_code = UNDEF_SIZE_2;
5812 case MVE_VRMLALDAVH:
5813 case MVE_VMLADAV_T1:
5814 case MVE_VMLADAV_T2:
5816 if ((arm_decode_field (given, 28, 28) == 1)
5817 && (arm_decode_field (given, 12, 12) == 1))
5819 *undefined_code = UNDEF_XCHG_UNS;
5830 unsigned long sz = arm_decode_field (given, 19, 20);
5833 else if ((sz & 2) == 2)
5837 *undefined_code = UNDEF_SIZE;
5851 unsigned long sz = arm_decode_field (given, 19, 21);
5854 else if ((sz & 6) == 2)
5856 else if ((sz & 4) == 4)
5860 *undefined_code = UNDEF_SIZE;
5867 if (arm_decode_field (given, 19, 20) == 0)
5869 *undefined_code = UNDEF_SIZE_0;
5876 if (arm_decode_field (given, 18, 19) == 3)
5878 *undefined_code = UNDEF_SIZE_3;
5887 if (arm_decode_field (given, 18, 19) == 3)
5889 *undefined_code = UNDEF_SIZE_3;
5900 /* Return FALSE if GIVEN is not an unpredictable encoding for MATCHED_INSN.
5901 Otherwise, return TRUE and set UNPREDICTABLE_CODE to give a reason as to
5902 why this encoding is unpredictable. */
5905 is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
5906 enum mve_unpredictable *unpredictable_code)
5908 *unpredictable_code = UNPRED_NONE;
5910 switch (matched_insn)
5912 case MVE_VCMP_FP_T2:
5914 if ((arm_decode_field (given, 12, 12) == 0)
5915 && (arm_decode_field (given, 5, 5) == 1))
5917 *unpredictable_code = UNPRED_FCA_0_FCB_1;
5923 case MVE_VPT_VEC_T4:
5924 case MVE_VPT_VEC_T5:
5925 case MVE_VPT_VEC_T6:
5926 case MVE_VCMP_VEC_T4:
5927 case MVE_VCMP_VEC_T5:
5928 case MVE_VCMP_VEC_T6:
5929 if (arm_decode_field (given, 0, 3) == 0xd)
5931 *unpredictable_code = UNPRED_R13;
5939 unsigned long gpr = arm_decode_field (given, 12, 15);
5942 *unpredictable_code = UNPRED_R13;
5945 else if (gpr == 0xf)
5947 *unpredictable_code = UNPRED_R15;
5954 case MVE_VMUL_FP_T2:
5955 case MVE_VMUL_VEC_T2:
5958 case MVE_VADD_FP_T2:
5959 case MVE_VSUB_FP_T2:
5960 case MVE_VADD_VEC_T2:
5961 case MVE_VSUB_VEC_T2:
5971 case MVE_VQDMULH_T3:
5972 case MVE_VQRDMULH_T4:
5974 case MVE_VFMA_FP_SCALAR:
5975 case MVE_VFMAS_FP_SCALAR:
5979 unsigned long gpr = arm_decode_field (given, 0, 3);
5982 *unpredictable_code = UNPRED_R13;
5985 else if (gpr == 0xf)
5987 *unpredictable_code = UNPRED_R15;
5997 unsigned long rn = arm_decode_field (given, 16, 19);
5999 if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
6001 *unpredictable_code = UNPRED_R13_AND_WB;
6007 *unpredictable_code = UNPRED_R15;
6011 if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 6)
6013 *unpredictable_code = UNPRED_Q_GT_6;
6023 unsigned long rn = arm_decode_field (given, 16, 19);
6025 if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
6027 *unpredictable_code = UNPRED_R13_AND_WB;
6033 *unpredictable_code = UNPRED_R15;
6037 if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 4)
6039 *unpredictable_code = UNPRED_Q_GT_4;
6053 unsigned long rn = arm_decode_field (given, 16, 19);
6055 if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
6057 *unpredictable_code = UNPRED_R13_AND_WB;
6062 *unpredictable_code = UNPRED_R15;
6069 case MVE_VLDRB_GATHER_T1:
6070 if (arm_decode_field (given, 0, 0) == 1)
6072 *unpredictable_code = UNPRED_OS;
6077 /* To handle common code with T2-T4 variants. */
6078 case MVE_VLDRH_GATHER_T2:
6079 case MVE_VLDRW_GATHER_T3:
6080 case MVE_VLDRD_GATHER_T4:
6082 unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6083 unsigned long qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6087 *unpredictable_code = UNPRED_Q_REGS_EQUAL;
6091 if (arm_decode_field (given, 16, 19) == 0xf)
6093 *unpredictable_code = UNPRED_R15;
6100 case MVE_VLDRW_GATHER_T5:
6101 case MVE_VLDRD_GATHER_T6:
6103 unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6104 unsigned long qm = arm_decode_field_multiple (given, 17, 19, 7, 7);
6108 *unpredictable_code = UNPRED_Q_REGS_EQUAL;
6115 case MVE_VSTRB_SCATTER_T1:
6116 if (arm_decode_field (given, 16, 19) == 0xf)
6118 *unpredictable_code = UNPRED_R15;
6121 else if (arm_decode_field (given, 0, 0) == 1)
6123 *unpredictable_code = UNPRED_OS;
6129 case MVE_VSTRH_SCATTER_T2:
6130 case MVE_VSTRW_SCATTER_T3:
6131 case MVE_VSTRD_SCATTER_T4:
6132 if (arm_decode_field (given, 16, 19) == 0xf)
6134 *unpredictable_code = UNPRED_R15;
6140 case MVE_VMOV2_VEC_LANE_TO_GP:
6141 case MVE_VMOV2_GP_TO_VEC_LANE:
6142 case MVE_VCVT_BETWEEN_FP_INT:
6143 case MVE_VCVT_FROM_FP_TO_INT:
6145 unsigned long rt = arm_decode_field (given, 0, 3);
6146 unsigned long rt2 = arm_decode_field (given, 16, 19);
6148 if ((rt == 0xd) || (rt2 == 0xd))
6150 *unpredictable_code = UNPRED_R13;
6153 else if ((rt == 0xf) || (rt2 == 0xf))
6155 *unpredictable_code = UNPRED_R15;
6160 *unpredictable_code = UNPRED_GP_REGS_EQUAL;
6169 case MVE_VMAXNMV_FP:
6170 case MVE_VMAXNMAV_FP:
6171 case MVE_VMINNMV_FP:
6172 case MVE_VMINNMAV_FP:
6176 case MVE_VMOV_HFP_TO_GP:
6177 case MVE_VMOV_GP_TO_VEC_LANE:
6178 case MVE_VMOV_VEC_LANE_TO_GP:
6180 unsigned long rda = arm_decode_field (given, 12, 15);
6183 *unpredictable_code = UNPRED_R13;
6186 else if (rda == 0xf)
6188 *unpredictable_code = UNPRED_R15;
6205 if (arm_decode_field (given, 20, 21) == 2)
6207 Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6208 Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6209 Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6211 if ((Qd == Qn) || (Qd == Qm))
6213 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
6224 case MVE_VQDMULL_T1:
6230 if (arm_decode_field (given, 28, 28) == 1)
6232 Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6233 Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6234 Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6236 if ((Qd == Qn) || (Qd == Qm))
6238 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6248 case MVE_VQDMULL_T2:
6250 unsigned long gpr = arm_decode_field (given, 0, 3);
6253 *unpredictable_code = UNPRED_R13;
6256 else if (gpr == 0xf)
6258 *unpredictable_code = UNPRED_R15;
6262 if (arm_decode_field (given, 28, 28) == 1)
6265 = arm_decode_field_multiple (given, 13, 15, 22, 22);
6266 unsigned long Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6270 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6281 case MVE_VRMLSLDAVH:
6284 if (arm_decode_field (given, 20, 22) == 6)
6286 *unpredictable_code = UNPRED_R13;
6294 if (arm_decode_field (given, 1, 3) == 6)
6296 *unpredictable_code = UNPRED_R13;
6305 unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6306 unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6307 if ((Qd == Qm) && arm_decode_field (given, 20, 21) == 2)
6309 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
6318 unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6319 unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6320 if ((Qd == Qm) && arm_decode_field (given, 20, 20) == 1)
6322 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6335 if (arm_decode_field (given, 20, 20) == 1)
6337 Qda = arm_decode_field_multiple (given, 13, 15, 22, 22);
6338 Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6339 Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6341 if ((Qda == Qn) || (Qda == Qm))
6343 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6355 if (arm_decode_field (given, 16, 19) == 0xd)
6357 *unpredictable_code = UNPRED_R13;
6369 print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
6371 unsigned long op1 = arm_decode_field (given, 21, 22);
6372 unsigned long op2 = arm_decode_field (given, 5, 6);
6373 unsigned long h = arm_decode_field (given, 16, 16);
6374 unsigned long index, esize, targetBeat, idx;
6375 void *stream = info->stream;
6376 fprintf_ftype func = info->fprintf_func;
6378 if ((op1 & 0x2) == 0x2)
6383 else if (((op1 & 0x2) == 0x0) && ((op2 & 0x1) == 0x1))
6388 else if (((op1 & 0x2) == 0) && ((op2 & 0x3) == 0))
6395 func (stream, "<undefined index>");
6399 targetBeat = (op1 & 0x1) | (h << 1);
6400 idx = index + targetBeat * (32/esize);
6402 func (stream, "%lu", idx);
6405 /* Print neon and mve 8-bit immediate that can be a 8, 16, 32, or 64-bits
6406 in length and integer of floating-point type. */
6408 print_simd_imm8 (struct disassemble_info *info, unsigned long given,
6409 unsigned int ibit_loc, const struct mopcode32 *insn)
6412 int cmode = (given >> 8) & 0xf;
6413 int op = (given >> 5) & 0x1;
6414 unsigned long value = 0, hival = 0;
6418 void *stream = info->stream;
6419 fprintf_ftype func = info->fprintf_func;
6421 /* On Neon the 'i' bit is at bit 24, on mve it is
6423 bits |= ((given >> ibit_loc) & 1) << 7;
6424 bits |= ((given >> 16) & 7) << 4;
6425 bits |= ((given >> 0) & 15) << 0;
6429 shift = (cmode >> 1) & 3;
6430 value = (unsigned long) bits << (8 * shift);
6433 else if (cmode < 12)
6435 shift = (cmode >> 1) & 1;
6436 value = (unsigned long) bits << (8 * shift);
6439 else if (cmode < 14)
6441 shift = (cmode & 1) + 1;
6442 value = (unsigned long) bits << (8 * shift);
6443 value |= (1ul << (8 * shift)) - 1;
6446 else if (cmode == 14)
6450 /* Bit replication into bytes. */
6456 for (ix = 7; ix >= 0; ix--)
6458 mask = ((bits >> ix) & 1) ? 0xff : 0;
6460 value = (value << 8) | mask;
6462 hival = (hival << 8) | mask;
6468 /* Byte replication. */
6469 value = (unsigned long) bits;
6475 /* Floating point encoding. */
6478 value = (unsigned long) (bits & 0x7f) << 19;
6479 value |= (unsigned long) (bits & 0x80) << 24;
6480 tmp = bits & 0x40 ? 0x3c : 0x40;
6481 value |= (unsigned long) tmp << 24;
6487 func (stream, "<illegal constant %.8x:%x:%x>",
6493 // printU determines whether the immediate value should be printed as
6495 unsigned printU = 0;
6496 switch (insn->mve_op)
6500 // We want this for instructions that don't have a 'signed' type
6504 case MVE_VMOV_IMM_TO_VEC:
6511 func (stream, "#%ld\t; 0x%.2lx", value, value);
6518 : "#%ld\t; 0x%.4lx", value, value);
6524 unsigned char valbytes[4];
6527 /* Do this a byte at a time so we don't have to
6528 worry about the host's endianness. */
6529 valbytes[0] = value & 0xff;
6530 valbytes[1] = (value >> 8) & 0xff;
6531 valbytes[2] = (value >> 16) & 0xff;
6532 valbytes[3] = (value >> 24) & 0xff;
6534 floatformat_to_double
6535 (& floatformat_ieee_single_little, valbytes,
6538 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
6545 : "#%ld\t; 0x%.8lx",
6546 (long) (((value & 0x80000000L) != 0)
6548 ? value | ~0xffffffffL : value),
6553 func (stream, "#0x%.8lx%.8lx", hival, value);
6563 print_mve_undefined (struct disassemble_info *info,
6564 enum mve_undefined undefined_code)
6566 void *stream = info->stream;
6567 fprintf_ftype func = info->fprintf_func;
6569 func (stream, "\t\tundefined instruction: ");
6571 switch (undefined_code)
6574 func (stream, "illegal size");
6578 func (stream, "size equals zero");
6582 func (stream, "size equals two");
6586 func (stream, "size equals three");
6589 case UNDEF_SIZE_LE_1:
6590 func (stream, "size <= 1");
6593 case UNDEF_SIZE_NOT_2:
6594 func (stream, "size not equal to 2");
6597 case UNDEF_SIZE_NOT_3:
6598 func (stream, "size not equal to 3");
6601 case UNDEF_NOT_UNS_SIZE_0:
6602 func (stream, "not unsigned and size = zero");
6605 case UNDEF_NOT_UNS_SIZE_1:
6606 func (stream, "not unsigned and size = one");
6609 case UNDEF_NOT_UNSIGNED:
6610 func (stream, "not unsigned");
6613 case UNDEF_VCVT_IMM6:
6614 func (stream, "invalid imm6");
6617 case UNDEF_VCVT_FSI_IMM6:
6618 func (stream, "fsi = 0 and invalid imm6");
6621 case UNDEF_BAD_OP1_OP2:
6622 func (stream, "bad size with op2 = 2 and op1 = 0 or 1");
6625 case UNDEF_BAD_U_OP1_OP2:
6626 func (stream, "unsigned with op2 = 0 and op1 = 0 or 1");
6629 case UNDEF_OP_0_BAD_CMODE:
6630 func (stream, "op field equal 0 and bad cmode");
6633 case UNDEF_XCHG_UNS:
6634 func (stream, "exchange and unsigned together");
6644 print_mve_unpredictable (struct disassemble_info *info,
6645 enum mve_unpredictable unpredict_code)
6647 void *stream = info->stream;
6648 fprintf_ftype func = info->fprintf_func;
6650 func (stream, "%s: ", UNPREDICTABLE_INSTRUCTION);
6652 switch (unpredict_code)
6654 case UNPRED_IT_BLOCK:
6655 func (stream, "mve instruction in it block");
6658 case UNPRED_FCA_0_FCB_1:
6659 func (stream, "condition bits, fca = 0 and fcb = 1");
6663 func (stream, "use of r13 (sp)");
6667 func (stream, "use of r15 (pc)");
6671 func (stream, "start register block > r4");
6675 func (stream, "start register block > r6");
6678 case UNPRED_R13_AND_WB:
6679 func (stream, "use of r13 and write back");
6682 case UNPRED_Q_REGS_EQUAL:
6684 "same vector register used for destination and other operand");
6688 func (stream, "use of offset scaled");
6691 case UNPRED_GP_REGS_EQUAL:
6692 func (stream, "same general-purpose register used for both operands");
6695 case UNPRED_Q_REGS_EQ_AND_SIZE_1:
6696 func (stream, "use of identical q registers and size = 1");
6699 case UNPRED_Q_REGS_EQ_AND_SIZE_2:
6700 func (stream, "use of identical q registers and size = 1");
6708 /* Print register block operand for mve vld2/vld4/vst2/vld4. */
6711 print_mve_register_blocks (struct disassemble_info *info,
6712 unsigned long given,
6713 enum mve_instructions matched_insn)
6715 void *stream = info->stream;
6716 fprintf_ftype func = info->fprintf_func;
6718 unsigned long q_reg_start = arm_decode_field_multiple (given,
6721 switch (matched_insn)
6725 if (q_reg_start <= 6)
6726 func (stream, "{q%ld, q%ld}", q_reg_start, q_reg_start + 1);
6728 func (stream, "<illegal reg q%ld>", q_reg_start);
6733 if (q_reg_start <= 4)
6734 func (stream, "{q%ld, q%ld, q%ld, q%ld}", q_reg_start,
6735 q_reg_start + 1, q_reg_start + 2,
6738 func (stream, "<illegal reg q%ld>", q_reg_start);
6747 print_mve_rounding_mode (struct disassemble_info *info,
6748 unsigned long given,
6749 enum mve_instructions matched_insn)
6751 void *stream = info->stream;
6752 fprintf_ftype func = info->fprintf_func;
6754 switch (matched_insn)
6756 case MVE_VCVT_FROM_FP_TO_INT:
6758 switch (arm_decode_field (given, 8, 9))
6784 switch (arm_decode_field (given, 7, 9))
6823 print_mve_vcvt_size (struct disassemble_info *info,
6824 unsigned long given,
6825 enum mve_instructions matched_insn)
6827 unsigned long mode = 0;
6828 void *stream = info->stream;
6829 fprintf_ftype func = info->fprintf_func;
6831 switch (matched_insn)
6833 case MVE_VCVT_FP_FIX_VEC:
6835 mode = (((given & 0x200) >> 7)
6836 | ((given & 0x10000000) >> 27)
6837 | ((given & 0x100) >> 8));
6842 func (stream, "f16.s16");
6846 func (stream, "s16.f16");
6850 func (stream, "f16.u16");
6854 func (stream, "u16.f16");
6858 func (stream, "f32.s32");
6862 func (stream, "s32.f32");
6866 func (stream, "f32.u32");
6870 func (stream, "u32.f32");
6878 case MVE_VCVT_BETWEEN_FP_INT:
6880 unsigned long size = arm_decode_field (given, 18, 19);
6881 unsigned long op = arm_decode_field (given, 7, 8);
6888 func (stream, "f16.s16");
6892 func (stream, "f16.u16");
6896 func (stream, "s16.f16");
6900 func (stream, "u16.f16");
6912 func (stream, "f32.s32");
6916 func (stream, "f32.u32");
6920 func (stream, "s32.f32");
6924 func (stream, "u32.f32");
6931 case MVE_VCVT_FP_HALF_FP:
6933 unsigned long op = arm_decode_field (given, 28, 28);
6935 func (stream, "f16.f32");
6937 func (stream, "f32.f16");
6941 case MVE_VCVT_FROM_FP_TO_INT:
6943 unsigned long size = arm_decode_field_multiple (given, 7, 7, 18, 19);
6948 func (stream, "s16.f16");
6952 func (stream, "u16.f16");
6956 func (stream, "s32.f32");
6960 func (stream, "u32.f32");
6975 print_mve_rotate (struct disassemble_info *info, unsigned long rot,
6976 unsigned long rot_width)
6978 void *stream = info->stream;
6979 fprintf_ftype func = info->fprintf_func;
6986 func (stream, "90");
6989 func (stream, "270");
6995 else if (rot_width == 2)
7003 func (stream, "90");
7006 func (stream, "180");
7009 func (stream, "270");
7018 print_instruction_predicate (struct disassemble_info *info)
7020 void *stream = info->stream;
7021 fprintf_ftype func = info->fprintf_func;
7023 if (vpt_block_state.next_pred_state == PRED_THEN)
7025 else if (vpt_block_state.next_pred_state == PRED_ELSE)
7030 print_mve_size (struct disassemble_info *info,
7032 enum mve_instructions matched_insn)
7034 void *stream = info->stream;
7035 fprintf_ftype func = info->fprintf_func;
7037 switch (matched_insn)
7043 case MVE_VADD_VEC_T1:
7044 case MVE_VADD_VEC_T2:
7050 case MVE_VCMP_VEC_T1:
7051 case MVE_VCMP_VEC_T2:
7052 case MVE_VCMP_VEC_T3:
7053 case MVE_VCMP_VEC_T4:
7054 case MVE_VCMP_VEC_T5:
7055 case MVE_VCMP_VEC_T6:
7068 case MVE_VLDRB_GATHER_T1:
7069 case MVE_VLDRH_GATHER_T2:
7070 case MVE_VLDRW_GATHER_T3:
7071 case MVE_VLDRD_GATHER_T4:
7084 case MVE_VMUL_VEC_T1:
7085 case MVE_VMUL_VEC_T2:
7091 case MVE_VPT_VEC_T1:
7092 case MVE_VPT_VEC_T2:
7093 case MVE_VPT_VEC_T3:
7094 case MVE_VPT_VEC_T4:
7095 case MVE_VPT_VEC_T5:
7096 case MVE_VPT_VEC_T6:
7105 case MVE_VQDMULH_T1:
7106 case MVE_VQRDMULH_T2:
7107 case MVE_VQDMULH_T3:
7108 case MVE_VQRDMULH_T4:
7122 case MVE_VSTRB_SCATTER_T1:
7123 case MVE_VSTRH_SCATTER_T2:
7124 case MVE_VSTRW_SCATTER_T3:
7127 case MVE_VSUB_VEC_T1:
7128 case MVE_VSUB_VEC_T2:
7130 func (stream, "%s", mve_vec_sizename[size]);
7132 func (stream, "<undef size>");
7136 case MVE_VADD_FP_T1:
7137 case MVE_VADD_FP_T2:
7138 case MVE_VSUB_FP_T1:
7139 case MVE_VSUB_FP_T2:
7140 case MVE_VCMP_FP_T1:
7141 case MVE_VCMP_FP_T2:
7142 case MVE_VFMA_FP_SCALAR:
7145 case MVE_VFMAS_FP_SCALAR:
7147 case MVE_VMAXNMA_FP:
7148 case MVE_VMAXNMV_FP:
7149 case MVE_VMAXNMAV_FP:
7151 case MVE_VMINNMA_FP:
7152 case MVE_VMINNMV_FP:
7153 case MVE_VMINNMAV_FP:
7154 case MVE_VMUL_FP_T1:
7155 case MVE_VMUL_FP_T2:
7159 func (stream, "32");
7161 func (stream, "16");
7167 case MVE_VMLADAV_T1:
7169 case MVE_VMLSDAV_T1:
7172 case MVE_VQDMULL_T1:
7173 case MVE_VQDMULL_T2:
7177 func (stream, "16");
7179 func (stream, "32");
7186 func (stream, "16");
7193 func (stream, "32");
7196 func (stream, "16");
7206 case MVE_VMOV_GP_TO_VEC_LANE:
7207 case MVE_VMOV_VEC_LANE_TO_GP:
7211 func (stream, "32");
7216 func (stream, "16");
7219 case 8: case 9: case 10: case 11:
7220 case 12: case 13: case 14: case 15:
7229 case MVE_VMOV_IMM_TO_VEC:
7232 case 0: case 4: case 8:
7233 case 12: case 24: case 26:
7234 func (stream, "i32");
7237 func (stream, "i16");
7240 func (stream, "i8");
7243 func (stream, "i64");
7246 func (stream, "f32");
7253 case MVE_VMULL_POLY:
7255 func (stream, "p8");
7257 func (stream, "p16");
7263 case 0: case 2: case 4:
7264 case 6: case 12: case 13:
7265 func (stream, "32");
7269 func (stream, "16");
7283 func (stream, "32");
7287 func (stream, "16");
7305 func (stream, "16");
7309 func (stream, "32");
7334 func (stream, "16");
7337 case 4: case 5: case 6: case 7:
7338 func (stream, "32");
7353 print_mve_shift_n (struct disassemble_info *info, long given,
7354 enum mve_instructions matched_insn)
7356 void *stream = info->stream;
7357 fprintf_ftype func = info->fprintf_func;
7360 = matched_insn == MVE_VQSHL_T2
7361 || matched_insn == MVE_VQSHLU_T3
7362 || matched_insn == MVE_VSHL_T1
7363 || matched_insn == MVE_VSHLL_T1
7364 || matched_insn == MVE_VSLI;
7366 unsigned imm6 = (given & 0x3f0000) >> 16;
7368 if (matched_insn == MVE_VSHLL_T1)
7371 unsigned shiftAmount = 0;
7372 if ((imm6 & 0x20) != 0)
7373 shiftAmount = startAt0 ? imm6 - 32 : 64 - imm6;
7374 else if ((imm6 & 0x10) != 0)
7375 shiftAmount = startAt0 ? imm6 - 16 : 32 - imm6;
7376 else if ((imm6 & 0x08) != 0)
7377 shiftAmount = startAt0 ? imm6 - 8 : 16 - imm6;
7379 print_mve_undefined (info, UNDEF_SIZE_0);
7381 func (stream, "%u", shiftAmount);
7385 print_vec_condition (struct disassemble_info *info, long given,
7386 enum mve_instructions matched_insn)
7388 void *stream = info->stream;
7389 fprintf_ftype func = info->fprintf_func;
7392 switch (matched_insn)
7395 case MVE_VCMP_FP_T1:
7396 vec_cond = (((given & 0x1000) >> 10)
7397 | ((given & 1) << 1)
7398 | ((given & 0x0080) >> 7));
7399 func (stream, "%s",vec_condnames[vec_cond]);
7403 case MVE_VCMP_FP_T2:
7404 vec_cond = (((given & 0x1000) >> 10)
7405 | ((given & 0x0020) >> 4)
7406 | ((given & 0x0080) >> 7));
7407 func (stream, "%s",vec_condnames[vec_cond]);
7410 case MVE_VPT_VEC_T1:
7411 case MVE_VCMP_VEC_T1:
7412 vec_cond = (given & 0x0080) >> 7;
7413 func (stream, "%s",vec_condnames[vec_cond]);
7416 case MVE_VPT_VEC_T2:
7417 case MVE_VCMP_VEC_T2:
7418 vec_cond = 2 | ((given & 0x0080) >> 7);
7419 func (stream, "%s",vec_condnames[vec_cond]);
7422 case MVE_VPT_VEC_T3:
7423 case MVE_VCMP_VEC_T3:
7424 vec_cond = 4 | ((given & 1) << 1) | ((given & 0x0080) >> 7);
7425 func (stream, "%s",vec_condnames[vec_cond]);
7428 case MVE_VPT_VEC_T4:
7429 case MVE_VCMP_VEC_T4:
7430 vec_cond = (given & 0x0080) >> 7;
7431 func (stream, "%s",vec_condnames[vec_cond]);
7434 case MVE_VPT_VEC_T5:
7435 case MVE_VCMP_VEC_T5:
7436 vec_cond = 2 | ((given & 0x0080) >> 7);
7437 func (stream, "%s",vec_condnames[vec_cond]);
7440 case MVE_VPT_VEC_T6:
7441 case MVE_VCMP_VEC_T6:
7442 vec_cond = 4 | ((given & 0x0020) >> 4) | ((given & 0x0080) >> 7);
7443 func (stream, "%s",vec_condnames[vec_cond]);
7458 #define WRITEBACK_BIT_SET (given & (1 << W_BIT))
7459 #define IMMEDIATE_BIT_SET (given & (1 << I_BIT))
7460 #define NEGATIVE_BIT_SET ((given & (1 << U_BIT)) == 0)
7461 #define PRE_BIT_SET (given & (1 << P_BIT))
7464 /* Print one coprocessor instruction on INFO->STREAM.
7465 Return TRUE if the instuction matched, FALSE if this is not a
7466 recognised coprocessor instruction. */
7469 print_insn_coprocessor (bfd_vma pc,
7470 struct disassemble_info *info,
7474 const struct sopcode32 *insn;
7475 void *stream = info->stream;
7476 fprintf_ftype func = info->fprintf_func;
7478 unsigned long value = 0;
7481 struct arm_private_data *private_data = info->private_data;
7482 arm_feature_set allowed_arches = ARM_ARCH_NONE;
7483 arm_feature_set arm_ext_v8_1m_main =
7484 ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
7486 allowed_arches = private_data->features;
7488 for (insn = coprocessor_opcodes; insn->assembler; insn++)
7490 unsigned long u_reg = 16;
7491 bfd_boolean is_unpredictable = FALSE;
7492 signed long value_in_comment = 0;
7495 if (ARM_FEATURE_ZERO (insn->arch))
7496 switch (insn->value)
7498 case SENTINEL_IWMMXT_START:
7499 if (info->mach != bfd_mach_arm_XScale
7500 && info->mach != bfd_mach_arm_iWMMXt
7501 && info->mach != bfd_mach_arm_iWMMXt2)
7504 while ((! ARM_FEATURE_ZERO (insn->arch))
7505 && insn->value != SENTINEL_IWMMXT_END);
7508 case SENTINEL_IWMMXT_END:
7511 case SENTINEL_GENERIC_START:
7512 allowed_arches = private_data->features;
7520 value = insn->value;
7521 cp_num = (given >> 8) & 0xf;
7525 /* The high 4 bits are 0xe for Arm conditional instructions, and
7526 0xe for arm unconditional instructions. The rest of the
7527 encoding is the same. */
7529 value |= 0xe0000000;
7537 /* Only match unconditional instuctions against unconditional
7539 if ((given & 0xf0000000) == 0xf0000000)
7546 cond = (given >> 28) & 0xf;
7552 if ((insn->isa == T32 && !thumb)
7553 || (insn->isa == ARM && thumb))
7556 if ((given & mask) != value)
7559 if (! ARM_CPU_HAS_FEATURE (insn->arch, allowed_arches))
7562 if (insn->value == 0xfe000010 /* mcr2 */
7563 || insn->value == 0xfe100010 /* mrc2 */
7564 || insn->value == 0xfc100000 /* ldc2 */
7565 || insn->value == 0xfc000000) /* stc2 */
7567 if (cp_num == 9 || cp_num == 10 || cp_num == 11)
7568 is_unpredictable = TRUE;
7570 /* Armv8.1-M Mainline FP & MVE instructions. */
7571 if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
7572 && !ARM_CPU_IS_ANY (allowed_arches)
7573 && (cp_num == 8 || cp_num == 14 || cp_num == 15))
7577 else if (insn->value == 0x0e000000 /* cdp */
7578 || insn->value == 0xfe000000 /* cdp2 */
7579 || insn->value == 0x0e000010 /* mcr */
7580 || insn->value == 0x0e100010 /* mrc */
7581 || insn->value == 0x0c100000 /* ldc */
7582 || insn->value == 0x0c000000) /* stc */
7584 /* Floating-point instructions. */
7585 if (cp_num == 9 || cp_num == 10 || cp_num == 11)
7588 /* Armv8.1-M Mainline FP & MVE instructions. */
7589 if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
7590 && !ARM_CPU_IS_ANY (allowed_arches)
7591 && (cp_num == 8 || cp_num == 14 || cp_num == 15))
7594 else if ((insn->value == 0xec100f80 /* vldr (system register) */
7595 || insn->value == 0xec000f80) /* vstr (system register) */
7596 && arm_decode_field (given, 24, 24) == 0
7597 && arm_decode_field (given, 21, 21) == 0)
7598 /* If the P and W bits are both 0 then these encodings match the MVE
7599 VLDR and VSTR instructions, these are in a different table, so we
7600 don't let it match here. */
7603 for (c = insn->assembler; *c; c++)
7607 const char mod = *++c;
7611 func (stream, "%%");
7617 int rn = (given >> 16) & 0xf;
7618 bfd_vma offset = given & 0xff;
7621 offset = given & 0x7f;
7623 func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
7625 if (PRE_BIT_SET || WRITEBACK_BIT_SET)
7627 /* Not unindexed. The offset is scaled. */
7629 /* vldr.16/vstr.16 will shift the address
7630 left by 1 bit only. */
7631 offset = offset * 2;
7633 offset = offset * 4;
7635 if (NEGATIVE_BIT_SET)
7638 value_in_comment = offset;
7644 func (stream, ", #%d]%s",
7646 WRITEBACK_BIT_SET ? "!" : "");
7647 else if (NEGATIVE_BIT_SET)
7648 func (stream, ", #-0]");
7656 if (WRITEBACK_BIT_SET)
7659 func (stream, ", #%d", (int) offset);
7660 else if (NEGATIVE_BIT_SET)
7661 func (stream, ", #-0");
7665 func (stream, ", {%s%d}",
7666 (NEGATIVE_BIT_SET && !offset) ? "-" : "",
7668 value_in_comment = offset;
7671 if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
7673 func (stream, "\t; ");
7674 /* For unaligned PCs, apply off-by-alignment
7676 info->print_address_func (offset + pc
7677 + info->bytes_per_chunk * 2
7686 int regno = ((given >> 12) & 0xf) | ((given >> (22 - 4)) & 0x10);
7687 int offset = (given >> 1) & 0x3f;
7690 func (stream, "{d%d}", regno);
7691 else if (regno + offset > 32)
7692 func (stream, "{d%d-<overflow reg d%d>}", regno, regno + offset - 1);
7694 func (stream, "{d%d-d%d}", regno, regno + offset - 1);
7700 bfd_boolean single = ((given >> 8) & 1) == 0;
7701 char reg_prefix = single ? 's' : 'd';
7702 int Dreg = (given >> 22) & 0x1;
7703 int Vdreg = (given >> 12) & 0xf;
7704 int reg = single ? ((Vdreg << 1) | Dreg)
7705 : ((Dreg << 4) | Vdreg);
7706 int num = (given >> (single ? 0 : 1)) & 0x7f;
7707 int maxreg = single ? 31 : 15;
7708 int topreg = reg + num - 1;
7711 func (stream, "{VPR}");
7713 func (stream, "{%c%d, VPR}", reg_prefix, reg);
7714 else if (topreg > maxreg)
7715 func (stream, "{%c%d-<overflow reg d%d, VPR}",
7716 reg_prefix, reg, single ? topreg >> 1 : topreg);
7718 func (stream, "{%c%d-%c%d, VPR}", reg_prefix, reg,
7719 reg_prefix, topreg);
7724 if (cond != COND_UNCOND)
7725 is_unpredictable = TRUE;
7729 if (cond != COND_UNCOND && cp_num == 9)
7730 is_unpredictable = TRUE;
7732 func (stream, "%s", arm_conditional[cond]);
7736 /* Print a Cirrus/DSP shift immediate. */
7737 /* Immediates are 7bit signed ints with bits 0..3 in
7738 bits 0..3 of opcode and bits 4..6 in bits 5..7
7743 imm = (given & 0xf) | ((given & 0xe0) >> 1);
7745 /* Is ``imm'' a negative number? */
7749 func (stream, "%d", imm);
7757 = arm_decode_field_multiple (given, 13, 15, 22, 22);
7762 func (stream, "FPSCR");
7765 func (stream, "FPSCR_nzcvqc");
7768 func (stream, "VPR");
7771 func (stream, "P0");
7774 func (stream, "FPCXTNS");
7777 func (stream, "FPCXTS");
7780 func (stream, "<invalid reg %lu>", regno);
7787 switch (given & 0x00408000)
7804 switch (given & 0x00080080)
7816 func (stream, _("<illegal precision>"));
7822 switch (given & 0x00408000)
7840 switch (given & 0x60)
7856 case '0': case '1': case '2': case '3': case '4':
7857 case '5': case '6': case '7': case '8': case '9':
7861 c = arm_decode_bitfield (c, given, &value, &width);
7867 is_unpredictable = TRUE;
7872 /* Eat the 'u' character. */
7876 is_unpredictable = TRUE;
7879 func (stream, "%s", arm_regnames[value]);
7882 if (given & (1 << 6))
7886 func (stream, "d%ld", value);
7891 func (stream, "<illegal reg q%ld.5>", value >> 1);
7893 func (stream, "q%ld", value >> 1);
7896 func (stream, "%ld", value);
7897 value_in_comment = value;
7901 /* Converts immediate 8 bit back to float value. */
7902 unsigned floatVal = (value & 0x80) << 24
7903 | (value & 0x3F) << 19
7904 | ((value & 0x40) ? (0xF8 << 22) : (1 << 30));
7906 /* Quarter float have a maximum value of 31.0.
7907 Get floating point value multiplied by 1e7.
7908 The maximum value stays in limit of a 32-bit int. */
7910 (78125 << (((floatVal >> 23) & 0xFF) - 124)) *
7911 (16 + (value & 0xF));
7913 if (!(decVal % 1000000))
7914 func (stream, "%ld\t; 0x%08x %c%u.%01u", value,
7915 floatVal, value & 0x80 ? '-' : ' ',
7917 decVal % 10000000 / 1000000);
7918 else if (!(decVal % 10000))
7919 func (stream, "%ld\t; 0x%08x %c%u.%03u", value,
7920 floatVal, value & 0x80 ? '-' : ' ',
7922 decVal % 10000000 / 10000);
7924 func (stream, "%ld\t; 0x%08x %c%u.%07u", value,
7925 floatVal, value & 0x80 ? '-' : ' ',
7926 decVal / 10000000, decVal % 10000000);
7931 int from = (given & (1 << 7)) ? 32 : 16;
7932 func (stream, "%ld", from - value);
7938 func (stream, "#%s", arm_fp_const[value & 7]);
7940 func (stream, "f%ld", value);
7945 func (stream, "%s", iwmmxt_wwnames[value]);
7947 func (stream, "%s", iwmmxt_wwssnames[value]);
7951 func (stream, "%s", iwmmxt_regnames[value]);
7954 func (stream, "%s", iwmmxt_cregnames[value]);
7958 func (stream, "0x%lx", (value & 0xffffffffUL));
7965 func (stream, "eq");
7969 func (stream, "vs");
7973 func (stream, "ge");
7977 func (stream, "gt");
7981 func (stream, "??");
7989 func (stream, "%c", *c);
7993 if (value == ((1ul << width) - 1))
7994 func (stream, "%c", *c);
7997 func (stream, "%c", c[(1 << width) - (int) value]);
8009 int single = *c++ == 'y';
8014 case '4': /* Sm pair */
8015 case '0': /* Sm, Dm */
8016 regno = given & 0x0000000f;
8020 regno += (given >> 5) & 1;
8023 regno += ((given >> 5) & 1) << 4;
8026 case '1': /* Sd, Dd */
8027 regno = (given >> 12) & 0x0000000f;
8031 regno += (given >> 22) & 1;
8034 regno += ((given >> 22) & 1) << 4;
8037 case '2': /* Sn, Dn */
8038 regno = (given >> 16) & 0x0000000f;
8042 regno += (given >> 7) & 1;
8045 regno += ((given >> 7) & 1) << 4;
8048 case '3': /* List */
8050 regno = (given >> 12) & 0x0000000f;
8054 regno += (given >> 22) & 1;
8057 regno += ((given >> 22) & 1) << 4;
8064 func (stream, "%c%d", single ? 's' : 'd', regno);
8068 int count = given & 0xff;
8075 func (stream, "-%c%d",
8083 func (stream, ", %c%d", single ? 's' : 'd',
8089 switch (given & 0x00400100)
8091 case 0x00000000: func (stream, "b"); break;
8092 case 0x00400000: func (stream, "h"); break;
8093 case 0x00000100: func (stream, "w"); break;
8094 case 0x00400100: func (stream, "d"); break;
8102 /* given (20, 23) | given (0, 3) */
8103 value = ((given >> 16) & 0xf0) | (given & 0xf);
8104 func (stream, "%d", (int) value);
8109 /* This is like the 'A' operator, except that if
8110 the width field "M" is zero, then the offset is
8111 *not* multiplied by four. */
8113 int offset = given & 0xff;
8114 int multiplier = (given & 0x00000100) ? 4 : 1;
8116 func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
8120 value_in_comment = offset * multiplier;
8121 if (NEGATIVE_BIT_SET)
8122 value_in_comment = - value_in_comment;
8128 func (stream, ", #%s%d]%s",
8129 NEGATIVE_BIT_SET ? "-" : "",
8130 offset * multiplier,
8131 WRITEBACK_BIT_SET ? "!" : "");
8133 func (stream, "], #%s%d",
8134 NEGATIVE_BIT_SET ? "-" : "",
8135 offset * multiplier);
8144 int imm4 = (given >> 4) & 0xf;
8145 int puw_bits = ((given >> 22) & 6) | ((given >> W_BIT) & 1);
8146 int ubit = ! NEGATIVE_BIT_SET;
8147 const char *rm = arm_regnames [given & 0xf];
8148 const char *rn = arm_regnames [(given >> 16) & 0xf];
8154 func (stream, "[%s], %c%s", rn, ubit ? '+' : '-', rm);
8156 func (stream, ", lsl #%d", imm4);
8163 func (stream, "[%s, %c%s", rn, ubit ? '+' : '-', rm);
8165 func (stream, ", lsl #%d", imm4);
8167 if (puw_bits == 5 || puw_bits == 7)
8172 func (stream, "INVALID");
8180 imm5 = ((given & 0x100) >> 4) | (given & 0xf);
8181 func (stream, "%ld", (imm5 == 0) ? 32 : imm5);
8190 func (stream, "%c", *c);
8193 if (value_in_comment > 32 || value_in_comment < -16)
8194 func (stream, "\t; 0x%lx", (value_in_comment & 0xffffffffUL));
8196 if (is_unpredictable)
8197 func (stream, UNPREDICTABLE_INSTRUCTION);
8204 /* Decodes and prints ARM addressing modes. Returns the offset
8205 used in the address, if any, if it is worthwhile printing the
8206 offset as a hexadecimal value in a comment at the end of the
8207 line of disassembly. */
8210 print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
8212 void *stream = info->stream;
8213 fprintf_ftype func = info->fprintf_func;
8216 if (((given & 0x000f0000) == 0x000f0000)
8217 && ((given & 0x02000000) == 0))
8219 offset = given & 0xfff;
8221 func (stream, "[pc");
8225 /* Pre-indexed. Elide offset of positive zero when
8227 if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
8228 func (stream, ", #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8230 if (NEGATIVE_BIT_SET)
8235 /* Cope with the possibility of write-back
8236 being used. Probably a very dangerous thing
8237 for the programmer to do, but who are we to
8239 func (stream, "]%s", WRITEBACK_BIT_SET ? "!" : "");
8241 else /* Post indexed. */
8243 func (stream, "], #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8245 /* Ie ignore the offset. */
8249 func (stream, "\t; ");
8250 info->print_address_func (offset, info);
8255 func (stream, "[%s",
8256 arm_regnames[(given >> 16) & 0xf]);
8260 if ((given & 0x02000000) == 0)
8262 /* Elide offset of positive zero when non-writeback. */
8263 offset = given & 0xfff;
8264 if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
8265 func (stream, ", #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8269 func (stream, ", %s", NEGATIVE_BIT_SET ? "-" : "");
8270 arm_decode_shift (given, func, stream, TRUE);
8273 func (stream, "]%s",
8274 WRITEBACK_BIT_SET ? "!" : "");
8278 if ((given & 0x02000000) == 0)
8280 /* Always show offset. */
8281 offset = given & 0xfff;
8282 func (stream, "], #%s%d",
8283 NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8287 func (stream, "], %s",
8288 NEGATIVE_BIT_SET ? "-" : "");
8289 arm_decode_shift (given, func, stream, TRUE);
8292 if (NEGATIVE_BIT_SET)
8296 return (signed long) offset;
8299 /* Print one neon instruction on INFO->STREAM.
8300 Return TRUE if the instuction matched, FALSE if this is not a
8301 recognised neon instruction. */
8304 print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
8306 const struct opcode32 *insn;
8307 void *stream = info->stream;
8308 fprintf_ftype func = info->fprintf_func;
8312 if ((given & 0xef000000) == 0xef000000)
8314 /* Move bit 28 to bit 24 to translate Thumb2 to ARM encoding. */
8315 unsigned long bit28 = given & (1 << 28);
8317 given &= 0x00ffffff;
8319 given |= 0xf3000000;
8321 given |= 0xf2000000;
8323 else if ((given & 0xff000000) == 0xf9000000)
8324 given ^= 0xf9000000 ^ 0xf4000000;
8325 /* vdup is also a valid neon instruction. */
8326 else if ((given & 0xff910f5f) != 0xee800b10)
8330 for (insn = neon_opcodes; insn->assembler; insn++)
8332 if ((given & insn->mask) == insn->value)
8334 signed long value_in_comment = 0;
8335 bfd_boolean is_unpredictable = FALSE;
8338 for (c = insn->assembler; *c; c++)
8345 func (stream, "%%");
8349 if (thumb && ifthen_state)
8350 is_unpredictable = TRUE;
8354 if (thumb && ifthen_state)
8355 func (stream, "%s", arm_conditional[IFTHEN_COND]);
8360 static const unsigned char enc[16] =
8362 0x4, 0x14, /* st4 0,1 */
8374 int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
8375 int rn = ((given >> 16) & 0xf);
8376 int rm = ((given >> 0) & 0xf);
8377 int align = ((given >> 4) & 0x3);
8378 int type = ((given >> 8) & 0xf);
8379 int n = enc[type] & 0xf;
8380 int stride = (enc[type] >> 4) + 1;
8385 for (ix = 0; ix != n; ix++)
8386 func (stream, "%sd%d", ix ? "," : "", rd + ix * stride);
8388 func (stream, "d%d", rd);
8390 func (stream, "d%d-d%d", rd, rd + n - 1);
8391 func (stream, "}, [%s", arm_regnames[rn]);
8393 func (stream, " :%d", 32 << align);
8398 func (stream, ", %s", arm_regnames[rm]);
8404 int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
8405 int rn = ((given >> 16) & 0xf);
8406 int rm = ((given >> 0) & 0xf);
8407 int idx_align = ((given >> 4) & 0xf);
8409 int size = ((given >> 10) & 0x3);
8410 int idx = idx_align >> (size + 1);
8411 int length = ((given >> 8) & 3) + 1;
8415 if (length > 1 && size > 0)
8416 stride = (idx_align & (1 << size)) ? 2 : 1;
8422 int amask = (1 << size) - 1;
8423 if ((idx_align & (1 << size)) != 0)
8427 if ((idx_align & amask) == amask)
8429 else if ((idx_align & amask) != 0)
8436 if (size == 2 && (idx_align & 2) != 0)
8438 align = (idx_align & 1) ? 16 << size : 0;
8442 if ((size == 2 && (idx_align & 3) != 0)
8443 || (idx_align & 1) != 0)
8450 if ((idx_align & 3) == 3)
8452 align = (idx_align & 3) * 64;
8455 align = (idx_align & 1) ? 32 << size : 0;
8463 for (i = 0; i < length; i++)
8464 func (stream, "%sd%d[%d]", (i == 0) ? "" : ",",
8465 rd + i * stride, idx);
8466 func (stream, "}, [%s", arm_regnames[rn]);
8468 func (stream, " :%d", align);
8473 func (stream, ", %s", arm_regnames[rm]);
8479 int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
8480 int rn = ((given >> 16) & 0xf);
8481 int rm = ((given >> 0) & 0xf);
8482 int align = ((given >> 4) & 0x1);
8483 int size = ((given >> 6) & 0x3);
8484 int type = ((given >> 8) & 0x3);
8486 int stride = ((given >> 5) & 0x1);
8489 if (stride && (n == 1))
8496 for (ix = 0; ix != n; ix++)
8497 func (stream, "%sd%d[]", ix ? "," : "", rd + ix * stride);
8499 func (stream, "d%d[]", rd);
8501 func (stream, "d%d[]-d%d[]", rd, rd + n - 1);
8502 func (stream, "}, [%s", arm_regnames[rn]);
8505 align = (8 * (type + 1)) << size;
8507 align = (size > 1) ? align >> 1 : align;
8508 if (type == 2 || (type == 0 && !size))
8509 func (stream, " :<bad align %d>", align);
8511 func (stream, " :%d", align);
8517 func (stream, ", %s", arm_regnames[rm]);
8523 int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
8524 int size = (given >> 20) & 3;
8525 int reg = raw_reg & ((4 << size) - 1);
8526 int ix = raw_reg >> size >> 2;
8528 func (stream, "d%d[%d]", reg, ix);
8533 /* Neon encoded constant for mov, mvn, vorr, vbic. */
8536 int cmode = (given >> 8) & 0xf;
8537 int op = (given >> 5) & 0x1;
8538 unsigned long value = 0, hival = 0;
8543 bits |= ((given >> 24) & 1) << 7;
8544 bits |= ((given >> 16) & 7) << 4;
8545 bits |= ((given >> 0) & 15) << 0;
8549 shift = (cmode >> 1) & 3;
8550 value = (unsigned long) bits << (8 * shift);
8553 else if (cmode < 12)
8555 shift = (cmode >> 1) & 1;
8556 value = (unsigned long) bits << (8 * shift);
8559 else if (cmode < 14)
8561 shift = (cmode & 1) + 1;
8562 value = (unsigned long) bits << (8 * shift);
8563 value |= (1ul << (8 * shift)) - 1;
8566 else if (cmode == 14)
8570 /* Bit replication into bytes. */
8576 for (ix = 7; ix >= 0; ix--)
8578 mask = ((bits >> ix) & 1) ? 0xff : 0;
8580 value = (value << 8) | mask;
8582 hival = (hival << 8) | mask;
8588 /* Byte replication. */
8589 value = (unsigned long) bits;
8595 /* Floating point encoding. */
8598 value = (unsigned long) (bits & 0x7f) << 19;
8599 value |= (unsigned long) (bits & 0x80) << 24;
8600 tmp = bits & 0x40 ? 0x3c : 0x40;
8601 value |= (unsigned long) tmp << 24;
8607 func (stream, "<illegal constant %.8x:%x:%x>",
8615 func (stream, "#%ld\t; 0x%.2lx", value, value);
8619 func (stream, "#%ld\t; 0x%.4lx", value, value);
8625 unsigned char valbytes[4];
8628 /* Do this a byte at a time so we don't have to
8629 worry about the host's endianness. */
8630 valbytes[0] = value & 0xff;
8631 valbytes[1] = (value >> 8) & 0xff;
8632 valbytes[2] = (value >> 16) & 0xff;
8633 valbytes[3] = (value >> 24) & 0xff;
8635 floatformat_to_double
8636 (& floatformat_ieee_single_little, valbytes,
8639 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
8643 func (stream, "#%ld\t; 0x%.8lx",
8644 (long) (((value & 0x80000000L) != 0)
8645 ? value | ~0xffffffffL : value),
8650 func (stream, "#0x%.8lx%.8lx", hival, value);
8661 int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
8662 int num = (given >> 8) & 0x3;
8665 func (stream, "{d%d}", regno);
8666 else if (num + regno >= 32)
8667 func (stream, "{d%d-<overflow reg d%d}", regno, regno + num);
8669 func (stream, "{d%d-d%d}", regno, regno + num);
8674 case '0': case '1': case '2': case '3': case '4':
8675 case '5': case '6': case '7': case '8': case '9':
8678 unsigned long value;
8680 c = arm_decode_bitfield (c, given, &value, &width);
8685 func (stream, "%s", arm_regnames[value]);
8688 func (stream, "%ld", value);
8689 value_in_comment = value;
8692 func (stream, "%ld", (1ul << width) - value);
8698 /* Various width encodings. */
8700 int base = 8 << (*c - 'S'); /* 8,16 or 32 */
8705 if (*c >= '0' && *c <= '9')
8707 else if (*c >= 'a' && *c <= 'f')
8708 limit = *c - 'a' + 10;
8714 if (value < low || value > high)
8715 func (stream, "<illegal width %d>", base << value);
8717 func (stream, "%d", base << value);
8721 if (given & (1 << 6))
8725 func (stream, "d%ld", value);
8730 func (stream, "<illegal reg q%ld.5>", value >> 1);
8732 func (stream, "q%ld", value >> 1);
8738 func (stream, "%c", *c);
8742 if (value == ((1ul << width) - 1))
8743 func (stream, "%c", *c);
8746 func (stream, "%c", c[(1 << width) - (int) value]);
8760 func (stream, "%c", *c);
8763 if (value_in_comment > 32 || value_in_comment < -16)
8764 func (stream, "\t; 0x%lx", value_in_comment);
8766 if (is_unpredictable)
8767 func (stream, UNPREDICTABLE_INSTRUCTION);
8775 /* Print one mve instruction on INFO->STREAM.
8776 Return TRUE if the instuction matched, FALSE if this is not a
8777 recognised mve instruction. */
8780 print_insn_mve (struct disassemble_info *info, long given)
8782 const struct mopcode32 *insn;
8783 void *stream = info->stream;
8784 fprintf_ftype func = info->fprintf_func;
8786 for (insn = mve_opcodes; insn->assembler; insn++)
8788 if (((given & insn->mask) == insn->value)
8789 && !is_mve_encoding_conflict (given, insn->mve_op))
8791 signed long value_in_comment = 0;
8792 bfd_boolean is_unpredictable = FALSE;
8793 bfd_boolean is_undefined = FALSE;
8795 enum mve_unpredictable unpredictable_cond = UNPRED_NONE;
8796 enum mve_undefined undefined_cond = UNDEF_NONE;
8798 /* Most vector mve instruction are illegal in a it block.
8799 There are a few exceptions; check for them. */
8800 if (ifthen_state && !is_mve_okay_in_it (insn->mve_op))
8802 is_unpredictable = TRUE;
8803 unpredictable_cond = UNPRED_IT_BLOCK;
8805 else if (is_mve_unpredictable (given, insn->mve_op,
8806 &unpredictable_cond))
8807 is_unpredictable = TRUE;
8809 if (is_mve_undefined (given, insn->mve_op, &undefined_cond))
8810 is_undefined = TRUE;
8812 for (c = insn->assembler; *c; c++)
8819 func (stream, "%%");
8823 /* Don't print anything for '+' as it is implied. */
8824 if (arm_decode_field (given, 23, 23) == 0)
8830 func (stream, "%s", arm_conditional[IFTHEN_COND]);
8834 print_mve_vld_str_addr (info, given, insn->mve_op);
8839 long mve_mask = mve_extract_pred_mask (given);
8840 func (stream, "%s", mve_predicatenames[mve_mask]);
8845 print_vec_condition (info, given, insn->mve_op);
8849 if (arm_decode_field (given, 0, 0) == 1)
8852 = arm_decode_field (given, 4, 4)
8853 | (arm_decode_field (given, 6, 6) << 1);
8855 func (stream, ", uxtw #%lu", size);
8860 print_mve_rounding_mode (info, given, insn->mve_op);
8864 print_mve_vcvt_size (info, given, insn->mve_op);
8869 unsigned long op1 = arm_decode_field (given, 21, 22);
8871 if ((insn->mve_op == MVE_VMOV_VEC_LANE_TO_GP))
8873 /* Check for signed. */
8874 if (arm_decode_field (given, 23, 23) == 0)
8876 /* We don't print 's' for S32. */
8877 if ((arm_decode_field (given, 5, 6) == 0)
8878 && ((op1 == 0) || (op1 == 1)))
8888 if (arm_decode_field (given, 28, 28) == 0)
8897 print_instruction_predicate (info);
8901 if (arm_decode_field (given, 21, 21) == 1)
8906 print_mve_register_blocks (info, given, insn->mve_op);
8910 /* SIMD encoded constant for mov, mvn, vorr, vbic. */
8912 print_simd_imm8 (info, given, 28, insn);
8916 print_mve_vmov_index (info, given);
8920 if (arm_decode_field (given, 12, 12) == 0)
8927 if (arm_decode_field (given, 12, 12) == 1)
8931 case '0': case '1': case '2': case '3': case '4':
8932 case '5': case '6': case '7': case '8': case '9':
8935 unsigned long value;
8937 c = arm_decode_bitfield (c, given, &value, &width);
8943 is_unpredictable = TRUE;
8944 else if (value == 15)
8945 func (stream, "zr");
8947 func (stream, "%s", arm_regnames[value]);
8950 print_mve_size (info,
8964 unsigned int odd_reg = (value << 1) | 1;
8965 func (stream, "%s", arm_regnames[odd_reg]);
8971 = arm_decode_field (given, 0, 6);
8972 unsigned long mod_imm = imm;
8974 switch (insn->mve_op)
8976 case MVE_VLDRW_GATHER_T5:
8977 case MVE_VSTRW_SCATTER_T5:
8978 mod_imm = mod_imm << 2;
8980 case MVE_VSTRD_SCATTER_T6:
8981 case MVE_VLDRD_GATHER_T6:
8982 mod_imm = mod_imm << 3;
8989 func (stream, "%lu", mod_imm);
8993 func (stream, "%lu", 64 - value);
8997 unsigned int even_reg = value << 1;
8998 func (stream, "%s", arm_regnames[even_reg]);
9021 print_mve_rotate (info, value, width);
9024 func (stream, "%s", arm_regnames[value]);
9027 if (insn->mve_op == MVE_VQSHL_T2
9028 || insn->mve_op == MVE_VQSHLU_T3
9029 || insn->mve_op == MVE_VRSHR
9030 || insn->mve_op == MVE_VRSHRN
9031 || insn->mve_op == MVE_VSHL_T1
9032 || insn->mve_op == MVE_VSHLL_T1
9033 || insn->mve_op == MVE_VSHR
9034 || insn->mve_op == MVE_VSHRN
9035 || insn->mve_op == MVE_VSLI
9036 || insn->mve_op == MVE_VSRI)
9037 print_mve_shift_n (info, given, insn->mve_op);
9038 else if (insn->mve_op == MVE_VSHLL_T2)
9046 func (stream, "16");
9049 print_mve_undefined (info, UNDEF_SIZE_0);
9058 if (insn->mve_op == MVE_VSHLC && value == 0)
9060 func (stream, "%ld", value);
9061 value_in_comment = value;
9065 func (stream, "s%ld", value);
9069 func (stream, "<illegal reg q%ld.5>", value);
9071 func (stream, "q%ld", value);
9074 func (stream, "0x%08lx", value);
9086 func (stream, "%c", *c);
9089 if (value_in_comment > 32 || value_in_comment < -16)
9090 func (stream, "\t; 0x%lx", value_in_comment);
9092 if (is_unpredictable)
9093 print_mve_unpredictable (info, unpredictable_cond);
9096 print_mve_undefined (info, undefined_cond);
9098 if ((vpt_block_state.in_vpt_block == FALSE)
9100 && (is_vpt_instruction (given) == TRUE))
9101 mark_inside_vpt_block (given);
9102 else if (vpt_block_state.in_vpt_block == TRUE)
9103 update_vpt_block_state ();
9112 /* Return the name of a v7A special register. */
9115 banked_regname (unsigned reg)
9119 case 15: return "CPSR";
9120 case 32: return "R8_usr";
9121 case 33: return "R9_usr";
9122 case 34: return "R10_usr";
9123 case 35: return "R11_usr";
9124 case 36: return "R12_usr";
9125 case 37: return "SP_usr";
9126 case 38: return "LR_usr";
9127 case 40: return "R8_fiq";
9128 case 41: return "R9_fiq";
9129 case 42: return "R10_fiq";
9130 case 43: return "R11_fiq";
9131 case 44: return "R12_fiq";
9132 case 45: return "SP_fiq";
9133 case 46: return "LR_fiq";
9134 case 48: return "LR_irq";
9135 case 49: return "SP_irq";
9136 case 50: return "LR_svc";
9137 case 51: return "SP_svc";
9138 case 52: return "LR_abt";
9139 case 53: return "SP_abt";
9140 case 54: return "LR_und";
9141 case 55: return "SP_und";
9142 case 60: return "LR_mon";
9143 case 61: return "SP_mon";
9144 case 62: return "ELR_hyp";
9145 case 63: return "SP_hyp";
9146 case 79: return "SPSR";
9147 case 110: return "SPSR_fiq";
9148 case 112: return "SPSR_irq";
9149 case 114: return "SPSR_svc";
9150 case 116: return "SPSR_abt";
9151 case 118: return "SPSR_und";
9152 case 124: return "SPSR_mon";
9153 case 126: return "SPSR_hyp";
9154 default: return NULL;
9158 /* Return the name of the DMB/DSB option. */
9160 data_barrier_option (unsigned option)
9162 switch (option & 0xf)
9164 case 0xf: return "sy";
9165 case 0xe: return "st";
9166 case 0xd: return "ld";
9167 case 0xb: return "ish";
9168 case 0xa: return "ishst";
9169 case 0x9: return "ishld";
9170 case 0x7: return "un";
9171 case 0x6: return "unst";
9172 case 0x5: return "nshld";
9173 case 0x3: return "osh";
9174 case 0x2: return "oshst";
9175 case 0x1: return "oshld";
9176 default: return NULL;
9180 /* Print one ARM instruction from PC on INFO->STREAM. */
9183 print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
9185 const struct opcode32 *insn;
9186 void *stream = info->stream;
9187 fprintf_ftype func = info->fprintf_func;
9188 struct arm_private_data *private_data = info->private_data;
9190 if (print_insn_coprocessor (pc, info, given, FALSE))
9193 if (print_insn_neon (info, given, FALSE))
9196 for (insn = arm_opcodes; insn->assembler; insn++)
9198 if ((given & insn->mask) != insn->value)
9201 if (! ARM_CPU_HAS_FEATURE (insn->arch, private_data->features))
9204 /* Special case: an instruction with all bits set in the condition field
9205 (0xFnnn_nnnn) is only matched if all those bits are set in insn->mask,
9206 or by the catchall at the end of the table. */
9207 if ((given & 0xF0000000) != 0xF0000000
9208 || (insn->mask & 0xF0000000) == 0xF0000000
9209 || (insn->mask == 0 && insn->value == 0))
9211 unsigned long u_reg = 16;
9212 unsigned long U_reg = 16;
9213 bfd_boolean is_unpredictable = FALSE;
9214 signed long value_in_comment = 0;
9217 for (c = insn->assembler; *c; c++)
9221 bfd_boolean allow_unpredictable = FALSE;
9226 func (stream, "%%");
9230 value_in_comment = print_arm_address (pc, info, given);
9234 /* Set P address bit and use normal address
9235 printing routine. */
9236 value_in_comment = print_arm_address (pc, info, given | (1 << P_BIT));
9240 allow_unpredictable = TRUE;
9243 if ((given & 0x004f0000) == 0x004f0000)
9245 /* PC relative with immediate offset. */
9246 bfd_vma offset = ((given & 0xf00) >> 4) | (given & 0xf);
9250 /* Elide positive zero offset. */
9251 if (offset || NEGATIVE_BIT_SET)
9252 func (stream, "[pc, #%s%d]\t; ",
9253 NEGATIVE_BIT_SET ? "-" : "", (int) offset);
9255 func (stream, "[pc]\t; ");
9256 if (NEGATIVE_BIT_SET)
9258 info->print_address_func (offset + pc + 8, info);
9262 /* Always show the offset. */
9263 func (stream, "[pc], #%s%d",
9264 NEGATIVE_BIT_SET ? "-" : "", (int) offset);
9265 if (! allow_unpredictable)
9266 is_unpredictable = TRUE;
9271 int offset = ((given & 0xf00) >> 4) | (given & 0xf);
9273 func (stream, "[%s",
9274 arm_regnames[(given >> 16) & 0xf]);
9278 if (IMMEDIATE_BIT_SET)
9280 /* Elide offset for non-writeback
9282 if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET
9284 func (stream, ", #%s%d",
9285 NEGATIVE_BIT_SET ? "-" : "", offset);
9287 if (NEGATIVE_BIT_SET)
9290 value_in_comment = offset;
9294 /* Register Offset or Register Pre-Indexed. */
9295 func (stream, ", %s%s",
9296 NEGATIVE_BIT_SET ? "-" : "",
9297 arm_regnames[given & 0xf]);
9299 /* Writing back to the register that is the source/
9300 destination of the load/store is unpredictable. */
9301 if (! allow_unpredictable
9302 && WRITEBACK_BIT_SET
9303 && ((given & 0xf) == ((given >> 12) & 0xf)))
9304 is_unpredictable = TRUE;
9307 func (stream, "]%s",
9308 WRITEBACK_BIT_SET ? "!" : "");
9312 if (IMMEDIATE_BIT_SET)
9314 /* Immediate Post-indexed. */
9315 /* PR 10924: Offset must be printed, even if it is zero. */
9316 func (stream, "], #%s%d",
9317 NEGATIVE_BIT_SET ? "-" : "", offset);
9318 if (NEGATIVE_BIT_SET)
9320 value_in_comment = offset;
9324 /* Register Post-indexed. */
9325 func (stream, "], %s%s",
9326 NEGATIVE_BIT_SET ? "-" : "",
9327 arm_regnames[given & 0xf]);
9329 /* Writing back to the register that is the source/
9330 destination of the load/store is unpredictable. */
9331 if (! allow_unpredictable
9332 && (given & 0xf) == ((given >> 12) & 0xf))
9333 is_unpredictable = TRUE;
9336 if (! allow_unpredictable)
9338 /* Writeback is automatically implied by post- addressing.
9339 Setting the W bit is unnecessary and ARM specify it as
9340 being unpredictable. */
9341 if (WRITEBACK_BIT_SET
9342 /* Specifying the PC register as the post-indexed
9343 registers is also unpredictable. */
9344 || (! IMMEDIATE_BIT_SET && ((given & 0xf) == 0xf)))
9345 is_unpredictable = TRUE;
9353 bfd_vma disp = (((given & 0xffffff) ^ 0x800000) - 0x800000);
9354 info->print_address_func (disp * 4 + pc + 8, info);
9359 if (((given >> 28) & 0xf) != 0xe)
9361 arm_conditional [(given >> 28) & 0xf]);
9370 for (reg = 0; reg < 16; reg++)
9371 if ((given & (1 << reg)) != 0)
9374 func (stream, ", ");
9376 func (stream, "%s", arm_regnames[reg]);
9380 is_unpredictable = TRUE;
9385 arm_decode_shift (given, func, stream, FALSE);
9389 if ((given & 0x02000000) != 0)
9391 unsigned int rotate = (given & 0xf00) >> 7;
9392 unsigned int immed = (given & 0xff);
9395 a = (((immed << (32 - rotate))
9396 | (immed >> rotate)) & 0xffffffff);
9397 /* If there is another encoding with smaller rotate,
9398 the rotate should be specified directly. */
9399 for (i = 0; i < 32; i += 2)
9400 if ((a << i | a >> (32 - i)) <= 0xff)
9404 func (stream, "#%d, %d", immed, rotate);
9406 func (stream, "#%d", a);
9407 value_in_comment = a;
9410 arm_decode_shift (given, func, stream, TRUE);
9414 if ((given & 0x0000f000) == 0x0000f000)
9416 arm_feature_set arm_ext_v6 =
9417 ARM_FEATURE_CORE_LOW (ARM_EXT_V6);
9419 /* The p-variants of tst/cmp/cmn/teq are the pre-V6
9420 mechanism for setting PSR flag bits. They are
9421 obsolete in V6 onwards. */
9422 if (! ARM_CPU_HAS_FEATURE (private_data->features, \
9426 is_unpredictable = TRUE;
9431 if ((given & 0x01200000) == 0x00200000)
9437 int offset = given & 0xff;
9439 value_in_comment = offset * 4;
9440 if (NEGATIVE_BIT_SET)
9441 value_in_comment = - value_in_comment;
9443 func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
9448 func (stream, ", #%d]%s",
9449 (int) value_in_comment,
9450 WRITEBACK_BIT_SET ? "!" : "");
9458 if (WRITEBACK_BIT_SET)
9461 func (stream, ", #%d", (int) value_in_comment);
9465 func (stream, ", {%d}", (int) offset);
9466 value_in_comment = offset;
9473 /* Print ARM V5 BLX(1) address: pc+25 bits. */
9478 if (! NEGATIVE_BIT_SET)
9479 /* Is signed, hi bits should be ones. */
9480 offset = (-1) ^ 0x00ffffff;
9482 /* Offset is (SignExtend(offset field)<<2). */
9483 offset += given & 0x00ffffff;
9485 address = offset + pc + 8;
9487 if (given & 0x01000000)
9488 /* H bit allows addressing to 2-byte boundaries. */
9491 info->print_address_func (address, info);
9496 if ((given & 0x02000200) == 0x200)
9499 unsigned sysm = (given & 0x004f0000) >> 16;
9501 sysm |= (given & 0x300) >> 4;
9502 name = banked_regname (sysm);
9505 func (stream, "%s", name);
9507 func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
9511 func (stream, "%cPSR_",
9512 (given & 0x00400000) ? 'S' : 'C');
9513 if (given & 0x80000)
9515 if (given & 0x40000)
9517 if (given & 0x20000)
9519 if (given & 0x10000)
9525 if ((given & 0xf0) == 0x60)
9527 switch (given & 0xf)
9529 case 0xf: func (stream, "sy"); break;
9531 func (stream, "#%d", (int) given & 0xf);
9537 const char * opt = data_barrier_option (given & 0xf);
9539 func (stream, "%s", opt);
9541 func (stream, "#%d", (int) given & 0xf);
9545 case '0': case '1': case '2': case '3': case '4':
9546 case '5': case '6': case '7': case '8': case '9':
9549 unsigned long value;
9551 c = arm_decode_bitfield (c, given, &value, &width);
9557 is_unpredictable = TRUE;
9561 /* We want register + 1 when decoding T. */
9567 /* Eat the 'u' character. */
9571 is_unpredictable = TRUE;
9576 /* Eat the 'U' character. */
9580 is_unpredictable = TRUE;
9583 func (stream, "%s", arm_regnames[value]);
9586 func (stream, "%ld", value);
9587 value_in_comment = value;
9590 func (stream, "%ld", value * 8);
9591 value_in_comment = value * 8;
9594 func (stream, "%ld", value + 1);
9595 value_in_comment = value + 1;
9598 func (stream, "0x%08lx", value);
9600 /* Some SWI instructions have special
9602 if ((given & 0x0fffffff) == 0x0FF00000)
9603 func (stream, "\t; IMB");
9604 else if ((given & 0x0fffffff) == 0x0FF00001)
9605 func (stream, "\t; IMBRange");
9608 func (stream, "%01lx", value & 0xf);
9609 value_in_comment = value;
9614 func (stream, "%c", *c);
9618 if (value == ((1ul << width) - 1))
9619 func (stream, "%c", *c);
9622 func (stream, "%c", c[(1 << width) - (int) value]);
9635 imm = (given & 0xf) | ((given & 0xfff00) >> 4);
9636 func (stream, "%d", imm);
9637 value_in_comment = imm;
9642 /* LSB and WIDTH fields of BFI or BFC. The machine-
9643 language instruction encodes LSB and MSB. */
9645 long msb = (given & 0x001f0000) >> 16;
9646 long lsb = (given & 0x00000f80) >> 7;
9647 long w = msb - lsb + 1;
9650 func (stream, "#%lu, #%lu", lsb, w);
9652 func (stream, "(invalid: %lu:%lu)", lsb, msb);
9657 /* Get the PSR/banked register name. */
9660 unsigned sysm = (given & 0x004f0000) >> 16;
9662 sysm |= (given & 0x300) >> 4;
9663 name = banked_regname (sysm);
9666 func (stream, "%s", name);
9668 func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
9673 /* 16-bit unsigned immediate from a MOVT or MOVW
9674 instruction, encoded in bits 0:11 and 15:19. */
9676 long hi = (given & 0x000f0000) >> 4;
9677 long lo = (given & 0x00000fff);
9678 long imm16 = hi | lo;
9680 func (stream, "#%lu", imm16);
9681 value_in_comment = imm16;
9690 func (stream, "%c", *c);
9693 if (value_in_comment > 32 || value_in_comment < -16)
9694 func (stream, "\t; 0x%lx", (value_in_comment & 0xffffffffUL));
9696 if (is_unpredictable)
9697 func (stream, UNPREDICTABLE_INSTRUCTION);
9702 func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
9706 /* Print one 16-bit Thumb instruction from PC on INFO->STREAM. */
9709 print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
9711 const struct opcode16 *insn;
9712 void *stream = info->stream;
9713 fprintf_ftype func = info->fprintf_func;
9715 for (insn = thumb_opcodes; insn->assembler; insn++)
9716 if ((given & insn->mask) == insn->value)
9718 signed long value_in_comment = 0;
9719 const char *c = insn->assembler;
9728 func (stream, "%c", *c);
9735 func (stream, "%%");
9740 func (stream, "%s", arm_conditional[IFTHEN_COND]);
9745 func (stream, "%s", arm_conditional[IFTHEN_COND]);
9754 ifthen_next_state = given & 0xff;
9755 for (tmp = given << 1; tmp & 0xf; tmp <<= 1)
9756 func (stream, ((given ^ tmp) & 0x10) ? "e" : "t");
9757 func (stream, "\t%s", arm_conditional[(given >> 4) & 0xf]);
9762 if (ifthen_next_state)
9763 func (stream, "\t; unpredictable branch in IT block\n");
9768 func (stream, "\t; unpredictable <IT:%s>",
9769 arm_conditional[IFTHEN_COND]);
9776 reg = (given >> 3) & 0x7;
9777 if (given & (1 << 6))
9780 func (stream, "%s", arm_regnames[reg]);
9789 if (given & (1 << 7))
9792 func (stream, "%s", arm_regnames[reg]);
9797 if (given & (1 << 8))
9801 if (*c == 'O' && (given & (1 << 8)))
9811 /* It would be nice if we could spot
9812 ranges, and generate the rS-rE format: */
9813 for (reg = 0; (reg < 8); reg++)
9814 if ((given & (1 << reg)) != 0)
9817 func (stream, ", ");
9819 func (stream, "%s", arm_regnames[reg]);
9825 func (stream, ", ");
9827 func (stream, "%s", arm_regnames[14] /* "lr" */);
9833 func (stream, ", ");
9834 func (stream, "%s", arm_regnames[15] /* "pc" */);
9842 /* Print writeback indicator for a LDMIA. We are doing a
9843 writeback if the base register is not in the register
9845 if ((given & (1 << ((given & 0x0700) >> 8))) == 0)
9850 /* Print ARM V6T2 CZB address: pc+4+6 bits. */
9852 bfd_vma address = (pc + 4
9853 + ((given & 0x00f8) >> 2)
9854 + ((given & 0x0200) >> 3));
9855 info->print_address_func (address, info);
9860 /* Right shift immediate -- bits 6..10; 1-31 print
9861 as themselves, 0 prints as 32. */
9863 long imm = (given & 0x07c0) >> 6;
9866 func (stream, "#%ld", imm);
9870 case '0': case '1': case '2': case '3': case '4':
9871 case '5': case '6': case '7': case '8': case '9':
9873 int bitstart = *c++ - '0';
9876 while (*c >= '0' && *c <= '9')
9877 bitstart = (bitstart * 10) + *c++ - '0';
9886 while (*c >= '0' && *c <= '9')
9887 bitend = (bitend * 10) + *c++ - '0';
9890 reg = given >> bitstart;
9891 reg &= (2 << (bitend - bitstart)) - 1;
9896 func (stream, "%s", arm_regnames[reg]);
9900 func (stream, "%ld", (long) reg);
9901 value_in_comment = reg;
9905 func (stream, "%ld", (long) (reg << 1));
9906 value_in_comment = reg << 1;
9910 func (stream, "%ld", (long) (reg << 2));
9911 value_in_comment = reg << 2;
9915 /* PC-relative address -- the bottom two
9916 bits of the address are dropped
9917 before the calculation. */
9918 info->print_address_func
9919 (((pc + 4) & ~3) + (reg << 2), info);
9920 value_in_comment = 0;
9924 func (stream, "0x%04lx", (long) reg);
9928 reg = ((reg ^ (1 << bitend)) - (1 << bitend));
9929 info->print_address_func (reg * 2 + pc + 4, info);
9930 value_in_comment = 0;
9934 func (stream, "%s", arm_conditional [reg]);
9945 if ((given & (1 << bitstart)) != 0)
9946 func (stream, "%c", *c);
9951 if ((given & (1 << bitstart)) != 0)
9952 func (stream, "%c", *c++);
9954 func (stream, "%c", *++c);
9968 if (value_in_comment > 32 || value_in_comment < -16)
9969 func (stream, "\t; 0x%lx", value_in_comment);
9974 func (stream, UNKNOWN_INSTRUCTION_16BIT, (unsigned)given);
9978 /* Return the name of an V7M special register. */
9981 psr_name (int regno)
9985 case 0x0: return "APSR";
9986 case 0x1: return "IAPSR";
9987 case 0x2: return "EAPSR";
9988 case 0x3: return "PSR";
9989 case 0x5: return "IPSR";
9990 case 0x6: return "EPSR";
9991 case 0x7: return "IEPSR";
9992 case 0x8: return "MSP";
9993 case 0x9: return "PSP";
9994 case 0xa: return "MSPLIM";
9995 case 0xb: return "PSPLIM";
9996 case 0x10: return "PRIMASK";
9997 case 0x11: return "BASEPRI";
9998 case 0x12: return "BASEPRI_MAX";
9999 case 0x13: return "FAULTMASK";
10000 case 0x14: return "CONTROL";
10001 case 0x88: return "MSP_NS";
10002 case 0x89: return "PSP_NS";
10003 case 0x8a: return "MSPLIM_NS";
10004 case 0x8b: return "PSPLIM_NS";
10005 case 0x90: return "PRIMASK_NS";
10006 case 0x91: return "BASEPRI_NS";
10007 case 0x93: return "FAULTMASK_NS";
10008 case 0x94: return "CONTROL_NS";
10009 case 0x98: return "SP_NS";
10010 default: return "<unknown>";
10014 /* Print one 32-bit Thumb instruction from PC on INFO->STREAM. */
10017 print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
10019 const struct opcode32 *insn;
10020 void *stream = info->stream;
10021 fprintf_ftype func = info->fprintf_func;
10022 bfd_boolean is_mve = is_mve_architecture (info);
10024 if (print_insn_coprocessor (pc, info, given, TRUE))
10027 if ((is_mve == FALSE) && print_insn_neon (info, given, TRUE))
10030 if (is_mve && print_insn_mve (info, given))
10033 for (insn = thumb32_opcodes; insn->assembler; insn++)
10034 if ((given & insn->mask) == insn->value)
10036 bfd_boolean is_clrm = FALSE;
10037 bfd_boolean is_unpredictable = FALSE;
10038 signed long value_in_comment = 0;
10039 const char *c = insn->assembler;
10045 func (stream, "%c", *c);
10052 func (stream, "%%");
10057 func (stream, "%s", arm_conditional[IFTHEN_COND]);
10061 if (ifthen_next_state)
10062 func (stream, "\t; unpredictable branch in IT block\n");
10067 func (stream, "\t; unpredictable <IT:%s>",
10068 arm_conditional[IFTHEN_COND]);
10073 unsigned int imm12 = 0;
10075 imm12 |= (given & 0x000000ffu);
10076 imm12 |= (given & 0x00007000u) >> 4;
10077 imm12 |= (given & 0x04000000u) >> 15;
10078 func (stream, "#%u", imm12);
10079 value_in_comment = imm12;
10085 unsigned int bits = 0, imm, imm8, mod;
10087 bits |= (given & 0x000000ffu);
10088 bits |= (given & 0x00007000u) >> 4;
10089 bits |= (given & 0x04000000u) >> 15;
10090 imm8 = (bits & 0x0ff);
10091 mod = (bits & 0xf00) >> 8;
10094 case 0: imm = imm8; break;
10095 case 1: imm = ((imm8 << 16) | imm8); break;
10096 case 2: imm = ((imm8 << 24) | (imm8 << 8)); break;
10097 case 3: imm = ((imm8 << 24) | (imm8 << 16) | (imm8 << 8) | imm8); break;
10099 mod = (bits & 0xf80) >> 7;
10100 imm8 = (bits & 0x07f) | 0x80;
10101 imm = (((imm8 << (32 - mod)) | (imm8 >> mod)) & 0xffffffff);
10103 func (stream, "#%u", imm);
10104 value_in_comment = imm;
10110 unsigned int imm = 0;
10112 imm |= (given & 0x000000ffu);
10113 imm |= (given & 0x00007000u) >> 4;
10114 imm |= (given & 0x04000000u) >> 15;
10115 imm |= (given & 0x000f0000u) >> 4;
10116 func (stream, "#%u", imm);
10117 value_in_comment = imm;
10123 unsigned int imm = 0;
10125 imm |= (given & 0x000f0000u) >> 16;
10126 imm |= (given & 0x00000ff0u) >> 0;
10127 imm |= (given & 0x0000000fu) << 12;
10128 func (stream, "#%u", imm);
10129 value_in_comment = imm;
10135 unsigned int imm = 0;
10137 imm |= (given & 0x000f0000u) >> 4;
10138 imm |= (given & 0x00000fffu) >> 0;
10139 func (stream, "#%u", imm);
10140 value_in_comment = imm;
10146 unsigned int imm = 0;
10148 imm |= (given & 0x00000fffu);
10149 imm |= (given & 0x000f0000u) >> 4;
10150 func (stream, "#%u", imm);
10151 value_in_comment = imm;
10157 unsigned int reg = (given & 0x0000000fu);
10158 unsigned int stp = (given & 0x00000030u) >> 4;
10159 unsigned int imm = 0;
10160 imm |= (given & 0x000000c0u) >> 6;
10161 imm |= (given & 0x00007000u) >> 10;
10163 func (stream, "%s", arm_regnames[reg]);
10168 func (stream, ", lsl #%u", imm);
10174 func (stream, ", lsr #%u", imm);
10180 func (stream, ", asr #%u", imm);
10185 func (stream, ", rrx");
10187 func (stream, ", ror #%u", imm);
10194 unsigned int Rn = (given & 0x000f0000) >> 16;
10195 unsigned int U = ! NEGATIVE_BIT_SET;
10196 unsigned int op = (given & 0x00000f00) >> 8;
10197 unsigned int i12 = (given & 0x00000fff);
10198 unsigned int i8 = (given & 0x000000ff);
10199 bfd_boolean writeback = FALSE, postind = FALSE;
10200 bfd_vma offset = 0;
10202 func (stream, "[%s", arm_regnames[Rn]);
10203 if (U) /* 12-bit positive immediate offset. */
10207 value_in_comment = offset;
10209 else if (Rn == 15) /* 12-bit negative immediate offset. */
10210 offset = - (int) i12;
10211 else if (op == 0x0) /* Shifted register offset. */
10213 unsigned int Rm = (i8 & 0x0f);
10214 unsigned int sh = (i8 & 0x30) >> 4;
10216 func (stream, ", %s", arm_regnames[Rm]);
10218 func (stream, ", lsl #%u", sh);
10219 func (stream, "]");
10224 case 0xE: /* 8-bit positive immediate offset. */
10228 case 0xC: /* 8-bit negative immediate offset. */
10232 case 0xF: /* 8-bit + preindex with wb. */
10237 case 0xD: /* 8-bit - preindex with wb. */
10242 case 0xB: /* 8-bit + postindex. */
10247 case 0x9: /* 8-bit - postindex. */
10253 func (stream, ", <undefined>]");
10258 func (stream, "], #%d", (int) offset);
10262 func (stream, ", #%d", (int) offset);
10263 func (stream, writeback ? "]!" : "]");
10268 func (stream, "\t; ");
10269 info->print_address_func (((pc + 4) & ~3) + offset, info);
10277 unsigned int U = ! NEGATIVE_BIT_SET;
10278 unsigned int W = WRITEBACK_BIT_SET;
10279 unsigned int Rn = (given & 0x000f0000) >> 16;
10280 unsigned int off = (given & 0x000000ff);
10282 func (stream, "[%s", arm_regnames[Rn]);
10288 func (stream, ", #%c%u", U ? '+' : '-', off * 4);
10289 value_in_comment = off * 4 * (U ? 1 : -1);
10291 func (stream, "]");
10293 func (stream, "!");
10297 func (stream, "], ");
10300 func (stream, "#%c%u", U ? '+' : '-', off * 4);
10301 value_in_comment = off * 4 * (U ? 1 : -1);
10305 func (stream, "{%u}", off);
10306 value_in_comment = off;
10314 unsigned int Sbit = (given & 0x01000000) >> 24;
10315 unsigned int type = (given & 0x00600000) >> 21;
10319 case 0: func (stream, Sbit ? "sb" : "b"); break;
10320 case 1: func (stream, Sbit ? "sh" : "h"); break;
10323 func (stream, "??");
10326 func (stream, "??");
10334 /* Fall through. */
10340 func (stream, "{");
10341 for (reg = 0; reg < 16; reg++)
10342 if ((given & (1 << reg)) != 0)
10345 func (stream, ", ");
10347 if (is_clrm && reg == 13)
10348 func (stream, "(invalid: %s)", arm_regnames[reg]);
10349 else if (is_clrm && reg == 15)
10350 func (stream, "%s", "APSR");
10352 func (stream, "%s", arm_regnames[reg]);
10354 func (stream, "}");
10360 unsigned int msb = (given & 0x0000001f);
10361 unsigned int lsb = 0;
10363 lsb |= (given & 0x000000c0u) >> 6;
10364 lsb |= (given & 0x00007000u) >> 10;
10365 func (stream, "#%u, #%u", lsb, msb - lsb + 1);
10371 unsigned int width = (given & 0x0000001f) + 1;
10372 unsigned int lsb = 0;
10374 lsb |= (given & 0x000000c0u) >> 6;
10375 lsb |= (given & 0x00007000u) >> 10;
10376 func (stream, "#%u, #%u", lsb, width);
10382 unsigned int boff = (((given & 0x07800000) >> 23) << 1);
10383 func (stream, "%x", boff);
10389 unsigned int immA = (given & 0x001f0000u) >> 16;
10390 unsigned int immB = (given & 0x000007feu) >> 1;
10391 unsigned int immC = (given & 0x00000800u) >> 11;
10392 bfd_vma offset = 0;
10394 offset |= immA << 12;
10395 offset |= immB << 2;
10396 offset |= immC << 1;
10398 offset = (offset & 0x10000) ? offset - (1 << 17) : offset;
10400 info->print_address_func (pc + 4 + offset, info);
10406 unsigned int immA = (given & 0x007f0000u) >> 16;
10407 unsigned int immB = (given & 0x000007feu) >> 1;
10408 unsigned int immC = (given & 0x00000800u) >> 11;
10409 bfd_vma offset = 0;
10411 offset |= immA << 12;
10412 offset |= immB << 2;
10413 offset |= immC << 1;
10415 offset = (offset & 0x40000) ? offset - (1 << 19) : offset;
10417 info->print_address_func (pc + 4 + offset, info);
10423 unsigned int immA = (given & 0x00010000u) >> 16;
10424 unsigned int immB = (given & 0x000007feu) >> 1;
10425 unsigned int immC = (given & 0x00000800u) >> 11;
10426 bfd_vma offset = 0;
10428 offset |= immA << 12;
10429 offset |= immB << 2;
10430 offset |= immC << 1;
10432 offset = (offset & 0x1000) ? offset - (1 << 13) : offset;
10434 info->print_address_func (pc + 4 + offset, info);
10436 unsigned int T = (given & 0x00020000u) >> 17;
10437 unsigned int endoffset = (((given & 0x07800000) >> 23) << 1);
10438 unsigned int boffset = (T == 1) ? 4 : 2;
10439 func (stream, ", ");
10440 func (stream, "%x", endoffset + boffset);
10446 unsigned int immh = (given & 0x000007feu) >> 1;
10447 unsigned int imml = (given & 0x00000800u) >> 11;
10450 imm32 |= immh << 2;
10451 imm32 |= imml << 1;
10453 info->print_address_func (pc + 4 + imm32, info);
10459 unsigned int immh = (given & 0x000007feu) >> 1;
10460 unsigned int imml = (given & 0x00000800u) >> 11;
10463 imm32 |= immh << 2;
10464 imm32 |= imml << 1;
10466 info->print_address_func (pc + 4 - imm32, info);
10472 unsigned int S = (given & 0x04000000u) >> 26;
10473 unsigned int J1 = (given & 0x00002000u) >> 13;
10474 unsigned int J2 = (given & 0x00000800u) >> 11;
10475 bfd_vma offset = 0;
10477 offset |= !S << 20;
10478 offset |= J2 << 19;
10479 offset |= J1 << 18;
10480 offset |= (given & 0x003f0000) >> 4;
10481 offset |= (given & 0x000007ff) << 1;
10482 offset -= (1 << 20);
10484 info->print_address_func (pc + 4 + offset, info);
10490 unsigned int S = (given & 0x04000000u) >> 26;
10491 unsigned int I1 = (given & 0x00002000u) >> 13;
10492 unsigned int I2 = (given & 0x00000800u) >> 11;
10493 bfd_vma offset = 0;
10495 offset |= !S << 24;
10496 offset |= !(I1 ^ S) << 23;
10497 offset |= !(I2 ^ S) << 22;
10498 offset |= (given & 0x03ff0000u) >> 4;
10499 offset |= (given & 0x000007ffu) << 1;
10500 offset -= (1 << 24);
10503 /* BLX target addresses are always word aligned. */
10504 if ((given & 0x00001000u) == 0)
10507 info->print_address_func (offset, info);
10513 unsigned int shift = 0;
10515 shift |= (given & 0x000000c0u) >> 6;
10516 shift |= (given & 0x00007000u) >> 10;
10517 if (WRITEBACK_BIT_SET)
10518 func (stream, ", asr #%u", shift);
10520 func (stream, ", lsl #%u", shift);
10521 /* else print nothing - lsl #0 */
10527 unsigned int rot = (given & 0x00000030) >> 4;
10530 func (stream, ", ror #%u", rot * 8);
10535 if ((given & 0xf0) == 0x60)
10537 switch (given & 0xf)
10539 case 0xf: func (stream, "sy"); break;
10541 func (stream, "#%d", (int) given & 0xf);
10547 const char * opt = data_barrier_option (given & 0xf);
10549 func (stream, "%s", opt);
10551 func (stream, "#%d", (int) given & 0xf);
10556 if ((given & 0xff) == 0)
10558 func (stream, "%cPSR_", (given & 0x100000) ? 'S' : 'C');
10560 func (stream, "f");
10562 func (stream, "s");
10564 func (stream, "x");
10566 func (stream, "c");
10568 else if ((given & 0x20) == 0x20)
10571 unsigned sysm = (given & 0xf00) >> 8;
10573 sysm |= (given & 0x30);
10574 sysm |= (given & 0x00100000) >> 14;
10575 name = banked_regname (sysm);
10578 func (stream, "%s", name);
10580 func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
10584 func (stream, "%s", psr_name (given & 0xff));
10589 if (((given & 0xff) == 0)
10590 || ((given & 0x20) == 0x20))
10593 unsigned sm = (given & 0xf0000) >> 16;
10595 sm |= (given & 0x30);
10596 sm |= (given & 0x00100000) >> 14;
10597 name = banked_regname (sm);
10600 func (stream, "%s", name);
10602 func (stream, "(UNDEF: %lu)", (unsigned long) sm);
10605 func (stream, "%s", psr_name (given & 0xff));
10608 case '0': case '1': case '2': case '3': case '4':
10609 case '5': case '6': case '7': case '8': case '9':
10614 c = arm_decode_bitfield (c, given, &val, &width);
10620 func (stream, "%s", mve_vec_sizename[val]);
10622 func (stream, "<undef size>");
10626 func (stream, "%lu", val);
10627 value_in_comment = val;
10631 func (stream, "%lu", val + 1);
10632 value_in_comment = val + 1;
10636 func (stream, "%lu", val * 4);
10637 value_in_comment = val * 4;
10642 is_unpredictable = TRUE;
10643 /* Fall through. */
10646 is_unpredictable = TRUE;
10647 /* Fall through. */
10649 func (stream, "%s", arm_regnames[val]);
10653 func (stream, "%s", arm_conditional[val]);
10658 if (val == ((1ul << width) - 1))
10659 func (stream, "%c", *c);
10665 func (stream, "%c", *c);
10669 func (stream, "%c", c[(1 << width) - (int) val]);
10674 func (stream, "0x%lx", val & 0xffffffffUL);
10684 /* PR binutils/12534
10685 If we have a PC relative offset in an LDRD or STRD
10686 instructions then display the decoded address. */
10687 if (((given >> 16) & 0xf) == 0xf)
10689 bfd_vma offset = (given & 0xff) * 4;
10691 if ((given & (1 << 23)) == 0)
10693 func (stream, "\t; ");
10694 info->print_address_func ((pc & ~3) + 4 + offset, info);
10703 if (value_in_comment > 32 || value_in_comment < -16)
10704 func (stream, "\t; 0x%lx", value_in_comment);
10706 if (is_unpredictable)
10707 func (stream, UNPREDICTABLE_INSTRUCTION);
10713 func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
10717 /* Print data bytes on INFO->STREAM. */
10720 print_insn_data (bfd_vma pc ATTRIBUTE_UNUSED,
10721 struct disassemble_info *info,
10724 switch (info->bytes_per_chunk)
10727 info->fprintf_func (info->stream, ".byte\t0x%02lx", given);
10730 info->fprintf_func (info->stream, ".short\t0x%04lx", given);
10733 info->fprintf_func (info->stream, ".word\t0x%08lx", given);
10740 /* Disallow mapping symbols ($a, $b, $d, $t etc) from
10741 being displayed in symbol relative addresses.
10743 Also disallow private symbol, with __tagsym$$ prefix,
10744 from ARM RVCT toolchain being displayed. */
10747 arm_symbol_is_valid (asymbol * sym,
10748 struct disassemble_info * info ATTRIBUTE_UNUSED)
10755 name = bfd_asymbol_name (sym);
10757 return (name && *name != '$' && strncmp (name, "__tagsym$$", 10));
10760 /* Parse the string of disassembler options. */
10763 parse_arm_disassembler_options (const char *options)
10767 FOR_EACH_DISASSEMBLER_OPTION (opt, options)
10769 if (CONST_STRNEQ (opt, "reg-names-"))
10772 for (i = 0; i < NUM_ARM_OPTIONS; i++)
10773 if (disassembler_options_cmp (opt, regnames[i].name) == 0)
10775 regname_selected = i;
10779 if (i >= NUM_ARM_OPTIONS)
10780 /* xgettext: c-format */
10781 opcodes_error_handler (_("unrecognised register name set: %s"),
10784 else if (CONST_STRNEQ (opt, "force-thumb"))
10786 else if (CONST_STRNEQ (opt, "no-force-thumb"))
10789 /* xgettext: c-format */
10790 opcodes_error_handler (_("unrecognised disassembler option: %s"), opt);
10797 mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
10798 enum map_type *map_symbol);
10800 /* Search back through the insn stream to determine if this instruction is
10801 conditionally executed. */
10804 find_ifthen_state (bfd_vma pc,
10805 struct disassemble_info *info,
10806 bfd_boolean little)
10808 unsigned char b[2];
10811 /* COUNT is twice the number of instructions seen. It will be odd if we
10812 just crossed an instruction boundary. */
10815 unsigned int seen_it;
10818 ifthen_address = pc;
10825 /* Scan backwards looking for IT instructions, keeping track of where
10826 instruction boundaries are. We don't know if something is actually an
10827 IT instruction until we find a definite instruction boundary. */
10830 if (addr == 0 || info->symbol_at_address_func (addr, info))
10832 /* A symbol must be on an instruction boundary, and will not
10833 be within an IT block. */
10834 if (seen_it && (count & 1))
10840 status = info->read_memory_func (addr, (bfd_byte *) b, 2, info);
10845 insn = (b[0]) | (b[1] << 8);
10847 insn = (b[1]) | (b[0] << 8);
10850 if ((insn & 0xf800) < 0xe800)
10852 /* Addr + 2 is an instruction boundary. See if this matches
10853 the expected boundary based on the position of the last
10860 if ((insn & 0xff00) == 0xbf00 && (insn & 0xf) != 0)
10862 enum map_type type = MAP_ARM;
10863 bfd_boolean found = mapping_symbol_for_insn (addr, info, &type);
10865 if (!found || (found && type == MAP_THUMB))
10867 /* This could be an IT instruction. */
10869 it_count = count >> 1;
10872 if ((insn & 0xf800) >= 0xe800)
10875 count = (count + 2) | 1;
10876 /* IT blocks contain at most 4 instructions. */
10877 if (count >= 8 && !seen_it)
10880 /* We found an IT instruction. */
10881 ifthen_state = (seen_it & 0xe0) | ((seen_it << it_count) & 0x1f);
10882 if ((ifthen_state & 0xf) == 0)
10886 /* Returns nonzero and sets *MAP_TYPE if the N'th symbol is a
10890 is_mapping_symbol (struct disassemble_info *info, int n,
10891 enum map_type *map_type)
10895 name = bfd_asymbol_name (info->symtab[n]);
10896 if (name[0] == '$' && (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
10897 && (name[2] == 0 || name[2] == '.'))
10899 *map_type = ((name[1] == 'a') ? MAP_ARM
10900 : (name[1] == 't') ? MAP_THUMB
10908 /* Try to infer the code type (ARM or Thumb) from a mapping symbol.
10909 Returns nonzero if *MAP_TYPE was set. */
10912 get_map_sym_type (struct disassemble_info *info,
10914 enum map_type *map_type)
10916 /* If the symbol is in a different section, ignore it. */
10917 if (info->section != NULL && info->section != info->symtab[n]->section)
10920 return is_mapping_symbol (info, n, map_type);
10923 /* Try to infer the code type (ARM or Thumb) from a non-mapping symbol.
10924 Returns nonzero if *MAP_TYPE was set. */
10927 get_sym_code_type (struct disassemble_info *info,
10929 enum map_type *map_type)
10931 elf_symbol_type *es;
10934 /* If the symbol is in a different section, ignore it. */
10935 if (info->section != NULL && info->section != info->symtab[n]->section)
10938 es = *(elf_symbol_type **)(info->symtab + n);
10939 type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
10941 /* If the symbol has function type then use that. */
10942 if (type == STT_FUNC || type == STT_GNU_IFUNC)
10944 if (ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
10945 == ST_BRANCH_TO_THUMB)
10946 *map_type = MAP_THUMB;
10948 *map_type = MAP_ARM;
10955 /* Search the mapping symbol state for instruction at pc. This is only
10956 applicable for elf target.
10958 There is an assumption Here, info->private_data contains the correct AND
10959 up-to-date information about current scan process. The information will be
10960 used to speed this search process.
10962 Return TRUE if the mapping state can be determined, and map_symbol
10963 will be updated accordingly. Otherwise, return FALSE. */
10966 mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
10967 enum map_type *map_symbol)
10969 bfd_vma addr, section_vma = 0;
10970 int n, last_sym = -1;
10971 bfd_boolean found = FALSE;
10972 bfd_boolean can_use_search_opt_p = FALSE;
10974 /* Default to DATA. A text section is required by the ABI to contain an
10975 INSN mapping symbol at the start. A data section has no such
10976 requirement, hence if no mapping symbol is found the section must
10977 contain only data. This however isn't very useful if the user has
10978 fully stripped the binaries. If this is the case use the section
10979 attributes to determine the default. If we have no section default to
10980 INSN as well, as we may be disassembling some raw bytes on a baremetal
10981 HEX file or similar. */
10982 enum map_type type = MAP_DATA;
10983 if ((info->section && info->section->flags & SEC_CODE) || !info->section)
10985 struct arm_private_data *private_data;
10987 if (info->private_data == NULL
10988 || bfd_asymbol_flavour (*info->symtab) != bfd_target_elf_flavour)
10991 private_data = info->private_data;
10993 /* First, look for mapping symbols. */
10994 if (info->symtab_size != 0)
10996 if (pc <= private_data->last_mapping_addr)
10997 private_data->last_mapping_sym = -1;
10999 /* Start scanning at the start of the function, or wherever
11000 we finished last time. */
11001 n = info->symtab_pos + 1;
11003 /* If the last stop offset is different from the current one it means we
11004 are disassembling a different glob of bytes. As such the optimization
11005 would not be safe and we should start over. */
11006 can_use_search_opt_p
11007 = private_data->last_mapping_sym >= 0
11008 && info->stop_offset == private_data->last_stop_offset;
11010 if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
11011 n = private_data->last_mapping_sym;
11013 /* Look down while we haven't passed the location being disassembled.
11014 The reason for this is that there's no defined order between a symbol
11015 and an mapping symbol that may be at the same address. We may have to
11016 look at least one position ahead. */
11017 for (; n < info->symtab_size; n++)
11019 addr = bfd_asymbol_value (info->symtab[n]);
11022 if (get_map_sym_type (info, n, &type))
11031 n = info->symtab_pos;
11032 if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
11033 n = private_data->last_mapping_sym;
11035 /* No mapping symbol found at this address. Look backwards
11036 for a preceeding one, but don't go pass the section start
11037 otherwise a data section with no mapping symbol can pick up
11038 a text mapping symbol of a preceeding section. The documentation
11039 says section can be NULL, in which case we will seek up all the
11042 section_vma = info->section->vma;
11044 for (; n >= 0; n--)
11046 addr = bfd_asymbol_value (info->symtab[n]);
11047 if (addr < section_vma)
11050 if (get_map_sym_type (info, n, &type))
11060 /* If no mapping symbol was found, try looking up without a mapping
11061 symbol. This is done by walking up from the current PC to the nearest
11062 symbol. We don't actually have to loop here since symtab_pos will
11063 contain the nearest symbol already. */
11066 n = info->symtab_pos;
11067 if (n >= 0 && get_sym_code_type (info, n, &type))
11074 private_data->last_mapping_sym = last_sym;
11075 private_data->last_type = type;
11076 private_data->last_stop_offset = info->stop_offset;
11078 *map_symbol = type;
11082 /* Given a bfd_mach_arm_XXX value, this function fills in the fields
11083 of the supplied arm_feature_set structure with bitmasks indicating
11084 the supported base architectures and coprocessor extensions.
11086 FIXME: This could more efficiently implemented as a constant array,
11087 although it would also be less robust. */
11090 select_arm_features (unsigned long mach,
11091 arm_feature_set * features)
11093 arm_feature_set arch_fset;
11094 const arm_feature_set fpu_any = FPU_ANY;
11096 #undef ARM_SET_FEATURES
11097 #define ARM_SET_FEATURES(FSET) \
11099 const arm_feature_set fset = FSET; \
11100 arch_fset = fset; \
11103 /* When several architecture versions share the same bfd_mach_arm_XXX value
11104 the most featureful is chosen. */
11107 case bfd_mach_arm_2: ARM_SET_FEATURES (ARM_ARCH_V2); break;
11108 case bfd_mach_arm_2a: ARM_SET_FEATURES (ARM_ARCH_V2S); break;
11109 case bfd_mach_arm_3: ARM_SET_FEATURES (ARM_ARCH_V3); break;
11110 case bfd_mach_arm_3M: ARM_SET_FEATURES (ARM_ARCH_V3M); break;
11111 case bfd_mach_arm_4: ARM_SET_FEATURES (ARM_ARCH_V4); break;
11112 case bfd_mach_arm_4T: ARM_SET_FEATURES (ARM_ARCH_V4T); break;
11113 case bfd_mach_arm_5: ARM_SET_FEATURES (ARM_ARCH_V5); break;
11114 case bfd_mach_arm_5T: ARM_SET_FEATURES (ARM_ARCH_V5T); break;
11115 case bfd_mach_arm_5TE: ARM_SET_FEATURES (ARM_ARCH_V5TE); break;
11116 case bfd_mach_arm_XScale: ARM_SET_FEATURES (ARM_ARCH_XSCALE); break;
11117 case bfd_mach_arm_ep9312:
11118 ARM_SET_FEATURES (ARM_FEATURE_LOW (ARM_AEXT_V4T,
11119 ARM_CEXT_MAVERICK | FPU_MAVERICK));
11121 case bfd_mach_arm_iWMMXt: ARM_SET_FEATURES (ARM_ARCH_IWMMXT); break;
11122 case bfd_mach_arm_iWMMXt2: ARM_SET_FEATURES (ARM_ARCH_IWMMXT2); break;
11123 case bfd_mach_arm_5TEJ: ARM_SET_FEATURES (ARM_ARCH_V5TEJ); break;
11124 case bfd_mach_arm_6: ARM_SET_FEATURES (ARM_ARCH_V6); break;
11125 case bfd_mach_arm_6KZ: ARM_SET_FEATURES (ARM_ARCH_V6KZ); break;
11126 case bfd_mach_arm_6T2: ARM_SET_FEATURES (ARM_ARCH_V6KZT2); break;
11127 case bfd_mach_arm_6K: ARM_SET_FEATURES (ARM_ARCH_V6K); break;
11128 case bfd_mach_arm_7: ARM_SET_FEATURES (ARM_ARCH_V7VE); break;
11129 case bfd_mach_arm_6M: ARM_SET_FEATURES (ARM_ARCH_V6M); break;
11130 case bfd_mach_arm_6SM: ARM_SET_FEATURES (ARM_ARCH_V6SM); break;
11131 case bfd_mach_arm_7EM: ARM_SET_FEATURES (ARM_ARCH_V7EM); break;
11132 case bfd_mach_arm_8:
11134 /* Add bits for extensions that Armv8.5-A recognizes. */
11135 arm_feature_set armv8_5_ext_fset
11136 = ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST);
11137 ARM_SET_FEATURES (ARM_ARCH_V8_5A);
11138 ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, armv8_5_ext_fset);
11141 case bfd_mach_arm_8R: ARM_SET_FEATURES (ARM_ARCH_V8R); break;
11142 case bfd_mach_arm_8M_BASE: ARM_SET_FEATURES (ARM_ARCH_V8M_BASE); break;
11143 case bfd_mach_arm_8M_MAIN: ARM_SET_FEATURES (ARM_ARCH_V8M_MAIN); break;
11144 case bfd_mach_arm_8_1M_MAIN:
11145 ARM_SET_FEATURES (ARM_ARCH_V8_1M_MAIN);
11148 /* If the machine type is unknown allow all architecture types and all
11150 case bfd_mach_arm_unknown: ARM_SET_FEATURES (ARM_FEATURE_ALL); break;
11154 #undef ARM_SET_FEATURES
11156 /* None of the feature bits related to -mfpu have an impact on Tag_CPU_arch
11157 and thus on bfd_mach_arm_XXX value. Therefore for a given
11158 bfd_mach_arm_XXX value all coprocessor feature bits should be allowed. */
11159 ARM_MERGE_FEATURE_SETS (*features, arch_fset, fpu_any);
11163 /* NOTE: There are no checks in these routines that
11164 the relevant number of data bytes exist. */
11167 print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
11169 unsigned char b[4];
11172 int is_thumb = FALSE;
11173 int is_data = FALSE;
11175 unsigned int size = 4;
11176 void (*printer) (bfd_vma, struct disassemble_info *, long);
11177 bfd_boolean found = FALSE;
11178 struct arm_private_data *private_data;
11180 if (info->disassembler_options)
11182 parse_arm_disassembler_options (info->disassembler_options);
11184 /* To avoid repeated parsing of these options, we remove them here. */
11185 info->disassembler_options = NULL;
11188 /* PR 10288: Control which instructions will be disassembled. */
11189 if (info->private_data == NULL)
11191 static struct arm_private_data private;
11193 if ((info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
11194 /* If the user did not use the -m command line switch then default to
11195 disassembling all types of ARM instruction.
11197 The info->mach value has to be ignored as this will be based on
11198 the default archictecture for the target and/or hints in the notes
11199 section, but it will never be greater than the current largest arm
11200 machine value (iWMMXt2), which is only equivalent to the V5TE
11201 architecture. ARM architectures have advanced beyond the machine
11202 value encoding, and these newer architectures would be ignored if
11203 the machine value was used.
11205 Ie the -m switch is used to restrict which instructions will be
11206 disassembled. If it is necessary to use the -m switch to tell
11207 objdump that an ARM binary is being disassembled, eg because the
11208 input is a raw binary file, but it is also desired to disassemble
11209 all ARM instructions then use "-marm". This will select the
11210 "unknown" arm architecture which is compatible with any ARM
11212 info->mach = bfd_mach_arm_unknown;
11214 /* Compute the architecture bitmask from the machine number.
11215 Note: This assumes that the machine number will not change
11216 during disassembly.... */
11217 select_arm_features (info->mach, & private.features);
11219 private.last_mapping_sym = -1;
11220 private.last_mapping_addr = 0;
11221 private.last_stop_offset = 0;
11223 info->private_data = & private;
11226 private_data = info->private_data;
11228 /* Decide if our code is going to be little-endian, despite what the
11229 function argument might say. */
11230 little_code = ((info->endian_code == BFD_ENDIAN_LITTLE) || little);
11232 /* For ELF, consult the symbol table to determine what kind of code
11233 or data we have. */
11234 if (info->symtab_size != 0
11235 && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
11240 enum map_type type = MAP_ARM;
11242 found = mapping_symbol_for_insn (pc, info, &type);
11243 last_sym = private_data->last_mapping_sym;
11245 is_thumb = (private_data->last_type == MAP_THUMB);
11246 is_data = (private_data->last_type == MAP_DATA);
11248 /* Look a little bit ahead to see if we should print out
11249 two or four bytes of data. If there's a symbol,
11250 mapping or otherwise, after two bytes then don't
11254 size = 4 - (pc & 3);
11255 for (n = last_sym + 1; n < info->symtab_size; n++)
11257 addr = bfd_asymbol_value (info->symtab[n]);
11259 && (info->section == NULL
11260 || info->section == info->symtab[n]->section))
11262 if (addr - pc < size)
11267 /* If the next symbol is after three bytes, we need to
11268 print only part of the data, so that we can use either
11269 .byte or .short. */
11271 size = (pc & 1) ? 1 : 2;
11275 if (info->symbols != NULL)
11277 if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
11279 coff_symbol_type * cs;
11281 cs = coffsymbol (*info->symbols);
11282 is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT
11283 || cs->native->u.syment.n_sclass == C_THUMBSTAT
11284 || cs->native->u.syment.n_sclass == C_THUMBLABEL
11285 || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
11286 || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
11288 else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
11291 /* If no mapping symbol has been found then fall back to the type
11292 of the function symbol. */
11293 elf_symbol_type * es;
11296 es = *(elf_symbol_type **)(info->symbols);
11297 type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
11300 ((ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
11301 == ST_BRANCH_TO_THUMB) || type == STT_ARM_16BIT);
11303 else if (bfd_asymbol_flavour (*info->symbols)
11304 == bfd_target_mach_o_flavour)
11306 bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols;
11308 is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF);
11316 info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
11318 info->display_endian = little_code ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
11320 info->bytes_per_line = 4;
11322 /* PR 10263: Disassemble data if requested to do so by the user. */
11323 if (is_data && ((info->flags & DISASSEMBLE_DATA) == 0))
11327 /* Size was already set above. */
11328 info->bytes_per_chunk = size;
11329 printer = print_insn_data;
11331 status = info->read_memory_func (pc, (bfd_byte *) b, size, info);
11334 for (i = size - 1; i >= 0; i--)
11335 given = b[i] | (given << 8);
11337 for (i = 0; i < (int) size; i++)
11338 given = b[i] | (given << 8);
11340 else if (!is_thumb)
11342 /* In ARM mode endianness is a straightforward issue: the instruction
11343 is four bytes long and is either ordered 0123 or 3210. */
11344 printer = print_insn_arm;
11345 info->bytes_per_chunk = 4;
11348 status = info->read_memory_func (pc, (bfd_byte *) b, 4, info);
11350 given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
11352 given = (b[3]) | (b[2] << 8) | (b[1] << 16) | (b[0] << 24);
11356 /* In Thumb mode we have the additional wrinkle of two
11357 instruction lengths. Fortunately, the bits that determine
11358 the length of the current instruction are always to be found
11359 in the first two bytes. */
11360 printer = print_insn_thumb16;
11361 info->bytes_per_chunk = 2;
11364 status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
11366 given = (b[0]) | (b[1] << 8);
11368 given = (b[1]) | (b[0] << 8);
11372 /* These bit patterns signal a four-byte Thumb
11374 if ((given & 0xF800) == 0xF800
11375 || (given & 0xF800) == 0xF000
11376 || (given & 0xF800) == 0xE800)
11378 status = info->read_memory_func (pc + 2, (bfd_byte *) b, 2, info);
11380 given = (b[0]) | (b[1] << 8) | (given << 16);
11382 given = (b[1]) | (b[0] << 8) | (given << 16);
11384 printer = print_insn_thumb32;
11389 if (ifthen_address != pc)
11390 find_ifthen_state (pc, info, little_code);
11394 if ((ifthen_state & 0xf) == 0x8)
11395 ifthen_next_state = 0;
11397 ifthen_next_state = (ifthen_state & 0xe0)
11398 | ((ifthen_state & 0xf) << 1);
11404 info->memory_error_func (status, pc, info);
11407 if (info->flags & INSN_HAS_RELOC)
11408 /* If the instruction has a reloc associated with it, then
11409 the offset field in the instruction will actually be the
11410 addend for the reloc. (We are using REL type relocs).
11411 In such cases, we can ignore the pc when computing
11412 addresses, since the addend is not currently pc-relative. */
11415 printer (pc, info, given);
11419 ifthen_state = ifthen_next_state;
11420 ifthen_address += size;
11426 print_insn_big_arm (bfd_vma pc, struct disassemble_info *info)
11428 /* Detect BE8-ness and record it in the disassembler info. */
11429 if (info->flavour == bfd_target_elf_flavour
11430 && info->section != NULL
11431 && (elf_elfheader (info->section->owner)->e_flags & EF_ARM_BE8))
11432 info->endian_code = BFD_ENDIAN_LITTLE;
11434 return print_insn (pc, info, FALSE);
11438 print_insn_little_arm (bfd_vma pc, struct disassemble_info *info)
11440 return print_insn (pc, info, TRUE);
11443 const disasm_options_and_args_t *
11444 disassembler_options_arm (void)
11446 static disasm_options_and_args_t *opts_and_args;
11448 if (opts_and_args == NULL)
11450 disasm_options_t *opts;
11453 opts_and_args = XNEW (disasm_options_and_args_t);
11454 opts_and_args->args = NULL;
11456 opts = &opts_and_args->options;
11457 opts->name = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
11458 opts->description = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
11460 for (i = 0; i < NUM_ARM_OPTIONS; i++)
11462 opts->name[i] = regnames[i].name;
11463 if (regnames[i].description != NULL)
11464 opts->description[i] = _(regnames[i].description);
11466 opts->description[i] = NULL;
11468 /* The array we return must be NULL terminated. */
11469 opts->name[i] = NULL;
11470 opts->description[i] = NULL;
11473 return opts_and_args;
11477 print_arm_disassembler_options (FILE *stream)
11479 unsigned int i, max_len = 0;
11480 fprintf (stream, _("\n\
11481 The following ARM specific disassembler options are supported for use with\n\
11482 the -M switch:\n"));
11484 for (i = 0; i < NUM_ARM_OPTIONS; i++)
11486 unsigned int len = strlen (regnames[i].name);
11491 for (i = 0, max_len++; i < NUM_ARM_OPTIONS; i++)
11492 fprintf (stream, " %s%*c %s\n",
11494 (int)(max_len - strlen (regnames[i].name)), ' ',
11495 _(regnames[i].description));