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,
270 enum mve_unpredictable
272 UNPRED_IT_BLOCK, /* Unpredictable because mve insn in it block.
274 UNPRED_FCA_0_FCB_1, /* Unpredictable because fcA = 0 and
276 UNPRED_R13, /* Unpredictable because r13 (sp) or
278 UNPRED_R15, /* Unpredictable because r15 (pc) is used. */
279 UNPRED_Q_GT_4, /* Unpredictable because
280 vec reg start > 4 (vld4/st4). */
281 UNPRED_Q_GT_6, /* Unpredictable because
282 vec reg start > 6 (vld2/st2). */
283 UNPRED_R13_AND_WB, /* Unpredictable becase gp reg = r13
285 UNPRED_Q_REGS_EQUAL, /* Unpredictable because vector registers are
287 UNPRED_OS, /* Unpredictable because offset scaled == 1. */
288 UNPRED_GP_REGS_EQUAL, /* Unpredictable because gp registers are the
290 UNPRED_Q_REGS_EQ_AND_SIZE_1, /* Unpredictable because q regs equal and
292 UNPRED_Q_REGS_EQ_AND_SIZE_2, /* Unpredictable because q regs equal and
294 UNPRED_NONE /* No unpredictable behavior. */
299 UNDEF_SIZE, /* undefined size. */
300 UNDEF_SIZE_0, /* undefined because size == 0. */
301 UNDEF_SIZE_2, /* undefined because size == 2. */
302 UNDEF_SIZE_3, /* undefined because size == 3. */
303 UNDEF_SIZE_LE_1, /* undefined because size <= 1. */
304 UNDEF_SIZE_NOT_0, /* undefined because size != 0. */
305 UNDEF_SIZE_NOT_2, /* undefined because size != 2. */
306 UNDEF_SIZE_NOT_3, /* undefined because size != 3. */
307 UNDEF_NOT_UNS_SIZE_0, /* undefined because U == 0 and
309 UNDEF_NOT_UNS_SIZE_1, /* undefined because U == 0 and
311 UNDEF_NOT_UNSIGNED, /* undefined because U == 0. */
312 UNDEF_VCVT_IMM6, /* imm6 < 32. */
313 UNDEF_VCVT_FSI_IMM6, /* fsi = 0 and 32 >= imm6 <= 47. */
314 UNDEF_BAD_OP1_OP2, /* undefined with op2 = 2 and
316 UNDEF_BAD_U_OP1_OP2, /* undefined with U = 1 and
317 op2 == 0 and op1 == (0 or 1). */
318 UNDEF_OP_0_BAD_CMODE, /* undefined because op == 0 and cmode
320 UNDEF_XCHG_UNS, /* undefined because X == 1 and U == 1. */
321 UNDEF_NONE /* no undefined behavior. */
326 arm_feature_set arch; /* Architecture defining this insn. */
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. */
336 arm_feature_set arch; /* Architecture defining this insn. */
337 enum mve_instructions mve_op; /* Specific mve instruction for faster
339 unsigned long value; /* If arch is 0 then value is a sentinel. */
340 unsigned long mask; /* Recognise insn if (op & mask) == value. */
341 const char * assembler; /* How to disassemble this insn. */
351 /* Shared (between Arm and Thumb mode) opcode. */
354 enum isa isa; /* Execution mode instruction availability. */
355 arm_feature_set arch; /* Architecture defining this insn. */
356 unsigned long value; /* If arch is 0 then value is a sentinel. */
357 unsigned long mask; /* Recognise insn if (op & mask) == value. */
358 const char * assembler; /* How to disassemble this insn. */
363 arm_feature_set arch; /* Architecture defining this insn. */
364 unsigned short value, mask; /* Recognise insn if (op & mask) == value. */
365 const char *assembler; /* How to disassemble this insn. */
368 /* print_insn_coprocessor recognizes the following format control codes:
372 %c print condition code (always bits 28-31 in ARM mode)
373 %q print shifter argument
374 %u print condition code (unconditional in ARM mode,
375 UNPREDICTABLE if not AL in Thumb)
376 %A print address for ldc/stc/ldf/stf instruction
377 %B print vstm/vldm register list
378 %C print vscclrm register list
379 %I print cirrus signed shift immediate: bits 0..3|4..6
380 %J print register for VLDR instruction
381 %K print address for VLDR instruction
382 %F print the COUNT field of a LFM/SFM instruction.
383 %P print floating point precision in arithmetic insn
384 %Q print floating point precision in ldf/stf insn
385 %R print floating point rounding mode
387 %<bitfield>c print as a condition code (for vsel)
388 %<bitfield>r print as an ARM register
389 %<bitfield>R as %<>r but r15 is UNPREDICTABLE
390 %<bitfield>ru as %<>r but each u register must be unique.
391 %<bitfield>d print the bitfield in decimal
392 %<bitfield>k print immediate for VFPv3 conversion instruction
393 %<bitfield>x print the bitfield in hex
394 %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
395 %<bitfield>f print a floating point constant if >7 else a
396 floating point register
397 %<bitfield>w print as an iWMMXt width field - [bhwd]ss/us
398 %<bitfield>g print as an iWMMXt 64-bit register
399 %<bitfield>G print as an iWMMXt general purpose or control register
400 %<bitfield>D print as a NEON D register
401 %<bitfield>Q print as a NEON Q register
402 %<bitfield>V print as a NEON D or Q register
403 %<bitfield>E print a quarter-float immediate value
405 %y<code> print a single precision VFP reg.
406 Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
407 %z<code> print a double precision VFP reg
408 Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
410 %<bitfield>'c print specified char iff bitfield is all ones
411 %<bitfield>`c print specified char iff bitfield is all zeroes
412 %<bitfield>?ab... select from array of values in big endian order
414 %L print as an iWMMXt N/M width field.
415 %Z print the Immediate of a WSHUFH instruction.
416 %l like 'A' except use byte offsets for 'B' & 'H'
418 %i print 5-bit immediate in bits 8,3..0
420 %r print register offset address for wldt/wstr instruction. */
422 enum opcode_sentinel_enum
424 SENTINEL_IWMMXT_START = 1,
426 SENTINEL_GENERIC_START
429 #define UNDEFINED_INSTRUCTION "\t\t; <UNDEFINED> instruction: %0-31x"
430 #define UNKNOWN_INSTRUCTION_32BIT "\t\t; <UNDEFINED> instruction: %08x"
431 #define UNKNOWN_INSTRUCTION_16BIT "\t\t; <UNDEFINED> instruction: %04x"
432 #define UNPREDICTABLE_INSTRUCTION "\t; <UNPREDICTABLE>"
434 /* Common coprocessor opcodes shared between Arm and Thumb-2. */
436 static const struct sopcode32 coprocessor_opcodes[] =
438 /* XScale instructions. */
439 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
440 0x0e200010, 0x0fff0ff0,
441 "mia%c\tacc0, %0-3r, %12-15r"},
442 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
443 0x0e280010, 0x0fff0ff0,
444 "miaph%c\tacc0, %0-3r, %12-15r"},
445 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
446 0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\tacc0, %0-3r, %12-15r"},
447 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
448 0x0c400000, 0x0ff00fff, "mar%c\tacc0, %12-15r, %16-19r"},
449 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
450 0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, acc0"},
452 /* Intel Wireless MMX technology instructions. */
453 {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_IWMMXT_START, 0, "" },
454 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_IWMMXT),
455 0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
456 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
457 0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
458 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
459 0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, #%0-2d"},
460 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
461 0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, #%0-2d"},
462 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
463 0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, #%0-2d"},
464 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
465 0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
466 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
467 0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
468 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
469 0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
470 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
471 0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
472 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
473 0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
474 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
475 0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
476 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
477 0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
478 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
479 0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
480 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
481 0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
482 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
483 0x0e120190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
484 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
485 0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
486 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
487 0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
488 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
489 0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
490 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
491 0x0e2001a0, 0x0fb00ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
492 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
493 0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
494 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
495 0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, #%20-22d"},
496 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
497 0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
498 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
499 0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
500 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
501 0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
502 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
503 0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
504 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
505 0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
506 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
507 0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
508 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
509 0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
510 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
511 0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
512 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
513 0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
514 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
515 0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
516 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
517 0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
518 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
519 0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
520 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
521 0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
522 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
523 0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, #%21-23d"},
524 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
525 0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
526 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
527 0x0e800120, 0x0f800ff0,
528 "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
529 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
530 0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
531 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
532 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
533 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
534 0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
535 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
536 0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
537 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
538 0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
539 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
540 0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
541 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
542 0x0e8000a0, 0x0f800ff0,
543 "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
544 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
545 0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
546 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
547 0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
548 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
549 0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
550 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
551 0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
552 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
553 0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, #%i"},
554 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
555 0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
556 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
557 0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
558 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
559 0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
560 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
561 0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, #%Z"},
562 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
563 0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, #%i"},
564 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
565 0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
566 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
567 0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
568 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
569 0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, #%i"},
570 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
571 0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
572 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
573 0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
574 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
575 0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, #%i"},
576 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
577 0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
578 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
579 0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
580 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
581 0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
582 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
583 0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
584 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
585 0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
586 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
587 0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
588 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
589 0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
590 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
591 0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
592 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
593 0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
594 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
595 0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
596 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
597 0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
598 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
599 0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
600 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
601 0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
602 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
603 0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
604 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
605 0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
606 {ANY, ARM_FEATURE_CORE_LOW (0),
607 SENTINEL_IWMMXT_END, 0, "" },
609 /* Floating point coprocessor (FPA) instructions. */
610 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
611 0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
612 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
613 0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
614 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
615 0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
616 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
617 0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
618 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
619 0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
620 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
621 0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
622 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
623 0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
624 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
625 0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
626 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
627 0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
628 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
629 0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
630 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
631 0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
632 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
633 0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
634 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
635 0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
636 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
637 0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
638 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
639 0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
640 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
641 0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
642 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
643 0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
644 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
645 0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
646 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
647 0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
648 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
649 0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
650 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
651 0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
652 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
653 0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
654 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
655 0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
656 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
657 0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
658 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
659 0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
660 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
661 0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
662 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
663 0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
664 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
665 0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
666 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
667 0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
668 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
669 0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
670 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
671 0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
672 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
673 0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
674 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
675 0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
676 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
677 0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
678 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
679 0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
680 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
681 0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
682 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
683 0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
684 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
685 0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
686 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
687 0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
688 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
689 0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
690 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
691 0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
692 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
693 0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
694 {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
695 0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
697 /* Armv8.1-M Mainline instructions. */
698 {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
699 0xec9f0b00, 0xffbf0f01, "vscclrm%c\t%C"},
700 {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
701 0xec9f0a00, 0xffbf0f00, "vscclrm%c\t%C"},
703 /* ARMv8-M Mainline Security Extensions instructions. */
704 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
705 0xec300a00, 0xfff0ffff, "vlldm\t%16-19r"},
706 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
707 0xec200a00, 0xfff0ffff, "vlstm\t%16-19r"},
709 /* Register load/store. */
710 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
711 0x0d2d0b00, 0x0fbf0f01, "vpush%c\t%B"},
712 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
713 0x0d200b00, 0x0fb00f01, "vstmdb%c\t%16-19r!, %B"},
714 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
715 0x0d300b00, 0x0fb00f01, "vldmdb%c\t%16-19r!, %B"},
716 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
717 0x0c800b00, 0x0f900f01, "vstmia%c\t%16-19r%21'!, %B"},
718 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
719 0x0cbd0b00, 0x0fbf0f01, "vpop%c\t%B"},
720 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
721 0x0c900b00, 0x0f900f01, "vldmia%c\t%16-19r%21'!, %B"},
722 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
723 0x0d000b00, 0x0f300f00, "vstr%c\t%12-15,22D, %A"},
724 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
725 0x0d100b00, 0x0f300f00, "vldr%c\t%12-15,22D, %A"},
726 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
727 0x0d2d0a00, 0x0fbf0f00, "vpush%c\t%y3"},
728 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
729 0x0d200a00, 0x0fb00f00, "vstmdb%c\t%16-19r!, %y3"},
730 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
731 0x0d300a00, 0x0fb00f00, "vldmdb%c\t%16-19r!, %y3"},
732 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
733 0x0c800a00, 0x0f900f00, "vstmia%c\t%16-19r%21'!, %y3"},
734 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
735 0x0cbd0a00, 0x0fbf0f00, "vpop%c\t%y3"},
736 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
737 0x0c900a00, 0x0f900f00, "vldmia%c\t%16-19r%21'!, %y3"},
738 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
739 0x0d000a00, 0x0f300f00, "vstr%c\t%y1, %A"},
740 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
741 0x0d100a00, 0x0f300f00, "vldr%c\t%y1, %A"},
742 {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
743 0xec100f80, 0xfe101f80, "vldr%c\t%J, %K"},
744 {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
745 0xec000f80, 0xfe101f80, "vstr%c\t%J, %K"},
747 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
748 0x0d200b01, 0x0fb00f01, "fstmdbx%c\t%16-19r!, %z3\t;@ Deprecated"},
749 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
750 0x0d300b01, 0x0fb00f01, "fldmdbx%c\t%16-19r!, %z3\t;@ Deprecated"},
751 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
752 0x0c800b01, 0x0f900f01, "fstmiax%c\t%16-19r%21'!, %z3\t;@ Deprecated"},
753 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
754 0x0c900b01, 0x0f900f01, "fldmiax%c\t%16-19r%21'!, %z3\t;@ Deprecated"},
756 /* Data transfer between ARM and NEON registers. */
757 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
758 0x0c400b10, 0x0ff00fd0, "vmov%c\t%0-3,5D, %12-15r, %16-19r"},
759 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
760 0x0c500b10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %0-3,5D"},
761 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
762 0x0e000b10, 0x0fd00f70, "vmov%c.32\t%16-19,7D[%21d], %12-15r"},
763 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
764 0x0e100b10, 0x0f500f70, "vmov%c.32\t%12-15r, %16-19,7D[%21d]"},
765 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
766 0x0e000b30, 0x0fd00f30, "vmov%c.16\t%16-19,7D[%6,21d], %12-15r"},
767 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
768 0x0e100b30, 0x0f500f30, "vmov%c.%23?us16\t%12-15r, %16-19,7D[%6,21d]"},
769 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
770 0x0e400b10, 0x0fd00f10, "vmov%c.8\t%16-19,7D[%5,6,21d], %12-15r"},
771 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
772 0x0e500b10, 0x0f500f10, "vmov%c.%23?us8\t%12-15r, %16-19,7D[%5,6,21d]"},
773 /* Half-precision conversion instructions. */
774 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
775 0x0eb20b40, 0x0fbf0f50, "vcvt%7?tb%c.f64.f16\t%z1, %y0"},
776 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
777 0x0eb30b40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f64\t%y1, %z0"},
778 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
779 0x0eb20a40, 0x0fbf0f50, "vcvt%7?tb%c.f32.f16\t%y1, %y0"},
780 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
781 0x0eb30a40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f32\t%y1, %y0"},
783 /* Floating point coprocessor (VFP) instructions. */
784 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
785 0x0ee00a10, 0x0fff0fff, "vmsr%c\tfpsid, %12-15r"},
786 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
787 0x0ee10a10, 0x0fff0fff, "vmsr%c\tfpscr, %12-15r"},
788 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
789 0x0ee60a10, 0x0fff0fff, "vmsr%c\tmvfr1, %12-15r"},
790 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
791 0x0ee70a10, 0x0fff0fff, "vmsr%c\tmvfr0, %12-15r"},
792 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
793 0x0ee50a10, 0x0fff0fff, "vmsr%c\tmvfr2, %12-15r"},
794 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
795 0x0ee80a10, 0x0fff0fff, "vmsr%c\tfpexc, %12-15r"},
796 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
797 0x0ee90a10, 0x0fff0fff, "vmsr%c\tfpinst, %12-15r\t@ Impl def"},
798 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
799 0x0eea0a10, 0x0fff0fff, "vmsr%c\tfpinst2, %12-15r\t@ Impl def"},
800 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
801 0x0ef00a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpsid"},
802 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
803 0x0ef1fa10, 0x0fffffff, "vmrs%c\tAPSR_nzcv, fpscr"},
804 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
805 0x0ef10a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpscr"},
806 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
807 0x0ef50a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr2"},
808 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
809 0x0ef60a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr1"},
810 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
811 0x0ef70a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr0"},
812 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
813 0x0ef80a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpexc"},
814 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
815 0x0ef90a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpinst\t@ Impl def"},
816 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
817 0x0efa0a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpinst2\t@ Impl def"},
818 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
819 0x0e000b10, 0x0fd00fff, "vmov%c.32\t%z2[%21d], %12-15r"},
820 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
821 0x0e100b10, 0x0fd00fff, "vmov%c.32\t%12-15r, %z2[%21d]"},
822 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
823 0x0ee00a10, 0x0ff00fff, "vmsr%c\t<impl def %16-19x>, %12-15r"},
824 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
825 0x0ef00a10, 0x0ff00fff, "vmrs%c\t%12-15r, <impl def %16-19x>"},
826 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
827 0x0e000a10, 0x0ff00f7f, "vmov%c\t%y2, %12-15r"},
828 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
829 0x0e100a10, 0x0ff00f7f, "vmov%c\t%12-15r, %y2"},
830 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
831 0x0eb50a40, 0x0fbf0f70, "vcmp%7'e%c.f32\t%y1, #0.0"},
832 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
833 0x0eb50b40, 0x0fbf0f70, "vcmp%7'e%c.f64\t%z1, #0.0"},
834 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
835 0x0eb00a40, 0x0fbf0fd0, "vmov%c.f32\t%y1, %y0"},
836 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
837 0x0eb00ac0, 0x0fbf0fd0, "vabs%c.f32\t%y1, %y0"},
838 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
839 0x0eb00b40, 0x0fbf0fd0, "vmov%c.f64\t%z1, %z0"},
840 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
841 0x0eb00bc0, 0x0fbf0fd0, "vabs%c.f64\t%z1, %z0"},
842 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
843 0x0eb10a40, 0x0fbf0fd0, "vneg%c.f32\t%y1, %y0"},
844 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
845 0x0eb10ac0, 0x0fbf0fd0, "vsqrt%c.f32\t%y1, %y0"},
846 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
847 0x0eb10b40, 0x0fbf0fd0, "vneg%c.f64\t%z1, %z0"},
848 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
849 0x0eb10bc0, 0x0fbf0fd0, "vsqrt%c.f64\t%z1, %z0"},
850 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
851 0x0eb70ac0, 0x0fbf0fd0, "vcvt%c.f64.f32\t%z1, %y0"},
852 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
853 0x0eb70bc0, 0x0fbf0fd0, "vcvt%c.f32.f64\t%y1, %z0"},
854 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
855 0x0eb80a40, 0x0fbf0f50, "vcvt%c.f32.%7?su32\t%y1, %y0"},
856 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
857 0x0eb80b40, 0x0fbf0f50, "vcvt%c.f64.%7?su32\t%z1, %y0"},
858 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
859 0x0eb40a40, 0x0fbf0f50, "vcmp%7'e%c.f32\t%y1, %y0"},
860 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
861 0x0eb40b40, 0x0fbf0f50, "vcmp%7'e%c.f64\t%z1, %z0"},
862 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
863 0x0eba0a40, 0x0fbe0f50, "vcvt%c.f32.%16?us%7?31%7?26\t%y1, %y1, #%5,0-3k"},
864 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
865 0x0eba0b40, 0x0fbe0f50, "vcvt%c.f64.%16?us%7?31%7?26\t%z1, %z1, #%5,0-3k"},
866 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
867 0x0ebc0a40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f32\t%y1, %y0"},
868 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
869 0x0ebc0b40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f64\t%y1, %z0"},
870 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
871 0x0ebe0a40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f32\t%y1, %y1, #%5,0-3k"},
872 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
873 0x0ebe0b40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f64\t%z1, %z1, #%5,0-3k"},
874 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
875 0x0c500b10, 0x0fb00ff0, "vmov%c\t%12-15r, %16-19r, %z0"},
876 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
877 0x0eb00a00, 0x0fb00ff0, "vmov%c.f32\t%y1, #%0-3,16-19E"},
878 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
879 0x0eb00b00, 0x0fb00ff0, "vmov%c.f64\t%z1, #%0-3,16-19E"},
880 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
881 0x0c400a10, 0x0ff00fd0, "vmov%c\t%y4, %12-15r, %16-19r"},
882 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
883 0x0c400b10, 0x0ff00fd0, "vmov%c\t%z0, %12-15r, %16-19r"},
884 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
885 0x0c500a10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %y4"},
886 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
887 0x0e000a00, 0x0fb00f50, "vmla%c.f32\t%y1, %y2, %y0"},
888 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
889 0x0e000a40, 0x0fb00f50, "vmls%c.f32\t%y1, %y2, %y0"},
890 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
891 0x0e000b00, 0x0fb00f50, "vmla%c.f64\t%z1, %z2, %z0"},
892 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
893 0x0e000b40, 0x0fb00f50, "vmls%c.f64\t%z1, %z2, %z0"},
894 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
895 0x0e100a00, 0x0fb00f50, "vnmls%c.f32\t%y1, %y2, %y0"},
896 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
897 0x0e100a40, 0x0fb00f50, "vnmla%c.f32\t%y1, %y2, %y0"},
898 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
899 0x0e100b00, 0x0fb00f50, "vnmls%c.f64\t%z1, %z2, %z0"},
900 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
901 0x0e100b40, 0x0fb00f50, "vnmla%c.f64\t%z1, %z2, %z0"},
902 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
903 0x0e200a00, 0x0fb00f50, "vmul%c.f32\t%y1, %y2, %y0"},
904 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
905 0x0e200a40, 0x0fb00f50, "vnmul%c.f32\t%y1, %y2, %y0"},
906 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
907 0x0e200b00, 0x0fb00f50, "vmul%c.f64\t%z1, %z2, %z0"},
908 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
909 0x0e200b40, 0x0fb00f50, "vnmul%c.f64\t%z1, %z2, %z0"},
910 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
911 0x0e300a00, 0x0fb00f50, "vadd%c.f32\t%y1, %y2, %y0"},
912 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
913 0x0e300a40, 0x0fb00f50, "vsub%c.f32\t%y1, %y2, %y0"},
914 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
915 0x0e300b00, 0x0fb00f50, "vadd%c.f64\t%z1, %z2, %z0"},
916 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
917 0x0e300b40, 0x0fb00f50, "vsub%c.f64\t%z1, %z2, %z0"},
918 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
919 0x0e800a00, 0x0fb00f50, "vdiv%c.f32\t%y1, %y2, %y0"},
920 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
921 0x0e800b00, 0x0fb00f50, "vdiv%c.f64\t%z1, %z2, %z0"},
923 /* Cirrus coprocessor instructions. */
924 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
925 0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
926 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
927 0x0c100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
928 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
929 0x0d500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
930 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
931 0x0c500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
932 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
933 0x0d100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
934 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
935 0x0c100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
936 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
937 0x0d500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
938 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
939 0x0c500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
940 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
941 0x0d000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
942 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
943 0x0c000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
944 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
945 0x0d400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
946 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
947 0x0c400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
948 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
949 0x0d000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
950 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
951 0x0c000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
952 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
953 0x0d400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
954 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
955 0x0c400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
956 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
957 0x0e000450, 0x0ff00ff0, "cfmvsr%c\tmvf%16-19d, %12-15r"},
958 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
959 0x0e100450, 0x0ff00ff0, "cfmvrs%c\t%12-15r, mvf%16-19d"},
960 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
961 0x0e000410, 0x0ff00ff0, "cfmvdlr%c\tmvd%16-19d, %12-15r"},
962 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
963 0x0e100410, 0x0ff00ff0, "cfmvrdl%c\t%12-15r, mvd%16-19d"},
964 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
965 0x0e000430, 0x0ff00ff0, "cfmvdhr%c\tmvd%16-19d, %12-15r"},
966 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
967 0x0e100430, 0x0ff00fff, "cfmvrdh%c\t%12-15r, mvd%16-19d"},
968 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
969 0x0e000510, 0x0ff00fff, "cfmv64lr%c\tmvdx%16-19d, %12-15r"},
970 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
971 0x0e100510, 0x0ff00fff, "cfmvr64l%c\t%12-15r, mvdx%16-19d"},
972 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
973 0x0e000530, 0x0ff00fff, "cfmv64hr%c\tmvdx%16-19d, %12-15r"},
974 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
975 0x0e100530, 0x0ff00fff, "cfmvr64h%c\t%12-15r, mvdx%16-19d"},
976 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
977 0x0e200440, 0x0ff00fff, "cfmval32%c\tmvax%12-15d, mvfx%16-19d"},
978 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
979 0x0e100440, 0x0ff00fff, "cfmv32al%c\tmvfx%12-15d, mvax%16-19d"},
980 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
981 0x0e200460, 0x0ff00fff, "cfmvam32%c\tmvax%12-15d, mvfx%16-19d"},
982 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
983 0x0e100460, 0x0ff00fff, "cfmv32am%c\tmvfx%12-15d, mvax%16-19d"},
984 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
985 0x0e200480, 0x0ff00fff, "cfmvah32%c\tmvax%12-15d, mvfx%16-19d"},
986 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
987 0x0e100480, 0x0ff00fff, "cfmv32ah%c\tmvfx%12-15d, mvax%16-19d"},
988 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
989 0x0e2004a0, 0x0ff00fff, "cfmva32%c\tmvax%12-15d, mvfx%16-19d"},
990 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
991 0x0e1004a0, 0x0ff00fff, "cfmv32a%c\tmvfx%12-15d, mvax%16-19d"},
992 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
993 0x0e2004c0, 0x0ff00fff, "cfmva64%c\tmvax%12-15d, mvdx%16-19d"},
994 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
995 0x0e1004c0, 0x0ff00fff, "cfmv64a%c\tmvdx%12-15d, mvax%16-19d"},
996 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
997 0x0e2004e0, 0x0fff0fff, "cfmvsc32%c\tdspsc, mvdx%12-15d"},
998 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
999 0x0e1004e0, 0x0fff0fff, "cfmv32sc%c\tmvdx%12-15d, dspsc"},
1000 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1001 0x0e000400, 0x0ff00fff, "cfcpys%c\tmvf%12-15d, mvf%16-19d"},
1002 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1003 0x0e000420, 0x0ff00fff, "cfcpyd%c\tmvd%12-15d, mvd%16-19d"},
1004 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1005 0x0e000460, 0x0ff00fff, "cfcvtsd%c\tmvd%12-15d, mvf%16-19d"},
1006 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1007 0x0e000440, 0x0ff00fff, "cfcvtds%c\tmvf%12-15d, mvd%16-19d"},
1008 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1009 0x0e000480, 0x0ff00fff, "cfcvt32s%c\tmvf%12-15d, mvfx%16-19d"},
1010 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1011 0x0e0004a0, 0x0ff00fff, "cfcvt32d%c\tmvd%12-15d, mvfx%16-19d"},
1012 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1013 0x0e0004c0, 0x0ff00fff, "cfcvt64s%c\tmvf%12-15d, mvdx%16-19d"},
1014 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1015 0x0e0004e0, 0x0ff00fff, "cfcvt64d%c\tmvd%12-15d, mvdx%16-19d"},
1016 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1017 0x0e100580, 0x0ff00fff, "cfcvts32%c\tmvfx%12-15d, mvf%16-19d"},
1018 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1019 0x0e1005a0, 0x0ff00fff, "cfcvtd32%c\tmvfx%12-15d, mvd%16-19d"},
1020 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1021 0x0e1005c0, 0x0ff00fff, "cftruncs32%c\tmvfx%12-15d, mvf%16-19d"},
1022 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1023 0x0e1005e0, 0x0ff00fff, "cftruncd32%c\tmvfx%12-15d, mvd%16-19d"},
1024 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1025 0x0e000550, 0x0ff00ff0, "cfrshl32%c\tmvfx%16-19d, mvfx%0-3d, %12-15r"},
1026 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1027 0x0e000570, 0x0ff00ff0, "cfrshl64%c\tmvdx%16-19d, mvdx%0-3d, %12-15r"},
1028 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1029 0x0e000500, 0x0ff00f10, "cfsh32%c\tmvfx%12-15d, mvfx%16-19d, #%I"},
1030 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1031 0x0e200500, 0x0ff00f10, "cfsh64%c\tmvdx%12-15d, mvdx%16-19d, #%I"},
1032 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1033 0x0e100490, 0x0ff00ff0, "cfcmps%c\t%12-15r, mvf%16-19d, mvf%0-3d"},
1034 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1035 0x0e1004b0, 0x0ff00ff0, "cfcmpd%c\t%12-15r, mvd%16-19d, mvd%0-3d"},
1036 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1037 0x0e100590, 0x0ff00ff0, "cfcmp32%c\t%12-15r, mvfx%16-19d, mvfx%0-3d"},
1038 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1039 0x0e1005b0, 0x0ff00ff0, "cfcmp64%c\t%12-15r, mvdx%16-19d, mvdx%0-3d"},
1040 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1041 0x0e300400, 0x0ff00fff, "cfabss%c\tmvf%12-15d, mvf%16-19d"},
1042 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1043 0x0e300420, 0x0ff00fff, "cfabsd%c\tmvd%12-15d, mvd%16-19d"},
1044 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1045 0x0e300440, 0x0ff00fff, "cfnegs%c\tmvf%12-15d, mvf%16-19d"},
1046 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1047 0x0e300460, 0x0ff00fff, "cfnegd%c\tmvd%12-15d, mvd%16-19d"},
1048 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1049 0x0e300480, 0x0ff00ff0, "cfadds%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
1050 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1051 0x0e3004a0, 0x0ff00ff0, "cfaddd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
1052 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1053 0x0e3004c0, 0x0ff00ff0, "cfsubs%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
1054 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1055 0x0e3004e0, 0x0ff00ff0, "cfsubd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
1056 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1057 0x0e100400, 0x0ff00ff0, "cfmuls%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
1058 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1059 0x0e100420, 0x0ff00ff0, "cfmuld%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
1060 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1061 0x0e300500, 0x0ff00fff, "cfabs32%c\tmvfx%12-15d, mvfx%16-19d"},
1062 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1063 0x0e300520, 0x0ff00fff, "cfabs64%c\tmvdx%12-15d, mvdx%16-19d"},
1064 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1065 0x0e300540, 0x0ff00fff, "cfneg32%c\tmvfx%12-15d, mvfx%16-19d"},
1066 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1067 0x0e300560, 0x0ff00fff, "cfneg64%c\tmvdx%12-15d, mvdx%16-19d"},
1068 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1069 0x0e300580, 0x0ff00ff0, "cfadd32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1070 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1071 0x0e3005a0, 0x0ff00ff0, "cfadd64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
1072 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1073 0x0e3005c0, 0x0ff00ff0, "cfsub32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1074 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1075 0x0e3005e0, 0x0ff00ff0, "cfsub64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
1076 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1077 0x0e100500, 0x0ff00ff0, "cfmul32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1078 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1079 0x0e100520, 0x0ff00ff0, "cfmul64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
1080 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1081 0x0e100540, 0x0ff00ff0, "cfmac32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1082 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1083 0x0e100560, 0x0ff00ff0, "cfmsc32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1084 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1085 0x0e000600, 0x0ff00f10,
1086 "cfmadd32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1087 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1088 0x0e100600, 0x0ff00f10,
1089 "cfmsub32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
1090 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1091 0x0e200600, 0x0ff00f10,
1092 "cfmadda32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
1093 {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
1094 0x0e300600, 0x0ff00f10,
1095 "cfmsuba32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
1097 /* VFP Fused multiply add instructions. */
1098 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1099 0x0ea00a00, 0x0fb00f50, "vfma%c.f32\t%y1, %y2, %y0"},
1100 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1101 0x0ea00b00, 0x0fb00f50, "vfma%c.f64\t%z1, %z2, %z0"},
1102 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1103 0x0ea00a40, 0x0fb00f50, "vfms%c.f32\t%y1, %y2, %y0"},
1104 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1105 0x0ea00b40, 0x0fb00f50, "vfms%c.f64\t%z1, %z2, %z0"},
1106 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1107 0x0e900a40, 0x0fb00f50, "vfnma%c.f32\t%y1, %y2, %y0"},
1108 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1109 0x0e900b40, 0x0fb00f50, "vfnma%c.f64\t%z1, %z2, %z0"},
1110 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1111 0x0e900a00, 0x0fb00f50, "vfnms%c.f32\t%y1, %y2, %y0"},
1112 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
1113 0x0e900b00, 0x0fb00f50, "vfnms%c.f64\t%z1, %z2, %z0"},
1116 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1117 0xfe000a00, 0xff800f50, "vsel%20-21c%u.f32\t%y1, %y2, %y0"},
1118 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1119 0xfe000b00, 0xff800f50, "vsel%20-21c%u.f64\t%z1, %z2, %z0"},
1120 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1121 0xfe800a00, 0xffb00f50, "vmaxnm%u.f32\t%y1, %y2, %y0"},
1122 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1123 0xfe800b00, 0xffb00f50, "vmaxnm%u.f64\t%z1, %z2, %z0"},
1124 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1125 0xfe800a40, 0xffb00f50, "vminnm%u.f32\t%y1, %y2, %y0"},
1126 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1127 0xfe800b40, 0xffb00f50, "vminnm%u.f64\t%z1, %z2, %z0"},
1128 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1129 0xfebc0a40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f32\t%y1, %y0"},
1130 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1131 0xfebc0b40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f64\t%y1, %z0"},
1132 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1133 0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32\t%y1, %y0"},
1134 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1135 0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64\t%z1, %z0"},
1136 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1137 0xfeb80a40, 0xffbc0fd0, "vrint%16-17?mpna%u.f32\t%y1, %y0"},
1138 {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
1139 0xfeb80b40, 0xffbc0fd0, "vrint%16-17?mpna%u.f64\t%z1, %z0"},
1141 /* Generic coprocessor instructions. */
1142 {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_GENERIC_START, 0, "" },
1143 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
1144 0x0c400000, 0x0ff00000, "mcrr%c\t%8-11d, %4-7d, %12-15R, %16-19r, cr%0-3d"},
1145 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
1146 0x0c500000, 0x0ff00000,
1147 "mrrc%c\t%8-11d, %4-7d, %12-15Ru, %16-19Ru, cr%0-3d"},
1148 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1149 0x0e000000, 0x0f000010,
1150 "cdp%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
1151 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1152 0x0e10f010, 0x0f10f010,
1153 "mrc%c\t%8-11d, %21-23d, APSR_nzcv, cr%16-19d, cr%0-3d, {%5-7d}"},
1154 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1155 0x0e100010, 0x0f100010,
1156 "mrc%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
1157 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1158 0x0e000010, 0x0f100010,
1159 "mcr%c\t%8-11d, %21-23d, %12-15R, cr%16-19d, cr%0-3d, {%5-7d}"},
1160 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1161 0x0c000000, 0x0e100000, "stc%22'l%c\t%8-11d, cr%12-15d, %A"},
1162 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
1163 0x0c100000, 0x0e100000, "ldc%22'l%c\t%8-11d, cr%12-15d, %A"},
1165 /* V6 coprocessor instructions. */
1166 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
1167 0xfc500000, 0xfff00000,
1168 "mrrc2%c\t%8-11d, %4-7d, %12-15Ru, %16-19Ru, cr%0-3d"},
1169 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
1170 0xfc400000, 0xfff00000,
1171 "mcrr2%c\t%8-11d, %4-7d, %12-15R, %16-19R, cr%0-3d"},
1173 /* ARMv8.3 AdvSIMD instructions in the space of coprocessor 8. */
1174 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1175 0xfc800800, 0xfeb00f10, "vcadd%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%24?29%24'70"},
1176 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1177 0xfc900800, 0xfeb00f10, "vcadd%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%24?29%24'70"},
1178 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1179 0xfc200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%23'90"},
1180 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1181 0xfd200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%23?21%23?780"},
1182 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1183 0xfc300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%23'90"},
1184 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1185 0xfd300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%23?21%23?780"},
1186 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1187 0xfe000800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3D[%5?10], #%20'90"},
1188 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1189 0xfe200800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3D[%5?10], #%20?21%20?780"},
1190 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1191 0xfe800800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5D[0], #%20'90"},
1192 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1193 0xfea00800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5D[0], #%20?21%20?780"},
1195 /* Dot Product instructions in the space of coprocessor 13. */
1196 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
1197 0xfc200d00, 0xffb00f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3,5V"},
1198 {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
1199 0xfe000d00, 0xff000f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3D[%5?10]"},
1201 /* ARMv8.2 FMAC Long instructions in the space of coprocessor 8. */
1202 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1203 0xfc200810, 0xffb00f50, "vfmal.f16\t%12-15,22D, s%7,16-19d, s%5,0-3d"},
1204 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1205 0xfca00810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, s%7,16-19d, s%5,0-3d"},
1206 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1207 0xfc200850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, d%16-19,7d, d%0-3,5d"},
1208 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1209 0xfca00850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, d%16-19,7d, d%0-3,5d"},
1210 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1211 0xfe000810, 0xffb00f50, "vfmal.f16\t%12-15,22D, s%7,16-19d, s%5,0-2d[%3d]"},
1212 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1213 0xfe100810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, s%7,16-19d, s%5,0-2d[%3d]"},
1214 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1215 0xfe000850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, d%16-19,7d, d%0-2d[%3,5d]"},
1216 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
1217 0xfe100850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, d%16-19,7d, d%0-2d[%3,5d]"},
1219 /* V5 coprocessor instructions. */
1220 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1221 0xfc100000, 0xfe100000, "ldc2%22'l%c\t%8-11d, cr%12-15d, %A"},
1222 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1223 0xfc000000, 0xfe100000, "stc2%22'l%c\t%8-11d, cr%12-15d, %A"},
1224 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1225 0xfe000000, 0xff000010,
1226 "cdp2%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
1227 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1228 0xfe000010, 0xff100010,
1229 "mcr2%c\t%8-11d, %21-23d, %12-15R, cr%16-19d, cr%0-3d, {%5-7d}"},
1230 {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
1231 0xfe100010, 0xff100010,
1232 "mrc2%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
1234 /* ARMv8.2 half-precision Floating point coprocessor 9 (VFP) instructions.
1235 cp_num: bit <11:8> == 0b1001.
1236 cond: bit <31:28> == 0b1110, otherwise, it's UNPREDICTABLE. */
1237 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1238 0x0eb009c0, 0x0fbf0fd0, "vabs%c.f16\t%y1, %y0"},
1239 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1240 0x0e300900, 0x0fb00f50, "vadd%c.f16\t%y1, %y2, %y0"},
1241 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1242 0x0eb40940, 0x0fbf0f50, "vcmp%7'e%c.f16\t%y1, %y0"},
1243 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1244 0x0eb50940, 0x0fbf0f70, "vcmp%7'e%c.f16\t%y1, #0.0"},
1245 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1246 0x0eba09c0, 0x0fbe0fd0, "vcvt%c.f16.%16?us%7?31%7?26\t%y1, %y1, #%5,0-3k"},
1247 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1248 0x0ebe09c0, 0x0fbe0fd0, "vcvt%c.%16?us%7?31%7?26.f16\t%y1, %y1, #%5,0-3k"},
1249 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1250 0x0ebc0940, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f16\t%y1, %y0"},
1251 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1252 0x0eb80940, 0x0fbf0f50, "vcvt%c.f16.%7?su32\t%y1, %y0"},
1253 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1254 0xfebc0940, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f16\t%y1, %y0"},
1255 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1256 0x0e800900, 0x0fb00f50, "vdiv%c.f16\t%y1, %y2, %y0"},
1257 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1258 0x0ea00900, 0x0fb00f50, "vfma%c.f16\t%y1, %y2, %y0"},
1259 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1260 0x0ea00940, 0x0fb00f50, "vfms%c.f16\t%y1, %y2, %y0"},
1261 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1262 0x0e900940, 0x0fb00f50, "vfnma%c.f16\t%y1, %y2, %y0"},
1263 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1264 0x0e900900, 0x0fb00f50, "vfnms%c.f16\t%y1, %y2, %y0"},
1265 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1266 0xfeb00ac0, 0xffbf0fd0, "vins.f16\t%y1, %y0"},
1267 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1268 0xfeb00a40, 0xffbf0fd0, "vmovx%c.f16\t%y1, %y0"},
1269 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1270 0x0d100900, 0x0f300f00, "vldr%c.16\t%y1, %A"},
1271 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1272 0x0d000900, 0x0f300f00, "vstr%c.16\t%y1, %A"},
1273 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1274 0xfe800900, 0xffb00f50, "vmaxnm%c.f16\t%y1, %y2, %y0"},
1275 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1276 0xfe800940, 0xffb00f50, "vminnm%c.f16\t%y1, %y2, %y0"},
1277 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1278 0x0e000900, 0x0fb00f50, "vmla%c.f16\t%y1, %y2, %y0"},
1279 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1280 0x0e000940, 0x0fb00f50, "vmls%c.f16\t%y1, %y2, %y0"},
1281 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1282 0x0e100910, 0x0ff00f7f, "vmov%c.f16\t%12-15r, %y2"},
1283 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1284 0x0e000910, 0x0ff00f7f, "vmov%c.f16\t%y2, %12-15r"},
1285 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1286 0xeb00900, 0x0fb00ff0, "vmov%c.f16\t%y1, #%0-3,16-19E"},
1287 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1288 0x0e200900, 0x0fb00f50, "vmul%c.f16\t%y1, %y2, %y0"},
1289 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1290 0x0eb10940, 0x0fbf0fd0, "vneg%c.f16\t%y1, %y0"},
1291 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1292 0x0e100940, 0x0fb00f50, "vnmla%c.f16\t%y1, %y2, %y0"},
1293 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1294 0x0e100900, 0x0fb00f50, "vnmls%c.f16\t%y1, %y2, %y0"},
1295 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1296 0x0e200940, 0x0fb00f50, "vnmul%c.f16\t%y1, %y2, %y0"},
1297 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1298 0x0eb60940, 0x0fbe0f50, "vrint%7,16??xzr%c.f16\t%y1, %y0"},
1299 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1300 0xfeb80940, 0xffbc0fd0, "vrint%16-17?mpna%u.f16\t%y1, %y0"},
1301 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1302 0xfe000900, 0xff800f50, "vsel%20-21c%u.f16\t%y1, %y2, %y0"},
1303 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1304 0x0eb109c0, 0x0fbf0fd0, "vsqrt%c.f16\t%y1, %y0"},
1305 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1306 0x0e300940, 0x0fb00f50, "vsub%c.f16\t%y1, %y2, %y0"},
1308 /* ARMv8.3 javascript conversion instruction. */
1309 {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
1310 0x0eb90bc0, 0x0fbf0fd0, "vjcvt%c.s32.f64\t%y1, %z0"},
1312 {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
1315 /* Neon opcode table: This does not encode the top byte -- that is
1316 checked by the print_insn_neon routine, as it depends on whether we are
1317 doing thumb32 or arm32 disassembly. */
1319 /* print_insn_neon recognizes the following format control codes:
1323 %c print condition code
1324 %u print condition code (unconditional in ARM mode,
1325 UNPREDICTABLE if not AL in Thumb)
1326 %A print v{st,ld}[1234] operands
1327 %B print v{st,ld}[1234] any one operands
1328 %C print v{st,ld}[1234] single->all operands
1330 %E print vmov, vmvn, vorr, vbic encoded constant
1331 %F print vtbl,vtbx register list
1333 %<bitfield>r print as an ARM register
1334 %<bitfield>d print the bitfield in decimal
1335 %<bitfield>e print the 2^N - bitfield in decimal
1336 %<bitfield>D print as a NEON D register
1337 %<bitfield>Q print as a NEON Q register
1338 %<bitfield>R print as a NEON D or Q register
1339 %<bitfield>Sn print byte scaled width limited by n
1340 %<bitfield>Tn print short scaled width limited by n
1341 %<bitfield>Un print long scaled width limited by n
1343 %<bitfield>'c print specified char iff bitfield is all ones
1344 %<bitfield>`c print specified char iff bitfield is all zeroes
1345 %<bitfield>?ab... select from array of values in big endian order. */
1347 static const struct opcode32 neon_opcodes[] =
1350 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1351 0xf2b00840, 0xffb00850,
1352 "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
1353 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1354 0xf2b00000, 0xffb00810,
1355 "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
1357 /* Data transfer between ARM and NEON registers. */
1358 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1359 0x0e800b10, 0x1ff00f70, "vdup%c.32\t%16-19,7D, %12-15r"},
1360 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1361 0x0e800b30, 0x1ff00f70, "vdup%c.16\t%16-19,7D, %12-15r"},
1362 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1363 0x0ea00b10, 0x1ff00f70, "vdup%c.32\t%16-19,7Q, %12-15r"},
1364 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1365 0x0ea00b30, 0x1ff00f70, "vdup%c.16\t%16-19,7Q, %12-15r"},
1366 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1367 0x0ec00b10, 0x1ff00f70, "vdup%c.8\t%16-19,7D, %12-15r"},
1368 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1369 0x0ee00b10, 0x1ff00f70, "vdup%c.8\t%16-19,7Q, %12-15r"},
1371 /* Move data element to all lanes. */
1372 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1373 0xf3b40c00, 0xffb70f90, "vdup%c.32\t%12-15,22R, %0-3,5D[%19d]"},
1374 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1375 0xf3b20c00, 0xffb30f90, "vdup%c.16\t%12-15,22R, %0-3,5D[%18-19d]"},
1376 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1377 0xf3b10c00, 0xffb10f90, "vdup%c.8\t%12-15,22R, %0-3,5D[%17-19d]"},
1380 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1381 0xf3b00800, 0xffb00c50, "vtbl%c.8\t%12-15,22D, %F, %0-3,5D"},
1382 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1383 0xf3b00840, 0xffb00c50, "vtbx%c.8\t%12-15,22D, %F, %0-3,5D"},
1385 /* Half-precision conversions. */
1386 {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
1387 0xf3b60600, 0xffbf0fd0, "vcvt%c.f16.f32\t%12-15,22D, %0-3,5Q"},
1388 {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
1389 0xf3b60700, 0xffbf0fd0, "vcvt%c.f32.f16\t%12-15,22Q, %0-3,5D"},
1391 /* NEON fused multiply add instructions. */
1392 {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
1393 0xf2000c10, 0xffb00f10, "vfma%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1394 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1395 0xf2100c10, 0xffb00f10, "vfma%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1396 {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
1397 0xf2200c10, 0xffb00f10, "vfms%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1398 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1399 0xf2300c10, 0xffb00f10, "vfms%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1401 /* Two registers, miscellaneous. */
1402 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1403 0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32\t%12-15,22R, %0-3,5R"},
1404 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1405 0xf3b60400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f16\t%12-15,22R, %0-3,5R"},
1406 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1407 0xf3bb0000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us32.f32\t%12-15,22R, %0-3,5R"},
1408 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1409 0xf3b70000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us16.f16\t%12-15,22R, %0-3,5R"},
1410 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1411 0xf3b00300, 0xffbf0fd0, "aese%u.8\t%12-15,22Q, %0-3,5Q"},
1412 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1413 0xf3b00340, 0xffbf0fd0, "aesd%u.8\t%12-15,22Q, %0-3,5Q"},
1414 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1415 0xf3b00380, 0xffbf0fd0, "aesmc%u.8\t%12-15,22Q, %0-3,5Q"},
1416 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1417 0xf3b003c0, 0xffbf0fd0, "aesimc%u.8\t%12-15,22Q, %0-3,5Q"},
1418 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1419 0xf3b902c0, 0xffbf0fd0, "sha1h%u.32\t%12-15,22Q, %0-3,5Q"},
1420 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1421 0xf3ba0380, 0xffbf0fd0, "sha1su1%u.32\t%12-15,22Q, %0-3,5Q"},
1422 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1423 0xf3ba03c0, 0xffbf0fd0, "sha256su0%u.32\t%12-15,22Q, %0-3,5Q"},
1424 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1425 0xf2880a10, 0xfebf0fd0, "vmovl%c.%24?us8\t%12-15,22Q, %0-3,5D"},
1426 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1427 0xf2900a10, 0xfebf0fd0, "vmovl%c.%24?us16\t%12-15,22Q, %0-3,5D"},
1428 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1429 0xf2a00a10, 0xfebf0fd0, "vmovl%c.%24?us32\t%12-15,22Q, %0-3,5D"},
1430 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1431 0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
1432 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1433 0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
1434 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1435 0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
1436 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1437 0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
1438 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1439 0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
1440 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1441 0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
1442 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1443 0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
1444 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1445 0xf3b20300, 0xffb30fd0,
1446 "vshll%c.i%18-19S2\t%12-15,22Q, %0-3,5D, #%18-19S2"},
1447 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1448 0xf3bb0400, 0xffbf0e90, "vrecpe%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
1449 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1450 0xf3b70400, 0xffbf0e90, "vrecpe%c.%8?fu16\t%12-15,22R, %0-3,5R"},
1451 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1452 0xf3bb0480, 0xffbf0e90, "vrsqrte%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
1453 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1454 0xf3b70480, 0xffbf0e90, "vrsqrte%c.%8?fu16\t%12-15,22R, %0-3,5R"},
1455 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1456 0xf3b00000, 0xffb30f90, "vrev64%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1457 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1458 0xf3b00080, 0xffb30f90, "vrev32%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1459 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1460 0xf3b00100, 0xffb30f90, "vrev16%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1461 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1462 0xf3b00400, 0xffb30f90, "vcls%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
1463 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1464 0xf3b00480, 0xffb30f90, "vclz%c.i%18-19S2\t%12-15,22R, %0-3,5R"},
1465 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1466 0xf3b00700, 0xffb30f90, "vqabs%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
1467 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1468 0xf3b00780, 0xffb30f90, "vqneg%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
1469 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1470 0xf3b20080, 0xffb30f90, "vtrn%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1471 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1472 0xf3b20100, 0xffb30f90, "vuzp%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1473 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1474 0xf3b20180, 0xffb30f90, "vzip%c.%18-19S2\t%12-15,22R, %0-3,5R"},
1475 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1476 0xf3b10000, 0xffb30b90, "vcgt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1477 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1478 0xf3b10080, 0xffb30b90, "vcge%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1479 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1480 0xf3b10100, 0xffb30b90, "vceq%c.%10?fi%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1481 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1482 0xf3b10180, 0xffb30b90, "vcle%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1483 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1484 0xf3b10200, 0xffb30b90, "vclt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
1485 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1486 0xf3b10300, 0xffb30b90, "vabs%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
1487 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1488 0xf3b10380, 0xffb30b90, "vneg%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
1489 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1490 0xf3b00200, 0xffb30f10, "vpaddl%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
1491 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1492 0xf3b00600, 0xffb30f10, "vpadal%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
1493 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1494 0xf3bb0600, 0xffbf0e10,
1495 "vcvt%c.%7-8?usff%18-19Sa.%7-8?ffus%18-19Sa\t%12-15,22R, %0-3,5R"},
1496 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1497 0xf3b70600, 0xffbf0e10,
1498 "vcvt%c.%7-8?usff16.%7-8?ffus16\t%12-15,22R, %0-3,5R"},
1500 /* Three registers of the same length. */
1501 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1502 0xf2000c40, 0xffb00f50, "sha1c%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1503 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1504 0xf2100c40, 0xffb00f50, "sha1p%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1505 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1506 0xf2200c40, 0xffb00f50, "sha1m%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1507 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1508 0xf2300c40, 0xffb00f50, "sha1su0%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1509 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1510 0xf3000c40, 0xffb00f50, "sha256h%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1511 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1512 0xf3100c40, 0xffb00f50, "sha256h2%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1513 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1514 0xf3200c40, 0xffb00f50, "sha256su1%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
1515 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1516 0xf3000f10, 0xffb00f10, "vmaxnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1517 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1518 0xf3100f10, 0xffb00f10, "vmaxnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1519 {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
1520 0xf3200f10, 0xffb00f10, "vminnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1521 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1522 0xf3300f10, 0xffb00f10, "vminnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1523 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1524 0xf2000110, 0xffb00f10, "vand%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1525 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1526 0xf2100110, 0xffb00f10, "vbic%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1527 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1528 0xf2200110, 0xffb00f10, "vorr%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1529 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1530 0xf2300110, 0xffb00f10, "vorn%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1531 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1532 0xf3000110, 0xffb00f10, "veor%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1533 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1534 0xf3100110, 0xffb00f10, "vbsl%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1535 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1536 0xf3200110, 0xffb00f10, "vbit%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1537 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1538 0xf3300110, 0xffb00f10, "vbif%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
1539 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1540 0xf2000d00, 0xffb00f10, "vadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1541 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1542 0xf2100d00, 0xffb00f10, "vadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1543 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1544 0xf2000d10, 0xffb00f10, "vmla%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1545 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1546 0xf2100d10, 0xffb00f10, "vmla%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1547 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1548 0xf2000e00, 0xffb00f10, "vceq%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1549 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1550 0xf2100e00, 0xffb00f10, "vceq%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1551 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1552 0xf2000f00, 0xffb00f10, "vmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1553 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1554 0xf2100f00, 0xffb00f10, "vmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1555 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1556 0xf2000f10, 0xffb00f10, "vrecps%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1557 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1558 0xf2100f10, 0xffb00f10, "vrecps%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1559 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1560 0xf2200d00, 0xffb00f10, "vsub%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1561 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1562 0xf2300d00, 0xffb00f10, "vsub%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1563 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1564 0xf2200d10, 0xffb00f10, "vmls%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1565 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1566 0xf2300d10, 0xffb00f10, "vmls%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1567 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1568 0xf2200f00, 0xffb00f10, "vmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1569 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1570 0xf2300f00, 0xffb00f10, "vmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1571 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1572 0xf2200f10, 0xffb00f10, "vrsqrts%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1573 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1574 0xf2300f10, 0xffb00f10, "vrsqrts%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1575 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1576 0xf3000d00, 0xffb00f10, "vpadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1577 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1578 0xf3100d00, 0xffb00f10, "vpadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1579 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1580 0xf3000d10, 0xffb00f10, "vmul%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1581 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1582 0xf3100d10, 0xffb00f10, "vmul%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1583 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1584 0xf3000e00, 0xffb00f10, "vcge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1585 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1586 0xf3100e00, 0xffb00f10, "vcge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1587 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1588 0xf3000e10, 0xffb00f10, "vacge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1589 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1590 0xf3100e10, 0xffb00f10, "vacge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1591 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1592 0xf3000f00, 0xffb00f10, "vpmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1593 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1594 0xf3100f00, 0xffb00f10, "vpmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1595 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1596 0xf3200d00, 0xffb00f10, "vabd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1597 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1598 0xf3300d00, 0xffb00f10, "vabd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1599 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1600 0xf3200e00, 0xffb00f10, "vcgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1601 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1602 0xf3300e00, 0xffb00f10, "vcgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1603 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1604 0xf3200e10, 0xffb00f10, "vacgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1605 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1606 0xf3300e10, 0xffb00f10, "vacgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1607 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1608 0xf3200f00, 0xffb00f10, "vpmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
1609 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1610 0xf3300f00, 0xffb00f10, "vpmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
1611 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1612 0xf2000800, 0xff800f10, "vadd%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1613 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1614 0xf2000810, 0xff800f10, "vtst%c.%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1615 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1616 0xf2000900, 0xff800f10, "vmla%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1617 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1618 0xf2000b00, 0xff800f10,
1619 "vqdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1620 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1621 0xf2000b10, 0xff800f10,
1622 "vpadd%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1623 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1624 0xf3000800, 0xff800f10, "vsub%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1625 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1626 0xf3000810, 0xff800f10, "vceq%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1627 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1628 0xf3000900, 0xff800f10, "vmls%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1629 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1630 0xf3000b00, 0xff800f10,
1631 "vqrdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1632 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1633 0xf2000000, 0xfe800f10,
1634 "vhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1635 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1636 0xf2000010, 0xfe800f10,
1637 "vqadd%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1638 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1639 0xf2000100, 0xfe800f10,
1640 "vrhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1641 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1642 0xf2000200, 0xfe800f10,
1643 "vhsub%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1644 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1645 0xf2000210, 0xfe800f10,
1646 "vqsub%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
1647 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1648 0xf2000300, 0xfe800f10,
1649 "vcgt%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1650 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1651 0xf2000310, 0xfe800f10,
1652 "vcge%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1653 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1654 0xf2000400, 0xfe800f10,
1655 "vshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1656 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1657 0xf2000410, 0xfe800f10,
1658 "vqshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1659 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1660 0xf2000500, 0xfe800f10,
1661 "vrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1662 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1663 0xf2000510, 0xfe800f10,
1664 "vqrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
1665 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1666 0xf2000600, 0xfe800f10,
1667 "vmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1668 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1669 0xf2000610, 0xfe800f10,
1670 "vmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1671 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1672 0xf2000700, 0xfe800f10,
1673 "vabd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1674 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1675 0xf2000710, 0xfe800f10,
1676 "vaba%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1677 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1678 0xf2000910, 0xfe800f10,
1679 "vmul%c.%24?pi%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1680 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1681 0xf2000a00, 0xfe800f10,
1682 "vpmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1683 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1684 0xf2000a10, 0xfe800f10,
1685 "vpmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
1686 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1687 0xf3000b10, 0xff800f10,
1688 "vqrdmlah%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1689 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1690 0xf3000c10, 0xff800f10,
1691 "vqrdmlsh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
1693 /* One register and an immediate value. */
1694 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1695 0xf2800e10, 0xfeb80fb0, "vmov%c.i8\t%12-15,22R, %E"},
1696 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1697 0xf2800e30, 0xfeb80fb0, "vmov%c.i64\t%12-15,22R, %E"},
1698 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1699 0xf2800f10, 0xfeb80fb0, "vmov%c.f32\t%12-15,22R, %E"},
1700 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1701 0xf2800810, 0xfeb80db0, "vmov%c.i16\t%12-15,22R, %E"},
1702 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1703 0xf2800830, 0xfeb80db0, "vmvn%c.i16\t%12-15,22R, %E"},
1704 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1705 0xf2800910, 0xfeb80db0, "vorr%c.i16\t%12-15,22R, %E"},
1706 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1707 0xf2800930, 0xfeb80db0, "vbic%c.i16\t%12-15,22R, %E"},
1708 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1709 0xf2800c10, 0xfeb80eb0, "vmov%c.i32\t%12-15,22R, %E"},
1710 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1711 0xf2800c30, 0xfeb80eb0, "vmvn%c.i32\t%12-15,22R, %E"},
1712 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1713 0xf2800110, 0xfeb809b0, "vorr%c.i32\t%12-15,22R, %E"},
1714 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1715 0xf2800130, 0xfeb809b0, "vbic%c.i32\t%12-15,22R, %E"},
1716 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1717 0xf2800010, 0xfeb808b0, "vmov%c.i32\t%12-15,22R, %E"},
1718 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1719 0xf2800030, 0xfeb808b0, "vmvn%c.i32\t%12-15,22R, %E"},
1721 /* Two registers and a shift amount. */
1722 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1723 0xf2880810, 0xffb80fd0, "vshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1724 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1725 0xf2880850, 0xffb80fd0, "vrshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1726 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1727 0xf2880810, 0xfeb80fd0, "vqshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1728 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1729 0xf2880850, 0xfeb80fd0, "vqrshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1730 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1731 0xf2880910, 0xfeb80fd0, "vqshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1732 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1733 0xf2880950, 0xfeb80fd0,
1734 "vqrshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
1735 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1736 0xf2880a10, 0xfeb80fd0, "vshll%c.%24?us8\t%12-15,22Q, %0-3,5D, #%16-18d"},
1737 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1738 0xf2900810, 0xffb00fd0, "vshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1739 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1740 0xf2900850, 0xffb00fd0, "vrshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1741 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1742 0xf2880510, 0xffb80f90, "vshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
1743 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1744 0xf3880410, 0xffb80f90, "vsri%c.8\t%12-15,22R, %0-3,5R, #%16-18e"},
1745 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1746 0xf3880510, 0xffb80f90, "vsli%c.8\t%12-15,22R, %0-3,5R, #%16-18d"},
1747 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1748 0xf3880610, 0xffb80f90, "vqshlu%c.s8\t%12-15,22R, %0-3,5R, #%16-18d"},
1749 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1750 0xf2900810, 0xfeb00fd0, "vqshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1751 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1752 0xf2900850, 0xfeb00fd0, "vqrshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1753 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1754 0xf2900910, 0xfeb00fd0, "vqshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1755 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1756 0xf2900950, 0xfeb00fd0,
1757 "vqrshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
1758 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1759 0xf2900a10, 0xfeb00fd0, "vshll%c.%24?us16\t%12-15,22Q, %0-3,5D, #%16-19d"},
1760 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1761 0xf2880010, 0xfeb80f90, "vshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1762 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1763 0xf2880110, 0xfeb80f90, "vsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1764 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1765 0xf2880210, 0xfeb80f90, "vrshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1766 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1767 0xf2880310, 0xfeb80f90, "vrsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
1768 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1769 0xf2880710, 0xfeb80f90, "vqshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
1770 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1771 0xf2a00810, 0xffa00fd0, "vshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1772 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1773 0xf2a00850, 0xffa00fd0, "vrshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1774 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1775 0xf2900510, 0xffb00f90, "vshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
1776 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1777 0xf3900410, 0xffb00f90, "vsri%c.16\t%12-15,22R, %0-3,5R, #%16-19e"},
1778 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1779 0xf3900510, 0xffb00f90, "vsli%c.16\t%12-15,22R, %0-3,5R, #%16-19d"},
1780 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1781 0xf3900610, 0xffb00f90, "vqshlu%c.s16\t%12-15,22R, %0-3,5R, #%16-19d"},
1782 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1783 0xf2a00a10, 0xfea00fd0, "vshll%c.%24?us32\t%12-15,22Q, %0-3,5D, #%16-20d"},
1784 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1785 0xf2900010, 0xfeb00f90, "vshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1786 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1787 0xf2900110, 0xfeb00f90, "vsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1788 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1789 0xf2900210, 0xfeb00f90, "vrshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1790 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1791 0xf2900310, 0xfeb00f90, "vrsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
1792 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1793 0xf2900710, 0xfeb00f90, "vqshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
1794 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1795 0xf2a00810, 0xfea00fd0, "vqshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1796 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1797 0xf2a00850, 0xfea00fd0, "vqrshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1798 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1799 0xf2a00910, 0xfea00fd0, "vqshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1800 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1801 0xf2a00950, 0xfea00fd0,
1802 "vqrshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
1803 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1804 0xf2a00510, 0xffa00f90, "vshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
1805 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1806 0xf3a00410, 0xffa00f90, "vsri%c.32\t%12-15,22R, %0-3,5R, #%16-20e"},
1807 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1808 0xf3a00510, 0xffa00f90, "vsli%c.32\t%12-15,22R, %0-3,5R, #%16-20d"},
1809 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1810 0xf3a00610, 0xffa00f90, "vqshlu%c.s32\t%12-15,22R, %0-3,5R, #%16-20d"},
1811 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1812 0xf2a00010, 0xfea00f90, "vshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1813 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1814 0xf2a00110, 0xfea00f90, "vsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1815 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1816 0xf2a00210, 0xfea00f90, "vrshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1817 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1818 0xf2a00310, 0xfea00f90, "vrsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
1819 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1820 0xf2a00710, 0xfea00f90, "vqshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
1821 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1822 0xf2800590, 0xff800f90, "vshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
1823 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1824 0xf3800490, 0xff800f90, "vsri%c.64\t%12-15,22R, %0-3,5R, #%16-21e"},
1825 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1826 0xf3800590, 0xff800f90, "vsli%c.64\t%12-15,22R, %0-3,5R, #%16-21d"},
1827 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1828 0xf3800690, 0xff800f90, "vqshlu%c.s64\t%12-15,22R, %0-3,5R, #%16-21d"},
1829 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1830 0xf2800090, 0xfe800f90, "vshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1831 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1832 0xf2800190, 0xfe800f90, "vsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1833 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1834 0xf2800290, 0xfe800f90, "vrshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1835 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1836 0xf2800390, 0xfe800f90, "vrsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
1837 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1838 0xf2800790, 0xfe800f90, "vqshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
1839 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1840 0xf2a00e10, 0xfea00e90,
1841 "vcvt%c.%24,8?usff32.%24,8?ffus32\t%12-15,22R, %0-3,5R, #%16-20e"},
1842 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
1843 0xf2a00c10, 0xfea00e90,
1844 "vcvt%c.%24,8?usff16.%24,8?ffus16\t%12-15,22R, %0-3,5R, #%16-20e"},
1846 /* Three registers of different lengths. */
1847 {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
1848 0xf2a00e00, 0xfeb00f50, "vmull%c.p64\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1849 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1850 0xf2800e00, 0xfea00f50, "vmull%c.p%20S0\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1851 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1852 0xf2800400, 0xff800f50,
1853 "vaddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1854 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1855 0xf2800600, 0xff800f50,
1856 "vsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1857 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1858 0xf2800900, 0xff800f50,
1859 "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1860 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1861 0xf2800b00, 0xff800f50,
1862 "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1863 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1864 0xf2800d00, 0xff800f50,
1865 "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1866 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1867 0xf3800400, 0xff800f50,
1868 "vraddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1869 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1870 0xf3800600, 0xff800f50,
1871 "vrsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
1872 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1873 0xf2800000, 0xfe800f50,
1874 "vaddl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1875 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1876 0xf2800100, 0xfe800f50,
1877 "vaddw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
1878 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1879 0xf2800200, 0xfe800f50,
1880 "vsubl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1881 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1882 0xf2800300, 0xfe800f50,
1883 "vsubw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
1884 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1885 0xf2800500, 0xfe800f50,
1886 "vabal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1887 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1888 0xf2800700, 0xfe800f50,
1889 "vabdl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1890 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1891 0xf2800800, 0xfe800f50,
1892 "vmlal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1893 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1894 0xf2800a00, 0xfe800f50,
1895 "vmlsl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1896 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1897 0xf2800c00, 0xfe800f50,
1898 "vmull%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
1900 /* Two registers and a scalar. */
1901 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1902 0xf2800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1903 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1904 0xf2800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
1905 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1906 0xf2900140, 0xffb00f50, "vmla%c.f16\t%12-15,22D, %16-19,7D, %D"},
1907 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1908 0xf2800340, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1909 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1910 0xf2800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1911 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1912 0xf2800540, 0xff900f50, "vmls%c.f%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1913 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1914 0xf2900540, 0xffb00f50, "vmls%c.f16\t%12-15,22D, %16-19,7D, %D"},
1915 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1916 0xf2800740, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1917 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1918 0xf2800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1919 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1920 0xf2800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
1921 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1922 0xf2900940, 0xffb00f50, "vmul%c.f16\t%12-15,22D, %16-19,7D, %D"},
1923 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1924 0xf2800b40, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1925 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1926 0xf2800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1927 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1928 0xf2800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1929 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1930 0xf3800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1931 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1932 0xf3800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
1933 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1934 0xf3900140, 0xffb00f50, "vmla%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
1935 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1936 0xf3800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1937 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1938 0xf3800540, 0xff900f50, "vmls%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
1939 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1940 0xf3900540, 0xffb00f50, "vmls%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
1941 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1942 0xf3800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1943 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1944 0xf3800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
1945 {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
1946 0xf3900940, 0xffb00f50, "vmul%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
1947 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1948 0xf3800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1949 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1950 0xf3800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1951 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1952 0xf2800240, 0xfe800f50,
1953 "vmlal%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1954 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1955 0xf2800640, 0xfe800f50,
1956 "vmlsl%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1957 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1958 0xf2800a40, 0xfe800f50,
1959 "vmull%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
1960 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1961 0xf2800e40, 0xff800f50,
1962 "vqrdmlah%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1963 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1964 0xf2800f40, 0xff800f50,
1965 "vqrdmlsh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
1966 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1967 0xf3800e40, 0xff800f50,
1968 "vqrdmlah%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
1969 {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
1970 0xf3800f40, 0xff800f50,
1971 "vqrdmlsh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"
1974 /* Element and structure load/store. */
1975 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1976 0xf4a00fc0, 0xffb00fc0, "vld4%c.32\t%C"},
1977 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1978 0xf4a00c00, 0xffb00f00, "vld1%c.%6-7S2\t%C"},
1979 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1980 0xf4a00d00, 0xffb00f00, "vld2%c.%6-7S2\t%C"},
1981 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1982 0xf4a00e00, 0xffb00f00, "vld3%c.%6-7S2\t%C"},
1983 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1984 0xf4a00f00, 0xffb00f00, "vld4%c.%6-7S2\t%C"},
1985 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1986 0xf4000200, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1987 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1988 0xf4000300, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
1989 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1990 0xf4000400, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
1991 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1992 0xf4000500, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
1993 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1994 0xf4000600, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1995 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1996 0xf4000700, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
1997 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
1998 0xf4000800, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
1999 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2000 0xf4000900, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
2001 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2002 0xf4000a00, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
2003 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2004 0xf4000000, 0xff900e00, "v%21?ls%21?dt4%c.%6-7S2\t%A"},
2005 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2006 0xf4800000, 0xff900300, "v%21?ls%21?dt1%c.%10-11S2\t%B"},
2007 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2008 0xf4800100, 0xff900300, "v%21?ls%21?dt2%c.%10-11S2\t%B"},
2009 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2010 0xf4800200, 0xff900300, "v%21?ls%21?dt3%c.%10-11S2\t%B"},
2011 {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
2012 0xf4800300, 0xff900300, "v%21?ls%21?dt4%c.%10-11S2\t%B"},
2014 {ARM_FEATURE_CORE_LOW (0), 0 ,0, 0}
2017 /* mve opcode table. */
2019 /* print_insn_mve recognizes the following format control codes:
2023 %a print '+' or '-' or imm offset in vldr[bhwd] and
2025 %c print condition code
2026 %d print addr mode of MVE vldr[bhw] and vstr[bhw]
2027 %u print 'U' (unsigned) or 'S' for various mve instructions
2028 %i print MVE predicate(s) for vpt and vpst
2029 %m print rounding mode for vcvt and vrint
2030 %n print vector comparison code for predicated instruction
2031 %s print size for various vcvt instructions
2032 %v print vector predicate for instruction in predicated
2034 %o print offset scaled for vldr[hwd] and vstr[hwd]
2035 %w print writeback mode for MVE v{st,ld}[24]
2036 %B print v{st,ld}[24] any one operands
2037 %E print vmov, vmvn, vorr, vbic encoded constant
2038 %N print generic index for vmov
2039 %T print bottom ('b') or top ('t') of source register
2040 %X print exchange field in vmla* instructions
2042 %<bitfield>r print as an ARM register
2043 %<bitfield>d print the bitfield in decimal
2044 %<bitfield>A print accumulate or not
2045 %<bitfield>Q print as a MVE Q register
2046 %<bitfield>F print as a MVE S register
2047 %<bitfield>Z as %<>r but r15 is ZR instead of PC and r13 is
2049 %<bitfield>s print size for vector predicate & non VMOV instructions
2050 %<bitfield>I print carry flag or not
2051 %<bitfield>i print immediate for vstr/vldr reg +/- imm
2052 %<bitfield>h print high half of 64-bit destination reg
2053 %<bitfield>k print immediate for vector conversion instruction
2054 %<bitfield>l print low half of 64-bit destination reg
2055 %<bitfield>o print rotate value for vcmul
2056 %<bitfield>u print immediate value for vddup/vdwdup
2057 %<bitfield>x print the bitfield in hex.
2060 static const struct mopcode32 mve_opcodes[] =
2064 {ARM_FEATURE_COPROC (FPU_MVE),
2066 0xfe310f4d, 0xffbf1fff,
2070 /* Floating point VPT T1. */
2071 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2073 0xee310f00, 0xefb10f50,
2074 "vpt%i.f%28s\t%n, %17-19Q, %1-3,5Q"},
2075 /* Floating point VPT T2. */
2076 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2078 0xee310f40, 0xefb10f50,
2079 "vpt%i.f%28s\t%n, %17-19Q, %0-3Z"},
2081 /* Vector VPT T1. */
2082 {ARM_FEATURE_COPROC (FPU_MVE),
2084 0xfe010f00, 0xff811f51,
2085 "vpt%i.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
2086 /* Vector VPT T2. */
2087 {ARM_FEATURE_COPROC (FPU_MVE),
2089 0xfe010f01, 0xff811f51,
2090 "vpt%i.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
2091 /* Vector VPT T3. */
2092 {ARM_FEATURE_COPROC (FPU_MVE),
2094 0xfe011f00, 0xff811f50,
2095 "vpt%i.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
2096 /* Vector VPT T4. */
2097 {ARM_FEATURE_COPROC (FPU_MVE),
2099 0xfe010f40, 0xff811f70,
2100 "vpt%i.i%20-21s\t%n, %17-19Q, %0-3Z"},
2101 /* Vector VPT T5. */
2102 {ARM_FEATURE_COPROC (FPU_MVE),
2104 0xfe010f60, 0xff811f70,
2105 "vpt%i.u%20-21s\t%n, %17-19Q, %0-3Z"},
2106 /* Vector VPT T6. */
2107 {ARM_FEATURE_COPROC (FPU_MVE),
2109 0xfe011f40, 0xff811f50,
2110 "vpt%i.s%20-21s\t%n, %17-19Q, %0-3Z"},
2112 /* Vector VBIC immediate. */
2113 {ARM_FEATURE_COPROC (FPU_MVE),
2115 0xef800070, 0xefb81070,
2116 "vbic%v.i%8-11s\t%13-15,22Q, %E"},
2118 /* Vector VBIC register. */
2119 {ARM_FEATURE_COPROC (FPU_MVE),
2121 0xef100150, 0xffb11f51,
2122 "vbic%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2125 {ARM_FEATURE_COPROC (FPU_MVE),
2127 0xee800f01, 0xefc10f51,
2128 "vabav%v.%u%20-21s\t%12-15r, %17-19,7Q, %1-3,5Q"},
2130 /* Vector VABD floating point. */
2131 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2133 0xff200d40, 0xffa11f51,
2134 "vabd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2137 {ARM_FEATURE_COPROC (FPU_MVE),
2139 0xef000740, 0xef811f51,
2140 "vabd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2142 /* Vector VABS floating point. */
2143 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2145 0xFFB10740, 0xFFB31FD1,
2146 "vabs%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
2148 {ARM_FEATURE_COPROC (FPU_MVE),
2150 0xffb10340, 0xffb31fd1,
2151 "vabs%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2153 /* Vector VADD floating point T1. */
2154 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2156 0xef000d40, 0xffa11f51,
2157 "vadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2158 /* Vector VADD floating point T2. */
2159 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2161 0xee300f40, 0xefb11f70,
2162 "vadd%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2163 /* Vector VADD T1. */
2164 {ARM_FEATURE_COPROC (FPU_MVE),
2166 0xef000840, 0xff811f51,
2167 "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2168 /* Vector VADD T2. */
2169 {ARM_FEATURE_COPROC (FPU_MVE),
2171 0xee010f40, 0xff811f70,
2172 "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2174 /* Vector VADDLV. */
2175 {ARM_FEATURE_COPROC (FPU_MVE),
2177 0xee890f00, 0xef8f1fd1,
2178 "vaddlv%5A%v.%u32\t%13-15l, %20-22h, %1-3Q"},
2181 {ARM_FEATURE_COPROC (FPU_MVE),
2183 0xeef10f00, 0xeff31fd1,
2184 "vaddv%5A%v.%u%18-19s\t%13-15l, %1-3Q"},
2187 {ARM_FEATURE_COPROC (FPU_MVE),
2189 0xee300f00, 0xffb10f51,
2190 "vadc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2193 {ARM_FEATURE_COPROC (FPU_MVE),
2195 0xef000150, 0xffb11f51,
2196 "vand%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2198 /* Vector VBRSR register. */
2199 {ARM_FEATURE_COPROC (FPU_MVE),
2201 0xfe011e60, 0xff811f70,
2202 "vbrsr%v.%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2204 /* Vector VCADD floating point. */
2205 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2207 0xfc800840, 0xfea11f51,
2208 "vcadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%24o"},
2211 {ARM_FEATURE_COPROC (FPU_MVE),
2213 0xfe000f00, 0xff810f51,
2214 "vcadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%12o"},
2217 {ARM_FEATURE_COPROC (FPU_MVE),
2219 0xffb00440, 0xffb31fd1,
2220 "vcls%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2223 {ARM_FEATURE_COPROC (FPU_MVE),
2225 0xffb004c0, 0xffb31fd1,
2226 "vclz%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
2229 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2231 0xfc200840, 0xfe211f51,
2232 "vcmla%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%23-24o"},
2234 /* Vector VCMP floating point T1. */
2235 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2237 0xee310f00, 0xeff1ef50,
2238 "vcmp%v.f%28s\t%n, %17-19Q, %1-3,5Q"},
2240 /* Vector VCMP floating point T2. */
2241 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2243 0xee310f40, 0xeff1ef50,
2244 "vcmp%v.f%28s\t%n, %17-19Q, %0-3Z"},
2246 /* Vector VCMP T1. */
2247 {ARM_FEATURE_COPROC (FPU_MVE),
2249 0xfe010f00, 0xffc1ff51,
2250 "vcmp%v.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
2251 /* Vector VCMP T2. */
2252 {ARM_FEATURE_COPROC (FPU_MVE),
2254 0xfe010f01, 0xffc1ff51,
2255 "vcmp%v.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
2256 /* Vector VCMP T3. */
2257 {ARM_FEATURE_COPROC (FPU_MVE),
2259 0xfe011f00, 0xffc1ff50,
2260 "vcmp%v.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
2261 /* Vector VCMP T4. */
2262 {ARM_FEATURE_COPROC (FPU_MVE),
2264 0xfe010f40, 0xffc1ff70,
2265 "vcmp%v.i%20-21s\t%n, %17-19Q, %0-3Z"},
2266 /* Vector VCMP T5. */
2267 {ARM_FEATURE_COPROC (FPU_MVE),
2269 0xfe010f60, 0xffc1ff70,
2270 "vcmp%v.u%20-21s\t%n, %17-19Q, %0-3Z"},
2271 /* Vector VCMP T6. */
2272 {ARM_FEATURE_COPROC (FPU_MVE),
2274 0xfe011f40, 0xffc1ff50,
2275 "vcmp%v.s%20-21s\t%n, %17-19Q, %0-3Z"},
2278 {ARM_FEATURE_COPROC (FPU_MVE),
2280 0xeea00b10, 0xffb10f5f,
2281 "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
2284 {ARM_FEATURE_COPROC (FPU_MVE),
2286 0xff000150, 0xffd11f51,
2287 "veor%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2289 /* Vector VFMA, vector * scalar. */
2290 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2292 0xee310e40, 0xefb11f70,
2293 "vfma%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2295 /* Vector VFMA floating point. */
2296 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2298 0xef000c50, 0xffa11f51,
2299 "vfma%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2301 /* Vector VFMS floating point. */
2302 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2304 0xef200c50, 0xffa11f51,
2305 "vfms%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2307 /* Vector VFMAS, vector * scalar. */
2308 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2309 MVE_VFMAS_FP_SCALAR,
2310 0xee311e40, 0xefb11f70,
2311 "vfmas%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2313 /* Vector VHADD T1. */
2314 {ARM_FEATURE_COPROC (FPU_MVE),
2316 0xef000040, 0xef811f51,
2317 "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2319 /* Vector VHADD T2. */
2320 {ARM_FEATURE_COPROC (FPU_MVE),
2322 0xee000f40, 0xef811f70,
2323 "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2325 /* Vector VHSUB T1. */
2326 {ARM_FEATURE_COPROC (FPU_MVE),
2328 0xef000240, 0xef811f51,
2329 "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2331 /* Vector VHSUB T2. */
2332 {ARM_FEATURE_COPROC (FPU_MVE),
2334 0xee001f40, 0xef811f70,
2335 "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2338 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2340 0xee300e00, 0xefb10f50,
2341 "vcmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%0,12o"},
2344 {ARM_FEATURE_COPROC (FPU_MVE),
2346 0xf000e801, 0xffc0ffff,
2347 "vctp%v.%20-21s\t%16-19r"},
2350 {ARM_FEATURE_COPROC (FPU_MVE),
2352 0xeea00b10, 0xffb10f5f,
2353 "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
2355 /* Vector VRHADD. */
2356 {ARM_FEATURE_COPROC (FPU_MVE),
2358 0xef000140, 0xef811f51,
2359 "vrhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2362 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2363 MVE_VCVT_FP_FIX_VEC,
2364 0xef800c50, 0xef801cd1,
2365 "vcvt%v.%s\t%13-15,22Q, %1-3,5Q, #%16-21k"},
2368 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2369 MVE_VCVT_BETWEEN_FP_INT,
2370 0xffb30640, 0xffb31e51,
2371 "vcvt%v.%s\t%13-15,22Q, %1-3,5Q"},
2373 /* Vector VCVT between single and half-precision float, bottom half. */
2374 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2375 MVE_VCVT_FP_HALF_FP,
2376 0xee3f0e01, 0xefbf1fd1,
2377 "vcvtb%v.%s\t%13-15,22Q, %1-3,5Q"},
2379 /* Vector VCVT between single and half-precision float, top half. */
2380 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2381 MVE_VCVT_FP_HALF_FP,
2382 0xee3f1e01, 0xefbf1fd1,
2383 "vcvtt%v.%s\t%13-15,22Q, %1-3,5Q"},
2386 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2387 MVE_VCVT_FROM_FP_TO_INT,
2388 0xffb30040, 0xffb31c51,
2389 "vcvt%m%v.%s\t%13-15,22Q, %1-3,5Q"},
2392 {ARM_FEATURE_COPROC (FPU_MVE),
2394 0xee011f6e, 0xff811f7e,
2395 "vddup%v.u%20-21s\t%13-15,22Q, %17-19l, #%0,7u"},
2397 /* Vector VDWDUP. */
2398 {ARM_FEATURE_COPROC (FPU_MVE),
2400 0xee011f60, 0xff811f70,
2401 "vdwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, #%0,7u"},
2403 /* Vector VHCADD. */
2404 {ARM_FEATURE_COPROC (FPU_MVE),
2406 0xee000f00, 0xff810f51,
2407 "vhcadd%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%12o"},
2409 /* Vector VIWDUP. */
2410 {ARM_FEATURE_COPROC (FPU_MVE),
2412 0xee010f60, 0xff811f70,
2413 "viwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, #%0,7u"},
2416 {ARM_FEATURE_COPROC (FPU_MVE),
2418 0xee010f6e, 0xff811f7e,
2419 "vidup%v.u%20-21s\t%13-15,22Q, %17-19l, #%0,7u"},
2422 {ARM_FEATURE_COPROC (FPU_MVE),
2424 0xfc901e00, 0xff901e5f,
2425 "vld2%5d.%7-8s\t%B, [%16-19r]%w"},
2428 {ARM_FEATURE_COPROC (FPU_MVE),
2430 0xfc901e01, 0xff901e1f,
2431 "vld4%5-6d.%7-8s\t%B, [%16-19r]%w"},
2433 /* Vector VLDRB gather load. */
2434 {ARM_FEATURE_COPROC (FPU_MVE),
2435 MVE_VLDRB_GATHER_T1,
2436 0xec900e00, 0xefb01e50,
2437 "vldrb%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
2439 /* Vector VLDRH gather load. */
2440 {ARM_FEATURE_COPROC (FPU_MVE),
2441 MVE_VLDRH_GATHER_T2,
2442 0xec900e10, 0xefb01e50,
2443 "vldrh%v.%u%7-8s\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_T3,
2448 0xfc900f40, 0xffb01fd0,
2449 "vldrw%v.u32\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
2451 /* Vector VLDRD gather load. */
2452 {ARM_FEATURE_COPROC (FPU_MVE),
2453 MVE_VLDRD_GATHER_T4,
2454 0xec900fd0, 0xefb01fd0,
2455 "vldrd%v.u64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
2457 /* Vector VLDRW gather load. */
2458 {ARM_FEATURE_COPROC (FPU_MVE),
2459 MVE_VLDRW_GATHER_T5,
2460 0xfd101e00, 0xff111f00,
2461 "vldrw%v.u32\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
2463 /* Vector VLDRD gather load, variant T6. */
2464 {ARM_FEATURE_COPROC (FPU_MVE),
2465 MVE_VLDRD_GATHER_T6,
2466 0xfd101f00, 0xff111f00,
2467 "vldrd%v.u64\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
2470 {ARM_FEATURE_COPROC (FPU_MVE),
2472 0xec100e00, 0xee581e00,
2473 "vldrb%v.%u%7-8s\t%13-15Q, %d"},
2476 {ARM_FEATURE_COPROC (FPU_MVE),
2478 0xec180e00, 0xee581e00,
2479 "vldrh%v.%u%7-8s\t%13-15Q, %d"},
2481 /* Vector VLDRB unsigned, variant T5. */
2482 {ARM_FEATURE_COPROC (FPU_MVE),
2484 0xec101e00, 0xfe101f80,
2485 "vldrb%v.u8\t%13-15,22Q, %d"},
2487 /* Vector VLDRH unsigned, variant T6. */
2488 {ARM_FEATURE_COPROC (FPU_MVE),
2490 0xec101e80, 0xfe101f80,
2491 "vldrh%v.u16\t%13-15,22Q, %d"},
2493 /* Vector VLDRW unsigned, variant T7. */
2494 {ARM_FEATURE_COPROC (FPU_MVE),
2496 0xec101f00, 0xfe101f80,
2497 "vldrw%v.u32\t%13-15,22Q, %d"},
2500 {ARM_FEATURE_COPROC (FPU_MVE),
2502 0xef000640, 0xef811f51,
2503 "vmax%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2506 {ARM_FEATURE_COPROC (FPU_MVE),
2508 0xee330e81, 0xffb31fd1,
2509 "vmaxa%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2511 /* Vector VMAXNM floating point. */
2512 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2514 0xff000f50, 0xffa11f51,
2515 "vmaxnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2517 /* Vector VMAXNMA floating point. */
2518 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2520 0xee3f0e81, 0xefbf1fd1,
2521 "vmaxnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
2523 /* Vector VMAXNMV floating point. */
2524 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2526 0xeeee0f00, 0xefff0fd1,
2527 "vmaxnmv%v.f%28s\t%12-15r, %1-3,5Q"},
2529 /* Vector VMAXNMAV floating point. */
2530 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2532 0xeeec0f00, 0xefff0fd1,
2533 "vmaxnmav%v.f%28s\t%12-15r, %1-3,5Q"},
2536 {ARM_FEATURE_COPROC (FPU_MVE),
2538 0xeee20f00, 0xeff30fd1,
2539 "vmaxv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
2541 /* Vector VMAXAV. */
2542 {ARM_FEATURE_COPROC (FPU_MVE),
2544 0xeee00f00, 0xfff30fd1,
2545 "vmaxav%v.s%18-19s\t%12-15r, %1-3,5Q"},
2548 {ARM_FEATURE_COPROC (FPU_MVE),
2550 0xef000650, 0xef811f51,
2551 "vmin%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2554 {ARM_FEATURE_COPROC (FPU_MVE),
2556 0xee331e81, 0xffb31fd1,
2557 "vmina%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2559 /* Vector VMINNM floating point. */
2560 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2562 0xff200f50, 0xffa11f51,
2563 "vminnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2565 /* Vector VMINNMA floating point. */
2566 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2568 0xee3f1e81, 0xefbf1fd1,
2569 "vminnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
2571 /* Vector VMINNMV floating point. */
2572 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2574 0xeeee0f80, 0xefff0fd1,
2575 "vminnmv%v.f%28s\t%12-15r, %1-3,5Q"},
2577 /* Vector VMINNMAV floating point. */
2578 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2580 0xeeec0f80, 0xefff0fd1,
2581 "vminnmav%v.f%28s\t%12-15r, %1-3,5Q"},
2584 {ARM_FEATURE_COPROC (FPU_MVE),
2586 0xeee20f80, 0xeff30fd1,
2587 "vminv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
2589 /* Vector VMINAV. */
2590 {ARM_FEATURE_COPROC (FPU_MVE),
2592 0xeee00f80, 0xfff30fd1,
2593 "vminav%v.s%18-19s\t%12-15r, %1-3,5Q"},
2596 {ARM_FEATURE_COPROC (FPU_MVE),
2598 0xee010e40, 0xef811f70,
2599 "vmla%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2601 /* Vector VMLALDAV. Note must appear before VMLADAV due to instruction
2603 {ARM_FEATURE_COPROC (FPU_MVE),
2605 0xee801e00, 0xef801f51,
2606 "vmlaldav%5Ax%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2608 {ARM_FEATURE_COPROC (FPU_MVE),
2610 0xee800e00, 0xef801f51,
2611 "vmlalv%5A%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2613 /* Vector VMLAV T1 variant, same as VMLADAV but with X == 0. */
2614 {ARM_FEATURE_COPROC (FPU_MVE),
2616 0xeef00e00, 0xeff01f51,
2617 "vmlav%5A%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
2619 /* Vector VMLAV T2 variant, same as VMLADAV but with X == 0. */
2620 {ARM_FEATURE_COPROC (FPU_MVE),
2622 0xeef00f00, 0xeff11f51,
2623 "vmlav%5A%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
2625 /* Vector VMLADAV T1 variant. */
2626 {ARM_FEATURE_COPROC (FPU_MVE),
2628 0xeef01e00, 0xeff01f51,
2629 "vmladav%5Ax%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
2631 /* Vector VMLADAV T2 variant. */
2632 {ARM_FEATURE_COPROC (FPU_MVE),
2634 0xeef01f00, 0xeff11f51,
2635 "vmladav%5Ax%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
2638 {ARM_FEATURE_COPROC (FPU_MVE),
2640 0xee011e40, 0xef811f70,
2641 "vmlas%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2643 /* Vector VRMLSLDAVH. Note must appear before VMLSDAV due to instruction
2645 {ARM_FEATURE_COPROC (FPU_MVE),
2647 0xfe800e01, 0xff810f51,
2648 "vrmlsldavh%5A%X%v.s32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2650 /* Vector VMLSLDAV. Note must appear before VMLSDAV due to instruction
2652 {ARM_FEATURE_COPROC (FPU_MVE),
2654 0xee800e01, 0xff800f51,
2655 "vmlsldav%5A%X%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
2657 /* Vector VMLSDAV T1 Variant. */
2658 {ARM_FEATURE_COPROC (FPU_MVE),
2660 0xeef00e01, 0xfff00f51,
2661 "vmlsdav%5A%X%v.s%16s\t%13-15l, %17-19,7Q, %1-3Q"},
2663 /* Vector VMLSDAV T2 Variant. */
2664 {ARM_FEATURE_COPROC (FPU_MVE),
2666 0xfef00e01, 0xfff10f51,
2667 "vmlsdav%5A%X%v.s8\t%13-15l, %17-19,7Q, %1-3Q"},
2669 /* Vector VMOV between gpr and half precision register, op == 0. */
2670 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2672 0xee000910, 0xfff00f7f,
2673 "vmov.f16\t%7,16-19F, %12-15r"},
2675 /* Vector VMOV between gpr and half precision register, op == 1. */
2676 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2678 0xee100910, 0xfff00f7f,
2679 "vmov.f16\t%12-15r, %7,16-19F"},
2681 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2682 MVE_VMOV_GP_TO_VEC_LANE,
2683 0xee000b10, 0xff900f1f,
2684 "vmov%c.%5-6,21-22s\t%17-19,7Q[%N], %12-15r"},
2686 /* Vector VORR immediate to vector.
2687 NOTE: MVE_VORR_IMM must appear in the table
2688 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2689 {ARM_FEATURE_COPROC (FPU_MVE),
2691 0xef800050, 0xefb810f0,
2692 "vorr%v.i%8-11s\t%13-15,22Q, %E"},
2694 /* Vector VQSHL T2 Variant.
2695 NOTE: MVE_VQSHL_T2 must appear in the table before
2696 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2697 {ARM_FEATURE_COPROC (FPU_MVE),
2699 0xef800750, 0xef801fd1,
2700 "vqshl%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2702 /* Vector VQSHLU T3 Variant
2703 NOTE: MVE_VQSHL_T2 must appear in the table before
2704 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2706 {ARM_FEATURE_COPROC (FPU_MVE),
2708 0xff800650, 0xff801fd1,
2709 "vqshlu%v.s%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2712 NOTE: MVE_VRSHR must appear in the table before
2713 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2714 {ARM_FEATURE_COPROC (FPU_MVE),
2716 0xef800250, 0xef801fd1,
2717 "vrshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2720 NOTE: MVE_VSHL must appear in the table before
2721 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2722 {ARM_FEATURE_COPROC (FPU_MVE),
2724 0xef800550, 0xff801fd1,
2725 "vshl%v.i%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2728 NOTE: MVE_VSHR must appear in the table before
2729 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2730 {ARM_FEATURE_COPROC (FPU_MVE),
2732 0xef800050, 0xef801fd1,
2733 "vshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2736 NOTE: MVE_VSLI must appear in the table before
2737 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2738 {ARM_FEATURE_COPROC (FPU_MVE),
2740 0xff800550, 0xff801fd1,
2741 "vsli%v.%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2744 NOTE: MVE_VSRI must appear in the table before
2745 before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
2746 {ARM_FEATURE_COPROC (FPU_MVE),
2748 0xff800450, 0xff801fd1,
2749 "vsri%v.%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2751 /* Vector VMOV immediate to vector,
2752 cmode == 11x1 -> VMVN which is UNDEFINED
2753 for such a cmode. */
2754 {ARM_FEATURE_COPROC (FPU_MVE),
2755 MVE_VMVN_IMM, 0xef800d50, 0xefb81dd0, UNDEFINED_INSTRUCTION},
2757 /* Vector VMOV immediate to vector. */
2758 {ARM_FEATURE_COPROC (FPU_MVE),
2759 MVE_VMOV_IMM_TO_VEC,
2760 0xef800050, 0xefb810d0,
2761 "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
2763 /* Vector VMOV two 32-bit lanes to two gprs, idx = 0. */
2764 {ARM_FEATURE_COPROC (FPU_MVE),
2765 MVE_VMOV2_VEC_LANE_TO_GP,
2766 0xec000f00, 0xffb01ff0,
2767 "vmov%c\t%0-3r, %16-19r, %13-15,22Q[2], %13-15,22Q[0]"},
2769 /* Vector VMOV two 32-bit lanes to two gprs, idx = 1. */
2770 {ARM_FEATURE_COPROC (FPU_MVE),
2771 MVE_VMOV2_VEC_LANE_TO_GP,
2772 0xec000f10, 0xffb01ff0,
2773 "vmov%c\t%0-3r, %16-19r, %13-15,22Q[3], %13-15,22Q[1]"},
2775 /* Vector VMOV Two gprs to two 32-bit lanes, idx = 0. */
2776 {ARM_FEATURE_COPROC (FPU_MVE),
2777 MVE_VMOV2_GP_TO_VEC_LANE,
2778 0xec100f00, 0xffb01ff0,
2779 "vmov%c\t%13-15,22Q[2], %13-15,22Q[0], %0-3r, %16-19r"},
2781 /* Vector VMOV Two gprs to two 32-bit lanes, idx = 1. */
2782 {ARM_FEATURE_COPROC (FPU_MVE),
2783 MVE_VMOV2_GP_TO_VEC_LANE,
2784 0xec100f10, 0xffb01ff0,
2785 "vmov%c\t%13-15,22Q[2], %13-15,22Q[0], %0-3r, %16-19r"},
2787 /* Vector VMOV Vector lane to gpr. */
2788 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2789 MVE_VMOV_VEC_LANE_TO_GP,
2790 0xee100b10, 0xff100f1f,
2791 "vmov%c.%u%5-6,21-22s\t%12-15r, %17-19,7Q[%N]"},
2793 /* Vector VSHLL T1 Variant. Note: VSHLL T1 must appear before MVE_VMOVL due
2794 to instruction opcode aliasing. */
2795 {ARM_FEATURE_COPROC (FPU_MVE),
2797 0xeea00f40, 0xefa00fd1,
2798 "vshll%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
2800 /* Vector VMOVL long. */
2801 {ARM_FEATURE_COPROC (FPU_MVE),
2803 0xeea00f40, 0xefa70fd1,
2804 "vmovl%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q"},
2806 /* Vector VMOV and narrow. */
2807 {ARM_FEATURE_COPROC (FPU_MVE),
2809 0xfe310e81, 0xffb30fd1,
2810 "vmovn%T%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
2812 /* Floating point move extract. */
2813 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2815 0xfeb00a40, 0xffbf0fd0,
2816 "vmovx.f16\t%22,12-15F, %5,0-3F"},
2818 /* Vector VMUL floating-point T1 variant. */
2819 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2821 0xff000d50, 0xffa11f51,
2822 "vmul%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2824 /* Vector VMUL floating-point T2 variant. */
2825 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2827 0xee310e60, 0xefb11f70,
2828 "vmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2830 /* Vector VMUL T1 variant. */
2831 {ARM_FEATURE_COPROC (FPU_MVE),
2833 0xef000950, 0xff811f51,
2834 "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2836 /* Vector VMUL T2 variant. */
2837 {ARM_FEATURE_COPROC (FPU_MVE),
2839 0xee011e60, 0xff811f70,
2840 "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2843 {ARM_FEATURE_COPROC (FPU_MVE),
2845 0xee010e01, 0xef811f51,
2846 "vmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2848 /* Vector VRMULH. */
2849 {ARM_FEATURE_COPROC (FPU_MVE),
2851 0xee011e01, 0xef811f51,
2852 "vrmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2854 /* Vector VMULL integer. */
2855 {ARM_FEATURE_COPROC (FPU_MVE),
2857 0xee010e00, 0xef810f51,
2858 "vmull%T%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2860 /* Vector VMULL polynomial. */
2861 {ARM_FEATURE_COPROC (FPU_MVE),
2863 0xee310e00, 0xefb10f51,
2864 "vmull%T%v.%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2866 /* Vector VMVN immediate to vector. */
2867 {ARM_FEATURE_COPROC (FPU_MVE),
2869 0xef800070, 0xefb810f0,
2870 "vmvn%v.i%8-11s\t%13-15,22Q, %E"},
2872 /* Vector VMVN register. */
2873 {ARM_FEATURE_COPROC (FPU_MVE),
2875 0xffb005c0, 0xffbf1fd1,
2876 "vmvn%v\t%13-15,22Q, %1-3,5Q"},
2878 /* Vector VNEG floating point. */
2879 {ARM_FEATURE_COPROC (FPU_MVE_FP),
2881 0xffb107c0, 0xffb31fd1,
2882 "vneg%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
2885 {ARM_FEATURE_COPROC (FPU_MVE),
2887 0xffb103c0, 0xffb31fd1,
2888 "vneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2890 /* Vector VORN, vector bitwise or not. */
2891 {ARM_FEATURE_COPROC (FPU_MVE),
2893 0xef300150, 0xffb11f51,
2894 "vorn%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2896 /* Vector VORR register. */
2897 {ARM_FEATURE_COPROC (FPU_MVE),
2899 0xef200150, 0xffb11f51,
2900 "vorr%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2902 /* Vector VQDMULL T1 variant. */
2903 {ARM_FEATURE_COPROC (FPU_MVE),
2905 0xee300f01, 0xefb10f51,
2906 "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2909 {ARM_FEATURE_COPROC (FPU_MVE),
2911 0xfe310f4d, 0xffffffff,
2915 {ARM_FEATURE_COPROC (FPU_MVE),
2917 0xfe310f01, 0xffb11f51,
2918 "vpsel%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2921 {ARM_FEATURE_COPROC (FPU_MVE),
2923 0xffb00740, 0xffb31fd1,
2924 "vqabs%v.s%18-19s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2926 /* Vector VQADD T1 variant. */
2927 {ARM_FEATURE_COPROC (FPU_MVE),
2929 0xef000050, 0xef811f51,
2930 "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2932 /* Vector VQADD T2 variant. */
2933 {ARM_FEATURE_COPROC (FPU_MVE),
2935 0xee000f60, 0xef811f70,
2936 "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2938 /* Vector VQDMULL T2 variant. */
2939 {ARM_FEATURE_COPROC (FPU_MVE),
2941 0xee300f60, 0xefb10f70,
2942 "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2944 /* Vector VQMOVN. */
2945 {ARM_FEATURE_COPROC (FPU_MVE),
2947 0xee330e01, 0xefb30fd1,
2948 "vqmovn%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q"},
2950 /* Vector VQMOVUN. */
2951 {ARM_FEATURE_COPROC (FPU_MVE),
2953 0xee310e81, 0xffb30fd1,
2954 "vqmovun%T%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
2956 /* Vector VQDMLADH. */
2957 {ARM_FEATURE_COPROC (FPU_MVE),
2959 0xee000e00, 0xff810f51,
2960 "vqdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2962 /* Vector VQRDMLADH. */
2963 {ARM_FEATURE_COPROC (FPU_MVE),
2965 0xee000e01, 0xff810f51,
2966 "vqrdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2968 /* Vector VQDMLAH. */
2969 {ARM_FEATURE_COPROC (FPU_MVE),
2971 0xee000e60, 0xef811f70,
2972 "vqdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2974 /* Vector VQRDMLAH. */
2975 {ARM_FEATURE_COPROC (FPU_MVE),
2977 0xee000e40, 0xef811f70,
2978 "vqrdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2980 /* Vector VQDMLASH. */
2981 {ARM_FEATURE_COPROC (FPU_MVE),
2983 0xee001e60, 0xef811f70,
2984 "vqdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2986 /* Vector VQRDMLASH. */
2987 {ARM_FEATURE_COPROC (FPU_MVE),
2989 0xee001e40, 0xef811f70,
2990 "vqrdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
2992 /* Vector VQDMLSDH. */
2993 {ARM_FEATURE_COPROC (FPU_MVE),
2995 0xfe000e00, 0xff810f51,
2996 "vqdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
2998 /* Vector VQRDMLSDH. */
2999 {ARM_FEATURE_COPROC (FPU_MVE),
3001 0xfe000e01, 0xff810f51,
3002 "vqrdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3004 /* Vector VQDMULH T1 variant. */
3005 {ARM_FEATURE_COPROC (FPU_MVE),
3007 0xef000b40, 0xff811f51,
3008 "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3010 /* Vector VQRDMULH T2 variant. */
3011 {ARM_FEATURE_COPROC (FPU_MVE),
3013 0xff000b40, 0xff811f51,
3014 "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3016 /* Vector VQDMULH T3 variant. */
3017 {ARM_FEATURE_COPROC (FPU_MVE),
3019 0xee010e60, 0xff811f70,
3020 "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3022 /* Vector VQRDMULH T4 variant. */
3023 {ARM_FEATURE_COPROC (FPU_MVE),
3025 0xfe010e60, 0xff811f70,
3026 "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3029 {ARM_FEATURE_COPROC (FPU_MVE),
3031 0xffb007c0, 0xffb31fd1,
3032 "vqneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
3034 /* Vector VQRSHL T1 variant. */
3035 {ARM_FEATURE_COPROC (FPU_MVE),
3037 0xef000550, 0xef811f51,
3038 "vqrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3040 /* Vector VQRSHL T2 variant. */
3041 {ARM_FEATURE_COPROC (FPU_MVE),
3043 0xee331ee0, 0xefb31ff0,
3044 "vqrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3046 /* Vector VQRSHRN. */
3047 {ARM_FEATURE_COPROC (FPU_MVE),
3049 0xee800f41, 0xefa00fd1,
3050 "vqrshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3052 /* Vector VQRSHRUN. */
3053 {ARM_FEATURE_COPROC (FPU_MVE),
3055 0xfe800fc0, 0xffa00fd1,
3056 "vqrshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3058 /* Vector VQSHL T1 Variant. */
3059 {ARM_FEATURE_COPROC (FPU_MVE),
3061 0xee311ee0, 0xefb31ff0,
3062 "vqshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3064 /* Vector VQSHL T4 Variant. */
3065 {ARM_FEATURE_COPROC (FPU_MVE),
3067 0xef000450, 0xef811f51,
3068 "vqshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3070 /* Vector VQSHRN. */
3071 {ARM_FEATURE_COPROC (FPU_MVE),
3073 0xee800f40, 0xefa00fd1,
3074 "vqshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3076 /* Vector VQSHRUN. */
3077 {ARM_FEATURE_COPROC (FPU_MVE),
3079 0xee800fc0, 0xffa00fd1,
3080 "vqshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3082 /* Vector VQSUB T1 Variant. */
3083 {ARM_FEATURE_COPROC (FPU_MVE),
3085 0xef000250, 0xef811f51,
3086 "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3088 /* Vector VQSUB T2 Variant. */
3089 {ARM_FEATURE_COPROC (FPU_MVE),
3091 0xee001f60, 0xef811f70,
3092 "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3094 /* Vector VREV16. */
3095 {ARM_FEATURE_COPROC (FPU_MVE),
3097 0xffb00140, 0xffb31fd1,
3098 "vrev16%v.8\t%13-15,22Q, %1-3,5Q"},
3100 /* Vector VREV32. */
3101 {ARM_FEATURE_COPROC (FPU_MVE),
3103 0xffb000c0, 0xffb31fd1,
3104 "vrev32%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
3106 /* Vector VREV64. */
3107 {ARM_FEATURE_COPROC (FPU_MVE),
3109 0xffb00040, 0xffb31fd1,
3110 "vrev64%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
3112 /* Vector VRINT floating point. */
3113 {ARM_FEATURE_COPROC (FPU_MVE_FP),
3115 0xffb20440, 0xffb31c51,
3116 "vrint%m%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
3118 /* Vector VRMLALDAVH. */
3119 {ARM_FEATURE_COPROC (FPU_MVE),
3121 0xee800f00, 0xef811f51,
3122 "vrmlalvh%5A%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
3124 /* Vector VRMLALDAVH. */
3125 {ARM_FEATURE_COPROC (FPU_MVE),
3127 0xee801f00, 0xef811f51,
3128 "vrmlaldavh%5Ax%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
3130 /* Vector VRSHL T1 Variant. */
3131 {ARM_FEATURE_COPROC (FPU_MVE),
3133 0xef000540, 0xef811f51,
3134 "vrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3136 /* Vector VRSHL T2 Variant. */
3137 {ARM_FEATURE_COPROC (FPU_MVE),
3139 0xee331e60, 0xefb31ff0,
3140 "vrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3142 /* Vector VRSHRN. */
3143 {ARM_FEATURE_COPROC (FPU_MVE),
3145 0xfe800fc1, 0xffa00fd1,
3146 "vrshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3149 {ARM_FEATURE_COPROC (FPU_MVE),
3151 0xfe300f00, 0xffb10f51,
3152 "vsbc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3154 /* Vector VSHL T2 Variant. */
3155 {ARM_FEATURE_COPROC (FPU_MVE),
3157 0xee311e60, 0xefb31ff0,
3158 "vshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
3160 /* Vector VSHL T3 Variant. */
3161 {ARM_FEATURE_COPROC (FPU_MVE),
3163 0xef000440, 0xef811f51,
3164 "vshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
3167 {ARM_FEATURE_COPROC (FPU_MVE),
3169 0xeea00fc0, 0xffa01ff0,
3170 "vshlc%v\t%13-15,22Q, %0-3r, #%16-20d"},
3172 /* Vector VSHLL T2 Variant. */
3173 {ARM_FEATURE_COPROC (FPU_MVE),
3175 0xee310e01, 0xefb30fd1,
3176 "vshll%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q, #%18-19d"},
3179 {ARM_FEATURE_COPROC (FPU_MVE),
3181 0xee800fc1, 0xffa00fd1,
3182 "vshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
3184 /* Vector VST2 no writeback. */
3185 {ARM_FEATURE_COPROC (FPU_MVE),
3187 0xfc801e00, 0xffb01e5f,
3188 "vst2%5d.%7-8s\t%B, [%16-19r]"},
3190 /* Vector VST2 writeback. */
3191 {ARM_FEATURE_COPROC (FPU_MVE),
3193 0xfca01e00, 0xffb01e5f,
3194 "vst2%5d.%7-8s\t%B, [%16-19r]!"},
3196 /* Vector VST4 no writeback. */
3197 {ARM_FEATURE_COPROC (FPU_MVE),
3199 0xfc801e01, 0xffb01e1f,
3200 "vst4%5-6d.%7-8s\t%B, [%16-19r]"},
3202 /* Vector VST4 writeback. */
3203 {ARM_FEATURE_COPROC (FPU_MVE),
3205 0xfca01e01, 0xffb01e1f,
3206 "vst4%5-6d.%7-8s\t%B, [%16-19r]!"},
3208 /* Vector VSTRB scatter store, T1 variant. */
3209 {ARM_FEATURE_COPROC (FPU_MVE),
3210 MVE_VSTRB_SCATTER_T1,
3211 0xec800e00, 0xffb01e50,
3212 "vstrb%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
3214 /* Vector VSTRH scatter store, T2 variant. */
3215 {ARM_FEATURE_COPROC (FPU_MVE),
3216 MVE_VSTRH_SCATTER_T2,
3217 0xec800e10, 0xffb01e50,
3218 "vstrh%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
3220 /* Vector VSTRW scatter store, T3 variant. */
3221 {ARM_FEATURE_COPROC (FPU_MVE),
3222 MVE_VSTRW_SCATTER_T3,
3223 0xec800e40, 0xffb01e50,
3224 "vstrw%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
3226 /* Vector VSTRD scatter store, T4 variant. */
3227 {ARM_FEATURE_COPROC (FPU_MVE),
3228 MVE_VSTRD_SCATTER_T4,
3229 0xec800fd0, 0xffb01fd0,
3230 "vstrd%v.64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
3232 /* Vector VSTRW scatter store, T5 variant. */
3233 {ARM_FEATURE_COPROC (FPU_MVE),
3234 MVE_VSTRW_SCATTER_T5,
3235 0xfd001e00, 0xff111f00,
3236 "vstrw%v.32\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
3238 /* Vector VSTRD scatter store, T6 variant. */
3239 {ARM_FEATURE_COPROC (FPU_MVE),
3240 MVE_VSTRD_SCATTER_T6,
3241 0xfd001f00, 0xff111f00,
3242 "vstrd%v.64\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
3245 {ARM_FEATURE_COPROC (FPU_MVE),
3247 0xec000e00, 0xfe581e00,
3248 "vstrb%v.%7-8s\t%13-15Q, %d"},
3251 {ARM_FEATURE_COPROC (FPU_MVE),
3253 0xec080e00, 0xfe581e00,
3254 "vstrh%v.%7-8s\t%13-15Q, %d"},
3256 /* Vector VSTRB variant T5. */
3257 {ARM_FEATURE_COPROC (FPU_MVE),
3259 0xec001e00, 0xfe101f80,
3260 "vstrb%v.8\t%13-15,22Q, %d"},
3262 /* Vector VSTRH variant T6. */
3263 {ARM_FEATURE_COPROC (FPU_MVE),
3265 0xec001e80, 0xfe101f80,
3266 "vstrh%v.16\t%13-15,22Q, %d"},
3268 /* Vector VSTRW variant T7. */
3269 {ARM_FEATURE_COPROC (FPU_MVE),
3271 0xec001f00, 0xfe101f80,
3272 "vstrw%v.32\t%13-15,22Q, %d"},
3274 /* Vector VSUB floating point T1 variant. */
3275 {ARM_FEATURE_COPROC (FPU_MVE_FP),
3277 0xef200d40, 0xffa11f51,
3278 "vsub%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3280 /* Vector VSUB floating point T2 variant. */
3281 {ARM_FEATURE_COPROC (FPU_MVE_FP),
3283 0xee301f40, 0xefb11f70,
3284 "vsub%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3286 /* Vector VSUB T1 variant. */
3287 {ARM_FEATURE_COPROC (FPU_MVE),
3289 0xff000840, 0xff811f51,
3290 "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
3292 /* Vector VSUB T2 variant. */
3293 {ARM_FEATURE_COPROC (FPU_MVE),
3295 0xee011f40, 0xff811f70,
3296 "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
3298 {ARM_FEATURE_CORE_LOW (0),
3300 0x00000000, 0x00000000, 0}
3303 /* Opcode tables: ARM, 16-bit Thumb, 32-bit Thumb. All three are partially
3304 ordered: they must be searched linearly from the top to obtain a correct
3307 /* print_insn_arm recognizes the following format control codes:
3311 %a print address for ldr/str instruction
3312 %s print address for ldr/str halfword/signextend instruction
3313 %S like %s but allow UNPREDICTABLE addressing
3314 %b print branch destination
3315 %c print condition code (always bits 28-31)
3316 %m print register mask for ldm/stm instruction
3317 %o print operand2 (immediate or register + shift)
3318 %p print 'p' iff bits 12-15 are 15
3319 %t print 't' iff bit 21 set and bit 24 clear
3320 %B print arm BLX(1) destination
3321 %C print the PSR sub type.
3322 %U print barrier type.
3323 %P print address for pli instruction.
3325 %<bitfield>r print as an ARM register
3326 %<bitfield>T print as an ARM register + 1
3327 %<bitfield>R as %r but r15 is UNPREDICTABLE
3328 %<bitfield>{r|R}u as %{r|R} but if matches the other %u field then is UNPREDICTABLE
3329 %<bitfield>{r|R}U as %{r|R} but if matches the other %U field then is UNPREDICTABLE
3330 %<bitfield>d print the bitfield in decimal
3331 %<bitfield>W print the bitfield plus one in decimal
3332 %<bitfield>x print the bitfield in hex
3333 %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
3335 %<bitfield>'c print specified char iff bitfield is all ones
3336 %<bitfield>`c print specified char iff bitfield is all zeroes
3337 %<bitfield>?ab... select from array of values in big endian order
3339 %e print arm SMI operand (bits 0..7,8..19).
3340 %E print the LSB and WIDTH fields of a BFI or BFC instruction.
3341 %V print the 16-bit immediate field of a MOVT or MOVW instruction.
3342 %R print the SPSR/CPSR or banked register of an MRS. */
3344 static const struct opcode32 arm_opcodes[] =
3346 /* ARM instructions. */
3347 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3348 0xe1a00000, 0xffffffff, "nop\t\t\t; (mov r0, r0)"},
3349 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3350 0xe7f000f0, 0xfff000f0, "udf\t#%e"},
3352 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T | ARM_EXT_V5),
3353 0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
3354 {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
3355 0x00000090, 0x0fe000f0, "mul%20's%c\t%16-19R, %0-3R, %8-11R"},
3356 {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
3357 0x00200090, 0x0fe000f0, "mla%20's%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3358 {ARM_FEATURE_CORE_LOW (ARM_EXT_V2S),
3359 0x01000090, 0x0fb00ff0, "swp%22'b%c\t%12-15RU, %0-3Ru, [%16-19RuU]"},
3360 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
3361 0x00800090, 0x0fa000f0,
3362 "%22?sumull%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3363 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
3364 0x00a00090, 0x0fa000f0,
3365 "%22?sumlal%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3367 /* V8.2 RAS extension instructions. */
3368 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
3369 0xe320f010, 0xffffffff, "esb"},
3371 /* V8 instructions. */
3372 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
3373 0x0320f005, 0x0fffffff, "sevl"},
3374 /* Defined in V8 but is in NOP space so available to all arch. */
3375 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3376 0xe1000070, 0xfff000f0, "hlt\t0x%16-19X%12-15X%8-11X%0-3X"},
3377 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_ATOMICS),
3378 0x01800e90, 0x0ff00ff0, "stlex%c\t%12-15r, %0-3r, [%16-19R]"},
3379 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3380 0x01900e9f, 0x0ff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
3381 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
3382 0x01a00e90, 0x0ff00ff0, "stlexd%c\t%12-15r, %0-3r, %0-3T, [%16-19R]"},
3383 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
3384 0x01b00e9f, 0x0ff00fff, "ldaexd%c\t%12-15r, %12-15T, [%16-19R]"},
3385 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3386 0x01c00e90, 0x0ff00ff0, "stlexb%c\t%12-15r, %0-3r, [%16-19R]"},
3387 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3388 0x01d00e9f, 0x0ff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
3389 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3390 0x01e00e90, 0x0ff00ff0, "stlexh%c\t%12-15r, %0-3r, [%16-19R]"},
3391 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3392 0x01f00e9f, 0x0ff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
3393 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3394 0x0180fc90, 0x0ff0fff0, "stl%c\t%0-3r, [%16-19R]"},
3395 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3396 0x01900c9f, 0x0ff00fff, "lda%c\t%12-15r, [%16-19R]"},
3397 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3398 0x01c0fc90, 0x0ff0fff0, "stlb%c\t%0-3r, [%16-19R]"},
3399 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3400 0x01d00c9f, 0x0ff00fff, "ldab%c\t%12-15r, [%16-19R]"},
3401 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3402 0x01e0fc90, 0x0ff0fff0, "stlh%c\t%0-3r, [%16-19R]"},
3403 {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
3404 0x01f00c9f, 0x0ff00fff, "ldah%c\t%12-15r, [%16-19R]"},
3405 /* CRC32 instructions. */
3406 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3407 0xe1000040, 0xfff00ff0, "crc32b\t%12-15R, %16-19R, %0-3R"},
3408 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3409 0xe1200040, 0xfff00ff0, "crc32h\t%12-15R, %16-19R, %0-3R"},
3410 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3411 0xe1400040, 0xfff00ff0, "crc32w\t%12-15R, %16-19R, %0-3R"},
3412 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3413 0xe1000240, 0xfff00ff0, "crc32cb\t%12-15R, %16-19R, %0-3R"},
3414 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3415 0xe1200240, 0xfff00ff0, "crc32ch\t%12-15R, %16-19R, %0-3R"},
3416 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
3417 0xe1400240, 0xfff00ff0, "crc32cw\t%12-15R, %16-19R, %0-3R"},
3419 /* Privileged Access Never extension instructions. */
3420 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),
3421 0xf1100000, 0xfffffdff, "setpan\t#%9-9d"},
3423 /* Virtualization Extension instructions. */
3424 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x0160006e, 0x0fffffff, "eret%c"},
3425 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x01400070, 0x0ff000f0, "hvc%c\t%e"},
3427 /* Integer Divide Extension instructions. */
3428 {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
3429 0x0710f010, 0x0ff0f0f0, "sdiv%c\t%16-19r, %0-3r, %8-11r"},
3430 {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
3431 0x0730f010, 0x0ff0f0f0, "udiv%c\t%16-19r, %0-3r, %8-11r"},
3433 /* MP Extension instructions. */
3434 {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf410f000, 0xfc70f000, "pldw\t%a"},
3436 /* Speculation Barriers. */
3437 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xe320f014, 0xffffffff, "csdb"},
3438 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff040, 0xffffffff, "ssbb"},
3439 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff044, 0xffffffff, "pssbb"},
3441 /* V7 instructions. */
3442 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf450f000, 0xfd70f000, "pli\t%P"},
3443 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0x0320f0f0, 0x0ffffff0, "dbg%c\t#%0-3d"},
3444 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff051, 0xfffffff3, "dmb\t%U"},
3445 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff041, 0xfffffff3, "dsb\t%U"},
3446 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff050, 0xfffffff0, "dmb\t%U"},
3447 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff040, 0xfffffff0, "dsb\t%U"},
3448 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff060, 0xfffffff0, "isb\t%U"},
3449 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
3450 0x0320f000, 0x0fffffff, "nop%c\t{%0-7d}"},
3452 /* ARM V6T2 instructions. */
3453 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3454 0x07c0001f, 0x0fe0007f, "bfc%c\t%12-15R, %E"},
3455 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3456 0x07c00010, 0x0fe00070, "bfi%c\t%12-15R, %0-3r, %E"},
3457 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3458 0x00600090, 0x0ff000f0, "mls%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3459 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3460 0x002000b0, 0x0f3000f0, "strht%c\t%12-15R, %S"},
3462 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3463 0x00300090, 0x0f3000f0, UNDEFINED_INSTRUCTION },
3464 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3465 0x00300090, 0x0f300090, "ldr%6's%5?hbt%c\t%12-15R, %S"},
3467 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
3468 0x03000000, 0x0ff00000, "movw%c\t%12-15R, %V"},
3469 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
3470 0x03400000, 0x0ff00000, "movt%c\t%12-15R, %V"},
3471 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3472 0x06ff0f30, 0x0fff0ff0, "rbit%c\t%12-15R, %0-3R"},
3473 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
3474 0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, #%7-11d, #%16-20W"},
3476 /* ARM Security extension instructions. */
3477 {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),
3478 0x01600070, 0x0ff000f0, "smc%c\t%e"},
3480 /* ARM V6K instructions. */
3481 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3482 0xf57ff01f, 0xffffffff, "clrex"},
3483 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3484 0x01d00f9f, 0x0ff00fff, "ldrexb%c\t%12-15R, [%16-19R]"},
3485 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3486 0x01b00f9f, 0x0ff00fff, "ldrexd%c\t%12-15r, [%16-19R]"},
3487 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3488 0x01f00f9f, 0x0ff00fff, "ldrexh%c\t%12-15R, [%16-19R]"},
3489 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3490 0x01c00f90, 0x0ff00ff0, "strexb%c\t%12-15R, %0-3R, [%16-19R]"},
3491 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3492 0x01a00f90, 0x0ff00ff0, "strexd%c\t%12-15R, %0-3r, [%16-19R]"},
3493 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3494 0x01e00f90, 0x0ff00ff0, "strexh%c\t%12-15R, %0-3R, [%16-19R]"},
3496 /* ARMv8.5-A instructions. */
3497 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf57ff070, 0xffffffff, "sb"},
3499 /* ARM V6K NOP hints. */
3500 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3501 0x0320f001, 0x0fffffff, "yield%c"},
3502 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3503 0x0320f002, 0x0fffffff, "wfe%c"},
3504 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3505 0x0320f003, 0x0fffffff, "wfi%c"},
3506 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3507 0x0320f004, 0x0fffffff, "sev%c"},
3508 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
3509 0x0320f000, 0x0fffff00, "nop%c\t{%0-7d}"},
3511 /* ARM V6 instructions. */
3512 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3513 0xf1080000, 0xfffffe3f, "cpsie\t%8'a%7'i%6'f"},
3514 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3515 0xf10a0000, 0xfffffe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"},
3516 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3517 0xf10C0000, 0xfffffe3f, "cpsid\t%8'a%7'i%6'f"},
3518 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3519 0xf10e0000, 0xfffffe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"},
3520 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3521 0xf1000000, 0xfff1fe20, "cps\t#%0-4d"},
3522 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3523 0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15R, %16-19R, %0-3R"},
3524 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3525 0x06800010, 0x0ff00070, "pkhbt%c\t%12-15R, %16-19R, %0-3R, lsl #%7-11d"},
3526 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3527 0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15R, %16-19R, %0-3R, asr #32"},
3528 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3529 0x06800050, 0x0ff00070, "pkhtb%c\t%12-15R, %16-19R, %0-3R, asr #%7-11d"},
3530 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3531 0x01900f9f, 0x0ff00fff, "ldrex%c\tr%12-15d, [%16-19R]"},
3532 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3533 0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15R, %16-19R, %0-3R"},
3534 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3535 0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15R, %16-19R, %0-3R"},
3536 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3537 0x06200f30, 0x0ff00ff0, "qasx%c\t%12-15R, %16-19R, %0-3R"},
3538 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3539 0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15R, %16-19R, %0-3R"},
3540 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3541 0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15R, %16-19R, %0-3R"},
3542 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3543 0x06200f50, 0x0ff00ff0, "qsax%c\t%12-15R, %16-19R, %0-3R"},
3544 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3545 0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15R, %16-19R, %0-3R"},
3546 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3547 0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15R, %16-19R, %0-3R"},
3548 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3549 0x06100f30, 0x0ff00ff0, "sasx%c\t%12-15R, %16-19R, %0-3R"},
3550 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3551 0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15R, %16-19R, %0-3R"},
3552 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3553 0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15R, %16-19R, %0-3R"},
3554 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3555 0x06300f30, 0x0ff00ff0, "shasx%c\t%12-15R, %16-19R, %0-3R"},
3556 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3557 0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15R, %16-19R, %0-3R"},
3558 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3559 0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15R, %16-19R, %0-3R"},
3560 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3561 0x06300f50, 0x0ff00ff0, "shsax%c\t%12-15R, %16-19R, %0-3R"},
3562 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3563 0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15R, %16-19R, %0-3R"},
3564 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3565 0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15R, %16-19R, %0-3R"},
3566 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3567 0x06100f50, 0x0ff00ff0, "ssax%c\t%12-15R, %16-19R, %0-3R"},
3568 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3569 0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15R, %16-19R, %0-3R"},
3570 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3571 0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15R, %16-19R, %0-3R"},
3572 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3573 0x06500f30, 0x0ff00ff0, "uasx%c\t%12-15R, %16-19R, %0-3R"},
3574 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3575 0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15R, %16-19R, %0-3R"},
3576 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3577 0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15R, %16-19R, %0-3R"},
3578 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3579 0x06700f30, 0x0ff00ff0, "uhasx%c\t%12-15R, %16-19R, %0-3R"},
3580 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3581 0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15R, %16-19R, %0-3R"},
3582 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3583 0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15R, %16-19R, %0-3R"},
3584 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3585 0x06700f50, 0x0ff00ff0, "uhsax%c\t%12-15R, %16-19R, %0-3R"},
3586 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3587 0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15R, %16-19R, %0-3R"},
3588 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3589 0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15R, %16-19R, %0-3R"},
3590 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3591 0x06600f30, 0x0ff00ff0, "uqasx%c\t%12-15R, %16-19R, %0-3R"},
3592 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3593 0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15R, %16-19R, %0-3R"},
3594 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3595 0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15R, %16-19R, %0-3R"},
3596 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3597 0x06600f50, 0x0ff00ff0, "uqsax%c\t%12-15R, %16-19R, %0-3R"},
3598 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3599 0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15R, %16-19R, %0-3R"},
3600 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3601 0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15R, %16-19R, %0-3R"},
3602 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3603 0x06500f50, 0x0ff00ff0, "usax%c\t%12-15R, %16-19R, %0-3R"},
3604 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3605 0x06bf0f30, 0x0fff0ff0, "rev%c\t%12-15R, %0-3R"},
3606 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3607 0x06bf0fb0, 0x0fff0ff0, "rev16%c\t%12-15R, %0-3R"},
3608 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3609 0x06ff0fb0, 0x0fff0ff0, "revsh%c\t%12-15R, %0-3R"},
3610 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3611 0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t%16-19r%21'!"},
3612 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3613 0x06bf0070, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R"},
3614 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3615 0x06bf0470, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #8"},
3616 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3617 0x06bf0870, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #16"},
3618 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3619 0x06bf0c70, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #24"},
3620 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3621 0x068f0070, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R"},
3622 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3623 0x068f0470, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #8"},
3624 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3625 0x068f0870, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #16"},
3626 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3627 0x068f0c70, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #24"},
3628 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3629 0x06af0070, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R"},
3630 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3631 0x06af0470, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #8"},
3632 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3633 0x06af0870, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #16"},
3634 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3635 0x06af0c70, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #24"},
3636 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3637 0x06ff0070, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R"},
3638 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3639 0x06ff0470, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #8"},
3640 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3641 0x06ff0870, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #16"},
3642 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3643 0x06ff0c70, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #24"},
3644 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3645 0x06cf0070, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R"},
3646 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3647 0x06cf0470, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #8"},
3648 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3649 0x06cf0870, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #16"},
3650 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3651 0x06cf0c70, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #24"},
3652 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3653 0x06ef0070, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R"},
3654 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3655 0x06ef0470, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #8"},
3656 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3657 0x06ef0870, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #16"},
3658 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3659 0x06ef0c70, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #24"},
3660 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3661 0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R"},
3662 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3663 0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3664 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3665 0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3666 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3667 0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3668 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3669 0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R"},
3670 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3671 0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3672 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3673 0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3674 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3675 0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3676 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3677 0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R"},
3678 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3679 0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3680 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3681 0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3682 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3683 0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3684 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3685 0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R"},
3686 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3687 0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3688 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3689 0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3690 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3691 0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3692 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3693 0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R"},
3694 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3695 0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3696 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3697 0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3698 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3699 0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ROR #24"},
3700 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3701 0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R"},
3702 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3703 0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #8"},
3704 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3705 0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #16"},
3706 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3707 0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #24"},
3708 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3709 0x06800fb0, 0x0ff00ff0, "sel%c\t%12-15R, %16-19R, %0-3R"},
3710 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3711 0xf1010000, 0xfffffc00, "setend\t%9?ble"},
3712 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3713 0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19R, %0-3R, %8-11R"},
3714 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3715 0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19R, %0-3R, %8-11R"},
3716 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3717 0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3718 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3719 0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3720 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3721 0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3722 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3723 0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3724 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3725 0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19R, %0-3R, %8-11R"},
3726 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3727 0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3728 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3729 0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3730 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3731 0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t%16-19r%21'!, #%0-4d"},
3732 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3733 0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15R, #%16-20W, %0-3R"},
3734 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3735 0x06a00010, 0x0fe00070, "ssat%c\t%12-15R, #%16-20W, %0-3R, lsl #%7-11d"},
3736 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3737 0x06a00050, 0x0fe00070, "ssat%c\t%12-15R, #%16-20W, %0-3R, asr #%7-11d"},
3738 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3739 0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, #%16-19W, %0-3r"},
3740 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3741 0x01800f90, 0x0ff00ff0, "strex%c\t%12-15R, %0-3R, [%16-19R]"},
3742 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3743 0x00400090, 0x0ff000f0, "umaal%c\t%12-15R, %16-19R, %0-3R, %8-11R"},
3744 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3745 0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19R, %0-3R, %8-11R"},
3746 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3747 0x07800010, 0x0ff000f0, "usada8%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3748 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3749 0x06e00010, 0x0fe00ff0, "usat%c\t%12-15R, #%16-20d, %0-3R"},
3750 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3751 0x06e00010, 0x0fe00070, "usat%c\t%12-15R, #%16-20d, %0-3R, lsl #%7-11d"},
3752 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3753 0x06e00050, 0x0fe00070, "usat%c\t%12-15R, #%16-20d, %0-3R, asr #%7-11d"},
3754 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
3755 0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15R, #%16-19d, %0-3R"},
3757 /* V5J instruction. */
3758 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5J),
3759 0x012fff20, 0x0ffffff0, "bxj%c\t%0-3R"},
3761 /* V5 Instructions. */
3762 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3763 0xe1200070, 0xfff000f0,
3764 "bkpt\t0x%16-19X%12-15X%8-11X%0-3X"},
3765 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3766 0xfa000000, 0xfe000000, "blx\t%B"},
3767 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3768 0x012fff30, 0x0ffffff0, "blx%c\t%0-3R"},
3769 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
3770 0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15R, %0-3R"},
3772 /* V5E "El Segundo" Instructions. */
3773 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
3774 0x000000d0, 0x0e1000f0, "ldrd%c\t%12-15r, %s"},
3775 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
3776 0x000000f0, 0x0e1000f0, "strd%c\t%12-15r, %s"},
3777 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
3778 0xf450f000, 0xfc70f000, "pld\t%a"},
3779 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3780 0x01000080, 0x0ff000f0, "smlabb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3781 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3782 0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3783 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3784 0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3785 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3786 0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11R, %12-15R"},
3788 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3789 0x01200080, 0x0ff000f0, "smlawb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
3790 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3791 0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19R, %0-3r, %8-11R, %12-15R"},
3793 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3794 0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3795 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3796 0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3797 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3798 0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3799 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3800 0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
3802 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3803 0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19R, %0-3R, %8-11R"},
3804 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3805 0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19R, %0-3R, %8-11R"},
3806 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3807 0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19R, %0-3R, %8-11R"},
3808 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3809 0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19R, %0-3R, %8-11R"},
3811 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3812 0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19R, %0-3R, %8-11R"},
3813 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3814 0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19R, %0-3R, %8-11R"},
3816 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3817 0x01000050, 0x0ff00ff0, "qadd%c\t%12-15R, %0-3R, %16-19R"},
3818 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3819 0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15R, %0-3R, %16-19R"},
3820 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3821 0x01200050, 0x0ff00ff0, "qsub%c\t%12-15R, %0-3R, %16-19R"},
3822 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
3823 0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15R, %0-3R, %16-19R"},
3825 /* ARM Instructions. */
3826 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3827 0x052d0004, 0x0fff0fff, "push%c\t{%12-15r}\t\t; (str%c %12-15r, %a)"},
3829 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3830 0x04400000, 0x0e500000, "strb%t%c\t%12-15R, %a"},
3831 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3832 0x04000000, 0x0e500000, "str%t%c\t%12-15r, %a"},
3833 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3834 0x06400000, 0x0e500ff0, "strb%t%c\t%12-15R, %a"},
3835 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3836 0x06000000, 0x0e500ff0, "str%t%c\t%12-15r, %a"},
3837 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3838 0x04400000, 0x0c500010, "strb%t%c\t%12-15R, %a"},
3839 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3840 0x04000000, 0x0c500010, "str%t%c\t%12-15r, %a"},
3842 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3843 0x04400000, 0x0e500000, "strb%c\t%12-15R, %a"},
3844 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3845 0x06400000, 0x0e500010, "strb%c\t%12-15R, %a"},
3846 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3847 0x004000b0, 0x0e5000f0, "strh%c\t%12-15R, %s"},
3848 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3849 0x000000b0, 0x0e500ff0, "strh%c\t%12-15R, %s"},
3851 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3852 0x00500090, 0x0e5000f0, UNDEFINED_INSTRUCTION},
3853 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3854 0x00500090, 0x0e500090, "ldr%6's%5?hb%c\t%12-15R, %s"},
3855 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3856 0x00100090, 0x0e500ff0, UNDEFINED_INSTRUCTION},
3857 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3858 0x00100090, 0x0e500f90, "ldr%6's%5?hb%c\t%12-15R, %s"},
3860 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3861 0x02000000, 0x0fe00000, "and%20's%c\t%12-15r, %16-19r, %o"},
3862 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3863 0x00000000, 0x0fe00010, "and%20's%c\t%12-15r, %16-19r, %o"},
3864 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3865 0x00000010, 0x0fe00090, "and%20's%c\t%12-15R, %16-19R, %o"},
3867 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3868 0x02200000, 0x0fe00000, "eor%20's%c\t%12-15r, %16-19r, %o"},
3869 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3870 0x00200000, 0x0fe00010, "eor%20's%c\t%12-15r, %16-19r, %o"},
3871 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3872 0x00200010, 0x0fe00090, "eor%20's%c\t%12-15R, %16-19R, %o"},
3874 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3875 0x02400000, 0x0fe00000, "sub%20's%c\t%12-15r, %16-19r, %o"},
3876 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3877 0x00400000, 0x0fe00010, "sub%20's%c\t%12-15r, %16-19r, %o"},
3878 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3879 0x00400010, 0x0fe00090, "sub%20's%c\t%12-15R, %16-19R, %o"},
3881 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3882 0x02600000, 0x0fe00000, "rsb%20's%c\t%12-15r, %16-19r, %o"},
3883 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3884 0x00600000, 0x0fe00010, "rsb%20's%c\t%12-15r, %16-19r, %o"},
3885 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3886 0x00600010, 0x0fe00090, "rsb%20's%c\t%12-15R, %16-19R, %o"},
3888 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3889 0x02800000, 0x0fe00000, "add%20's%c\t%12-15r, %16-19r, %o"},
3890 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3891 0x00800000, 0x0fe00010, "add%20's%c\t%12-15r, %16-19r, %o"},
3892 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3893 0x00800010, 0x0fe00090, "add%20's%c\t%12-15R, %16-19R, %o"},
3895 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3896 0x02a00000, 0x0fe00000, "adc%20's%c\t%12-15r, %16-19r, %o"},
3897 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3898 0x00a00000, 0x0fe00010, "adc%20's%c\t%12-15r, %16-19r, %o"},
3899 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3900 0x00a00010, 0x0fe00090, "adc%20's%c\t%12-15R, %16-19R, %o"},
3902 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3903 0x02c00000, 0x0fe00000, "sbc%20's%c\t%12-15r, %16-19r, %o"},
3904 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3905 0x00c00000, 0x0fe00010, "sbc%20's%c\t%12-15r, %16-19r, %o"},
3906 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3907 0x00c00010, 0x0fe00090, "sbc%20's%c\t%12-15R, %16-19R, %o"},
3909 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3910 0x02e00000, 0x0fe00000, "rsc%20's%c\t%12-15r, %16-19r, %o"},
3911 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3912 0x00e00000, 0x0fe00010, "rsc%20's%c\t%12-15r, %16-19r, %o"},
3913 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3914 0x00e00010, 0x0fe00090, "rsc%20's%c\t%12-15R, %16-19R, %o"},
3916 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT),
3917 0x0120f200, 0x0fb0f200, "msr%c\t%C, %0-3r"},
3918 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
3919 0x0120f000, 0x0db0f000, "msr%c\t%C, %o"},
3920 {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
3921 0x01000000, 0x0fb00cff, "mrs%c\t%12-15R, %R"},
3923 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3924 0x03000000, 0x0fe00000, "tst%p%c\t%16-19r, %o"},
3925 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3926 0x01000000, 0x0fe00010, "tst%p%c\t%16-19r, %o"},
3927 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3928 0x01000010, 0x0fe00090, "tst%p%c\t%16-19R, %o"},
3930 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3931 0x03300000, 0x0ff00000, "teq%p%c\t%16-19r, %o"},
3932 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3933 0x01300000, 0x0ff00010, "teq%p%c\t%16-19r, %o"},
3934 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3935 0x01300010, 0x0ff00010, "teq%p%c\t%16-19R, %o"},
3937 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3938 0x03400000, 0x0fe00000, "cmp%p%c\t%16-19r, %o"},
3939 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3940 0x01400000, 0x0fe00010, "cmp%p%c\t%16-19r, %o"},
3941 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3942 0x01400010, 0x0fe00090, "cmp%p%c\t%16-19R, %o"},
3944 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3945 0x03600000, 0x0fe00000, "cmn%p%c\t%16-19r, %o"},
3946 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3947 0x01600000, 0x0fe00010, "cmn%p%c\t%16-19r, %o"},
3948 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3949 0x01600010, 0x0fe00090, "cmn%p%c\t%16-19R, %o"},
3951 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3952 0x03800000, 0x0fe00000, "orr%20's%c\t%12-15r, %16-19r, %o"},
3953 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3954 0x01800000, 0x0fe00010, "orr%20's%c\t%12-15r, %16-19r, %o"},
3955 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3956 0x01800010, 0x0fe00090, "orr%20's%c\t%12-15R, %16-19R, %o"},
3958 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3959 0x03a00000, 0x0fef0000, "mov%20's%c\t%12-15r, %o"},
3960 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3961 0x01a00000, 0x0def0ff0, "mov%20's%c\t%12-15r, %0-3r"},
3962 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3963 0x01a00000, 0x0def0060, "lsl%20's%c\t%12-15R, %q"},
3964 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3965 0x01a00020, 0x0def0060, "lsr%20's%c\t%12-15R, %q"},
3966 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3967 0x01a00040, 0x0def0060, "asr%20's%c\t%12-15R, %q"},
3968 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3969 0x01a00060, 0x0def0ff0, "rrx%20's%c\t%12-15r, %0-3r"},
3970 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3971 0x01a00060, 0x0def0060, "ror%20's%c\t%12-15R, %q"},
3973 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3974 0x03c00000, 0x0fe00000, "bic%20's%c\t%12-15r, %16-19r, %o"},
3975 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3976 0x01c00000, 0x0fe00010, "bic%20's%c\t%12-15r, %16-19r, %o"},
3977 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3978 0x01c00010, 0x0fe00090, "bic%20's%c\t%12-15R, %16-19R, %o"},
3980 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3981 0x03e00000, 0x0fe00000, "mvn%20's%c\t%12-15r, %o"},
3982 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3983 0x01e00000, 0x0fe00010, "mvn%20's%c\t%12-15r, %o"},
3984 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3985 0x01e00010, 0x0fe00090, "mvn%20's%c\t%12-15R, %o"},
3987 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3988 0x06000010, 0x0e000010, UNDEFINED_INSTRUCTION},
3989 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3990 0x049d0004, 0x0fff0fff, "pop%c\t{%12-15r}\t\t; (ldr%c %12-15r, %a)"},
3992 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3993 0x04500000, 0x0c500000, "ldrb%t%c\t%12-15R, %a"},
3995 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3996 0x04300000, 0x0d700000, "ldrt%c\t%12-15R, %a"},
3997 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
3998 0x04100000, 0x0c500000, "ldr%c\t%12-15r, %a"},
4000 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4001 0x092d0001, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4002 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4003 0x092d0002, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4004 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4005 0x092d0004, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4006 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4007 0x092d0008, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4008 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4009 0x092d0010, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4010 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4011 0x092d0020, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4012 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4013 0x092d0040, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4014 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4015 0x092d0080, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4016 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4017 0x092d0100, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4018 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4019 0x092d0200, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4020 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4021 0x092d0400, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4022 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4023 0x092d0800, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4024 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4025 0x092d1000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4026 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4027 0x092d2000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4028 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4029 0x092d4000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4030 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4031 0x092d8000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
4032 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4033 0x092d0000, 0x0fff0000, "push%c\t%m"},
4034 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4035 0x08800000, 0x0ff00000, "stm%c\t%16-19R%21'!, %m%22'^"},
4036 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4037 0x08000000, 0x0e100000, "stm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
4039 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4040 0x08bd0001, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4041 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4042 0x08bd0002, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4043 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4044 0x08bd0004, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4045 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4046 0x08bd0008, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4047 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4048 0x08bd0010, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4049 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4050 0x08bd0020, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4051 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4052 0x08bd0040, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4053 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4054 0x08bd0080, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4055 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4056 0x08bd0100, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4057 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4058 0x08bd0200, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4059 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4060 0x08bd0400, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4061 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4062 0x08bd0800, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4063 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4064 0x08bd1000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4065 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4066 0x08bd2000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4067 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4068 0x08bd4000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4069 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4070 0x08bd8000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
4071 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4072 0x08bd0000, 0x0fff0000, "pop%c\t%m"},
4073 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4074 0x08900000, 0x0f900000, "ldm%c\t%16-19R%21'!, %m%22'^"},
4075 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4076 0x08100000, 0x0e100000, "ldm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
4078 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4079 0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
4080 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4081 0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
4084 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
4085 0x03200000, 0x0fff00ff, "nop%c\t{%0-7d}" UNPREDICTABLE_INSTRUCTION},
4086 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4087 0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
4088 {ARM_FEATURE_CORE_LOW (0),
4089 0x00000000, 0x00000000, 0}
4092 /* print_insn_thumb16 recognizes the following format control codes:
4094 %S print Thumb register (bits 3..5 as high number if bit 6 set)
4095 %D print Thumb register (bits 0..2 as high number if bit 7 set)
4096 %<bitfield>I print bitfield as a signed decimal
4097 (top bit of range being the sign bit)
4098 %N print Thumb register mask (with LR)
4099 %O print Thumb register mask (with PC)
4100 %M print Thumb register mask
4101 %b print CZB's 6-bit unsigned branch destination
4102 %s print Thumb right-shift immediate (6..10; 0 == 32).
4103 %c print the condition code
4104 %C print the condition code, or "s" if not conditional
4105 %x print warning if conditional an not at end of IT block"
4106 %X print "\t; unpredictable <IT:code>" if conditional
4107 %I print IT instruction suffix and operands
4108 %W print Thumb Writeback indicator for LDMIA
4109 %<bitfield>r print bitfield as an ARM register
4110 %<bitfield>d print bitfield as a decimal
4111 %<bitfield>H print (bitfield * 2) as a decimal
4112 %<bitfield>W print (bitfield * 4) as a decimal
4113 %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
4114 %<bitfield>B print Thumb branch destination (signed displacement)
4115 %<bitfield>c print bitfield as a condition code
4116 %<bitnum>'c print specified char iff bit is one
4117 %<bitnum>?ab print a if bit is one else print b. */
4119 static const struct opcode16 thumb_opcodes[] =
4121 /* Thumb instructions. */
4123 /* ARMv8-M Security Extensions instructions. */
4124 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4784, 0xff87, "blxns\t%3-6r"},
4125 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4704, 0xff87, "bxns\t%3-6r"},
4127 /* ARM V8 instructions. */
4128 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xbf50, 0xffff, "sevl%c"},
4129 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xba80, 0xffc0, "hlt\t%0-5x"},
4130 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN), 0xb610, 0xfff7, "setpan\t#%3-3d"},
4132 /* ARM V6K no-argument instructions. */
4133 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xffff, "nop%c"},
4134 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf10, 0xffff, "yield%c"},
4135 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf20, 0xffff, "wfe%c"},
4136 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf30, 0xffff, "wfi%c"},
4137 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf40, 0xffff, "sev%c"},
4138 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xff0f, "nop%c\t{%4-7d}"},
4140 /* ARM V6T2 instructions. */
4141 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4142 0xb900, 0xfd00, "cbnz\t%0-2r, %b%X"},
4143 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4144 0xb100, 0xfd00, "cbz\t%0-2r, %b%X"},
4145 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xbf00, 0xff00, "it%I%X"},
4148 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f%X"},
4149 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f%X"},
4150 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0x4600, 0xffc0, "mov%c\t%0-2r, %3-5r"},
4151 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba00, 0xffc0, "rev%c\t%0-2r, %3-5r"},
4152 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba40, 0xffc0, "rev16%c\t%0-2r, %3-5r"},
4153 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xbac0, 0xffc0, "revsh%c\t%0-2r, %3-5r"},
4154 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb650, 0xfff7, "setend\t%3?ble%X"},
4155 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb200, 0xffc0, "sxth%c\t%0-2r, %3-5r"},
4156 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb240, 0xffc0, "sxtb%c\t%0-2r, %3-5r"},
4157 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb280, 0xffc0, "uxth%c\t%0-2r, %3-5r"},
4158 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb2c0, 0xffc0, "uxtb%c\t%0-2r, %3-5r"},
4160 /* ARM V5 ISA extends Thumb. */
4161 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
4162 0xbe00, 0xff00, "bkpt\t%0-7x"}, /* Is always unconditional. */
4163 /* This is BLX(2). BLX(1) is a 32-bit instruction. */
4164 {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
4165 0x4780, 0xff87, "blx%c\t%3-6r%x"}, /* note: 4 bit register number. */
4166 /* ARM V4T ISA (Thumb v1). */
4167 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4168 0x46C0, 0xFFFF, "nop%c\t\t\t; (mov r8, r8)"},
4170 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4000, 0xFFC0, "and%C\t%0-2r, %3-5r"},
4171 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4040, 0xFFC0, "eor%C\t%0-2r, %3-5r"},
4172 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4080, 0xFFC0, "lsl%C\t%0-2r, %3-5r"},
4173 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x40C0, 0xFFC0, "lsr%C\t%0-2r, %3-5r"},
4174 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4100, 0xFFC0, "asr%C\t%0-2r, %3-5r"},
4175 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4140, 0xFFC0, "adc%C\t%0-2r, %3-5r"},
4176 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4180, 0xFFC0, "sbc%C\t%0-2r, %3-5r"},
4177 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x41C0, 0xFFC0, "ror%C\t%0-2r, %3-5r"},
4178 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4200, 0xFFC0, "tst%c\t%0-2r, %3-5r"},
4179 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4240, 0xFFC0, "neg%C\t%0-2r, %3-5r"},
4180 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4280, 0xFFC0, "cmp%c\t%0-2r, %3-5r"},
4181 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x42C0, 0xFFC0, "cmn%c\t%0-2r, %3-5r"},
4182 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4300, 0xFFC0, "orr%C\t%0-2r, %3-5r"},
4183 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4340, 0xFFC0, "mul%C\t%0-2r, %3-5r"},
4184 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4380, 0xFFC0, "bic%C\t%0-2r, %3-5r"},
4185 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x43C0, 0xFFC0, "mvn%C\t%0-2r, %3-5r"},
4187 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB000, 0xFF80, "add%c\tsp, #%0-6W"},
4188 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB080, 0xFF80, "sub%c\tsp, #%0-6W"},
4190 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4700, 0xFF80, "bx%c\t%S%x"},
4191 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4400, 0xFF00, "add%c\t%D, %S"},
4192 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4500, 0xFF00, "cmp%c\t%D, %S"},
4193 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4600, 0xFF00, "mov%c\t%D, %S"},
4195 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB400, 0xFE00, "push%c\t%N"},
4196 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xBC00, 0xFE00, "pop%c\t%O"},
4198 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4199 0x1800, 0xFE00, "add%C\t%0-2r, %3-5r, %6-8r"},
4200 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4201 0x1A00, 0xFE00, "sub%C\t%0-2r, %3-5r, %6-8r"},
4202 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4203 0x1C00, 0xFE00, "add%C\t%0-2r, %3-5r, #%6-8d"},
4204 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4205 0x1E00, 0xFE00, "sub%C\t%0-2r, %3-5r, #%6-8d"},
4207 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4208 0x5200, 0xFE00, "strh%c\t%0-2r, [%3-5r, %6-8r]"},
4209 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4210 0x5A00, 0xFE00, "ldrh%c\t%0-2r, [%3-5r, %6-8r]"},
4211 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4212 0x5600, 0xF600, "ldrs%11?hb%c\t%0-2r, [%3-5r, %6-8r]"},
4214 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4215 0x5000, 0xFA00, "str%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
4216 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4217 0x5800, 0xFA00, "ldr%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
4219 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0000, 0xFFC0, "mov%C\t%0-2r, %3-5r"},
4220 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4221 0x0000, 0xF800, "lsl%C\t%0-2r, %3-5r, #%6-10d"},
4222 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0800, 0xF800, "lsr%C\t%0-2r, %3-5r, %s"},
4223 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x1000, 0xF800, "asr%C\t%0-2r, %3-5r, %s"},
4225 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2000, 0xF800, "mov%C\t%8-10r, #%0-7d"},
4226 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2800, 0xF800, "cmp%c\t%8-10r, #%0-7d"},
4227 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3000, 0xF800, "add%C\t%8-10r, #%0-7d"},
4228 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3800, 0xF800, "sub%C\t%8-10r, #%0-7d"},
4230 /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
4231 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4233 "ldr%c\t%8-10r, [pc, #%0-7W]\t; (%0-7a)"},
4235 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4236 0x6000, 0xF800, "str%c\t%0-2r, [%3-5r, #%6-10W]"},
4237 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4238 0x6800, 0xF800, "ldr%c\t%0-2r, [%3-5r, #%6-10W]"},
4239 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4240 0x7000, 0xF800, "strb%c\t%0-2r, [%3-5r, #%6-10d]"},
4241 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4242 0x7800, 0xF800, "ldrb%c\t%0-2r, [%3-5r, #%6-10d]"},
4244 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4245 0x8000, 0xF800, "strh%c\t%0-2r, [%3-5r, #%6-10H]"},
4246 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4247 0x8800, 0xF800, "ldrh%c\t%0-2r, [%3-5r, #%6-10H]"},
4249 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4250 0x9000, 0xF800, "str%c\t%8-10r, [sp, #%0-7W]"},
4251 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4252 0x9800, 0xF800, "ldr%c\t%8-10r, [sp, #%0-7W]"},
4254 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4255 0xA000, 0xF800, "add%c\t%8-10r, pc, #%0-7W\t; (adr %8-10r, %0-7a)"},
4256 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4257 0xA800, 0xF800, "add%c\t%8-10r, sp, #%0-7W"},
4259 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC000, 0xF800, "stmia%c\t%8-10r!, %M"},
4260 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC800, 0xF800, "ldmia%c\t%8-10r%W, %M"},
4262 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDF00, 0xFF00, "svc%c\t%0-7d"},
4264 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFF00, "udf%c\t#%0-7d"},
4265 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFE00, UNDEFINED_INSTRUCTION},
4266 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xD000, 0xF000, "b%8-11c.n\t%0-7B%X"},
4268 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xE000, 0xF800, "b%c.n\t%0-10B%x"},
4270 /* The E800 .. FFFF range is unconditionally redirected to the
4271 32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
4272 are processed via that table. Thus, we can never encounter a
4273 bare "second half of BL/BLX(1)" instruction here. */
4274 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1), 0x0000, 0x0000, UNDEFINED_INSTRUCTION},
4275 {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
4278 /* Thumb32 opcodes use the same table structure as the ARM opcodes.
4279 We adopt the convention that hw1 is the high 16 bits of .value and
4280 .mask, hw2 the low 16 bits.
4282 print_insn_thumb32 recognizes the following format control codes:
4286 %I print a 12-bit immediate from hw1[10],hw2[14:12,7:0]
4287 %M print a modified 12-bit immediate (same location)
4288 %J print a 16-bit immediate from hw1[3:0,10],hw2[14:12,7:0]
4289 %K print a 16-bit immediate from hw2[3:0],hw1[3:0],hw2[11:4]
4290 %H print a 16-bit immediate from hw2[3:0],hw1[11:0]
4291 %S print a possibly-shifted Rm
4293 %L print address for a ldrd/strd instruction
4294 %a print the address of a plain load/store
4295 %w print the width and signedness of a core load/store
4296 %m print register mask for ldm/stm
4297 %n print register mask for clrm
4299 %E print the lsb and width fields of a bfc/bfi instruction
4300 %F print the lsb and width fields of a sbfx/ubfx instruction
4301 %G print a fallback offset for Branch Future instructions
4302 %W print an offset for BF instruction
4303 %Y print an offset for BFL instruction
4304 %Z print an offset for BFCSEL instruction
4305 %Q print an offset for Low Overhead Loop instructions
4306 %P print an offset for Low Overhead Loop end instructions
4307 %b print a conditional branch offset
4308 %B print an unconditional branch offset
4309 %s print the shift field of an SSAT instruction
4310 %R print the rotation field of an SXT instruction
4311 %U print barrier type.
4312 %P print address for pli instruction.
4313 %c print the condition code
4314 %x print warning if conditional an not at end of IT block"
4315 %X print "\t; unpredictable <IT:code>" if conditional
4317 %<bitfield>d print bitfield in decimal
4318 %<bitfield>D print bitfield plus one in decimal
4319 %<bitfield>W print bitfield*4 in decimal
4320 %<bitfield>r print bitfield as an ARM register
4321 %<bitfield>R as %<>r but r15 is UNPREDICTABLE
4322 %<bitfield>S as %<>r but r13 and r15 is UNPREDICTABLE
4323 %<bitfield>c print bitfield as a condition code
4325 %<bitfield>'c print specified char iff bitfield is all ones
4326 %<bitfield>`c print specified char iff bitfield is all zeroes
4327 %<bitfield>?ab... select from array of values in big endian order
4329 With one exception at the bottom (done because BL and BLX(1) need
4330 to come dead last), this table was machine-sorted first in
4331 decreasing order of number of bits set in the mask, then in
4332 increasing numeric order of mask, then in increasing numeric order
4333 of opcode. This order is not the clearest for a human reader, but
4334 is guaranteed never to catch a special-case bit pattern with a more
4335 general mask, which is important, because this instruction encoding
4336 makes heavy use of special-case bit patterns. */
4337 static const struct opcode32 thumb32_opcodes[] =
4339 /* Armv8.1-M Mainline and Armv8.1-M Mainline Security Extensions
4341 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4342 0xf00fe001, 0xffffffff, "lctp%c"},
4343 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4344 0xf02fc001, 0xfffff001, "le\t%P"},
4345 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4346 0xf00fc001, 0xfffff001, "le\tlr, %P"},
4347 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4348 0xf01fc001, 0xfffff001, "letp\tlr, %P"},
4349 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4350 0xf040c001, 0xfff0f001, "wls\tlr, %16-19S, %Q"},
4351 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4352 0xf000c001, 0xffc0f001, "wlstp.%20-21s\tlr, %16-19S, %Q"},
4353 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4354 0xf040e001, 0xfff0ffff, "dls\tlr, %16-19S"},
4355 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4356 0xf000e001, 0xffc0ffff, "dlstp.%20-21s\tlr, %16-19S"},
4358 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4359 0xf040e001, 0xf860f001, "bf%c\t%G, %W"},
4360 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4361 0xf060e001, 0xf8f0f001, "bfx%c\t%G, %16-19S"},
4362 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4363 0xf000c001, 0xf800f001, "bfl%c\t%G, %Y"},
4364 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4365 0xf070e001, 0xf8f0f001, "bflx%c\t%G, %16-19S"},
4366 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4367 0xf000e001, 0xf840f001, "bfcsel\t%G, %Z, %18-21c"},
4369 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
4370 0xe89f0000, 0xffff2000, "clrm%c\t%n"},
4372 /* ARMv8-M and ARMv8-M Security Extensions instructions. */
4373 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0xe97fe97f, 0xffffffff, "sg"},
4374 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4375 0xe840f000, 0xfff0f0ff, "tt\t%8-11r, %16-19r"},
4376 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4377 0xe840f040, 0xfff0f0ff, "ttt\t%8-11r, %16-19r"},
4378 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4379 0xe840f080, 0xfff0f0ff, "tta\t%8-11r, %16-19r"},
4380 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
4381 0xe840f0c0, 0xfff0f0ff, "ttat\t%8-11r, %16-19r"},
4383 /* ARM V8.2 RAS extension instructions. */
4384 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
4385 0xf3af8010, 0xffffffff, "esb"},
4387 /* V8 instructions. */
4388 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4389 0xf3af8005, 0xffffffff, "sevl%c.w"},
4390 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4391 0xf78f8000, 0xfffffffc, "dcps%0-1d"},
4392 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4393 0xe8c00f8f, 0xfff00fff, "stlb%c\t%12-15r, [%16-19R]"},
4394 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4395 0xe8c00f9f, 0xfff00fff, "stlh%c\t%12-15r, [%16-19R]"},
4396 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4397 0xe8c00faf, 0xfff00fff, "stl%c\t%12-15r, [%16-19R]"},
4398 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4399 0xe8c00fc0, 0xfff00ff0, "stlexb%c\t%0-3r, %12-15r, [%16-19R]"},
4400 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4401 0xe8c00fd0, 0xfff00ff0, "stlexh%c\t%0-3r, %12-15r, [%16-19R]"},
4402 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4403 0xe8c00fe0, 0xfff00ff0, "stlex%c\t%0-3r, %12-15r, [%16-19R]"},
4404 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4405 0xe8c000f0, 0xfff000f0, "stlexd%c\t%0-3r, %12-15r, %8-11r, [%16-19R]"},
4406 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4407 0xe8d00f8f, 0xfff00fff, "ldab%c\t%12-15r, [%16-19R]"},
4408 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4409 0xe8d00f9f, 0xfff00fff, "ldah%c\t%12-15r, [%16-19R]"},
4410 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4411 0xe8d00faf, 0xfff00fff, "lda%c\t%12-15r, [%16-19R]"},
4412 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4413 0xe8d00fcf, 0xfff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
4414 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4415 0xe8d00fdf, 0xfff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
4416 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4417 0xe8d00fef, 0xfff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
4418 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
4419 0xe8d000ff, 0xfff000ff, "ldaexd%c\t%12-15r, %8-11r, [%16-19R]"},
4421 /* CRC32 instructions. */
4422 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4423 0xfac0f080, 0xfff0f0f0, "crc32b\t%8-11R, %16-19R, %0-3R"},
4424 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4425 0xfac0f090, 0xfff0f0f0, "crc32h\t%9-11R, %16-19R, %0-3R"},
4426 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4427 0xfac0f0a0, 0xfff0f0f0, "crc32w\t%8-11R, %16-19R, %0-3R"},
4428 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4429 0xfad0f080, 0xfff0f0f0, "crc32cb\t%8-11R, %16-19R, %0-3R"},
4430 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4431 0xfad0f090, 0xfff0f0f0, "crc32ch\t%8-11R, %16-19R, %0-3R"},
4432 {ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
4433 0xfad0f0a0, 0xfff0f0f0, "crc32cw\t%8-11R, %16-19R, %0-3R"},
4435 /* Speculation Barriers. */
4436 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8014, 0xffffffff, "csdb"},
4437 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f40, 0xffffffff, "ssbb"},
4438 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f44, 0xffffffff, "pssbb"},
4440 /* V7 instructions. */
4441 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf910f000, 0xff70f000, "pli%c\t%a"},
4442 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3af80f0, 0xfffffff0, "dbg%c\t#%0-3d"},
4443 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f51, 0xfffffff3, "dmb%c\t%U"},
4444 {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f41, 0xfffffff3, "dsb%c\t%U"},
4445 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f50, 0xfffffff0, "dmb%c\t%U"},
4446 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f40, 0xfffffff0, "dsb%c\t%U"},
4447 {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f60, 0xfffffff0, "isb%c\t%U"},
4448 {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
4449 0xfb90f0f0, 0xfff0f0f0, "sdiv%c\t%8-11r, %16-19r, %0-3r"},
4450 {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
4451 0xfbb0f0f0, 0xfff0f0f0, "udiv%c\t%8-11r, %16-19r, %0-3r"},
4453 /* Virtualization Extension instructions. */
4454 {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0xf7e08000, 0xfff0f000, "hvc%c\t%V"},
4455 /* We skip ERET as that is SUBS pc, lr, #0. */
4457 /* MP Extension instructions. */
4458 {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf830f000, 0xff70f000, "pldw%c\t%a"},
4460 /* Security extension instructions. */
4461 {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC), 0xf7f08000, 0xfff0f000, "smc%c\t%K"},
4463 /* ARMv8.5-A instructions. */
4464 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf3bf8f70, 0xffffffff, "sb"},
4466 /* Instructions defined in the basic V6T2 set. */
4467 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8000, 0xffffffff, "nop%c.w"},
4468 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8001, 0xffffffff, "yield%c.w"},
4469 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8002, 0xffffffff, "wfe%c.w"},
4470 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8003, 0xffffffff, "wfi%c.w"},
4471 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8004, 0xffffffff, "sev%c.w"},
4472 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4473 0xf3af8000, 0xffffff00, "nop%c.w\t{%0-7d}"},
4474 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf7f0a000, 0xfff0f000, "udf%c.w\t%H"},
4476 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4477 0xf3bf8f2f, 0xffffffff, "clrex%c"},
4478 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4479 0xf3af8400, 0xffffff1f, "cpsie.w\t%7'a%6'i%5'f%X"},
4480 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4481 0xf3af8600, 0xffffff1f, "cpsid.w\t%7'a%6'i%5'f%X"},
4482 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4483 0xf3c08f00, 0xfff0ffff, "bxj%c\t%16-19r%x"},
4484 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4485 0xe810c000, 0xffd0ffff, "rfedb%c\t%16-19r%21'!"},
4486 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4487 0xe990c000, 0xffd0ffff, "rfeia%c\t%16-19r%21'!"},
4488 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4489 0xf3e08000, 0xffe0f000, "mrs%c\t%8-11r, %D"},
4490 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4491 0xf3af8100, 0xffffffe0, "cps\t#%0-4d%X"},
4492 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4493 0xe8d0f000, 0xfff0fff0, "tbb%c\t[%16-19r, %0-3r]%x"},
4494 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4495 0xe8d0f010, 0xfff0fff0, "tbh%c\t[%16-19r, %0-3r, lsl #1]%x"},
4496 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4497 0xf3af8500, 0xffffff00, "cpsie\t%7'a%6'i%5'f, #%0-4d%X"},
4498 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4499 0xf3af8700, 0xffffff00, "cpsid\t%7'a%6'i%5'f, #%0-4d%X"},
4500 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4501 0xf3de8f00, 0xffffff00, "subs%c\tpc, lr, #%0-7d"},
4502 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4503 0xf3808000, 0xffe0f000, "msr%c\t%C, %16-19r"},
4504 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4505 0xe8500f00, 0xfff00fff, "ldrex%c\t%12-15r, [%16-19r]"},
4506 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4507 0xe8d00f4f, 0xfff00fef, "ldrex%4?hb%c\t%12-15r, [%16-19r]"},
4508 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4509 0xe800c000, 0xffd0ffe0, "srsdb%c\t%16-19r%21'!, #%0-4d"},
4510 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4511 0xe980c000, 0xffd0ffe0, "srsia%c\t%16-19r%21'!, #%0-4d"},
4512 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4513 0xfa0ff080, 0xfffff0c0, "sxth%c.w\t%8-11r, %0-3r%R"},
4514 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4515 0xfa1ff080, 0xfffff0c0, "uxth%c.w\t%8-11r, %0-3r%R"},
4516 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4517 0xfa2ff080, 0xfffff0c0, "sxtb16%c\t%8-11r, %0-3r%R"},
4518 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4519 0xfa3ff080, 0xfffff0c0, "uxtb16%c\t%8-11r, %0-3r%R"},
4520 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4521 0xfa4ff080, 0xfffff0c0, "sxtb%c.w\t%8-11r, %0-3r%R"},
4522 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4523 0xfa5ff080, 0xfffff0c0, "uxtb%c.w\t%8-11r, %0-3r%R"},
4524 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4525 0xe8400000, 0xfff000ff, "strex%c\t%8-11r, %12-15r, [%16-19r]"},
4526 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4527 0xe8d0007f, 0xfff000ff, "ldrexd%c\t%12-15r, %8-11r, [%16-19r]"},
4528 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4529 0xfa80f000, 0xfff0f0f0, "sadd8%c\t%8-11r, %16-19r, %0-3r"},
4530 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4531 0xfa80f010, 0xfff0f0f0, "qadd8%c\t%8-11r, %16-19r, %0-3r"},
4532 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4533 0xfa80f020, 0xfff0f0f0, "shadd8%c\t%8-11r, %16-19r, %0-3r"},
4534 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4535 0xfa80f040, 0xfff0f0f0, "uadd8%c\t%8-11r, %16-19r, %0-3r"},
4536 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4537 0xfa80f050, 0xfff0f0f0, "uqadd8%c\t%8-11r, %16-19r, %0-3r"},
4538 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4539 0xfa80f060, 0xfff0f0f0, "uhadd8%c\t%8-11r, %16-19r, %0-3r"},
4540 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4541 0xfa80f080, 0xfff0f0f0, "qadd%c\t%8-11r, %0-3r, %16-19r"},
4542 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4543 0xfa80f090, 0xfff0f0f0, "qdadd%c\t%8-11r, %0-3r, %16-19r"},
4544 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4545 0xfa80f0a0, 0xfff0f0f0, "qsub%c\t%8-11r, %0-3r, %16-19r"},
4546 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4547 0xfa80f0b0, 0xfff0f0f0, "qdsub%c\t%8-11r, %0-3r, %16-19r"},
4548 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4549 0xfa90f000, 0xfff0f0f0, "sadd16%c\t%8-11r, %16-19r, %0-3r"},
4550 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4551 0xfa90f010, 0xfff0f0f0, "qadd16%c\t%8-11r, %16-19r, %0-3r"},
4552 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4553 0xfa90f020, 0xfff0f0f0, "shadd16%c\t%8-11r, %16-19r, %0-3r"},
4554 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4555 0xfa90f040, 0xfff0f0f0, "uadd16%c\t%8-11r, %16-19r, %0-3r"},
4556 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4557 0xfa90f050, 0xfff0f0f0, "uqadd16%c\t%8-11r, %16-19r, %0-3r"},
4558 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4559 0xfa90f060, 0xfff0f0f0, "uhadd16%c\t%8-11r, %16-19r, %0-3r"},
4560 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4561 0xfa90f080, 0xfff0f0f0, "rev%c.w\t%8-11r, %16-19r"},
4562 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4563 0xfa90f090, 0xfff0f0f0, "rev16%c.w\t%8-11r, %16-19r"},
4564 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4565 0xfa90f0a0, 0xfff0f0f0, "rbit%c\t%8-11r, %16-19r"},
4566 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4567 0xfa90f0b0, 0xfff0f0f0, "revsh%c.w\t%8-11r, %16-19r"},
4568 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4569 0xfaa0f000, 0xfff0f0f0, "sasx%c\t%8-11r, %16-19r, %0-3r"},
4570 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4571 0xfaa0f010, 0xfff0f0f0, "qasx%c\t%8-11r, %16-19r, %0-3r"},
4572 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4573 0xfaa0f020, 0xfff0f0f0, "shasx%c\t%8-11r, %16-19r, %0-3r"},
4574 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4575 0xfaa0f040, 0xfff0f0f0, "uasx%c\t%8-11r, %16-19r, %0-3r"},
4576 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4577 0xfaa0f050, 0xfff0f0f0, "uqasx%c\t%8-11r, %16-19r, %0-3r"},
4578 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4579 0xfaa0f060, 0xfff0f0f0, "uhasx%c\t%8-11r, %16-19r, %0-3r"},
4580 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4581 0xfaa0f080, 0xfff0f0f0, "sel%c\t%8-11r, %16-19r, %0-3r"},
4582 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4583 0xfab0f080, 0xfff0f0f0, "clz%c\t%8-11r, %16-19r"},
4584 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4585 0xfac0f000, 0xfff0f0f0, "ssub8%c\t%8-11r, %16-19r, %0-3r"},
4586 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4587 0xfac0f010, 0xfff0f0f0, "qsub8%c\t%8-11r, %16-19r, %0-3r"},
4588 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4589 0xfac0f020, 0xfff0f0f0, "shsub8%c\t%8-11r, %16-19r, %0-3r"},
4590 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4591 0xfac0f040, 0xfff0f0f0, "usub8%c\t%8-11r, %16-19r, %0-3r"},
4592 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4593 0xfac0f050, 0xfff0f0f0, "uqsub8%c\t%8-11r, %16-19r, %0-3r"},
4594 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4595 0xfac0f060, 0xfff0f0f0, "uhsub8%c\t%8-11r, %16-19r, %0-3r"},
4596 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4597 0xfad0f000, 0xfff0f0f0, "ssub16%c\t%8-11r, %16-19r, %0-3r"},
4598 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4599 0xfad0f010, 0xfff0f0f0, "qsub16%c\t%8-11r, %16-19r, %0-3r"},
4600 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4601 0xfad0f020, 0xfff0f0f0, "shsub16%c\t%8-11r, %16-19r, %0-3r"},
4602 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4603 0xfad0f040, 0xfff0f0f0, "usub16%c\t%8-11r, %16-19r, %0-3r"},
4604 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4605 0xfad0f050, 0xfff0f0f0, "uqsub16%c\t%8-11r, %16-19r, %0-3r"},
4606 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4607 0xfad0f060, 0xfff0f0f0, "uhsub16%c\t%8-11r, %16-19r, %0-3r"},
4608 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4609 0xfae0f000, 0xfff0f0f0, "ssax%c\t%8-11r, %16-19r, %0-3r"},
4610 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4611 0xfae0f010, 0xfff0f0f0, "qsax%c\t%8-11r, %16-19r, %0-3r"},
4612 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4613 0xfae0f020, 0xfff0f0f0, "shsax%c\t%8-11r, %16-19r, %0-3r"},
4614 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4615 0xfae0f040, 0xfff0f0f0, "usax%c\t%8-11r, %16-19r, %0-3r"},
4616 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4617 0xfae0f050, 0xfff0f0f0, "uqsax%c\t%8-11r, %16-19r, %0-3r"},
4618 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4619 0xfae0f060, 0xfff0f0f0, "uhsax%c\t%8-11r, %16-19r, %0-3r"},
4620 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4621 0xfb00f000, 0xfff0f0f0, "mul%c.w\t%8-11r, %16-19r, %0-3r"},
4622 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4623 0xfb70f000, 0xfff0f0f0, "usad8%c\t%8-11r, %16-19r, %0-3r"},
4624 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4625 0xfa00f000, 0xffe0f0f0, "lsl%20's%c.w\t%8-11R, %16-19R, %0-3R"},
4626 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4627 0xfa20f000, 0xffe0f0f0, "lsr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
4628 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4629 0xfa40f000, 0xffe0f0f0, "asr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
4630 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4631 0xfa60f000, 0xffe0f0f0, "ror%20's%c.w\t%8-11r, %16-19r, %0-3r"},
4632 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4633 0xe8c00f40, 0xfff00fe0, "strex%4?hb%c\t%0-3r, %12-15r, [%16-19r]"},
4634 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4635 0xf3200000, 0xfff0f0e0, "ssat16%c\t%8-11r, #%0-4D, %16-19r"},
4636 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4637 0xf3a00000, 0xfff0f0e0, "usat16%c\t%8-11r, #%0-4d, %16-19r"},
4638 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4639 0xfb20f000, 0xfff0f0e0, "smuad%4'x%c\t%8-11r, %16-19r, %0-3r"},
4640 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4641 0xfb30f000, 0xfff0f0e0, "smulw%4?tb%c\t%8-11r, %16-19r, %0-3r"},
4642 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4643 0xfb40f000, 0xfff0f0e0, "smusd%4'x%c\t%8-11r, %16-19r, %0-3r"},
4644 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4645 0xfb50f000, 0xfff0f0e0, "smmul%4'r%c\t%8-11r, %16-19r, %0-3r"},
4646 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4647 0xfa00f080, 0xfff0f0c0, "sxtah%c\t%8-11r, %16-19r, %0-3r%R"},
4648 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4649 0xfa10f080, 0xfff0f0c0, "uxtah%c\t%8-11r, %16-19r, %0-3r%R"},
4650 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4651 0xfa20f080, 0xfff0f0c0, "sxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
4652 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4653 0xfa30f080, 0xfff0f0c0, "uxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
4654 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4655 0xfa40f080, 0xfff0f0c0, "sxtab%c\t%8-11r, %16-19r, %0-3r%R"},
4656 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4657 0xfa50f080, 0xfff0f0c0, "uxtab%c\t%8-11r, %16-19r, %0-3r%R"},
4658 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4659 0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r"},
4660 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4661 0xf36f0000, 0xffff8020, "bfc%c\t%8-11r, %E"},
4662 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4663 0xea100f00, 0xfff08f00, "tst%c.w\t%16-19r, %S"},
4664 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4665 0xea900f00, 0xfff08f00, "teq%c\t%16-19r, %S"},
4666 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4667 0xeb100f00, 0xfff08f00, "cmn%c.w\t%16-19r, %S"},
4668 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4669 0xebb00f00, 0xfff08f00, "cmp%c.w\t%16-19r, %S"},
4670 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4671 0xf0100f00, 0xfbf08f00, "tst%c.w\t%16-19r, %M"},
4672 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4673 0xf0900f00, 0xfbf08f00, "teq%c\t%16-19r, %M"},
4674 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4675 0xf1100f00, 0xfbf08f00, "cmn%c.w\t%16-19r, %M"},
4676 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4677 0xf1b00f00, 0xfbf08f00, "cmp%c.w\t%16-19r, %M"},
4678 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4679 0xea4f0000, 0xffef8000, "mov%20's%c.w\t%8-11r, %S"},
4680 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4681 0xea6f0000, 0xffef8000, "mvn%20's%c.w\t%8-11r, %S"},
4682 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4683 0xe8c00070, 0xfff000f0, "strexd%c\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
4684 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4685 0xfb000000, 0xfff000f0, "mla%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
4686 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4687 0xfb000010, 0xfff000f0, "mls%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
4688 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4689 0xfb700000, 0xfff000f0, "usada8%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4690 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4691 0xfb800000, 0xfff000f0, "smull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4692 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4693 0xfba00000, 0xfff000f0, "umull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4694 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4695 0xfbc00000, 0xfff000f0, "smlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4696 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4697 0xfbe00000, 0xfff000f0, "umlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4698 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4699 0xfbe00060, 0xfff000f0, "umaal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4700 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4701 0xe8500f00, 0xfff00f00, "ldrex%c\t%12-15r, [%16-19r, #%0-7W]"},
4702 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4703 0xf04f0000, 0xfbef8000, "mov%20's%c.w\t%8-11r, %M"},
4704 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4705 0xf06f0000, 0xfbef8000, "mvn%20's%c.w\t%8-11r, %M"},
4706 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4707 0xf810f000, 0xff70f000, "pld%c\t%a"},
4708 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4709 0xfb200000, 0xfff000e0, "smlad%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4710 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4711 0xfb300000, 0xfff000e0, "smlaw%4?tb%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4712 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4713 0xfb400000, 0xfff000e0, "smlsd%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4714 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4715 0xfb500000, 0xfff000e0, "smmla%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4716 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4717 0xfb600000, 0xfff000e0, "smmls%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
4718 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4719 0xfbc000c0, 0xfff000e0, "smlald%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4720 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4721 0xfbd000c0, 0xfff000e0, "smlsld%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
4722 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4723 0xeac00000, 0xfff08030, "pkhbt%c\t%8-11r, %16-19r, %S"},
4724 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4725 0xeac00020, 0xfff08030, "pkhtb%c\t%8-11r, %16-19r, %S"},
4726 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4727 0xf3400000, 0xfff08020, "sbfx%c\t%8-11r, %16-19r, %F"},
4728 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4729 0xf3c00000, 0xfff08020, "ubfx%c\t%8-11r, %16-19r, %F"},
4730 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4731 0xf8000e00, 0xff900f00, "str%wt%c\t%12-15r, %a"},
4732 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4733 0xfb100000, 0xfff000c0,
4734 "smla%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
4735 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4736 0xfbc00080, 0xfff000c0,
4737 "smlal%5?tb%4?tb%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
4738 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4739 0xf3600000, 0xfff08020, "bfi%c\t%8-11r, %16-19r, %E"},
4740 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4741 0xf8100e00, 0xfe900f00, "ldr%wt%c\t%12-15r, %a"},
4742 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4743 0xf3000000, 0xffd08020, "ssat%c\t%8-11r, #%0-4D, %16-19r%s"},
4744 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4745 0xf3800000, 0xffd08020, "usat%c\t%8-11r, #%0-4d, %16-19r%s"},
4746 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4747 0xf2000000, 0xfbf08000, "addw%c\t%8-11r, %16-19r, %I"},
4748 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4749 0xf2400000, 0xfbf08000, "movw%c\t%8-11r, %J"},
4750 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4751 0xf2a00000, 0xfbf08000, "subw%c\t%8-11r, %16-19r, %I"},
4752 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4753 0xf2c00000, 0xfbf08000, "movt%c\t%8-11r, %J"},
4754 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4755 0xea000000, 0xffe08000, "and%20's%c.w\t%8-11r, %16-19r, %S"},
4756 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4757 0xea200000, 0xffe08000, "bic%20's%c.w\t%8-11r, %16-19r, %S"},
4758 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4759 0xea400000, 0xffe08000, "orr%20's%c.w\t%8-11r, %16-19r, %S"},
4760 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4761 0xea600000, 0xffe08000, "orn%20's%c\t%8-11r, %16-19r, %S"},
4762 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4763 0xea800000, 0xffe08000, "eor%20's%c.w\t%8-11r, %16-19r, %S"},
4764 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4765 0xeb000000, 0xffe08000, "add%20's%c.w\t%8-11r, %16-19r, %S"},
4766 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4767 0xeb400000, 0xffe08000, "adc%20's%c.w\t%8-11r, %16-19r, %S"},
4768 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4769 0xeb600000, 0xffe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %S"},
4770 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4771 0xeba00000, 0xffe08000, "sub%20's%c.w\t%8-11r, %16-19r, %S"},
4772 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4773 0xebc00000, 0xffe08000, "rsb%20's%c\t%8-11r, %16-19r, %S"},
4774 {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
4775 0xe8400000, 0xfff00000, "strex%c\t%8-11r, %12-15r, [%16-19r, #%0-7W]"},
4776 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4777 0xf0000000, 0xfbe08000, "and%20's%c.w\t%8-11r, %16-19r, %M"},
4778 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4779 0xf0200000, 0xfbe08000, "bic%20's%c.w\t%8-11r, %16-19r, %M"},
4780 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4781 0xf0400000, 0xfbe08000, "orr%20's%c.w\t%8-11r, %16-19r, %M"},
4782 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4783 0xf0600000, 0xfbe08000, "orn%20's%c\t%8-11r, %16-19r, %M"},
4784 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4785 0xf0800000, 0xfbe08000, "eor%20's%c.w\t%8-11r, %16-19r, %M"},
4786 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4787 0xf1000000, 0xfbe08000, "add%20's%c.w\t%8-11r, %16-19r, %M"},
4788 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4789 0xf1400000, 0xfbe08000, "adc%20's%c.w\t%8-11r, %16-19r, %M"},
4790 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4791 0xf1600000, 0xfbe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %M"},
4792 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4793 0xf1a00000, 0xfbe08000, "sub%20's%c.w\t%8-11r, %16-19r, %M"},
4794 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4795 0xf1c00000, 0xfbe08000, "rsb%20's%c\t%8-11r, %16-19r, %M"},
4796 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4797 0xe8800000, 0xffd00000, "stmia%c.w\t%16-19r%21'!, %m"},
4798 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4799 0xe8900000, 0xffd00000, "ldmia%c.w\t%16-19r%21'!, %m"},
4800 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4801 0xe9000000, 0xffd00000, "stmdb%c\t%16-19r%21'!, %m"},
4802 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4803 0xe9100000, 0xffd00000, "ldmdb%c\t%16-19r%21'!, %m"},
4804 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4805 0xe9c00000, 0xffd000ff, "strd%c\t%12-15r, %8-11r, [%16-19r]"},
4806 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4807 0xe9d00000, 0xffd000ff, "ldrd%c\t%12-15r, %8-11r, [%16-19r]"},
4808 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4809 0xe9400000, 0xff500000,
4810 "strd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!%L"},
4811 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4812 0xe9500000, 0xff500000,
4813 "ldrd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!%L"},
4814 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4815 0xe8600000, 0xff700000,
4816 "strd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W%L"},
4817 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4818 0xe8700000, 0xff700000,
4819 "ldrd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W%L"},
4820 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4821 0xf8000000, 0xff100000, "str%w%c.w\t%12-15r, %a"},
4822 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4823 0xf8100000, 0xfe100000, "ldr%w%c.w\t%12-15r, %a"},
4825 /* Filter out Bcc with cond=E or F, which are used for other instructions. */
4826 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4827 0xf3c08000, 0xfbc0d000, "undefined (bcc, cond=0xF)"},
4828 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4829 0xf3808000, 0xfbc0d000, "undefined (bcc, cond=0xE)"},
4830 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4831 0xf0008000, 0xf800d000, "b%22-25c.w\t%b%X"},
4832 {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
4833 0xf0009000, 0xf800d000, "b%c.w\t%B%x"},
4835 /* These have been 32-bit since the invention of Thumb. */
4836 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4837 0xf000c000, 0xf800d001, "blx%c\t%B%x"},
4838 {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
4839 0xf000d000, 0xf800d000, "bl%c\t%B%x"},
4842 {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
4843 0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
4844 {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
4847 static const char *const arm_conditional[] =
4848 {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
4849 "hi", "ls", "ge", "lt", "gt", "le", "al", "<und>", ""};
4851 static const char *const arm_fp_const[] =
4852 {"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
4854 static const char *const arm_shift[] =
4855 {"lsl", "lsr", "asr", "ror"};
4860 const char *description;
4861 const char *reg_names[16];
4865 static const arm_regname regnames[] =
4867 { "reg-names-raw", N_("Select raw register names"),
4868 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
4869 { "reg-names-gcc", N_("Select register names used by GCC"),
4870 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc" }},
4871 { "reg-names-std", N_("Select register names used in ARM's ISA documentation"),
4872 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc" }},
4873 { "force-thumb", N_("Assume all insns are Thumb insns"), {NULL} },
4874 { "no-force-thumb", N_("Examine preceding label to determine an insn's type"), {NULL} },
4875 { "reg-names-apcs", N_("Select register names used in the APCS"),
4876 { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl", "fp", "ip", "sp", "lr", "pc" }},
4877 { "reg-names-atpcs", N_("Select register names used in the ATPCS"),
4878 { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "IP", "SP", "LR", "PC" }},
4879 { "reg-names-special-atpcs", N_("Select special register names used in the ATPCS"),
4880 { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }}
4883 static const char *const iwmmxt_wwnames[] =
4884 {"b", "h", "w", "d"};
4886 static const char *const iwmmxt_wwssnames[] =
4887 {"b", "bus", "bc", "bss",
4888 "h", "hus", "hc", "hss",
4889 "w", "wus", "wc", "wss",
4890 "d", "dus", "dc", "dss"
4893 static const char *const iwmmxt_regnames[] =
4894 { "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7",
4895 "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"
4898 static const char *const iwmmxt_cregnames[] =
4899 { "wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved",
4900 "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"
4903 static const char *const vec_condnames[] =
4904 { "eq", "ne", "cs", "hi", "ge", "lt", "gt", "le"
4907 static const char *const mve_predicatenames[] =
4908 { "", "ttt", "tt", "tte", "t", "tee", "te", "tet", "",
4909 "eee", "ee", "eet", "e", "ett", "et", "ete"
4912 /* Names for 2-bit size field for mve vector isntructions. */
4913 static const char *const mve_vec_sizename[] =
4914 { "8", "16", "32", "64"};
4916 /* Indicates whether we are processing a then predicate,
4917 else predicate or none at all. */
4925 /* Information used to process a vpt block and subsequent instructions. */
4928 /* Are we in a vpt block. */
4929 bfd_boolean in_vpt_block;
4931 /* Next predicate state if in vpt block. */
4932 enum vpt_pred_state next_pred_state;
4934 /* Mask from vpt/vpst instruction. */
4935 long predicate_mask;
4937 /* Instruction number in vpt block. */
4938 long current_insn_num;
4940 /* Number of instructions in vpt block.. */
4944 static struct vpt_block vpt_block_state =
4953 /* Default to GCC register name set. */
4954 static unsigned int regname_selected = 1;
4956 #define NUM_ARM_OPTIONS ARRAY_SIZE (regnames)
4957 #define arm_regnames regnames[regname_selected].reg_names
4959 static bfd_boolean force_thumb = FALSE;
4961 /* Current IT instruction state. This contains the same state as the IT
4962 bits in the CPSR. */
4963 static unsigned int ifthen_state;
4964 /* IT state for the next instruction. */
4965 static unsigned int ifthen_next_state;
4966 /* The address of the insn for which the IT state is valid. */
4967 static bfd_vma ifthen_address;
4968 #define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
4969 /* Indicates that the current Conditional state is unconditional or outside
4971 #define COND_UNCOND 16
4975 /* Extract the predicate mask for a VPT or VPST instruction.
4976 The mask is composed of bits 13-15 (Mkl) and bit 22 (Mkh). */
4979 mve_extract_pred_mask (long given)
4981 return ((given & 0x00400000) >> 19) | ((given & 0xe000) >> 13);
4984 /* Return the number of instructions in a MVE predicate block. */
4986 num_instructions_vpt_block (long given)
4988 long mask = mve_extract_pred_mask (given);
4995 if ((mask & 7) == 4)
4998 if ((mask & 3) == 2)
5001 if ((mask & 1) == 1)
5008 mark_outside_vpt_block (void)
5010 vpt_block_state.in_vpt_block = FALSE;
5011 vpt_block_state.next_pred_state = PRED_NONE;
5012 vpt_block_state.predicate_mask = 0;
5013 vpt_block_state.current_insn_num = 0;
5014 vpt_block_state.num_pred_insn = 0;
5018 mark_inside_vpt_block (long given)
5020 vpt_block_state.in_vpt_block = TRUE;
5021 vpt_block_state.next_pred_state = PRED_THEN;
5022 vpt_block_state.predicate_mask = mve_extract_pred_mask (given);
5023 vpt_block_state.current_insn_num = 0;
5024 vpt_block_state.num_pred_insn = num_instructions_vpt_block (given);
5025 assert (vpt_block_state.num_pred_insn >= 1);
5028 static enum vpt_pred_state
5029 invert_next_predicate_state (enum vpt_pred_state astate)
5031 if (astate == PRED_THEN)
5033 else if (astate == PRED_ELSE)
5039 static enum vpt_pred_state
5040 update_next_predicate_state (void)
5042 long pred_mask = vpt_block_state.predicate_mask;
5043 long mask_for_insn = 0;
5045 switch (vpt_block_state.current_insn_num)
5063 if (pred_mask & mask_for_insn)
5064 return invert_next_predicate_state (vpt_block_state.next_pred_state);
5066 return vpt_block_state.next_pred_state;
5070 update_vpt_block_state (void)
5072 vpt_block_state.current_insn_num++;
5073 if (vpt_block_state.current_insn_num == vpt_block_state.num_pred_insn)
5075 /* No more instructions to process in vpt block. */
5076 mark_outside_vpt_block ();
5080 vpt_block_state.next_pred_state = update_next_predicate_state ();
5083 /* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
5084 Returns pointer to following character of the format string and
5085 fills in *VALUEP and *WIDTHP with the extracted value and number of
5086 bits extracted. WIDTHP can be NULL. */
5089 arm_decode_bitfield (const char *ptr,
5091 unsigned long *valuep,
5094 unsigned long value = 0;
5102 for (start = 0; *ptr >= '0' && *ptr <= '9'; ptr++)
5103 start = start * 10 + *ptr - '0';
5105 for (end = 0, ptr++; *ptr >= '0' && *ptr <= '9'; ptr++)
5106 end = end * 10 + *ptr - '0';
5112 value |= ((insn >> start) & ((2ul << bits) - 1)) << width;
5115 while (*ptr++ == ',');
5123 arm_decode_shift (long given, fprintf_ftype func, void *stream,
5124 bfd_boolean print_shift)
5126 func (stream, "%s", arm_regnames[given & 0xf]);
5128 if ((given & 0xff0) != 0)
5130 if ((given & 0x10) == 0)
5132 int amount = (given & 0xf80) >> 7;
5133 int shift = (given & 0x60) >> 5;
5139 func (stream, ", rrx");
5147 func (stream, ", %s #%d", arm_shift[shift], amount);
5149 func (stream, ", #%d", amount);
5151 else if ((given & 0x80) == 0x80)
5152 func (stream, "\t; <illegal shifter operand>");
5153 else if (print_shift)
5154 func (stream, ", %s %s", arm_shift[(given & 0x60) >> 5],
5155 arm_regnames[(given & 0xf00) >> 8]);
5157 func (stream, ", %s", arm_regnames[(given & 0xf00) >> 8]);
5161 /* Return TRUE if the MATCHED_INSN can be inside an IT block. */
5164 is_mve_okay_in_it (enum mve_instructions matched_insn)
5166 switch (matched_insn)
5168 case MVE_VMOV_GP_TO_VEC_LANE:
5169 case MVE_VMOV2_VEC_LANE_TO_GP:
5170 case MVE_VMOV2_GP_TO_VEC_LANE:
5171 case MVE_VMOV_VEC_LANE_TO_GP:
5179 is_mve_architecture (struct disassemble_info *info)
5181 struct arm_private_data *private_data = info->private_data;
5182 arm_feature_set allowed_arches = private_data->features;
5184 arm_feature_set arm_ext_v8_1m_main
5185 = ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
5187 if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
5188 && !ARM_CPU_IS_ANY (allowed_arches))
5195 is_vpt_instruction (long given)
5198 /* If mkh:mkl is '0000' then its not a vpt/vpst instruction. */
5199 if ((given & 0x0040e000) == 0)
5202 /* VPT floating point T1 variant. */
5203 if (((given & 0xefb10f50) == 0xee310f00 && ((given & 0x1001) != 0x1))
5204 /* VPT floating point T2 variant. */
5205 || ((given & 0xefb10f50) == 0xee310f40)
5206 /* VPT vector T1 variant. */
5207 || ((given & 0xff811f51) == 0xfe010f00)
5208 /* VPT vector T2 variant. */
5209 || ((given & 0xff811f51) == 0xfe010f01
5210 && ((given & 0x300000) != 0x300000))
5211 /* VPT vector T3 variant. */
5212 || ((given & 0xff811f50) == 0xfe011f00)
5213 /* VPT vector T4 variant. */
5214 || ((given & 0xff811f70) == 0xfe010f40)
5215 /* VPT vector T5 variant. */
5216 || ((given & 0xff811f70) == 0xfe010f60)
5217 /* VPT vector T6 variant. */
5218 || ((given & 0xff811f50) == 0xfe011f40)
5219 /* VPST vector T variant. */
5220 || ((given & 0xffbf1fff) == 0xfe310f4d))
5226 /* Decode a bitfield from opcode GIVEN, with starting bitfield = START
5227 and ending bitfield = END. END must be greater than START. */
5229 static unsigned long
5230 arm_decode_field (unsigned long given, unsigned int start, unsigned int end)
5232 int bits = end - start;
5237 return ((given >> start) & ((2ul << bits) - 1));
5240 /* Decode a bitfield from opcode GIVEN, with multiple bitfields:
5241 START:END and START2:END2. END/END2 must be greater than
5244 static unsigned long
5245 arm_decode_field_multiple (unsigned long given, unsigned int start,
5246 unsigned int end, unsigned int start2,
5249 int bits = end - start;
5250 int bits2 = end2 - start2;
5251 unsigned long value = 0;
5257 value = arm_decode_field (given, start, end);
5260 value |= ((given >> start2) & ((2ul << bits2) - 1)) << width;
5264 /* Return TRUE if the GIVEN encoding should not be decoded as MATCHED_INSN.
5265 This helps us decode instructions that change mnemonic depending on specific
5266 operand values/encodings. */
5269 is_mve_encoding_conflict (unsigned long given,
5270 enum mve_instructions matched_insn)
5272 switch (matched_insn)
5275 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5281 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5283 if ((arm_decode_field (given, 12, 12) == 0)
5284 && (arm_decode_field (given, 0, 0) == 1))
5289 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5291 if (arm_decode_field (given, 0, 3) == 0xd)
5295 case MVE_VPT_VEC_T1:
5296 case MVE_VPT_VEC_T2:
5297 case MVE_VPT_VEC_T3:
5298 case MVE_VPT_VEC_T4:
5299 case MVE_VPT_VEC_T5:
5300 case MVE_VPT_VEC_T6:
5301 if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
5303 if (arm_decode_field (given, 20, 21) == 3)
5307 case MVE_VCMP_FP_T1:
5308 if ((arm_decode_field (given, 12, 12) == 0)
5309 && (arm_decode_field (given, 0, 0) == 1))
5314 case MVE_VCMP_FP_T2:
5315 if (arm_decode_field (given, 0, 3) == 0xd)
5322 case MVE_VMUL_VEC_T2:
5329 case MVE_VADD_VEC_T2:
5330 case MVE_VSUB_VEC_T2:
5347 case MVE_VQDMULH_T3:
5348 case MVE_VQRDMULH_T4:
5354 case MVE_VCMP_VEC_T1:
5355 case MVE_VCMP_VEC_T2:
5356 case MVE_VCMP_VEC_T3:
5357 case MVE_VCMP_VEC_T4:
5358 case MVE_VCMP_VEC_T5:
5359 case MVE_VCMP_VEC_T6:
5360 if (arm_decode_field (given, 20, 21) == 3)
5369 if (arm_decode_field (given, 7, 8) == 3)
5376 if ((arm_decode_field (given, 24, 24) == 0)
5377 && (arm_decode_field (given, 21, 21) == 0))
5381 else if ((arm_decode_field (given, 7, 8) == 3))
5389 if ((arm_decode_field (given, 24, 24) == 0)
5390 && (arm_decode_field (given, 21, 21) == 0))
5397 case MVE_VCVT_FP_FIX_VEC:
5398 return (arm_decode_field (given, 16, 21) & 0x38) == 0;
5403 unsigned long cmode = arm_decode_field (given, 8, 11);
5405 if ((cmode & 1) == 0)
5407 else if ((cmode & 0xc) == 0xc)
5415 unsigned long cmode = arm_decode_field (given, 8, 11);
5417 if ((cmode & 9) == 1)
5419 else if ((cmode & 5) == 1)
5421 else if ((cmode & 0xe) == 0xe)
5427 case MVE_VMOV_IMM_TO_VEC:
5428 if ((arm_decode_field (given, 5, 5) == 1)
5429 && (arm_decode_field (given, 8, 11) != 0xe))
5436 unsigned long size = arm_decode_field (given, 19, 20);
5437 if ((size == 0) || (size == 3))
5458 if (arm_decode_field (given, 18, 19) == 3)
5464 case MVE_VRMLSLDAVH:
5467 if (arm_decode_field (given, 20, 22) == 7)
5472 case MVE_VRMLALDAVH:
5473 if ((arm_decode_field (given, 20, 22) & 6) == 6)
5480 if ((arm_decode_field (given, 20, 21) == 3)
5481 || (arm_decode_field (given, 1, 3) == 7))
5488 if (arm_decode_field (given, 16, 18) == 0)
5490 unsigned long sz = arm_decode_field (given, 19, 20);
5492 if ((sz == 1) || (sz == 2))
5507 if (arm_decode_field (given, 19, 21) == 0)
5513 if (arm_decode_field (given, 16, 19) == 0xf)
5519 case MVE_VADD_FP_T1:
5520 case MVE_VADD_FP_T2:
5521 case MVE_VADD_VEC_T1:
5528 print_mve_vld_str_addr (struct disassemble_info *info,
5529 unsigned long given,
5530 enum mve_instructions matched_insn)
5532 void *stream = info->stream;
5533 fprintf_ftype func = info->fprintf_func;
5535 unsigned long p, w, gpr, imm, add, mod_imm;
5537 imm = arm_decode_field (given, 0, 6);
5540 switch (matched_insn)
5544 gpr = arm_decode_field (given, 16, 18);
5549 gpr = arm_decode_field (given, 16, 18);
5555 gpr = arm_decode_field (given, 16, 19);
5561 gpr = arm_decode_field (given, 16, 19);
5567 gpr = arm_decode_field (given, 16, 19);
5574 p = arm_decode_field (given, 24, 24);
5575 w = arm_decode_field (given, 21, 21);
5577 add = arm_decode_field (given, 23, 23);
5581 /* Don't print anything for '+' as it is implied. */
5591 func (stream, "[%s, #%s%lu]", arm_regnames[gpr], add_sub, mod_imm);
5592 /* Pre-indexed mode. */
5594 func (stream, "[%s, #%s%lu]!", arm_regnames[gpr], add_sub, mod_imm);
5596 else if ((p == 0) && (w == 1))
5597 /* Post-index mode. */
5598 func (stream, "[%s], #%s%lu", arm_regnames[gpr], add_sub, mod_imm);
5601 /* Return FALSE if GIVEN is not an undefined encoding for MATCHED_INSN.
5602 Otherwise, return TRUE and set UNDEFINED_CODE to give a reason as to why
5603 this encoding is undefined. */
5606 is_mve_undefined (unsigned long given, enum mve_instructions matched_insn,
5607 enum mve_undefined *undefined_code)
5609 *undefined_code = UNDEF_NONE;
5611 switch (matched_insn)
5614 if (arm_decode_field_multiple (given, 5, 5, 22, 22) == 3)
5616 *undefined_code = UNDEF_SIZE_3;
5624 case MVE_VMUL_VEC_T1:
5626 case MVE_VADD_VEC_T1:
5627 case MVE_VSUB_VEC_T1:
5628 case MVE_VQDMULH_T1:
5629 case MVE_VQRDMULH_T2:
5633 if (arm_decode_field (given, 20, 21) == 3)
5635 *undefined_code = UNDEF_SIZE_3;
5642 if (arm_decode_field (given, 7, 8) == 3)
5644 *undefined_code = UNDEF_SIZE_3;
5651 if (arm_decode_field (given, 7, 8) <= 1)
5653 *undefined_code = UNDEF_SIZE_LE_1;
5660 if ((arm_decode_field (given, 7, 8) == 0))
5662 *undefined_code = UNDEF_SIZE_0;
5669 if ((arm_decode_field (given, 7, 8) <= 1))
5671 *undefined_code = UNDEF_SIZE_LE_1;
5677 case MVE_VLDRB_GATHER_T1:
5678 if (arm_decode_field (given, 7, 8) == 3)
5680 *undefined_code = UNDEF_SIZE_3;
5683 else if ((arm_decode_field (given, 28, 28) == 0)
5684 && (arm_decode_field (given, 7, 8) == 0))
5686 *undefined_code = UNDEF_NOT_UNS_SIZE_0;
5692 case MVE_VLDRH_GATHER_T2:
5693 if (arm_decode_field (given, 7, 8) == 3)
5695 *undefined_code = UNDEF_SIZE_3;
5698 else if ((arm_decode_field (given, 28, 28) == 0)
5699 && (arm_decode_field (given, 7, 8) == 1))
5701 *undefined_code = UNDEF_NOT_UNS_SIZE_1;
5704 else if (arm_decode_field (given, 7, 8) == 0)
5706 *undefined_code = UNDEF_SIZE_0;
5712 case MVE_VLDRW_GATHER_T3:
5713 if (arm_decode_field (given, 7, 8) != 2)
5715 *undefined_code = UNDEF_SIZE_NOT_2;
5718 else if (arm_decode_field (given, 28, 28) == 0)
5720 *undefined_code = UNDEF_NOT_UNSIGNED;
5726 case MVE_VLDRD_GATHER_T4:
5727 if (arm_decode_field (given, 7, 8) != 3)
5729 *undefined_code = UNDEF_SIZE_NOT_3;
5732 else if (arm_decode_field (given, 28, 28) == 0)
5734 *undefined_code = UNDEF_NOT_UNSIGNED;
5740 case MVE_VSTRB_SCATTER_T1:
5741 if (arm_decode_field (given, 7, 8) == 3)
5743 *undefined_code = UNDEF_SIZE_3;
5749 case MVE_VSTRH_SCATTER_T2:
5751 unsigned long size = arm_decode_field (given, 7, 8);
5754 *undefined_code = UNDEF_SIZE_3;
5759 *undefined_code = UNDEF_SIZE_0;
5766 case MVE_VSTRW_SCATTER_T3:
5767 if (arm_decode_field (given, 7, 8) != 2)
5769 *undefined_code = UNDEF_SIZE_NOT_2;
5775 case MVE_VSTRD_SCATTER_T4:
5776 if (arm_decode_field (given, 7, 8) != 3)
5778 *undefined_code = UNDEF_SIZE_NOT_3;
5784 case MVE_VCVT_FP_FIX_VEC:
5786 unsigned long imm6 = arm_decode_field (given, 16, 21);
5787 if ((imm6 & 0x20) == 0)
5789 *undefined_code = UNDEF_VCVT_IMM6;
5793 if ((arm_decode_field (given, 9, 9) == 0)
5794 && ((imm6 & 0x30) == 0x20))
5796 *undefined_code = UNDEF_VCVT_FSI_IMM6;
5805 case MVE_VCVT_BETWEEN_FP_INT:
5806 case MVE_VCVT_FROM_FP_TO_INT:
5808 unsigned long size = arm_decode_field (given, 18, 19);
5811 *undefined_code = UNDEF_SIZE_0;
5816 *undefined_code = UNDEF_SIZE_3;
5823 case MVE_VMOV_VEC_LANE_TO_GP:
5825 unsigned long op1 = arm_decode_field (given, 21, 22);
5826 unsigned long op2 = arm_decode_field (given, 5, 6);
5827 unsigned long u = arm_decode_field (given, 23, 23);
5829 if ((op2 == 0) && (u == 1))
5831 if ((op1 == 0) || (op1 == 1))
5833 *undefined_code = UNDEF_BAD_U_OP1_OP2;
5841 if ((op1 == 0) || (op1 == 1))
5843 *undefined_code = UNDEF_BAD_OP1_OP2;
5853 case MVE_VMOV_GP_TO_VEC_LANE:
5854 if (arm_decode_field (given, 5, 6) == 2)
5856 unsigned long op1 = arm_decode_field (given, 21, 22);
5857 if ((op1 == 0) || (op1 == 1))
5859 *undefined_code = UNDEF_BAD_OP1_OP2;
5868 case MVE_VMOV_IMM_TO_VEC:
5869 if (arm_decode_field (given, 5, 5) == 0)
5871 unsigned long cmode = arm_decode_field (given, 8, 11);
5873 if (((cmode & 9) == 1) || ((cmode & 5) == 1))
5875 *undefined_code = UNDEF_OP_0_BAD_CMODE;
5886 if (arm_decode_field (given, 18, 19) == 2)
5888 *undefined_code = UNDEF_SIZE_2;
5894 case MVE_VRMLALDAVH:
5895 case MVE_VMLADAV_T1:
5896 case MVE_VMLADAV_T2:
5898 if ((arm_decode_field (given, 28, 28) == 1)
5899 && (arm_decode_field (given, 12, 12) == 1))
5901 *undefined_code = UNDEF_XCHG_UNS;
5912 unsigned long sz = arm_decode_field (given, 19, 20);
5915 else if ((sz & 2) == 2)
5919 *undefined_code = UNDEF_SIZE;
5933 unsigned long sz = arm_decode_field (given, 19, 21);
5936 else if ((sz & 6) == 2)
5938 else if ((sz & 4) == 4)
5942 *undefined_code = UNDEF_SIZE;
5949 if (arm_decode_field (given, 19, 20) == 0)
5951 *undefined_code = UNDEF_SIZE_0;
5958 if (arm_decode_field (given, 18, 19) == 3)
5960 *undefined_code = UNDEF_SIZE_3;
5971 if (arm_decode_field (given, 18, 19) == 3)
5973 *undefined_code = UNDEF_SIZE_3;
5980 if (arm_decode_field (given, 18, 19) == 0)
5984 *undefined_code = UNDEF_SIZE_NOT_0;
5990 unsigned long size = arm_decode_field (given, 18, 19);
5991 if ((size & 2) == 2)
5993 *undefined_code = UNDEF_SIZE_2;
6001 if (arm_decode_field (given, 18, 19) != 3)
6005 *undefined_code = UNDEF_SIZE_3;
6014 /* Return FALSE if GIVEN is not an unpredictable encoding for MATCHED_INSN.
6015 Otherwise, return TRUE and set UNPREDICTABLE_CODE to give a reason as to
6016 why this encoding is unpredictable. */
6019 is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
6020 enum mve_unpredictable *unpredictable_code)
6022 *unpredictable_code = UNPRED_NONE;
6024 switch (matched_insn)
6026 case MVE_VCMP_FP_T2:
6028 if ((arm_decode_field (given, 12, 12) == 0)
6029 && (arm_decode_field (given, 5, 5) == 1))
6031 *unpredictable_code = UNPRED_FCA_0_FCB_1;
6037 case MVE_VPT_VEC_T4:
6038 case MVE_VPT_VEC_T5:
6039 case MVE_VPT_VEC_T6:
6040 case MVE_VCMP_VEC_T4:
6041 case MVE_VCMP_VEC_T5:
6042 case MVE_VCMP_VEC_T6:
6043 if (arm_decode_field (given, 0, 3) == 0xd)
6045 *unpredictable_code = UNPRED_R13;
6053 unsigned long gpr = arm_decode_field (given, 12, 15);
6056 *unpredictable_code = UNPRED_R13;
6059 else if (gpr == 0xf)
6061 *unpredictable_code = UNPRED_R15;
6070 case MVE_VMUL_FP_T2:
6071 case MVE_VMUL_VEC_T2:
6074 case MVE_VADD_FP_T2:
6075 case MVE_VSUB_FP_T2:
6076 case MVE_VADD_VEC_T2:
6077 case MVE_VSUB_VEC_T2:
6087 case MVE_VQDMULH_T3:
6088 case MVE_VQRDMULH_T4:
6090 case MVE_VFMA_FP_SCALAR:
6091 case MVE_VFMAS_FP_SCALAR:
6095 unsigned long gpr = arm_decode_field (given, 0, 3);
6098 *unpredictable_code = UNPRED_R13;
6101 else if (gpr == 0xf)
6103 *unpredictable_code = UNPRED_R15;
6113 unsigned long rn = arm_decode_field (given, 16, 19);
6115 if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
6117 *unpredictable_code = UNPRED_R13_AND_WB;
6123 *unpredictable_code = UNPRED_R15;
6127 if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 6)
6129 *unpredictable_code = UNPRED_Q_GT_6;
6139 unsigned long rn = arm_decode_field (given, 16, 19);
6141 if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
6143 *unpredictable_code = UNPRED_R13_AND_WB;
6149 *unpredictable_code = UNPRED_R15;
6153 if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 4)
6155 *unpredictable_code = UNPRED_Q_GT_4;
6169 unsigned long rn = arm_decode_field (given, 16, 19);
6171 if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
6173 *unpredictable_code = UNPRED_R13_AND_WB;
6178 *unpredictable_code = UNPRED_R15;
6185 case MVE_VLDRB_GATHER_T1:
6186 if (arm_decode_field (given, 0, 0) == 1)
6188 *unpredictable_code = UNPRED_OS;
6193 /* To handle common code with T2-T4 variants. */
6194 case MVE_VLDRH_GATHER_T2:
6195 case MVE_VLDRW_GATHER_T3:
6196 case MVE_VLDRD_GATHER_T4:
6198 unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6199 unsigned long qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6203 *unpredictable_code = UNPRED_Q_REGS_EQUAL;
6207 if (arm_decode_field (given, 16, 19) == 0xf)
6209 *unpredictable_code = UNPRED_R15;
6216 case MVE_VLDRW_GATHER_T5:
6217 case MVE_VLDRD_GATHER_T6:
6219 unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6220 unsigned long qm = arm_decode_field_multiple (given, 17, 19, 7, 7);
6224 *unpredictable_code = UNPRED_Q_REGS_EQUAL;
6231 case MVE_VSTRB_SCATTER_T1:
6232 if (arm_decode_field (given, 16, 19) == 0xf)
6234 *unpredictable_code = UNPRED_R15;
6237 else if (arm_decode_field (given, 0, 0) == 1)
6239 *unpredictable_code = UNPRED_OS;
6245 case MVE_VSTRH_SCATTER_T2:
6246 case MVE_VSTRW_SCATTER_T3:
6247 case MVE_VSTRD_SCATTER_T4:
6248 if (arm_decode_field (given, 16, 19) == 0xf)
6250 *unpredictable_code = UNPRED_R15;
6256 case MVE_VMOV2_VEC_LANE_TO_GP:
6257 case MVE_VMOV2_GP_TO_VEC_LANE:
6258 case MVE_VCVT_BETWEEN_FP_INT:
6259 case MVE_VCVT_FROM_FP_TO_INT:
6261 unsigned long rt = arm_decode_field (given, 0, 3);
6262 unsigned long rt2 = arm_decode_field (given, 16, 19);
6264 if ((rt == 0xd) || (rt2 == 0xd))
6266 *unpredictable_code = UNPRED_R13;
6269 else if ((rt == 0xf) || (rt2 == 0xf))
6271 *unpredictable_code = UNPRED_R15;
6276 *unpredictable_code = UNPRED_GP_REGS_EQUAL;
6285 case MVE_VMAXNMV_FP:
6286 case MVE_VMAXNMAV_FP:
6287 case MVE_VMINNMV_FP:
6288 case MVE_VMINNMAV_FP:
6292 case MVE_VMOV_HFP_TO_GP:
6293 case MVE_VMOV_GP_TO_VEC_LANE:
6294 case MVE_VMOV_VEC_LANE_TO_GP:
6296 unsigned long rda = arm_decode_field (given, 12, 15);
6299 *unpredictable_code = UNPRED_R13;
6302 else if (rda == 0xf)
6304 *unpredictable_code = UNPRED_R15;
6321 if (arm_decode_field (given, 20, 21) == 2)
6323 Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6324 Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6325 Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6327 if ((Qd == Qn) || (Qd == Qm))
6329 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
6340 case MVE_VQDMULL_T1:
6346 if (arm_decode_field (given, 28, 28) == 1)
6348 Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6349 Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6350 Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6352 if ((Qd == Qn) || (Qd == Qm))
6354 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6364 case MVE_VQDMULL_T2:
6366 unsigned long gpr = arm_decode_field (given, 0, 3);
6369 *unpredictable_code = UNPRED_R13;
6372 else if (gpr == 0xf)
6374 *unpredictable_code = UNPRED_R15;
6378 if (arm_decode_field (given, 28, 28) == 1)
6381 = arm_decode_field_multiple (given, 13, 15, 22, 22);
6382 unsigned long Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6386 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6397 case MVE_VRMLSLDAVH:
6400 if (arm_decode_field (given, 20, 22) == 6)
6402 *unpredictable_code = UNPRED_R13;
6410 if (arm_decode_field (given, 1, 3) == 6)
6412 *unpredictable_code = UNPRED_R13;
6421 unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6422 unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6423 if ((Qd == Qm) && arm_decode_field (given, 20, 21) == 2)
6425 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
6434 unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6435 unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6436 if ((Qd == Qm) && arm_decode_field (given, 20, 20) == 1)
6438 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6451 if (arm_decode_field (given, 20, 20) == 1)
6453 Qda = arm_decode_field_multiple (given, 13, 15, 22, 22);
6454 Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
6455 Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
6457 if ((Qda == Qn) || (Qda == Qm))
6459 *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
6471 if (arm_decode_field (given, 16, 19) == 0xd)
6473 *unpredictable_code = UNPRED_R13;
6481 unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
6482 unsigned long qm = arm_decode_field_multiple (given, 1, 3, 6, 6);
6486 *unpredictable_code = UNPRED_Q_REGS_EQUAL;
6499 print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
6501 unsigned long op1 = arm_decode_field (given, 21, 22);
6502 unsigned long op2 = arm_decode_field (given, 5, 6);
6503 unsigned long h = arm_decode_field (given, 16, 16);
6504 unsigned long index, esize, targetBeat, idx;
6505 void *stream = info->stream;
6506 fprintf_ftype func = info->fprintf_func;
6508 if ((op1 & 0x2) == 0x2)
6513 else if (((op1 & 0x2) == 0x0) && ((op2 & 0x1) == 0x1))
6518 else if (((op1 & 0x2) == 0) && ((op2 & 0x3) == 0))
6525 func (stream, "<undefined index>");
6529 targetBeat = (op1 & 0x1) | (h << 1);
6530 idx = index + targetBeat * (32/esize);
6532 func (stream, "%lu", idx);
6535 /* Print neon and mve 8-bit immediate that can be a 8, 16, 32, or 64-bits
6536 in length and integer of floating-point type. */
6538 print_simd_imm8 (struct disassemble_info *info, unsigned long given,
6539 unsigned int ibit_loc, const struct mopcode32 *insn)
6542 int cmode = (given >> 8) & 0xf;
6543 int op = (given >> 5) & 0x1;
6544 unsigned long value = 0, hival = 0;
6548 void *stream = info->stream;
6549 fprintf_ftype func = info->fprintf_func;
6551 /* On Neon the 'i' bit is at bit 24, on mve it is
6553 bits |= ((given >> ibit_loc) & 1) << 7;
6554 bits |= ((given >> 16) & 7) << 4;
6555 bits |= ((given >> 0) & 15) << 0;
6559 shift = (cmode >> 1) & 3;
6560 value = (unsigned long) bits << (8 * shift);
6563 else if (cmode < 12)
6565 shift = (cmode >> 1) & 1;
6566 value = (unsigned long) bits << (8 * shift);
6569 else if (cmode < 14)
6571 shift = (cmode & 1) + 1;
6572 value = (unsigned long) bits << (8 * shift);
6573 value |= (1ul << (8 * shift)) - 1;
6576 else if (cmode == 14)
6580 /* Bit replication into bytes. */
6586 for (ix = 7; ix >= 0; ix--)
6588 mask = ((bits >> ix) & 1) ? 0xff : 0;
6590 value = (value << 8) | mask;
6592 hival = (hival << 8) | mask;
6598 /* Byte replication. */
6599 value = (unsigned long) bits;
6605 /* Floating point encoding. */
6608 value = (unsigned long) (bits & 0x7f) << 19;
6609 value |= (unsigned long) (bits & 0x80) << 24;
6610 tmp = bits & 0x40 ? 0x3c : 0x40;
6611 value |= (unsigned long) tmp << 24;
6617 func (stream, "<illegal constant %.8x:%x:%x>",
6623 // printU determines whether the immediate value should be printed as
6625 unsigned printU = 0;
6626 switch (insn->mve_op)
6630 // We want this for instructions that don't have a 'signed' type
6634 case MVE_VMOV_IMM_TO_VEC:
6641 func (stream, "#%ld\t; 0x%.2lx", value, value);
6648 : "#%ld\t; 0x%.4lx", value, value);
6654 unsigned char valbytes[4];
6657 /* Do this a byte at a time so we don't have to
6658 worry about the host's endianness. */
6659 valbytes[0] = value & 0xff;
6660 valbytes[1] = (value >> 8) & 0xff;
6661 valbytes[2] = (value >> 16) & 0xff;
6662 valbytes[3] = (value >> 24) & 0xff;
6664 floatformat_to_double
6665 (& floatformat_ieee_single_little, valbytes,
6668 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
6675 : "#%ld\t; 0x%.8lx",
6676 (long) (((value & 0x80000000L) != 0)
6678 ? value | ~0xffffffffL : value),
6683 func (stream, "#0x%.8lx%.8lx", hival, value);
6693 print_mve_undefined (struct disassemble_info *info,
6694 enum mve_undefined undefined_code)
6696 void *stream = info->stream;
6697 fprintf_ftype func = info->fprintf_func;
6699 func (stream, "\t\tundefined instruction: ");
6701 switch (undefined_code)
6704 func (stream, "illegal size");
6708 func (stream, "size equals zero");
6712 func (stream, "size equals two");
6716 func (stream, "size equals three");
6719 case UNDEF_SIZE_LE_1:
6720 func (stream, "size <= 1");
6723 case UNDEF_SIZE_NOT_0:
6724 func (stream, "size not equal to 0");
6727 case UNDEF_SIZE_NOT_2:
6728 func (stream, "size not equal to 2");
6731 case UNDEF_SIZE_NOT_3:
6732 func (stream, "size not equal to 3");
6735 case UNDEF_NOT_UNS_SIZE_0:
6736 func (stream, "not unsigned and size = zero");
6739 case UNDEF_NOT_UNS_SIZE_1:
6740 func (stream, "not unsigned and size = one");
6743 case UNDEF_NOT_UNSIGNED:
6744 func (stream, "not unsigned");
6747 case UNDEF_VCVT_IMM6:
6748 func (stream, "invalid imm6");
6751 case UNDEF_VCVT_FSI_IMM6:
6752 func (stream, "fsi = 0 and invalid imm6");
6755 case UNDEF_BAD_OP1_OP2:
6756 func (stream, "bad size with op2 = 2 and op1 = 0 or 1");
6759 case UNDEF_BAD_U_OP1_OP2:
6760 func (stream, "unsigned with op2 = 0 and op1 = 0 or 1");
6763 case UNDEF_OP_0_BAD_CMODE:
6764 func (stream, "op field equal 0 and bad cmode");
6767 case UNDEF_XCHG_UNS:
6768 func (stream, "exchange and unsigned together");
6778 print_mve_unpredictable (struct disassemble_info *info,
6779 enum mve_unpredictable unpredict_code)
6781 void *stream = info->stream;
6782 fprintf_ftype func = info->fprintf_func;
6784 func (stream, "%s: ", UNPREDICTABLE_INSTRUCTION);
6786 switch (unpredict_code)
6788 case UNPRED_IT_BLOCK:
6789 func (stream, "mve instruction in it block");
6792 case UNPRED_FCA_0_FCB_1:
6793 func (stream, "condition bits, fca = 0 and fcb = 1");
6797 func (stream, "use of r13 (sp)");
6801 func (stream, "use of r15 (pc)");
6805 func (stream, "start register block > r4");
6809 func (stream, "start register block > r6");
6812 case UNPRED_R13_AND_WB:
6813 func (stream, "use of r13 and write back");
6816 case UNPRED_Q_REGS_EQUAL:
6818 "same vector register used for destination and other operand");
6822 func (stream, "use of offset scaled");
6825 case UNPRED_GP_REGS_EQUAL:
6826 func (stream, "same general-purpose register used for both operands");
6829 case UNPRED_Q_REGS_EQ_AND_SIZE_1:
6830 func (stream, "use of identical q registers and size = 1");
6833 case UNPRED_Q_REGS_EQ_AND_SIZE_2:
6834 func (stream, "use of identical q registers and size = 1");
6842 /* Print register block operand for mve vld2/vld4/vst2/vld4. */
6845 print_mve_register_blocks (struct disassemble_info *info,
6846 unsigned long given,
6847 enum mve_instructions matched_insn)
6849 void *stream = info->stream;
6850 fprintf_ftype func = info->fprintf_func;
6852 unsigned long q_reg_start = arm_decode_field_multiple (given,
6855 switch (matched_insn)
6859 if (q_reg_start <= 6)
6860 func (stream, "{q%ld, q%ld}", q_reg_start, q_reg_start + 1);
6862 func (stream, "<illegal reg q%ld>", q_reg_start);
6867 if (q_reg_start <= 4)
6868 func (stream, "{q%ld, q%ld, q%ld, q%ld}", q_reg_start,
6869 q_reg_start + 1, q_reg_start + 2,
6872 func (stream, "<illegal reg q%ld>", q_reg_start);
6881 print_mve_rounding_mode (struct disassemble_info *info,
6882 unsigned long given,
6883 enum mve_instructions matched_insn)
6885 void *stream = info->stream;
6886 fprintf_ftype func = info->fprintf_func;
6888 switch (matched_insn)
6890 case MVE_VCVT_FROM_FP_TO_INT:
6892 switch (arm_decode_field (given, 8, 9))
6918 switch (arm_decode_field (given, 7, 9))
6957 print_mve_vcvt_size (struct disassemble_info *info,
6958 unsigned long given,
6959 enum mve_instructions matched_insn)
6961 unsigned long mode = 0;
6962 void *stream = info->stream;
6963 fprintf_ftype func = info->fprintf_func;
6965 switch (matched_insn)
6967 case MVE_VCVT_FP_FIX_VEC:
6969 mode = (((given & 0x200) >> 7)
6970 | ((given & 0x10000000) >> 27)
6971 | ((given & 0x100) >> 8));
6976 func (stream, "f16.s16");
6980 func (stream, "s16.f16");
6984 func (stream, "f16.u16");
6988 func (stream, "u16.f16");
6992 func (stream, "f32.s32");
6996 func (stream, "s32.f32");
7000 func (stream, "f32.u32");
7004 func (stream, "u32.f32");
7012 case MVE_VCVT_BETWEEN_FP_INT:
7014 unsigned long size = arm_decode_field (given, 18, 19);
7015 unsigned long op = arm_decode_field (given, 7, 8);
7022 func (stream, "f16.s16");
7026 func (stream, "f16.u16");
7030 func (stream, "s16.f16");
7034 func (stream, "u16.f16");
7046 func (stream, "f32.s32");
7050 func (stream, "f32.u32");
7054 func (stream, "s32.f32");
7058 func (stream, "u32.f32");
7065 case MVE_VCVT_FP_HALF_FP:
7067 unsigned long op = arm_decode_field (given, 28, 28);
7069 func (stream, "f16.f32");
7071 func (stream, "f32.f16");
7075 case MVE_VCVT_FROM_FP_TO_INT:
7077 unsigned long size = arm_decode_field_multiple (given, 7, 7, 18, 19);
7082 func (stream, "s16.f16");
7086 func (stream, "u16.f16");
7090 func (stream, "s32.f32");
7094 func (stream, "u32.f32");
7109 print_mve_rotate (struct disassemble_info *info, unsigned long rot,
7110 unsigned long rot_width)
7112 void *stream = info->stream;
7113 fprintf_ftype func = info->fprintf_func;
7120 func (stream, "90");
7123 func (stream, "270");
7129 else if (rot_width == 2)
7137 func (stream, "90");
7140 func (stream, "180");
7143 func (stream, "270");
7152 print_instruction_predicate (struct disassemble_info *info)
7154 void *stream = info->stream;
7155 fprintf_ftype func = info->fprintf_func;
7157 if (vpt_block_state.next_pred_state == PRED_THEN)
7159 else if (vpt_block_state.next_pred_state == PRED_ELSE)
7164 print_mve_size (struct disassemble_info *info,
7166 enum mve_instructions matched_insn)
7168 void *stream = info->stream;
7169 fprintf_ftype func = info->fprintf_func;
7171 switch (matched_insn)
7177 case MVE_VADD_VEC_T1:
7178 case MVE_VADD_VEC_T2:
7184 case MVE_VCMP_VEC_T1:
7185 case MVE_VCMP_VEC_T2:
7186 case MVE_VCMP_VEC_T3:
7187 case MVE_VCMP_VEC_T4:
7188 case MVE_VCMP_VEC_T5:
7189 case MVE_VCMP_VEC_T6:
7202 case MVE_VLDRB_GATHER_T1:
7203 case MVE_VLDRH_GATHER_T2:
7204 case MVE_VLDRW_GATHER_T3:
7205 case MVE_VLDRD_GATHER_T4:
7218 case MVE_VMUL_VEC_T1:
7219 case MVE_VMUL_VEC_T2:
7225 case MVE_VPT_VEC_T1:
7226 case MVE_VPT_VEC_T2:
7227 case MVE_VPT_VEC_T3:
7228 case MVE_VPT_VEC_T4:
7229 case MVE_VPT_VEC_T5:
7230 case MVE_VPT_VEC_T6:
7242 case MVE_VQDMULH_T1:
7243 case MVE_VQRDMULH_T2:
7244 case MVE_VQDMULH_T3:
7245 case MVE_VQRDMULH_T4:
7264 case MVE_VSTRB_SCATTER_T1:
7265 case MVE_VSTRH_SCATTER_T2:
7266 case MVE_VSTRW_SCATTER_T3:
7269 case MVE_VSUB_VEC_T1:
7270 case MVE_VSUB_VEC_T2:
7272 func (stream, "%s", mve_vec_sizename[size]);
7274 func (stream, "<undef size>");
7278 case MVE_VADD_FP_T1:
7279 case MVE_VADD_FP_T2:
7280 case MVE_VSUB_FP_T1:
7281 case MVE_VSUB_FP_T2:
7282 case MVE_VCMP_FP_T1:
7283 case MVE_VCMP_FP_T2:
7284 case MVE_VFMA_FP_SCALAR:
7287 case MVE_VFMAS_FP_SCALAR:
7289 case MVE_VMAXNMA_FP:
7290 case MVE_VMAXNMV_FP:
7291 case MVE_VMAXNMAV_FP:
7293 case MVE_VMINNMA_FP:
7294 case MVE_VMINNMV_FP:
7295 case MVE_VMINNMAV_FP:
7296 case MVE_VMUL_FP_T1:
7297 case MVE_VMUL_FP_T2:
7301 func (stream, "32");
7303 func (stream, "16");
7309 case MVE_VMLADAV_T1:
7311 case MVE_VMLSDAV_T1:
7314 case MVE_VQDMULL_T1:
7315 case MVE_VQDMULL_T2:
7319 func (stream, "16");
7321 func (stream, "32");
7328 func (stream, "16");
7335 func (stream, "32");
7338 func (stream, "16");
7348 case MVE_VMOV_GP_TO_VEC_LANE:
7349 case MVE_VMOV_VEC_LANE_TO_GP:
7353 func (stream, "32");
7358 func (stream, "16");
7361 case 8: case 9: case 10: case 11:
7362 case 12: case 13: case 14: case 15:
7371 case MVE_VMOV_IMM_TO_VEC:
7374 case 0: case 4: case 8:
7375 case 12: case 24: case 26:
7376 func (stream, "i32");
7379 func (stream, "i16");
7382 func (stream, "i8");
7385 func (stream, "i64");
7388 func (stream, "f32");
7395 case MVE_VMULL_POLY:
7397 func (stream, "p8");
7399 func (stream, "p16");
7405 case 0: case 2: case 4:
7406 case 6: case 12: case 13:
7407 func (stream, "32");
7411 func (stream, "16");
7425 func (stream, "32");
7429 func (stream, "16");
7447 func (stream, "16");
7451 func (stream, "32");
7476 func (stream, "16");
7479 case 4: case 5: case 6: case 7:
7480 func (stream, "32");
7495 print_mve_shift_n (struct disassemble_info *info, long given,
7496 enum mve_instructions matched_insn)
7498 void *stream = info->stream;
7499 fprintf_ftype func = info->fprintf_func;
7502 = matched_insn == MVE_VQSHL_T2
7503 || matched_insn == MVE_VQSHLU_T3
7504 || matched_insn == MVE_VSHL_T1
7505 || matched_insn == MVE_VSHLL_T1
7506 || matched_insn == MVE_VSLI;
7508 unsigned imm6 = (given & 0x3f0000) >> 16;
7510 if (matched_insn == MVE_VSHLL_T1)
7513 unsigned shiftAmount = 0;
7514 if ((imm6 & 0x20) != 0)
7515 shiftAmount = startAt0 ? imm6 - 32 : 64 - imm6;
7516 else if ((imm6 & 0x10) != 0)
7517 shiftAmount = startAt0 ? imm6 - 16 : 32 - imm6;
7518 else if ((imm6 & 0x08) != 0)
7519 shiftAmount = startAt0 ? imm6 - 8 : 16 - imm6;
7521 print_mve_undefined (info, UNDEF_SIZE_0);
7523 func (stream, "%u", shiftAmount);
7527 print_vec_condition (struct disassemble_info *info, long given,
7528 enum mve_instructions matched_insn)
7530 void *stream = info->stream;
7531 fprintf_ftype func = info->fprintf_func;
7534 switch (matched_insn)
7537 case MVE_VCMP_FP_T1:
7538 vec_cond = (((given & 0x1000) >> 10)
7539 | ((given & 1) << 1)
7540 | ((given & 0x0080) >> 7));
7541 func (stream, "%s",vec_condnames[vec_cond]);
7545 case MVE_VCMP_FP_T2:
7546 vec_cond = (((given & 0x1000) >> 10)
7547 | ((given & 0x0020) >> 4)
7548 | ((given & 0x0080) >> 7));
7549 func (stream, "%s",vec_condnames[vec_cond]);
7552 case MVE_VPT_VEC_T1:
7553 case MVE_VCMP_VEC_T1:
7554 vec_cond = (given & 0x0080) >> 7;
7555 func (stream, "%s",vec_condnames[vec_cond]);
7558 case MVE_VPT_VEC_T2:
7559 case MVE_VCMP_VEC_T2:
7560 vec_cond = 2 | ((given & 0x0080) >> 7);
7561 func (stream, "%s",vec_condnames[vec_cond]);
7564 case MVE_VPT_VEC_T3:
7565 case MVE_VCMP_VEC_T3:
7566 vec_cond = 4 | ((given & 1) << 1) | ((given & 0x0080) >> 7);
7567 func (stream, "%s",vec_condnames[vec_cond]);
7570 case MVE_VPT_VEC_T4:
7571 case MVE_VCMP_VEC_T4:
7572 vec_cond = (given & 0x0080) >> 7;
7573 func (stream, "%s",vec_condnames[vec_cond]);
7576 case MVE_VPT_VEC_T5:
7577 case MVE_VCMP_VEC_T5:
7578 vec_cond = 2 | ((given & 0x0080) >> 7);
7579 func (stream, "%s",vec_condnames[vec_cond]);
7582 case MVE_VPT_VEC_T6:
7583 case MVE_VCMP_VEC_T6:
7584 vec_cond = 4 | ((given & 0x0020) >> 4) | ((given & 0x0080) >> 7);
7585 func (stream, "%s",vec_condnames[vec_cond]);
7600 #define WRITEBACK_BIT_SET (given & (1 << W_BIT))
7601 #define IMMEDIATE_BIT_SET (given & (1 << I_BIT))
7602 #define NEGATIVE_BIT_SET ((given & (1 << U_BIT)) == 0)
7603 #define PRE_BIT_SET (given & (1 << P_BIT))
7606 /* Print one coprocessor instruction on INFO->STREAM.
7607 Return TRUE if the instuction matched, FALSE if this is not a
7608 recognised coprocessor instruction. */
7611 print_insn_coprocessor (bfd_vma pc,
7612 struct disassemble_info *info,
7616 const struct sopcode32 *insn;
7617 void *stream = info->stream;
7618 fprintf_ftype func = info->fprintf_func;
7620 unsigned long value = 0;
7623 struct arm_private_data *private_data = info->private_data;
7624 arm_feature_set allowed_arches = ARM_ARCH_NONE;
7625 arm_feature_set arm_ext_v8_1m_main =
7626 ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
7628 allowed_arches = private_data->features;
7630 for (insn = coprocessor_opcodes; insn->assembler; insn++)
7632 unsigned long u_reg = 16;
7633 bfd_boolean is_unpredictable = FALSE;
7634 signed long value_in_comment = 0;
7637 if (ARM_FEATURE_ZERO (insn->arch))
7638 switch (insn->value)
7640 case SENTINEL_IWMMXT_START:
7641 if (info->mach != bfd_mach_arm_XScale
7642 && info->mach != bfd_mach_arm_iWMMXt
7643 && info->mach != bfd_mach_arm_iWMMXt2)
7646 while ((! ARM_FEATURE_ZERO (insn->arch))
7647 && insn->value != SENTINEL_IWMMXT_END);
7650 case SENTINEL_IWMMXT_END:
7653 case SENTINEL_GENERIC_START:
7654 allowed_arches = private_data->features;
7662 value = insn->value;
7663 cp_num = (given >> 8) & 0xf;
7667 /* The high 4 bits are 0xe for Arm conditional instructions, and
7668 0xe for arm unconditional instructions. The rest of the
7669 encoding is the same. */
7671 value |= 0xe0000000;
7679 /* Only match unconditional instuctions against unconditional
7681 if ((given & 0xf0000000) == 0xf0000000)
7688 cond = (given >> 28) & 0xf;
7694 if ((insn->isa == T32 && !thumb)
7695 || (insn->isa == ARM && thumb))
7698 if ((given & mask) != value)
7701 if (! ARM_CPU_HAS_FEATURE (insn->arch, allowed_arches))
7704 if (insn->value == 0xfe000010 /* mcr2 */
7705 || insn->value == 0xfe100010 /* mrc2 */
7706 || insn->value == 0xfc100000 /* ldc2 */
7707 || insn->value == 0xfc000000) /* stc2 */
7709 if (cp_num == 9 || cp_num == 10 || cp_num == 11)
7710 is_unpredictable = TRUE;
7712 /* Armv8.1-M Mainline FP & MVE instructions. */
7713 if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
7714 && !ARM_CPU_IS_ANY (allowed_arches)
7715 && (cp_num == 8 || cp_num == 14 || cp_num == 15))
7719 else if (insn->value == 0x0e000000 /* cdp */
7720 || insn->value == 0xfe000000 /* cdp2 */
7721 || insn->value == 0x0e000010 /* mcr */
7722 || insn->value == 0x0e100010 /* mrc */
7723 || insn->value == 0x0c100000 /* ldc */
7724 || insn->value == 0x0c000000) /* stc */
7726 /* Floating-point instructions. */
7727 if (cp_num == 9 || cp_num == 10 || cp_num == 11)
7730 /* Armv8.1-M Mainline FP & MVE instructions. */
7731 if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
7732 && !ARM_CPU_IS_ANY (allowed_arches)
7733 && (cp_num == 8 || cp_num == 14 || cp_num == 15))
7736 else if ((insn->value == 0xec100f80 /* vldr (system register) */
7737 || insn->value == 0xec000f80) /* vstr (system register) */
7738 && arm_decode_field (given, 24, 24) == 0
7739 && arm_decode_field (given, 21, 21) == 0)
7740 /* If the P and W bits are both 0 then these encodings match the MVE
7741 VLDR and VSTR instructions, these are in a different table, so we
7742 don't let it match here. */
7745 for (c = insn->assembler; *c; c++)
7749 const char mod = *++c;
7753 func (stream, "%%");
7759 int rn = (given >> 16) & 0xf;
7760 bfd_vma offset = given & 0xff;
7763 offset = given & 0x7f;
7765 func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
7767 if (PRE_BIT_SET || WRITEBACK_BIT_SET)
7769 /* Not unindexed. The offset is scaled. */
7771 /* vldr.16/vstr.16 will shift the address
7772 left by 1 bit only. */
7773 offset = offset * 2;
7775 offset = offset * 4;
7777 if (NEGATIVE_BIT_SET)
7780 value_in_comment = offset;
7786 func (stream, ", #%d]%s",
7788 WRITEBACK_BIT_SET ? "!" : "");
7789 else if (NEGATIVE_BIT_SET)
7790 func (stream, ", #-0]");
7798 if (WRITEBACK_BIT_SET)
7801 func (stream, ", #%d", (int) offset);
7802 else if (NEGATIVE_BIT_SET)
7803 func (stream, ", #-0");
7807 func (stream, ", {%s%d}",
7808 (NEGATIVE_BIT_SET && !offset) ? "-" : "",
7810 value_in_comment = offset;
7813 if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
7815 func (stream, "\t; ");
7816 /* For unaligned PCs, apply off-by-alignment
7818 info->print_address_func (offset + pc
7819 + info->bytes_per_chunk * 2
7828 int regno = ((given >> 12) & 0xf) | ((given >> (22 - 4)) & 0x10);
7829 int offset = (given >> 1) & 0x3f;
7832 func (stream, "{d%d}", regno);
7833 else if (regno + offset > 32)
7834 func (stream, "{d%d-<overflow reg d%d>}", regno, regno + offset - 1);
7836 func (stream, "{d%d-d%d}", regno, regno + offset - 1);
7842 bfd_boolean single = ((given >> 8) & 1) == 0;
7843 char reg_prefix = single ? 's' : 'd';
7844 int Dreg = (given >> 22) & 0x1;
7845 int Vdreg = (given >> 12) & 0xf;
7846 int reg = single ? ((Vdreg << 1) | Dreg)
7847 : ((Dreg << 4) | Vdreg);
7848 int num = (given >> (single ? 0 : 1)) & 0x7f;
7849 int maxreg = single ? 31 : 15;
7850 int topreg = reg + num - 1;
7853 func (stream, "{VPR}");
7855 func (stream, "{%c%d, VPR}", reg_prefix, reg);
7856 else if (topreg > maxreg)
7857 func (stream, "{%c%d-<overflow reg d%d, VPR}",
7858 reg_prefix, reg, single ? topreg >> 1 : topreg);
7860 func (stream, "{%c%d-%c%d, VPR}", reg_prefix, reg,
7861 reg_prefix, topreg);
7866 if (cond != COND_UNCOND)
7867 is_unpredictable = TRUE;
7871 if (cond != COND_UNCOND && cp_num == 9)
7872 is_unpredictable = TRUE;
7874 func (stream, "%s", arm_conditional[cond]);
7878 /* Print a Cirrus/DSP shift immediate. */
7879 /* Immediates are 7bit signed ints with bits 0..3 in
7880 bits 0..3 of opcode and bits 4..6 in bits 5..7
7885 imm = (given & 0xf) | ((given & 0xe0) >> 1);
7887 /* Is ``imm'' a negative number? */
7891 func (stream, "%d", imm);
7899 = arm_decode_field_multiple (given, 13, 15, 22, 22);
7904 func (stream, "FPSCR");
7907 func (stream, "FPSCR_nzcvqc");
7910 func (stream, "VPR");
7913 func (stream, "P0");
7916 func (stream, "FPCXTNS");
7919 func (stream, "FPCXTS");
7922 func (stream, "<invalid reg %lu>", regno);
7929 switch (given & 0x00408000)
7946 switch (given & 0x00080080)
7958 func (stream, _("<illegal precision>"));
7964 switch (given & 0x00408000)
7982 switch (given & 0x60)
7998 case '0': case '1': case '2': case '3': case '4':
7999 case '5': case '6': case '7': case '8': case '9':
8003 c = arm_decode_bitfield (c, given, &value, &width);
8009 is_unpredictable = TRUE;
8014 /* Eat the 'u' character. */
8018 is_unpredictable = TRUE;
8021 func (stream, "%s", arm_regnames[value]);
8024 if (given & (1 << 6))
8028 func (stream, "d%ld", value);
8033 func (stream, "<illegal reg q%ld.5>", value >> 1);
8035 func (stream, "q%ld", value >> 1);
8038 func (stream, "%ld", value);
8039 value_in_comment = value;
8043 /* Converts immediate 8 bit back to float value. */
8044 unsigned floatVal = (value & 0x80) << 24
8045 | (value & 0x3F) << 19
8046 | ((value & 0x40) ? (0xF8 << 22) : (1 << 30));
8048 /* Quarter float have a maximum value of 31.0.
8049 Get floating point value multiplied by 1e7.
8050 The maximum value stays in limit of a 32-bit int. */
8052 (78125 << (((floatVal >> 23) & 0xFF) - 124)) *
8053 (16 + (value & 0xF));
8055 if (!(decVal % 1000000))
8056 func (stream, "%ld\t; 0x%08x %c%u.%01u", value,
8057 floatVal, value & 0x80 ? '-' : ' ',
8059 decVal % 10000000 / 1000000);
8060 else if (!(decVal % 10000))
8061 func (stream, "%ld\t; 0x%08x %c%u.%03u", value,
8062 floatVal, value & 0x80 ? '-' : ' ',
8064 decVal % 10000000 / 10000);
8066 func (stream, "%ld\t; 0x%08x %c%u.%07u", value,
8067 floatVal, value & 0x80 ? '-' : ' ',
8068 decVal / 10000000, decVal % 10000000);
8073 int from = (given & (1 << 7)) ? 32 : 16;
8074 func (stream, "%ld", from - value);
8080 func (stream, "#%s", arm_fp_const[value & 7]);
8082 func (stream, "f%ld", value);
8087 func (stream, "%s", iwmmxt_wwnames[value]);
8089 func (stream, "%s", iwmmxt_wwssnames[value]);
8093 func (stream, "%s", iwmmxt_regnames[value]);
8096 func (stream, "%s", iwmmxt_cregnames[value]);
8100 func (stream, "0x%lx", (value & 0xffffffffUL));
8107 func (stream, "eq");
8111 func (stream, "vs");
8115 func (stream, "ge");
8119 func (stream, "gt");
8123 func (stream, "??");
8131 func (stream, "%c", *c);
8135 if (value == ((1ul << width) - 1))
8136 func (stream, "%c", *c);
8139 func (stream, "%c", c[(1 << width) - (int) value]);
8151 int single = *c++ == 'y';
8156 case '4': /* Sm pair */
8157 case '0': /* Sm, Dm */
8158 regno = given & 0x0000000f;
8162 regno += (given >> 5) & 1;
8165 regno += ((given >> 5) & 1) << 4;
8168 case '1': /* Sd, Dd */
8169 regno = (given >> 12) & 0x0000000f;
8173 regno += (given >> 22) & 1;
8176 regno += ((given >> 22) & 1) << 4;
8179 case '2': /* Sn, Dn */
8180 regno = (given >> 16) & 0x0000000f;
8184 regno += (given >> 7) & 1;
8187 regno += ((given >> 7) & 1) << 4;
8190 case '3': /* List */
8192 regno = (given >> 12) & 0x0000000f;
8196 regno += (given >> 22) & 1;
8199 regno += ((given >> 22) & 1) << 4;
8206 func (stream, "%c%d", single ? 's' : 'd', regno);
8210 int count = given & 0xff;
8217 func (stream, "-%c%d",
8225 func (stream, ", %c%d", single ? 's' : 'd',
8231 switch (given & 0x00400100)
8233 case 0x00000000: func (stream, "b"); break;
8234 case 0x00400000: func (stream, "h"); break;
8235 case 0x00000100: func (stream, "w"); break;
8236 case 0x00400100: func (stream, "d"); break;
8244 /* given (20, 23) | given (0, 3) */
8245 value = ((given >> 16) & 0xf0) | (given & 0xf);
8246 func (stream, "%d", (int) value);
8251 /* This is like the 'A' operator, except that if
8252 the width field "M" is zero, then the offset is
8253 *not* multiplied by four. */
8255 int offset = given & 0xff;
8256 int multiplier = (given & 0x00000100) ? 4 : 1;
8258 func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
8262 value_in_comment = offset * multiplier;
8263 if (NEGATIVE_BIT_SET)
8264 value_in_comment = - value_in_comment;
8270 func (stream, ", #%s%d]%s",
8271 NEGATIVE_BIT_SET ? "-" : "",
8272 offset * multiplier,
8273 WRITEBACK_BIT_SET ? "!" : "");
8275 func (stream, "], #%s%d",
8276 NEGATIVE_BIT_SET ? "-" : "",
8277 offset * multiplier);
8286 int imm4 = (given >> 4) & 0xf;
8287 int puw_bits = ((given >> 22) & 6) | ((given >> W_BIT) & 1);
8288 int ubit = ! NEGATIVE_BIT_SET;
8289 const char *rm = arm_regnames [given & 0xf];
8290 const char *rn = arm_regnames [(given >> 16) & 0xf];
8296 func (stream, "[%s], %c%s", rn, ubit ? '+' : '-', rm);
8298 func (stream, ", lsl #%d", imm4);
8305 func (stream, "[%s, %c%s", rn, ubit ? '+' : '-', rm);
8307 func (stream, ", lsl #%d", imm4);
8309 if (puw_bits == 5 || puw_bits == 7)
8314 func (stream, "INVALID");
8322 imm5 = ((given & 0x100) >> 4) | (given & 0xf);
8323 func (stream, "%ld", (imm5 == 0) ? 32 : imm5);
8332 func (stream, "%c", *c);
8335 if (value_in_comment > 32 || value_in_comment < -16)
8336 func (stream, "\t; 0x%lx", (value_in_comment & 0xffffffffUL));
8338 if (is_unpredictable)
8339 func (stream, UNPREDICTABLE_INSTRUCTION);
8346 /* Decodes and prints ARM addressing modes. Returns the offset
8347 used in the address, if any, if it is worthwhile printing the
8348 offset as a hexadecimal value in a comment at the end of the
8349 line of disassembly. */
8352 print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
8354 void *stream = info->stream;
8355 fprintf_ftype func = info->fprintf_func;
8358 if (((given & 0x000f0000) == 0x000f0000)
8359 && ((given & 0x02000000) == 0))
8361 offset = given & 0xfff;
8363 func (stream, "[pc");
8367 /* Pre-indexed. Elide offset of positive zero when
8369 if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
8370 func (stream, ", #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8372 if (NEGATIVE_BIT_SET)
8377 /* Cope with the possibility of write-back
8378 being used. Probably a very dangerous thing
8379 for the programmer to do, but who are we to
8381 func (stream, "]%s", WRITEBACK_BIT_SET ? "!" : "");
8383 else /* Post indexed. */
8385 func (stream, "], #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8387 /* Ie ignore the offset. */
8391 func (stream, "\t; ");
8392 info->print_address_func (offset, info);
8397 func (stream, "[%s",
8398 arm_regnames[(given >> 16) & 0xf]);
8402 if ((given & 0x02000000) == 0)
8404 /* Elide offset of positive zero when non-writeback. */
8405 offset = given & 0xfff;
8406 if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
8407 func (stream, ", #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8411 func (stream, ", %s", NEGATIVE_BIT_SET ? "-" : "");
8412 arm_decode_shift (given, func, stream, TRUE);
8415 func (stream, "]%s",
8416 WRITEBACK_BIT_SET ? "!" : "");
8420 if ((given & 0x02000000) == 0)
8422 /* Always show offset. */
8423 offset = given & 0xfff;
8424 func (stream, "], #%s%d",
8425 NEGATIVE_BIT_SET ? "-" : "", (int) offset);
8429 func (stream, "], %s",
8430 NEGATIVE_BIT_SET ? "-" : "");
8431 arm_decode_shift (given, func, stream, TRUE);
8434 if (NEGATIVE_BIT_SET)
8438 return (signed long) offset;
8441 /* Print one neon instruction on INFO->STREAM.
8442 Return TRUE if the instuction matched, FALSE if this is not a
8443 recognised neon instruction. */
8446 print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
8448 const struct opcode32 *insn;
8449 void *stream = info->stream;
8450 fprintf_ftype func = info->fprintf_func;
8454 if ((given & 0xef000000) == 0xef000000)
8456 /* Move bit 28 to bit 24 to translate Thumb2 to ARM encoding. */
8457 unsigned long bit28 = given & (1 << 28);
8459 given &= 0x00ffffff;
8461 given |= 0xf3000000;
8463 given |= 0xf2000000;
8465 else if ((given & 0xff000000) == 0xf9000000)
8466 given ^= 0xf9000000 ^ 0xf4000000;
8467 /* vdup is also a valid neon instruction. */
8468 else if ((given & 0xff910f5f) != 0xee800b10)
8472 for (insn = neon_opcodes; insn->assembler; insn++)
8474 if ((given & insn->mask) == insn->value)
8476 signed long value_in_comment = 0;
8477 bfd_boolean is_unpredictable = FALSE;
8480 for (c = insn->assembler; *c; c++)
8487 func (stream, "%%");
8491 if (thumb && ifthen_state)
8492 is_unpredictable = TRUE;
8496 if (thumb && ifthen_state)
8497 func (stream, "%s", arm_conditional[IFTHEN_COND]);
8502 static const unsigned char enc[16] =
8504 0x4, 0x14, /* st4 0,1 */
8516 int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
8517 int rn = ((given >> 16) & 0xf);
8518 int rm = ((given >> 0) & 0xf);
8519 int align = ((given >> 4) & 0x3);
8520 int type = ((given >> 8) & 0xf);
8521 int n = enc[type] & 0xf;
8522 int stride = (enc[type] >> 4) + 1;
8527 for (ix = 0; ix != n; ix++)
8528 func (stream, "%sd%d", ix ? "," : "", rd + ix * stride);
8530 func (stream, "d%d", rd);
8532 func (stream, "d%d-d%d", rd, rd + n - 1);
8533 func (stream, "}, [%s", arm_regnames[rn]);
8535 func (stream, " :%d", 32 << align);
8540 func (stream, ", %s", arm_regnames[rm]);
8546 int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
8547 int rn = ((given >> 16) & 0xf);
8548 int rm = ((given >> 0) & 0xf);
8549 int idx_align = ((given >> 4) & 0xf);
8551 int size = ((given >> 10) & 0x3);
8552 int idx = idx_align >> (size + 1);
8553 int length = ((given >> 8) & 3) + 1;
8557 if (length > 1 && size > 0)
8558 stride = (idx_align & (1 << size)) ? 2 : 1;
8564 int amask = (1 << size) - 1;
8565 if ((idx_align & (1 << size)) != 0)
8569 if ((idx_align & amask) == amask)
8571 else if ((idx_align & amask) != 0)
8578 if (size == 2 && (idx_align & 2) != 0)
8580 align = (idx_align & 1) ? 16 << size : 0;
8584 if ((size == 2 && (idx_align & 3) != 0)
8585 || (idx_align & 1) != 0)
8592 if ((idx_align & 3) == 3)
8594 align = (idx_align & 3) * 64;
8597 align = (idx_align & 1) ? 32 << size : 0;
8605 for (i = 0; i < length; i++)
8606 func (stream, "%sd%d[%d]", (i == 0) ? "" : ",",
8607 rd + i * stride, idx);
8608 func (stream, "}, [%s", arm_regnames[rn]);
8610 func (stream, " :%d", align);
8615 func (stream, ", %s", arm_regnames[rm]);
8621 int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
8622 int rn = ((given >> 16) & 0xf);
8623 int rm = ((given >> 0) & 0xf);
8624 int align = ((given >> 4) & 0x1);
8625 int size = ((given >> 6) & 0x3);
8626 int type = ((given >> 8) & 0x3);
8628 int stride = ((given >> 5) & 0x1);
8631 if (stride && (n == 1))
8638 for (ix = 0; ix != n; ix++)
8639 func (stream, "%sd%d[]", ix ? "," : "", rd + ix * stride);
8641 func (stream, "d%d[]", rd);
8643 func (stream, "d%d[]-d%d[]", rd, rd + n - 1);
8644 func (stream, "}, [%s", arm_regnames[rn]);
8647 align = (8 * (type + 1)) << size;
8649 align = (size > 1) ? align >> 1 : align;
8650 if (type == 2 || (type == 0 && !size))
8651 func (stream, " :<bad align %d>", align);
8653 func (stream, " :%d", align);
8659 func (stream, ", %s", arm_regnames[rm]);
8665 int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
8666 int size = (given >> 20) & 3;
8667 int reg = raw_reg & ((4 << size) - 1);
8668 int ix = raw_reg >> size >> 2;
8670 func (stream, "d%d[%d]", reg, ix);
8675 /* Neon encoded constant for mov, mvn, vorr, vbic. */
8678 int cmode = (given >> 8) & 0xf;
8679 int op = (given >> 5) & 0x1;
8680 unsigned long value = 0, hival = 0;
8685 bits |= ((given >> 24) & 1) << 7;
8686 bits |= ((given >> 16) & 7) << 4;
8687 bits |= ((given >> 0) & 15) << 0;
8691 shift = (cmode >> 1) & 3;
8692 value = (unsigned long) bits << (8 * shift);
8695 else if (cmode < 12)
8697 shift = (cmode >> 1) & 1;
8698 value = (unsigned long) bits << (8 * shift);
8701 else if (cmode < 14)
8703 shift = (cmode & 1) + 1;
8704 value = (unsigned long) bits << (8 * shift);
8705 value |= (1ul << (8 * shift)) - 1;
8708 else if (cmode == 14)
8712 /* Bit replication into bytes. */
8718 for (ix = 7; ix >= 0; ix--)
8720 mask = ((bits >> ix) & 1) ? 0xff : 0;
8722 value = (value << 8) | mask;
8724 hival = (hival << 8) | mask;
8730 /* Byte replication. */
8731 value = (unsigned long) bits;
8737 /* Floating point encoding. */
8740 value = (unsigned long) (bits & 0x7f) << 19;
8741 value |= (unsigned long) (bits & 0x80) << 24;
8742 tmp = bits & 0x40 ? 0x3c : 0x40;
8743 value |= (unsigned long) tmp << 24;
8749 func (stream, "<illegal constant %.8x:%x:%x>",
8757 func (stream, "#%ld\t; 0x%.2lx", value, value);
8761 func (stream, "#%ld\t; 0x%.4lx", value, value);
8767 unsigned char valbytes[4];
8770 /* Do this a byte at a time so we don't have to
8771 worry about the host's endianness. */
8772 valbytes[0] = value & 0xff;
8773 valbytes[1] = (value >> 8) & 0xff;
8774 valbytes[2] = (value >> 16) & 0xff;
8775 valbytes[3] = (value >> 24) & 0xff;
8777 floatformat_to_double
8778 (& floatformat_ieee_single_little, valbytes,
8781 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
8785 func (stream, "#%ld\t; 0x%.8lx",
8786 (long) (((value & 0x80000000L) != 0)
8787 ? value | ~0xffffffffL : value),
8792 func (stream, "#0x%.8lx%.8lx", hival, value);
8803 int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
8804 int num = (given >> 8) & 0x3;
8807 func (stream, "{d%d}", regno);
8808 else if (num + regno >= 32)
8809 func (stream, "{d%d-<overflow reg d%d}", regno, regno + num);
8811 func (stream, "{d%d-d%d}", regno, regno + num);
8816 case '0': case '1': case '2': case '3': case '4':
8817 case '5': case '6': case '7': case '8': case '9':
8820 unsigned long value;
8822 c = arm_decode_bitfield (c, given, &value, &width);
8827 func (stream, "%s", arm_regnames[value]);
8830 func (stream, "%ld", value);
8831 value_in_comment = value;
8834 func (stream, "%ld", (1ul << width) - value);
8840 /* Various width encodings. */
8842 int base = 8 << (*c - 'S'); /* 8,16 or 32 */
8847 if (*c >= '0' && *c <= '9')
8849 else if (*c >= 'a' && *c <= 'f')
8850 limit = *c - 'a' + 10;
8856 if (value < low || value > high)
8857 func (stream, "<illegal width %d>", base << value);
8859 func (stream, "%d", base << value);
8863 if (given & (1 << 6))
8867 func (stream, "d%ld", value);
8872 func (stream, "<illegal reg q%ld.5>", value >> 1);
8874 func (stream, "q%ld", value >> 1);
8880 func (stream, "%c", *c);
8884 if (value == ((1ul << width) - 1))
8885 func (stream, "%c", *c);
8888 func (stream, "%c", c[(1 << width) - (int) value]);
8902 func (stream, "%c", *c);
8905 if (value_in_comment > 32 || value_in_comment < -16)
8906 func (stream, "\t; 0x%lx", value_in_comment);
8908 if (is_unpredictable)
8909 func (stream, UNPREDICTABLE_INSTRUCTION);
8917 /* Print one mve instruction on INFO->STREAM.
8918 Return TRUE if the instuction matched, FALSE if this is not a
8919 recognised mve instruction. */
8922 print_insn_mve (struct disassemble_info *info, long given)
8924 const struct mopcode32 *insn;
8925 void *stream = info->stream;
8926 fprintf_ftype func = info->fprintf_func;
8928 for (insn = mve_opcodes; insn->assembler; insn++)
8930 if (((given & insn->mask) == insn->value)
8931 && !is_mve_encoding_conflict (given, insn->mve_op))
8933 signed long value_in_comment = 0;
8934 bfd_boolean is_unpredictable = FALSE;
8935 bfd_boolean is_undefined = FALSE;
8937 enum mve_unpredictable unpredictable_cond = UNPRED_NONE;
8938 enum mve_undefined undefined_cond = UNDEF_NONE;
8940 /* Most vector mve instruction are illegal in a it block.
8941 There are a few exceptions; check for them. */
8942 if (ifthen_state && !is_mve_okay_in_it (insn->mve_op))
8944 is_unpredictable = TRUE;
8945 unpredictable_cond = UNPRED_IT_BLOCK;
8947 else if (is_mve_unpredictable (given, insn->mve_op,
8948 &unpredictable_cond))
8949 is_unpredictable = TRUE;
8951 if (is_mve_undefined (given, insn->mve_op, &undefined_cond))
8952 is_undefined = TRUE;
8954 for (c = insn->assembler; *c; c++)
8961 func (stream, "%%");
8965 /* Don't print anything for '+' as it is implied. */
8966 if (arm_decode_field (given, 23, 23) == 0)
8972 func (stream, "%s", arm_conditional[IFTHEN_COND]);
8976 print_mve_vld_str_addr (info, given, insn->mve_op);
8981 long mve_mask = mve_extract_pred_mask (given);
8982 func (stream, "%s", mve_predicatenames[mve_mask]);
8987 print_vec_condition (info, given, insn->mve_op);
8991 if (arm_decode_field (given, 0, 0) == 1)
8994 = arm_decode_field (given, 4, 4)
8995 | (arm_decode_field (given, 6, 6) << 1);
8997 func (stream, ", uxtw #%lu", size);
9002 print_mve_rounding_mode (info, given, insn->mve_op);
9006 print_mve_vcvt_size (info, given, insn->mve_op);
9011 unsigned long op1 = arm_decode_field (given, 21, 22);
9013 if ((insn->mve_op == MVE_VMOV_VEC_LANE_TO_GP))
9015 /* Check for signed. */
9016 if (arm_decode_field (given, 23, 23) == 0)
9018 /* We don't print 's' for S32. */
9019 if ((arm_decode_field (given, 5, 6) == 0)
9020 && ((op1 == 0) || (op1 == 1)))
9030 if (arm_decode_field (given, 28, 28) == 0)
9039 print_instruction_predicate (info);
9043 if (arm_decode_field (given, 21, 21) == 1)
9048 print_mve_register_blocks (info, given, insn->mve_op);
9052 /* SIMD encoded constant for mov, mvn, vorr, vbic. */
9054 print_simd_imm8 (info, given, 28, insn);
9058 print_mve_vmov_index (info, given);
9062 if (arm_decode_field (given, 12, 12) == 0)
9069 if (arm_decode_field (given, 12, 12) == 1)
9073 case '0': case '1': case '2': case '3': case '4':
9074 case '5': case '6': case '7': case '8': case '9':
9077 unsigned long value;
9079 c = arm_decode_bitfield (c, given, &value, &width);
9085 is_unpredictable = TRUE;
9086 else if (value == 15)
9087 func (stream, "zr");
9089 func (stream, "%s", arm_regnames[value]);
9092 print_mve_size (info,
9106 unsigned int odd_reg = (value << 1) | 1;
9107 func (stream, "%s", arm_regnames[odd_reg]);
9113 = arm_decode_field (given, 0, 6);
9114 unsigned long mod_imm = imm;
9116 switch (insn->mve_op)
9118 case MVE_VLDRW_GATHER_T5:
9119 case MVE_VSTRW_SCATTER_T5:
9120 mod_imm = mod_imm << 2;
9122 case MVE_VSTRD_SCATTER_T6:
9123 case MVE_VLDRD_GATHER_T6:
9124 mod_imm = mod_imm << 3;
9131 func (stream, "%lu", mod_imm);
9135 func (stream, "%lu", 64 - value);
9139 unsigned int even_reg = value << 1;
9140 func (stream, "%s", arm_regnames[even_reg]);
9163 print_mve_rotate (info, value, width);
9166 func (stream, "%s", arm_regnames[value]);
9169 if (insn->mve_op == MVE_VQSHL_T2
9170 || insn->mve_op == MVE_VQSHLU_T3
9171 || insn->mve_op == MVE_VRSHR
9172 || insn->mve_op == MVE_VRSHRN
9173 || insn->mve_op == MVE_VSHL_T1
9174 || insn->mve_op == MVE_VSHLL_T1
9175 || insn->mve_op == MVE_VSHR
9176 || insn->mve_op == MVE_VSHRN
9177 || insn->mve_op == MVE_VSLI
9178 || insn->mve_op == MVE_VSRI)
9179 print_mve_shift_n (info, given, insn->mve_op);
9180 else if (insn->mve_op == MVE_VSHLL_T2)
9188 func (stream, "16");
9191 print_mve_undefined (info, UNDEF_SIZE_0);
9200 if (insn->mve_op == MVE_VSHLC && value == 0)
9202 func (stream, "%ld", value);
9203 value_in_comment = value;
9207 func (stream, "s%ld", value);
9211 func (stream, "<illegal reg q%ld.5>", value);
9213 func (stream, "q%ld", value);
9216 func (stream, "0x%08lx", value);
9228 func (stream, "%c", *c);
9231 if (value_in_comment > 32 || value_in_comment < -16)
9232 func (stream, "\t; 0x%lx", value_in_comment);
9234 if (is_unpredictable)
9235 print_mve_unpredictable (info, unpredictable_cond);
9238 print_mve_undefined (info, undefined_cond);
9240 if ((vpt_block_state.in_vpt_block == FALSE)
9242 && (is_vpt_instruction (given) == TRUE))
9243 mark_inside_vpt_block (given);
9244 else if (vpt_block_state.in_vpt_block == TRUE)
9245 update_vpt_block_state ();
9254 /* Return the name of a v7A special register. */
9257 banked_regname (unsigned reg)
9261 case 15: return "CPSR";
9262 case 32: return "R8_usr";
9263 case 33: return "R9_usr";
9264 case 34: return "R10_usr";
9265 case 35: return "R11_usr";
9266 case 36: return "R12_usr";
9267 case 37: return "SP_usr";
9268 case 38: return "LR_usr";
9269 case 40: return "R8_fiq";
9270 case 41: return "R9_fiq";
9271 case 42: return "R10_fiq";
9272 case 43: return "R11_fiq";
9273 case 44: return "R12_fiq";
9274 case 45: return "SP_fiq";
9275 case 46: return "LR_fiq";
9276 case 48: return "LR_irq";
9277 case 49: return "SP_irq";
9278 case 50: return "LR_svc";
9279 case 51: return "SP_svc";
9280 case 52: return "LR_abt";
9281 case 53: return "SP_abt";
9282 case 54: return "LR_und";
9283 case 55: return "SP_und";
9284 case 60: return "LR_mon";
9285 case 61: return "SP_mon";
9286 case 62: return "ELR_hyp";
9287 case 63: return "SP_hyp";
9288 case 79: return "SPSR";
9289 case 110: return "SPSR_fiq";
9290 case 112: return "SPSR_irq";
9291 case 114: return "SPSR_svc";
9292 case 116: return "SPSR_abt";
9293 case 118: return "SPSR_und";
9294 case 124: return "SPSR_mon";
9295 case 126: return "SPSR_hyp";
9296 default: return NULL;
9300 /* Return the name of the DMB/DSB option. */
9302 data_barrier_option (unsigned option)
9304 switch (option & 0xf)
9306 case 0xf: return "sy";
9307 case 0xe: return "st";
9308 case 0xd: return "ld";
9309 case 0xb: return "ish";
9310 case 0xa: return "ishst";
9311 case 0x9: return "ishld";
9312 case 0x7: return "un";
9313 case 0x6: return "unst";
9314 case 0x5: return "nshld";
9315 case 0x3: return "osh";
9316 case 0x2: return "oshst";
9317 case 0x1: return "oshld";
9318 default: return NULL;
9322 /* Print one ARM instruction from PC on INFO->STREAM. */
9325 print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
9327 const struct opcode32 *insn;
9328 void *stream = info->stream;
9329 fprintf_ftype func = info->fprintf_func;
9330 struct arm_private_data *private_data = info->private_data;
9332 if (print_insn_coprocessor (pc, info, given, FALSE))
9335 if (print_insn_neon (info, given, FALSE))
9338 for (insn = arm_opcodes; insn->assembler; insn++)
9340 if ((given & insn->mask) != insn->value)
9343 if (! ARM_CPU_HAS_FEATURE (insn->arch, private_data->features))
9346 /* Special case: an instruction with all bits set in the condition field
9347 (0xFnnn_nnnn) is only matched if all those bits are set in insn->mask,
9348 or by the catchall at the end of the table. */
9349 if ((given & 0xF0000000) != 0xF0000000
9350 || (insn->mask & 0xF0000000) == 0xF0000000
9351 || (insn->mask == 0 && insn->value == 0))
9353 unsigned long u_reg = 16;
9354 unsigned long U_reg = 16;
9355 bfd_boolean is_unpredictable = FALSE;
9356 signed long value_in_comment = 0;
9359 for (c = insn->assembler; *c; c++)
9363 bfd_boolean allow_unpredictable = FALSE;
9368 func (stream, "%%");
9372 value_in_comment = print_arm_address (pc, info, given);
9376 /* Set P address bit and use normal address
9377 printing routine. */
9378 value_in_comment = print_arm_address (pc, info, given | (1 << P_BIT));
9382 allow_unpredictable = TRUE;
9385 if ((given & 0x004f0000) == 0x004f0000)
9387 /* PC relative with immediate offset. */
9388 bfd_vma offset = ((given & 0xf00) >> 4) | (given & 0xf);
9392 /* Elide positive zero offset. */
9393 if (offset || NEGATIVE_BIT_SET)
9394 func (stream, "[pc, #%s%d]\t; ",
9395 NEGATIVE_BIT_SET ? "-" : "", (int) offset);
9397 func (stream, "[pc]\t; ");
9398 if (NEGATIVE_BIT_SET)
9400 info->print_address_func (offset + pc + 8, info);
9404 /* Always show the offset. */
9405 func (stream, "[pc], #%s%d",
9406 NEGATIVE_BIT_SET ? "-" : "", (int) offset);
9407 if (! allow_unpredictable)
9408 is_unpredictable = TRUE;
9413 int offset = ((given & 0xf00) >> 4) | (given & 0xf);
9415 func (stream, "[%s",
9416 arm_regnames[(given >> 16) & 0xf]);
9420 if (IMMEDIATE_BIT_SET)
9422 /* Elide offset for non-writeback
9424 if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET
9426 func (stream, ", #%s%d",
9427 NEGATIVE_BIT_SET ? "-" : "", offset);
9429 if (NEGATIVE_BIT_SET)
9432 value_in_comment = offset;
9436 /* Register Offset or Register Pre-Indexed. */
9437 func (stream, ", %s%s",
9438 NEGATIVE_BIT_SET ? "-" : "",
9439 arm_regnames[given & 0xf]);
9441 /* Writing back to the register that is the source/
9442 destination of the load/store is unpredictable. */
9443 if (! allow_unpredictable
9444 && WRITEBACK_BIT_SET
9445 && ((given & 0xf) == ((given >> 12) & 0xf)))
9446 is_unpredictable = TRUE;
9449 func (stream, "]%s",
9450 WRITEBACK_BIT_SET ? "!" : "");
9454 if (IMMEDIATE_BIT_SET)
9456 /* Immediate Post-indexed. */
9457 /* PR 10924: Offset must be printed, even if it is zero. */
9458 func (stream, "], #%s%d",
9459 NEGATIVE_BIT_SET ? "-" : "", offset);
9460 if (NEGATIVE_BIT_SET)
9462 value_in_comment = offset;
9466 /* Register Post-indexed. */
9467 func (stream, "], %s%s",
9468 NEGATIVE_BIT_SET ? "-" : "",
9469 arm_regnames[given & 0xf]);
9471 /* Writing back to the register that is the source/
9472 destination of the load/store is unpredictable. */
9473 if (! allow_unpredictable
9474 && (given & 0xf) == ((given >> 12) & 0xf))
9475 is_unpredictable = TRUE;
9478 if (! allow_unpredictable)
9480 /* Writeback is automatically implied by post- addressing.
9481 Setting the W bit is unnecessary and ARM specify it as
9482 being unpredictable. */
9483 if (WRITEBACK_BIT_SET
9484 /* Specifying the PC register as the post-indexed
9485 registers is also unpredictable. */
9486 || (! IMMEDIATE_BIT_SET && ((given & 0xf) == 0xf)))
9487 is_unpredictable = TRUE;
9495 bfd_vma disp = (((given & 0xffffff) ^ 0x800000) - 0x800000);
9496 info->print_address_func (disp * 4 + pc + 8, info);
9501 if (((given >> 28) & 0xf) != 0xe)
9503 arm_conditional [(given >> 28) & 0xf]);
9512 for (reg = 0; reg < 16; reg++)
9513 if ((given & (1 << reg)) != 0)
9516 func (stream, ", ");
9518 func (stream, "%s", arm_regnames[reg]);
9522 is_unpredictable = TRUE;
9527 arm_decode_shift (given, func, stream, FALSE);
9531 if ((given & 0x02000000) != 0)
9533 unsigned int rotate = (given & 0xf00) >> 7;
9534 unsigned int immed = (given & 0xff);
9537 a = (((immed << (32 - rotate))
9538 | (immed >> rotate)) & 0xffffffff);
9539 /* If there is another encoding with smaller rotate,
9540 the rotate should be specified directly. */
9541 for (i = 0; i < 32; i += 2)
9542 if ((a << i | a >> (32 - i)) <= 0xff)
9546 func (stream, "#%d, %d", immed, rotate);
9548 func (stream, "#%d", a);
9549 value_in_comment = a;
9552 arm_decode_shift (given, func, stream, TRUE);
9556 if ((given & 0x0000f000) == 0x0000f000)
9558 arm_feature_set arm_ext_v6 =
9559 ARM_FEATURE_CORE_LOW (ARM_EXT_V6);
9561 /* The p-variants of tst/cmp/cmn/teq are the pre-V6
9562 mechanism for setting PSR flag bits. They are
9563 obsolete in V6 onwards. */
9564 if (! ARM_CPU_HAS_FEATURE (private_data->features, \
9568 is_unpredictable = TRUE;
9573 if ((given & 0x01200000) == 0x00200000)
9579 int offset = given & 0xff;
9581 value_in_comment = offset * 4;
9582 if (NEGATIVE_BIT_SET)
9583 value_in_comment = - value_in_comment;
9585 func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
9590 func (stream, ", #%d]%s",
9591 (int) value_in_comment,
9592 WRITEBACK_BIT_SET ? "!" : "");
9600 if (WRITEBACK_BIT_SET)
9603 func (stream, ", #%d", (int) value_in_comment);
9607 func (stream, ", {%d}", (int) offset);
9608 value_in_comment = offset;
9615 /* Print ARM V5 BLX(1) address: pc+25 bits. */
9620 if (! NEGATIVE_BIT_SET)
9621 /* Is signed, hi bits should be ones. */
9622 offset = (-1) ^ 0x00ffffff;
9624 /* Offset is (SignExtend(offset field)<<2). */
9625 offset += given & 0x00ffffff;
9627 address = offset + pc + 8;
9629 if (given & 0x01000000)
9630 /* H bit allows addressing to 2-byte boundaries. */
9633 info->print_address_func (address, info);
9638 if ((given & 0x02000200) == 0x200)
9641 unsigned sysm = (given & 0x004f0000) >> 16;
9643 sysm |= (given & 0x300) >> 4;
9644 name = banked_regname (sysm);
9647 func (stream, "%s", name);
9649 func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
9653 func (stream, "%cPSR_",
9654 (given & 0x00400000) ? 'S' : 'C');
9655 if (given & 0x80000)
9657 if (given & 0x40000)
9659 if (given & 0x20000)
9661 if (given & 0x10000)
9667 if ((given & 0xf0) == 0x60)
9669 switch (given & 0xf)
9671 case 0xf: func (stream, "sy"); break;
9673 func (stream, "#%d", (int) given & 0xf);
9679 const char * opt = data_barrier_option (given & 0xf);
9681 func (stream, "%s", opt);
9683 func (stream, "#%d", (int) given & 0xf);
9687 case '0': case '1': case '2': case '3': case '4':
9688 case '5': case '6': case '7': case '8': case '9':
9691 unsigned long value;
9693 c = arm_decode_bitfield (c, given, &value, &width);
9699 is_unpredictable = TRUE;
9703 /* We want register + 1 when decoding T. */
9709 /* Eat the 'u' character. */
9713 is_unpredictable = TRUE;
9718 /* Eat the 'U' character. */
9722 is_unpredictable = TRUE;
9725 func (stream, "%s", arm_regnames[value]);
9728 func (stream, "%ld", value);
9729 value_in_comment = value;
9732 func (stream, "%ld", value * 8);
9733 value_in_comment = value * 8;
9736 func (stream, "%ld", value + 1);
9737 value_in_comment = value + 1;
9740 func (stream, "0x%08lx", value);
9742 /* Some SWI instructions have special
9744 if ((given & 0x0fffffff) == 0x0FF00000)
9745 func (stream, "\t; IMB");
9746 else if ((given & 0x0fffffff) == 0x0FF00001)
9747 func (stream, "\t; IMBRange");
9750 func (stream, "%01lx", value & 0xf);
9751 value_in_comment = value;
9756 func (stream, "%c", *c);
9760 if (value == ((1ul << width) - 1))
9761 func (stream, "%c", *c);
9764 func (stream, "%c", c[(1 << width) - (int) value]);
9777 imm = (given & 0xf) | ((given & 0xfff00) >> 4);
9778 func (stream, "%d", imm);
9779 value_in_comment = imm;
9784 /* LSB and WIDTH fields of BFI or BFC. The machine-
9785 language instruction encodes LSB and MSB. */
9787 long msb = (given & 0x001f0000) >> 16;
9788 long lsb = (given & 0x00000f80) >> 7;
9789 long w = msb - lsb + 1;
9792 func (stream, "#%lu, #%lu", lsb, w);
9794 func (stream, "(invalid: %lu:%lu)", lsb, msb);
9799 /* Get the PSR/banked register name. */
9802 unsigned sysm = (given & 0x004f0000) >> 16;
9804 sysm |= (given & 0x300) >> 4;
9805 name = banked_regname (sysm);
9808 func (stream, "%s", name);
9810 func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
9815 /* 16-bit unsigned immediate from a MOVT or MOVW
9816 instruction, encoded in bits 0:11 and 15:19. */
9818 long hi = (given & 0x000f0000) >> 4;
9819 long lo = (given & 0x00000fff);
9820 long imm16 = hi | lo;
9822 func (stream, "#%lu", imm16);
9823 value_in_comment = imm16;
9832 func (stream, "%c", *c);
9835 if (value_in_comment > 32 || value_in_comment < -16)
9836 func (stream, "\t; 0x%lx", (value_in_comment & 0xffffffffUL));
9838 if (is_unpredictable)
9839 func (stream, UNPREDICTABLE_INSTRUCTION);
9844 func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
9848 /* Print one 16-bit Thumb instruction from PC on INFO->STREAM. */
9851 print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
9853 const struct opcode16 *insn;
9854 void *stream = info->stream;
9855 fprintf_ftype func = info->fprintf_func;
9857 for (insn = thumb_opcodes; insn->assembler; insn++)
9858 if ((given & insn->mask) == insn->value)
9860 signed long value_in_comment = 0;
9861 const char *c = insn->assembler;
9870 func (stream, "%c", *c);
9877 func (stream, "%%");
9882 func (stream, "%s", arm_conditional[IFTHEN_COND]);
9887 func (stream, "%s", arm_conditional[IFTHEN_COND]);
9896 ifthen_next_state = given & 0xff;
9897 for (tmp = given << 1; tmp & 0xf; tmp <<= 1)
9898 func (stream, ((given ^ tmp) & 0x10) ? "e" : "t");
9899 func (stream, "\t%s", arm_conditional[(given >> 4) & 0xf]);
9904 if (ifthen_next_state)
9905 func (stream, "\t; unpredictable branch in IT block\n");
9910 func (stream, "\t; unpredictable <IT:%s>",
9911 arm_conditional[IFTHEN_COND]);
9918 reg = (given >> 3) & 0x7;
9919 if (given & (1 << 6))
9922 func (stream, "%s", arm_regnames[reg]);
9931 if (given & (1 << 7))
9934 func (stream, "%s", arm_regnames[reg]);
9939 if (given & (1 << 8))
9943 if (*c == 'O' && (given & (1 << 8)))
9953 /* It would be nice if we could spot
9954 ranges, and generate the rS-rE format: */
9955 for (reg = 0; (reg < 8); reg++)
9956 if ((given & (1 << reg)) != 0)
9959 func (stream, ", ");
9961 func (stream, "%s", arm_regnames[reg]);
9967 func (stream, ", ");
9969 func (stream, "%s", arm_regnames[14] /* "lr" */);
9975 func (stream, ", ");
9976 func (stream, "%s", arm_regnames[15] /* "pc" */);
9984 /* Print writeback indicator for a LDMIA. We are doing a
9985 writeback if the base register is not in the register
9987 if ((given & (1 << ((given & 0x0700) >> 8))) == 0)
9992 /* Print ARM V6T2 CZB address: pc+4+6 bits. */
9994 bfd_vma address = (pc + 4
9995 + ((given & 0x00f8) >> 2)
9996 + ((given & 0x0200) >> 3));
9997 info->print_address_func (address, info);
10002 /* Right shift immediate -- bits 6..10; 1-31 print
10003 as themselves, 0 prints as 32. */
10005 long imm = (given & 0x07c0) >> 6;
10008 func (stream, "#%ld", imm);
10012 case '0': case '1': case '2': case '3': case '4':
10013 case '5': case '6': case '7': case '8': case '9':
10015 int bitstart = *c++ - '0';
10018 while (*c >= '0' && *c <= '9')
10019 bitstart = (bitstart * 10) + *c++ - '0';
10028 while (*c >= '0' && *c <= '9')
10029 bitend = (bitend * 10) + *c++ - '0';
10032 reg = given >> bitstart;
10033 reg &= (2 << (bitend - bitstart)) - 1;
10038 func (stream, "%s", arm_regnames[reg]);
10042 func (stream, "%ld", (long) reg);
10043 value_in_comment = reg;
10047 func (stream, "%ld", (long) (reg << 1));
10048 value_in_comment = reg << 1;
10052 func (stream, "%ld", (long) (reg << 2));
10053 value_in_comment = reg << 2;
10057 /* PC-relative address -- the bottom two
10058 bits of the address are dropped
10059 before the calculation. */
10060 info->print_address_func
10061 (((pc + 4) & ~3) + (reg << 2), info);
10062 value_in_comment = 0;
10066 func (stream, "0x%04lx", (long) reg);
10070 reg = ((reg ^ (1 << bitend)) - (1 << bitend));
10071 info->print_address_func (reg * 2 + pc + 4, info);
10072 value_in_comment = 0;
10076 func (stream, "%s", arm_conditional [reg]);
10087 if ((given & (1 << bitstart)) != 0)
10088 func (stream, "%c", *c);
10093 if ((given & (1 << bitstart)) != 0)
10094 func (stream, "%c", *c++);
10096 func (stream, "%c", *++c);
10110 if (value_in_comment > 32 || value_in_comment < -16)
10111 func (stream, "\t; 0x%lx", value_in_comment);
10116 func (stream, UNKNOWN_INSTRUCTION_16BIT, (unsigned)given);
10120 /* Return the name of an V7M special register. */
10122 static const char *
10123 psr_name (int regno)
10127 case 0x0: return "APSR";
10128 case 0x1: return "IAPSR";
10129 case 0x2: return "EAPSR";
10130 case 0x3: return "PSR";
10131 case 0x5: return "IPSR";
10132 case 0x6: return "EPSR";
10133 case 0x7: return "IEPSR";
10134 case 0x8: return "MSP";
10135 case 0x9: return "PSP";
10136 case 0xa: return "MSPLIM";
10137 case 0xb: return "PSPLIM";
10138 case 0x10: return "PRIMASK";
10139 case 0x11: return "BASEPRI";
10140 case 0x12: return "BASEPRI_MAX";
10141 case 0x13: return "FAULTMASK";
10142 case 0x14: return "CONTROL";
10143 case 0x88: return "MSP_NS";
10144 case 0x89: return "PSP_NS";
10145 case 0x8a: return "MSPLIM_NS";
10146 case 0x8b: return "PSPLIM_NS";
10147 case 0x90: return "PRIMASK_NS";
10148 case 0x91: return "BASEPRI_NS";
10149 case 0x93: return "FAULTMASK_NS";
10150 case 0x94: return "CONTROL_NS";
10151 case 0x98: return "SP_NS";
10152 default: return "<unknown>";
10156 /* Print one 32-bit Thumb instruction from PC on INFO->STREAM. */
10159 print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
10161 const struct opcode32 *insn;
10162 void *stream = info->stream;
10163 fprintf_ftype func = info->fprintf_func;
10164 bfd_boolean is_mve = is_mve_architecture (info);
10166 if (print_insn_coprocessor (pc, info, given, TRUE))
10169 if ((is_mve == FALSE) && print_insn_neon (info, given, TRUE))
10172 if (is_mve && print_insn_mve (info, given))
10175 for (insn = thumb32_opcodes; insn->assembler; insn++)
10176 if ((given & insn->mask) == insn->value)
10178 bfd_boolean is_clrm = FALSE;
10179 bfd_boolean is_unpredictable = FALSE;
10180 signed long value_in_comment = 0;
10181 const char *c = insn->assembler;
10187 func (stream, "%c", *c);
10194 func (stream, "%%");
10199 func (stream, "%s", arm_conditional[IFTHEN_COND]);
10203 if (ifthen_next_state)
10204 func (stream, "\t; unpredictable branch in IT block\n");
10209 func (stream, "\t; unpredictable <IT:%s>",
10210 arm_conditional[IFTHEN_COND]);
10215 unsigned int imm12 = 0;
10217 imm12 |= (given & 0x000000ffu);
10218 imm12 |= (given & 0x00007000u) >> 4;
10219 imm12 |= (given & 0x04000000u) >> 15;
10220 func (stream, "#%u", imm12);
10221 value_in_comment = imm12;
10227 unsigned int bits = 0, imm, imm8, mod;
10229 bits |= (given & 0x000000ffu);
10230 bits |= (given & 0x00007000u) >> 4;
10231 bits |= (given & 0x04000000u) >> 15;
10232 imm8 = (bits & 0x0ff);
10233 mod = (bits & 0xf00) >> 8;
10236 case 0: imm = imm8; break;
10237 case 1: imm = ((imm8 << 16) | imm8); break;
10238 case 2: imm = ((imm8 << 24) | (imm8 << 8)); break;
10239 case 3: imm = ((imm8 << 24) | (imm8 << 16) | (imm8 << 8) | imm8); break;
10241 mod = (bits & 0xf80) >> 7;
10242 imm8 = (bits & 0x07f) | 0x80;
10243 imm = (((imm8 << (32 - mod)) | (imm8 >> mod)) & 0xffffffff);
10245 func (stream, "#%u", imm);
10246 value_in_comment = imm;
10252 unsigned int imm = 0;
10254 imm |= (given & 0x000000ffu);
10255 imm |= (given & 0x00007000u) >> 4;
10256 imm |= (given & 0x04000000u) >> 15;
10257 imm |= (given & 0x000f0000u) >> 4;
10258 func (stream, "#%u", imm);
10259 value_in_comment = imm;
10265 unsigned int imm = 0;
10267 imm |= (given & 0x000f0000u) >> 16;
10268 imm |= (given & 0x00000ff0u) >> 0;
10269 imm |= (given & 0x0000000fu) << 12;
10270 func (stream, "#%u", imm);
10271 value_in_comment = imm;
10277 unsigned int imm = 0;
10279 imm |= (given & 0x000f0000u) >> 4;
10280 imm |= (given & 0x00000fffu) >> 0;
10281 func (stream, "#%u", imm);
10282 value_in_comment = imm;
10288 unsigned int imm = 0;
10290 imm |= (given & 0x00000fffu);
10291 imm |= (given & 0x000f0000u) >> 4;
10292 func (stream, "#%u", imm);
10293 value_in_comment = imm;
10299 unsigned int reg = (given & 0x0000000fu);
10300 unsigned int stp = (given & 0x00000030u) >> 4;
10301 unsigned int imm = 0;
10302 imm |= (given & 0x000000c0u) >> 6;
10303 imm |= (given & 0x00007000u) >> 10;
10305 func (stream, "%s", arm_regnames[reg]);
10310 func (stream, ", lsl #%u", imm);
10316 func (stream, ", lsr #%u", imm);
10322 func (stream, ", asr #%u", imm);
10327 func (stream, ", rrx");
10329 func (stream, ", ror #%u", imm);
10336 unsigned int Rn = (given & 0x000f0000) >> 16;
10337 unsigned int U = ! NEGATIVE_BIT_SET;
10338 unsigned int op = (given & 0x00000f00) >> 8;
10339 unsigned int i12 = (given & 0x00000fff);
10340 unsigned int i8 = (given & 0x000000ff);
10341 bfd_boolean writeback = FALSE, postind = FALSE;
10342 bfd_vma offset = 0;
10344 func (stream, "[%s", arm_regnames[Rn]);
10345 if (U) /* 12-bit positive immediate offset. */
10349 value_in_comment = offset;
10351 else if (Rn == 15) /* 12-bit negative immediate offset. */
10352 offset = - (int) i12;
10353 else if (op == 0x0) /* Shifted register offset. */
10355 unsigned int Rm = (i8 & 0x0f);
10356 unsigned int sh = (i8 & 0x30) >> 4;
10358 func (stream, ", %s", arm_regnames[Rm]);
10360 func (stream, ", lsl #%u", sh);
10361 func (stream, "]");
10366 case 0xE: /* 8-bit positive immediate offset. */
10370 case 0xC: /* 8-bit negative immediate offset. */
10374 case 0xF: /* 8-bit + preindex with wb. */
10379 case 0xD: /* 8-bit - preindex with wb. */
10384 case 0xB: /* 8-bit + postindex. */
10389 case 0x9: /* 8-bit - postindex. */
10395 func (stream, ", <undefined>]");
10400 func (stream, "], #%d", (int) offset);
10404 func (stream, ", #%d", (int) offset);
10405 func (stream, writeback ? "]!" : "]");
10410 func (stream, "\t; ");
10411 info->print_address_func (((pc + 4) & ~3) + offset, info);
10419 unsigned int U = ! NEGATIVE_BIT_SET;
10420 unsigned int W = WRITEBACK_BIT_SET;
10421 unsigned int Rn = (given & 0x000f0000) >> 16;
10422 unsigned int off = (given & 0x000000ff);
10424 func (stream, "[%s", arm_regnames[Rn]);
10430 func (stream, ", #%c%u", U ? '+' : '-', off * 4);
10431 value_in_comment = off * 4 * (U ? 1 : -1);
10433 func (stream, "]");
10435 func (stream, "!");
10439 func (stream, "], ");
10442 func (stream, "#%c%u", U ? '+' : '-', off * 4);
10443 value_in_comment = off * 4 * (U ? 1 : -1);
10447 func (stream, "{%u}", off);
10448 value_in_comment = off;
10456 unsigned int Sbit = (given & 0x01000000) >> 24;
10457 unsigned int type = (given & 0x00600000) >> 21;
10461 case 0: func (stream, Sbit ? "sb" : "b"); break;
10462 case 1: func (stream, Sbit ? "sh" : "h"); break;
10465 func (stream, "??");
10468 func (stream, "??");
10476 /* Fall through. */
10482 func (stream, "{");
10483 for (reg = 0; reg < 16; reg++)
10484 if ((given & (1 << reg)) != 0)
10487 func (stream, ", ");
10489 if (is_clrm && reg == 13)
10490 func (stream, "(invalid: %s)", arm_regnames[reg]);
10491 else if (is_clrm && reg == 15)
10492 func (stream, "%s", "APSR");
10494 func (stream, "%s", arm_regnames[reg]);
10496 func (stream, "}");
10502 unsigned int msb = (given & 0x0000001f);
10503 unsigned int lsb = 0;
10505 lsb |= (given & 0x000000c0u) >> 6;
10506 lsb |= (given & 0x00007000u) >> 10;
10507 func (stream, "#%u, #%u", lsb, msb - lsb + 1);
10513 unsigned int width = (given & 0x0000001f) + 1;
10514 unsigned int lsb = 0;
10516 lsb |= (given & 0x000000c0u) >> 6;
10517 lsb |= (given & 0x00007000u) >> 10;
10518 func (stream, "#%u, #%u", lsb, width);
10524 unsigned int boff = (((given & 0x07800000) >> 23) << 1);
10525 func (stream, "%x", boff);
10531 unsigned int immA = (given & 0x001f0000u) >> 16;
10532 unsigned int immB = (given & 0x000007feu) >> 1;
10533 unsigned int immC = (given & 0x00000800u) >> 11;
10534 bfd_vma offset = 0;
10536 offset |= immA << 12;
10537 offset |= immB << 2;
10538 offset |= immC << 1;
10540 offset = (offset & 0x10000) ? offset - (1 << 17) : offset;
10542 info->print_address_func (pc + 4 + offset, info);
10548 unsigned int immA = (given & 0x007f0000u) >> 16;
10549 unsigned int immB = (given & 0x000007feu) >> 1;
10550 unsigned int immC = (given & 0x00000800u) >> 11;
10551 bfd_vma offset = 0;
10553 offset |= immA << 12;
10554 offset |= immB << 2;
10555 offset |= immC << 1;
10557 offset = (offset & 0x40000) ? offset - (1 << 19) : offset;
10559 info->print_address_func (pc + 4 + offset, info);
10565 unsigned int immA = (given & 0x00010000u) >> 16;
10566 unsigned int immB = (given & 0x000007feu) >> 1;
10567 unsigned int immC = (given & 0x00000800u) >> 11;
10568 bfd_vma offset = 0;
10570 offset |= immA << 12;
10571 offset |= immB << 2;
10572 offset |= immC << 1;
10574 offset = (offset & 0x1000) ? offset - (1 << 13) : offset;
10576 info->print_address_func (pc + 4 + offset, info);
10578 unsigned int T = (given & 0x00020000u) >> 17;
10579 unsigned int endoffset = (((given & 0x07800000) >> 23) << 1);
10580 unsigned int boffset = (T == 1) ? 4 : 2;
10581 func (stream, ", ");
10582 func (stream, "%x", endoffset + boffset);
10588 unsigned int immh = (given & 0x000007feu) >> 1;
10589 unsigned int imml = (given & 0x00000800u) >> 11;
10592 imm32 |= immh << 2;
10593 imm32 |= imml << 1;
10595 info->print_address_func (pc + 4 + imm32, info);
10601 unsigned int immh = (given & 0x000007feu) >> 1;
10602 unsigned int imml = (given & 0x00000800u) >> 11;
10605 imm32 |= immh << 2;
10606 imm32 |= imml << 1;
10608 info->print_address_func (pc + 4 - imm32, info);
10614 unsigned int S = (given & 0x04000000u) >> 26;
10615 unsigned int J1 = (given & 0x00002000u) >> 13;
10616 unsigned int J2 = (given & 0x00000800u) >> 11;
10617 bfd_vma offset = 0;
10619 offset |= !S << 20;
10620 offset |= J2 << 19;
10621 offset |= J1 << 18;
10622 offset |= (given & 0x003f0000) >> 4;
10623 offset |= (given & 0x000007ff) << 1;
10624 offset -= (1 << 20);
10626 info->print_address_func (pc + 4 + offset, info);
10632 unsigned int S = (given & 0x04000000u) >> 26;
10633 unsigned int I1 = (given & 0x00002000u) >> 13;
10634 unsigned int I2 = (given & 0x00000800u) >> 11;
10635 bfd_vma offset = 0;
10637 offset |= !S << 24;
10638 offset |= !(I1 ^ S) << 23;
10639 offset |= !(I2 ^ S) << 22;
10640 offset |= (given & 0x03ff0000u) >> 4;
10641 offset |= (given & 0x000007ffu) << 1;
10642 offset -= (1 << 24);
10645 /* BLX target addresses are always word aligned. */
10646 if ((given & 0x00001000u) == 0)
10649 info->print_address_func (offset, info);
10655 unsigned int shift = 0;
10657 shift |= (given & 0x000000c0u) >> 6;
10658 shift |= (given & 0x00007000u) >> 10;
10659 if (WRITEBACK_BIT_SET)
10660 func (stream, ", asr #%u", shift);
10662 func (stream, ", lsl #%u", shift);
10663 /* else print nothing - lsl #0 */
10669 unsigned int rot = (given & 0x00000030) >> 4;
10672 func (stream, ", ror #%u", rot * 8);
10677 if ((given & 0xf0) == 0x60)
10679 switch (given & 0xf)
10681 case 0xf: func (stream, "sy"); break;
10683 func (stream, "#%d", (int) given & 0xf);
10689 const char * opt = data_barrier_option (given & 0xf);
10691 func (stream, "%s", opt);
10693 func (stream, "#%d", (int) given & 0xf);
10698 if ((given & 0xff) == 0)
10700 func (stream, "%cPSR_", (given & 0x100000) ? 'S' : 'C');
10702 func (stream, "f");
10704 func (stream, "s");
10706 func (stream, "x");
10708 func (stream, "c");
10710 else if ((given & 0x20) == 0x20)
10713 unsigned sysm = (given & 0xf00) >> 8;
10715 sysm |= (given & 0x30);
10716 sysm |= (given & 0x00100000) >> 14;
10717 name = banked_regname (sysm);
10720 func (stream, "%s", name);
10722 func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
10726 func (stream, "%s", psr_name (given & 0xff));
10731 if (((given & 0xff) == 0)
10732 || ((given & 0x20) == 0x20))
10735 unsigned sm = (given & 0xf0000) >> 16;
10737 sm |= (given & 0x30);
10738 sm |= (given & 0x00100000) >> 14;
10739 name = banked_regname (sm);
10742 func (stream, "%s", name);
10744 func (stream, "(UNDEF: %lu)", (unsigned long) sm);
10747 func (stream, "%s", psr_name (given & 0xff));
10750 case '0': case '1': case '2': case '3': case '4':
10751 case '5': case '6': case '7': case '8': case '9':
10756 c = arm_decode_bitfield (c, given, &val, &width);
10762 func (stream, "%s", mve_vec_sizename[val]);
10764 func (stream, "<undef size>");
10768 func (stream, "%lu", val);
10769 value_in_comment = val;
10773 func (stream, "%lu", val + 1);
10774 value_in_comment = val + 1;
10778 func (stream, "%lu", val * 4);
10779 value_in_comment = val * 4;
10784 is_unpredictable = TRUE;
10785 /* Fall through. */
10788 is_unpredictable = TRUE;
10789 /* Fall through. */
10791 func (stream, "%s", arm_regnames[val]);
10795 func (stream, "%s", arm_conditional[val]);
10800 if (val == ((1ul << width) - 1))
10801 func (stream, "%c", *c);
10807 func (stream, "%c", *c);
10811 func (stream, "%c", c[(1 << width) - (int) val]);
10816 func (stream, "0x%lx", val & 0xffffffffUL);
10826 /* PR binutils/12534
10827 If we have a PC relative offset in an LDRD or STRD
10828 instructions then display the decoded address. */
10829 if (((given >> 16) & 0xf) == 0xf)
10831 bfd_vma offset = (given & 0xff) * 4;
10833 if ((given & (1 << 23)) == 0)
10835 func (stream, "\t; ");
10836 info->print_address_func ((pc & ~3) + 4 + offset, info);
10845 if (value_in_comment > 32 || value_in_comment < -16)
10846 func (stream, "\t; 0x%lx", value_in_comment);
10848 if (is_unpredictable)
10849 func (stream, UNPREDICTABLE_INSTRUCTION);
10855 func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
10859 /* Print data bytes on INFO->STREAM. */
10862 print_insn_data (bfd_vma pc ATTRIBUTE_UNUSED,
10863 struct disassemble_info *info,
10866 switch (info->bytes_per_chunk)
10869 info->fprintf_func (info->stream, ".byte\t0x%02lx", given);
10872 info->fprintf_func (info->stream, ".short\t0x%04lx", given);
10875 info->fprintf_func (info->stream, ".word\t0x%08lx", given);
10882 /* Disallow mapping symbols ($a, $b, $d, $t etc) from
10883 being displayed in symbol relative addresses.
10885 Also disallow private symbol, with __tagsym$$ prefix,
10886 from ARM RVCT toolchain being displayed. */
10889 arm_symbol_is_valid (asymbol * sym,
10890 struct disassemble_info * info ATTRIBUTE_UNUSED)
10897 name = bfd_asymbol_name (sym);
10899 return (name && *name != '$' && strncmp (name, "__tagsym$$", 10));
10902 /* Parse the string of disassembler options. */
10905 parse_arm_disassembler_options (const char *options)
10909 FOR_EACH_DISASSEMBLER_OPTION (opt, options)
10911 if (CONST_STRNEQ (opt, "reg-names-"))
10914 for (i = 0; i < NUM_ARM_OPTIONS; i++)
10915 if (disassembler_options_cmp (opt, regnames[i].name) == 0)
10917 regname_selected = i;
10921 if (i >= NUM_ARM_OPTIONS)
10922 /* xgettext: c-format */
10923 opcodes_error_handler (_("unrecognised register name set: %s"),
10926 else if (CONST_STRNEQ (opt, "force-thumb"))
10928 else if (CONST_STRNEQ (opt, "no-force-thumb"))
10931 /* xgettext: c-format */
10932 opcodes_error_handler (_("unrecognised disassembler option: %s"), opt);
10939 mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
10940 enum map_type *map_symbol);
10942 /* Search back through the insn stream to determine if this instruction is
10943 conditionally executed. */
10946 find_ifthen_state (bfd_vma pc,
10947 struct disassemble_info *info,
10948 bfd_boolean little)
10950 unsigned char b[2];
10953 /* COUNT is twice the number of instructions seen. It will be odd if we
10954 just crossed an instruction boundary. */
10957 unsigned int seen_it;
10960 ifthen_address = pc;
10967 /* Scan backwards looking for IT instructions, keeping track of where
10968 instruction boundaries are. We don't know if something is actually an
10969 IT instruction until we find a definite instruction boundary. */
10972 if (addr == 0 || info->symbol_at_address_func (addr, info))
10974 /* A symbol must be on an instruction boundary, and will not
10975 be within an IT block. */
10976 if (seen_it && (count & 1))
10982 status = info->read_memory_func (addr, (bfd_byte *) b, 2, info);
10987 insn = (b[0]) | (b[1] << 8);
10989 insn = (b[1]) | (b[0] << 8);
10992 if ((insn & 0xf800) < 0xe800)
10994 /* Addr + 2 is an instruction boundary. See if this matches
10995 the expected boundary based on the position of the last
11002 if ((insn & 0xff00) == 0xbf00 && (insn & 0xf) != 0)
11004 enum map_type type = MAP_ARM;
11005 bfd_boolean found = mapping_symbol_for_insn (addr, info, &type);
11007 if (!found || (found && type == MAP_THUMB))
11009 /* This could be an IT instruction. */
11011 it_count = count >> 1;
11014 if ((insn & 0xf800) >= 0xe800)
11017 count = (count + 2) | 1;
11018 /* IT blocks contain at most 4 instructions. */
11019 if (count >= 8 && !seen_it)
11022 /* We found an IT instruction. */
11023 ifthen_state = (seen_it & 0xe0) | ((seen_it << it_count) & 0x1f);
11024 if ((ifthen_state & 0xf) == 0)
11028 /* Returns nonzero and sets *MAP_TYPE if the N'th symbol is a
11032 is_mapping_symbol (struct disassemble_info *info, int n,
11033 enum map_type *map_type)
11037 name = bfd_asymbol_name (info->symtab[n]);
11038 if (name[0] == '$' && (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
11039 && (name[2] == 0 || name[2] == '.'))
11041 *map_type = ((name[1] == 'a') ? MAP_ARM
11042 : (name[1] == 't') ? MAP_THUMB
11050 /* Try to infer the code type (ARM or Thumb) from a mapping symbol.
11051 Returns nonzero if *MAP_TYPE was set. */
11054 get_map_sym_type (struct disassemble_info *info,
11056 enum map_type *map_type)
11058 /* If the symbol is in a different section, ignore it. */
11059 if (info->section != NULL && info->section != info->symtab[n]->section)
11062 return is_mapping_symbol (info, n, map_type);
11065 /* Try to infer the code type (ARM or Thumb) from a non-mapping symbol.
11066 Returns nonzero if *MAP_TYPE was set. */
11069 get_sym_code_type (struct disassemble_info *info,
11071 enum map_type *map_type)
11073 elf_symbol_type *es;
11076 /* If the symbol is in a different section, ignore it. */
11077 if (info->section != NULL && info->section != info->symtab[n]->section)
11080 es = *(elf_symbol_type **)(info->symtab + n);
11081 type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
11083 /* If the symbol has function type then use that. */
11084 if (type == STT_FUNC || type == STT_GNU_IFUNC)
11086 if (ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
11087 == ST_BRANCH_TO_THUMB)
11088 *map_type = MAP_THUMB;
11090 *map_type = MAP_ARM;
11097 /* Search the mapping symbol state for instruction at pc. This is only
11098 applicable for elf target.
11100 There is an assumption Here, info->private_data contains the correct AND
11101 up-to-date information about current scan process. The information will be
11102 used to speed this search process.
11104 Return TRUE if the mapping state can be determined, and map_symbol
11105 will be updated accordingly. Otherwise, return FALSE. */
11108 mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
11109 enum map_type *map_symbol)
11111 bfd_vma addr, section_vma = 0;
11112 int n, last_sym = -1;
11113 bfd_boolean found = FALSE;
11114 bfd_boolean can_use_search_opt_p = FALSE;
11116 /* Default to DATA. A text section is required by the ABI to contain an
11117 INSN mapping symbol at the start. A data section has no such
11118 requirement, hence if no mapping symbol is found the section must
11119 contain only data. This however isn't very useful if the user has
11120 fully stripped the binaries. If this is the case use the section
11121 attributes to determine the default. If we have no section default to
11122 INSN as well, as we may be disassembling some raw bytes on a baremetal
11123 HEX file or similar. */
11124 enum map_type type = MAP_DATA;
11125 if ((info->section && info->section->flags & SEC_CODE) || !info->section)
11127 struct arm_private_data *private_data;
11129 if (info->private_data == NULL
11130 || bfd_asymbol_flavour (*info->symtab) != bfd_target_elf_flavour)
11133 private_data = info->private_data;
11135 /* First, look for mapping symbols. */
11136 if (info->symtab_size != 0)
11138 if (pc <= private_data->last_mapping_addr)
11139 private_data->last_mapping_sym = -1;
11141 /* Start scanning at the start of the function, or wherever
11142 we finished last time. */
11143 n = info->symtab_pos + 1;
11145 /* If the last stop offset is different from the current one it means we
11146 are disassembling a different glob of bytes. As such the optimization
11147 would not be safe and we should start over. */
11148 can_use_search_opt_p
11149 = private_data->last_mapping_sym >= 0
11150 && info->stop_offset == private_data->last_stop_offset;
11152 if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
11153 n = private_data->last_mapping_sym;
11155 /* Look down while we haven't passed the location being disassembled.
11156 The reason for this is that there's no defined order between a symbol
11157 and an mapping symbol that may be at the same address. We may have to
11158 look at least one position ahead. */
11159 for (; n < info->symtab_size; n++)
11161 addr = bfd_asymbol_value (info->symtab[n]);
11164 if (get_map_sym_type (info, n, &type))
11173 n = info->symtab_pos;
11174 if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
11175 n = private_data->last_mapping_sym;
11177 /* No mapping symbol found at this address. Look backwards
11178 for a preceeding one, but don't go pass the section start
11179 otherwise a data section with no mapping symbol can pick up
11180 a text mapping symbol of a preceeding section. The documentation
11181 says section can be NULL, in which case we will seek up all the
11184 section_vma = info->section->vma;
11186 for (; n >= 0; n--)
11188 addr = bfd_asymbol_value (info->symtab[n]);
11189 if (addr < section_vma)
11192 if (get_map_sym_type (info, n, &type))
11202 /* If no mapping symbol was found, try looking up without a mapping
11203 symbol. This is done by walking up from the current PC to the nearest
11204 symbol. We don't actually have to loop here since symtab_pos will
11205 contain the nearest symbol already. */
11208 n = info->symtab_pos;
11209 if (n >= 0 && get_sym_code_type (info, n, &type))
11216 private_data->last_mapping_sym = last_sym;
11217 private_data->last_type = type;
11218 private_data->last_stop_offset = info->stop_offset;
11220 *map_symbol = type;
11224 /* Given a bfd_mach_arm_XXX value, this function fills in the fields
11225 of the supplied arm_feature_set structure with bitmasks indicating
11226 the supported base architectures and coprocessor extensions.
11228 FIXME: This could more efficiently implemented as a constant array,
11229 although it would also be less robust. */
11232 select_arm_features (unsigned long mach,
11233 arm_feature_set * features)
11235 arm_feature_set arch_fset;
11236 const arm_feature_set fpu_any = FPU_ANY;
11238 #undef ARM_SET_FEATURES
11239 #define ARM_SET_FEATURES(FSET) \
11241 const arm_feature_set fset = FSET; \
11242 arch_fset = fset; \
11245 /* When several architecture versions share the same bfd_mach_arm_XXX value
11246 the most featureful is chosen. */
11249 case bfd_mach_arm_2: ARM_SET_FEATURES (ARM_ARCH_V2); break;
11250 case bfd_mach_arm_2a: ARM_SET_FEATURES (ARM_ARCH_V2S); break;
11251 case bfd_mach_arm_3: ARM_SET_FEATURES (ARM_ARCH_V3); break;
11252 case bfd_mach_arm_3M: ARM_SET_FEATURES (ARM_ARCH_V3M); break;
11253 case bfd_mach_arm_4: ARM_SET_FEATURES (ARM_ARCH_V4); break;
11254 case bfd_mach_arm_4T: ARM_SET_FEATURES (ARM_ARCH_V4T); break;
11255 case bfd_mach_arm_5: ARM_SET_FEATURES (ARM_ARCH_V5); break;
11256 case bfd_mach_arm_5T: ARM_SET_FEATURES (ARM_ARCH_V5T); break;
11257 case bfd_mach_arm_5TE: ARM_SET_FEATURES (ARM_ARCH_V5TE); break;
11258 case bfd_mach_arm_XScale: ARM_SET_FEATURES (ARM_ARCH_XSCALE); break;
11259 case bfd_mach_arm_ep9312:
11260 ARM_SET_FEATURES (ARM_FEATURE_LOW (ARM_AEXT_V4T,
11261 ARM_CEXT_MAVERICK | FPU_MAVERICK));
11263 case bfd_mach_arm_iWMMXt: ARM_SET_FEATURES (ARM_ARCH_IWMMXT); break;
11264 case bfd_mach_arm_iWMMXt2: ARM_SET_FEATURES (ARM_ARCH_IWMMXT2); break;
11265 case bfd_mach_arm_5TEJ: ARM_SET_FEATURES (ARM_ARCH_V5TEJ); break;
11266 case bfd_mach_arm_6: ARM_SET_FEATURES (ARM_ARCH_V6); break;
11267 case bfd_mach_arm_6KZ: ARM_SET_FEATURES (ARM_ARCH_V6KZ); break;
11268 case bfd_mach_arm_6T2: ARM_SET_FEATURES (ARM_ARCH_V6KZT2); break;
11269 case bfd_mach_arm_6K: ARM_SET_FEATURES (ARM_ARCH_V6K); break;
11270 case bfd_mach_arm_7: ARM_SET_FEATURES (ARM_ARCH_V7VE); break;
11271 case bfd_mach_arm_6M: ARM_SET_FEATURES (ARM_ARCH_V6M); break;
11272 case bfd_mach_arm_6SM: ARM_SET_FEATURES (ARM_ARCH_V6SM); break;
11273 case bfd_mach_arm_7EM: ARM_SET_FEATURES (ARM_ARCH_V7EM); break;
11274 case bfd_mach_arm_8:
11276 /* Add bits for extensions that Armv8.5-A recognizes. */
11277 arm_feature_set armv8_5_ext_fset
11278 = ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST);
11279 ARM_SET_FEATURES (ARM_ARCH_V8_5A);
11280 ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, armv8_5_ext_fset);
11283 case bfd_mach_arm_8R: ARM_SET_FEATURES (ARM_ARCH_V8R); break;
11284 case bfd_mach_arm_8M_BASE: ARM_SET_FEATURES (ARM_ARCH_V8M_BASE); break;
11285 case bfd_mach_arm_8M_MAIN: ARM_SET_FEATURES (ARM_ARCH_V8M_MAIN); break;
11286 case bfd_mach_arm_8_1M_MAIN:
11287 ARM_SET_FEATURES (ARM_ARCH_V8_1M_MAIN);
11290 /* If the machine type is unknown allow all architecture types and all
11292 case bfd_mach_arm_unknown: ARM_SET_FEATURES (ARM_FEATURE_ALL); break;
11296 #undef ARM_SET_FEATURES
11298 /* None of the feature bits related to -mfpu have an impact on Tag_CPU_arch
11299 and thus on bfd_mach_arm_XXX value. Therefore for a given
11300 bfd_mach_arm_XXX value all coprocessor feature bits should be allowed. */
11301 ARM_MERGE_FEATURE_SETS (*features, arch_fset, fpu_any);
11305 /* NOTE: There are no checks in these routines that
11306 the relevant number of data bytes exist. */
11309 print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
11311 unsigned char b[4];
11314 int is_thumb = FALSE;
11315 int is_data = FALSE;
11317 unsigned int size = 4;
11318 void (*printer) (bfd_vma, struct disassemble_info *, long);
11319 bfd_boolean found = FALSE;
11320 struct arm_private_data *private_data;
11322 if (info->disassembler_options)
11324 parse_arm_disassembler_options (info->disassembler_options);
11326 /* To avoid repeated parsing of these options, we remove them here. */
11327 info->disassembler_options = NULL;
11330 /* PR 10288: Control which instructions will be disassembled. */
11331 if (info->private_data == NULL)
11333 static struct arm_private_data private;
11335 if ((info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
11336 /* If the user did not use the -m command line switch then default to
11337 disassembling all types of ARM instruction.
11339 The info->mach value has to be ignored as this will be based on
11340 the default archictecture for the target and/or hints in the notes
11341 section, but it will never be greater than the current largest arm
11342 machine value (iWMMXt2), which is only equivalent to the V5TE
11343 architecture. ARM architectures have advanced beyond the machine
11344 value encoding, and these newer architectures would be ignored if
11345 the machine value was used.
11347 Ie the -m switch is used to restrict which instructions will be
11348 disassembled. If it is necessary to use the -m switch to tell
11349 objdump that an ARM binary is being disassembled, eg because the
11350 input is a raw binary file, but it is also desired to disassemble
11351 all ARM instructions then use "-marm". This will select the
11352 "unknown" arm architecture which is compatible with any ARM
11354 info->mach = bfd_mach_arm_unknown;
11356 /* Compute the architecture bitmask from the machine number.
11357 Note: This assumes that the machine number will not change
11358 during disassembly.... */
11359 select_arm_features (info->mach, & private.features);
11361 private.last_mapping_sym = -1;
11362 private.last_mapping_addr = 0;
11363 private.last_stop_offset = 0;
11365 info->private_data = & private;
11368 private_data = info->private_data;
11370 /* Decide if our code is going to be little-endian, despite what the
11371 function argument might say. */
11372 little_code = ((info->endian_code == BFD_ENDIAN_LITTLE) || little);
11374 /* For ELF, consult the symbol table to determine what kind of code
11375 or data we have. */
11376 if (info->symtab_size != 0
11377 && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
11382 enum map_type type = MAP_ARM;
11384 found = mapping_symbol_for_insn (pc, info, &type);
11385 last_sym = private_data->last_mapping_sym;
11387 is_thumb = (private_data->last_type == MAP_THUMB);
11388 is_data = (private_data->last_type == MAP_DATA);
11390 /* Look a little bit ahead to see if we should print out
11391 two or four bytes of data. If there's a symbol,
11392 mapping or otherwise, after two bytes then don't
11396 size = 4 - (pc & 3);
11397 for (n = last_sym + 1; n < info->symtab_size; n++)
11399 addr = bfd_asymbol_value (info->symtab[n]);
11401 && (info->section == NULL
11402 || info->section == info->symtab[n]->section))
11404 if (addr - pc < size)
11409 /* If the next symbol is after three bytes, we need to
11410 print only part of the data, so that we can use either
11411 .byte or .short. */
11413 size = (pc & 1) ? 1 : 2;
11417 if (info->symbols != NULL)
11419 if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
11421 coff_symbol_type * cs;
11423 cs = coffsymbol (*info->symbols);
11424 is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT
11425 || cs->native->u.syment.n_sclass == C_THUMBSTAT
11426 || cs->native->u.syment.n_sclass == C_THUMBLABEL
11427 || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
11428 || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
11430 else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
11433 /* If no mapping symbol has been found then fall back to the type
11434 of the function symbol. */
11435 elf_symbol_type * es;
11438 es = *(elf_symbol_type **)(info->symbols);
11439 type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
11442 ((ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
11443 == ST_BRANCH_TO_THUMB) || type == STT_ARM_16BIT);
11445 else if (bfd_asymbol_flavour (*info->symbols)
11446 == bfd_target_mach_o_flavour)
11448 bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols;
11450 is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF);
11458 info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
11460 info->display_endian = little_code ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
11462 info->bytes_per_line = 4;
11464 /* PR 10263: Disassemble data if requested to do so by the user. */
11465 if (is_data && ((info->flags & DISASSEMBLE_DATA) == 0))
11469 /* Size was already set above. */
11470 info->bytes_per_chunk = size;
11471 printer = print_insn_data;
11473 status = info->read_memory_func (pc, (bfd_byte *) b, size, info);
11476 for (i = size - 1; i >= 0; i--)
11477 given = b[i] | (given << 8);
11479 for (i = 0; i < (int) size; i++)
11480 given = b[i] | (given << 8);
11482 else if (!is_thumb)
11484 /* In ARM mode endianness is a straightforward issue: the instruction
11485 is four bytes long and is either ordered 0123 or 3210. */
11486 printer = print_insn_arm;
11487 info->bytes_per_chunk = 4;
11490 status = info->read_memory_func (pc, (bfd_byte *) b, 4, info);
11492 given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
11494 given = (b[3]) | (b[2] << 8) | (b[1] << 16) | (b[0] << 24);
11498 /* In Thumb mode we have the additional wrinkle of two
11499 instruction lengths. Fortunately, the bits that determine
11500 the length of the current instruction are always to be found
11501 in the first two bytes. */
11502 printer = print_insn_thumb16;
11503 info->bytes_per_chunk = 2;
11506 status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
11508 given = (b[0]) | (b[1] << 8);
11510 given = (b[1]) | (b[0] << 8);
11514 /* These bit patterns signal a four-byte Thumb
11516 if ((given & 0xF800) == 0xF800
11517 || (given & 0xF800) == 0xF000
11518 || (given & 0xF800) == 0xE800)
11520 status = info->read_memory_func (pc + 2, (bfd_byte *) b, 2, info);
11522 given = (b[0]) | (b[1] << 8) | (given << 16);
11524 given = (b[1]) | (b[0] << 8) | (given << 16);
11526 printer = print_insn_thumb32;
11531 if (ifthen_address != pc)
11532 find_ifthen_state (pc, info, little_code);
11536 if ((ifthen_state & 0xf) == 0x8)
11537 ifthen_next_state = 0;
11539 ifthen_next_state = (ifthen_state & 0xe0)
11540 | ((ifthen_state & 0xf) << 1);
11546 info->memory_error_func (status, pc, info);
11549 if (info->flags & INSN_HAS_RELOC)
11550 /* If the instruction has a reloc associated with it, then
11551 the offset field in the instruction will actually be the
11552 addend for the reloc. (We are using REL type relocs).
11553 In such cases, we can ignore the pc when computing
11554 addresses, since the addend is not currently pc-relative. */
11557 printer (pc, info, given);
11561 ifthen_state = ifthen_next_state;
11562 ifthen_address += size;
11568 print_insn_big_arm (bfd_vma pc, struct disassemble_info *info)
11570 /* Detect BE8-ness and record it in the disassembler info. */
11571 if (info->flavour == bfd_target_elf_flavour
11572 && info->section != NULL
11573 && (elf_elfheader (info->section->owner)->e_flags & EF_ARM_BE8))
11574 info->endian_code = BFD_ENDIAN_LITTLE;
11576 return print_insn (pc, info, FALSE);
11580 print_insn_little_arm (bfd_vma pc, struct disassemble_info *info)
11582 return print_insn (pc, info, TRUE);
11585 const disasm_options_and_args_t *
11586 disassembler_options_arm (void)
11588 static disasm_options_and_args_t *opts_and_args;
11590 if (opts_and_args == NULL)
11592 disasm_options_t *opts;
11595 opts_and_args = XNEW (disasm_options_and_args_t);
11596 opts_and_args->args = NULL;
11598 opts = &opts_and_args->options;
11599 opts->name = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
11600 opts->description = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
11602 for (i = 0; i < NUM_ARM_OPTIONS; i++)
11604 opts->name[i] = regnames[i].name;
11605 if (regnames[i].description != NULL)
11606 opts->description[i] = _(regnames[i].description);
11608 opts->description[i] = NULL;
11610 /* The array we return must be NULL terminated. */
11611 opts->name[i] = NULL;
11612 opts->description[i] = NULL;
11615 return opts_and_args;
11619 print_arm_disassembler_options (FILE *stream)
11621 unsigned int i, max_len = 0;
11622 fprintf (stream, _("\n\
11623 The following ARM specific disassembler options are supported for use with\n\
11624 the -M switch:\n"));
11626 for (i = 0; i < NUM_ARM_OPTIONS; i++)
11628 unsigned int len = strlen (regnames[i].name);
11633 for (i = 0, max_len++; i < NUM_ARM_OPTIONS; i++)
11634 fprintf (stream, " %s%*c %s\n",
11636 (int)(max_len - strlen (regnames[i].name)), ' ',
11637 _(regnames[i].description));