Home | History | Annotate | Line # | Download | only in opcodes
      1   1.1  christos /* Instruction printing code for the ARM
      2  1.11  christos    Copyright (C) 1994-2024 Free Software Foundation, Inc.
      3   1.1  christos    Contributed by Richard Earnshaw (rwe (at) pegasus.esprit.ec.org)
      4   1.1  christos    Modification by James G. Smith (jsmith (at) cygnus.co.uk)
      5   1.1  christos 
      6   1.1  christos    This file is part of libopcodes.
      7   1.1  christos 
      8   1.1  christos    This library is free software; you can redistribute it and/or modify
      9   1.1  christos    it under the terms of the GNU General Public License as published by
     10   1.1  christos    the Free Software Foundation; either version 3 of the License, or
     11   1.1  christos    (at your option) any later version.
     12   1.1  christos 
     13   1.1  christos    It is distributed in the hope that it will be useful, but WITHOUT
     14   1.1  christos    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     15   1.1  christos    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
     16   1.1  christos    License for more details.
     17   1.1  christos 
     18   1.1  christos    You should have received a copy of the GNU General Public License
     19   1.1  christos    along with this program; if not, write to the Free Software
     20   1.1  christos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
     21   1.1  christos    MA 02110-1301, USA.  */
     22   1.1  christos 
     23   1.1  christos #include "sysdep.h"
     24   1.9  christos #include <assert.h>
     25   1.1  christos 
     26   1.8  christos #include "disassemble.h"
     27   1.1  christos #include "opcode/arm.h"
     28   1.1  christos #include "opintl.h"
     29   1.1  christos #include "safe-ctype.h"
     30   1.7  christos #include "libiberty.h"
     31   1.1  christos #include "floatformat.h"
     32   1.1  christos 
     33   1.1  christos /* FIXME: This shouldn't be done here.  */
     34   1.1  christos #include "coff/internal.h"
     35   1.1  christos #include "libcoff.h"
     36   1.8  christos #include "bfd.h"
     37   1.1  christos #include "elf-bfd.h"
     38   1.1  christos #include "elf/internal.h"
     39   1.1  christos #include "elf/arm.h"
     40   1.6  christos #include "mach-o.h"
     41   1.1  christos 
     42   1.1  christos /* Cached mapping symbol state.  */
     43   1.1  christos enum map_type
     44   1.1  christos {
     45   1.1  christos   MAP_ARM,
     46   1.1  christos   MAP_THUMB,
     47   1.1  christos   MAP_DATA
     48   1.1  christos };
     49   1.1  christos 
     50   1.1  christos struct arm_private_data
     51   1.1  christos {
     52   1.1  christos   /* The features to use when disassembling optional instructions.  */
     53   1.1  christos   arm_feature_set features;
     54   1.1  christos 
     55   1.1  christos   /* Track the last type (although this doesn't seem to be useful) */
     56   1.1  christos   enum map_type last_type;
     57   1.1  christos 
     58   1.1  christos   /* Tracking symbol table information */
     59   1.1  christos   int last_mapping_sym;
     60   1.9  christos 
     61   1.9  christos   /* The end range of the current range being disassembled.  */
     62   1.9  christos   bfd_vma last_stop_offset;
     63   1.1  christos   bfd_vma last_mapping_addr;
     64   1.1  christos };
     65   1.1  christos 
     66   1.9  christos enum mve_instructions
     67   1.9  christos {
     68   1.9  christos   MVE_VPST,
     69   1.9  christos   MVE_VPT_FP_T1,
     70   1.9  christos   MVE_VPT_FP_T2,
     71   1.9  christos   MVE_VPT_VEC_T1,
     72   1.9  christos   MVE_VPT_VEC_T2,
     73   1.9  christos   MVE_VPT_VEC_T3,
     74   1.9  christos   MVE_VPT_VEC_T4,
     75   1.9  christos   MVE_VPT_VEC_T5,
     76   1.9  christos   MVE_VPT_VEC_T6,
     77   1.9  christos   MVE_VCMP_FP_T1,
     78   1.9  christos   MVE_VCMP_FP_T2,
     79   1.9  christos   MVE_VCMP_VEC_T1,
     80   1.9  christos   MVE_VCMP_VEC_T2,
     81   1.9  christos   MVE_VCMP_VEC_T3,
     82   1.9  christos   MVE_VCMP_VEC_T4,
     83   1.9  christos   MVE_VCMP_VEC_T5,
     84   1.9  christos   MVE_VCMP_VEC_T6,
     85   1.9  christos   MVE_VDUP,
     86   1.9  christos   MVE_VEOR,
     87   1.9  christos   MVE_VFMAS_FP_SCALAR,
     88   1.9  christos   MVE_VFMA_FP_SCALAR,
     89   1.9  christos   MVE_VFMA_FP,
     90   1.9  christos   MVE_VFMS_FP,
     91   1.9  christos   MVE_VHADD_T1,
     92   1.9  christos   MVE_VHADD_T2,
     93   1.9  christos   MVE_VHSUB_T1,
     94   1.9  christos   MVE_VHSUB_T2,
     95   1.9  christos   MVE_VRHADD,
     96   1.9  christos   MVE_VLD2,
     97   1.9  christos   MVE_VLD4,
     98   1.9  christos   MVE_VST2,
     99   1.9  christos   MVE_VST4,
    100   1.9  christos   MVE_VLDRB_T1,
    101   1.9  christos   MVE_VLDRH_T2,
    102   1.9  christos   MVE_VLDRB_T5,
    103   1.9  christos   MVE_VLDRH_T6,
    104   1.9  christos   MVE_VLDRW_T7,
    105   1.9  christos   MVE_VSTRB_T1,
    106   1.9  christos   MVE_VSTRH_T2,
    107   1.9  christos   MVE_VSTRB_T5,
    108   1.9  christos   MVE_VSTRH_T6,
    109   1.9  christos   MVE_VSTRW_T7,
    110   1.9  christos   MVE_VLDRB_GATHER_T1,
    111   1.9  christos   MVE_VLDRH_GATHER_T2,
    112   1.9  christos   MVE_VLDRW_GATHER_T3,
    113   1.9  christos   MVE_VLDRD_GATHER_T4,
    114   1.9  christos   MVE_VLDRW_GATHER_T5,
    115   1.9  christos   MVE_VLDRD_GATHER_T6,
    116   1.9  christos   MVE_VSTRB_SCATTER_T1,
    117   1.9  christos   MVE_VSTRH_SCATTER_T2,
    118   1.9  christos   MVE_VSTRW_SCATTER_T3,
    119   1.9  christos   MVE_VSTRD_SCATTER_T4,
    120   1.9  christos   MVE_VSTRW_SCATTER_T5,
    121   1.9  christos   MVE_VSTRD_SCATTER_T6,
    122   1.9  christos   MVE_VCVT_FP_FIX_VEC,
    123   1.9  christos   MVE_VCVT_BETWEEN_FP_INT,
    124   1.9  christos   MVE_VCVT_FP_HALF_FP,
    125   1.9  christos   MVE_VCVT_FROM_FP_TO_INT,
    126   1.9  christos   MVE_VRINT_FP,
    127   1.9  christos   MVE_VMOV_HFP_TO_GP,
    128   1.9  christos   MVE_VMOV_GP_TO_VEC_LANE,
    129   1.9  christos   MVE_VMOV_IMM_TO_VEC,
    130   1.9  christos   MVE_VMOV_VEC_TO_VEC,
    131   1.9  christos   MVE_VMOV2_VEC_LANE_TO_GP,
    132   1.9  christos   MVE_VMOV2_GP_TO_VEC_LANE,
    133   1.9  christos   MVE_VMOV_VEC_LANE_TO_GP,
    134   1.9  christos   MVE_VMVN_IMM,
    135   1.9  christos   MVE_VMVN_REG,
    136   1.9  christos   MVE_VORR_IMM,
    137   1.9  christos   MVE_VORR_REG,
    138   1.9  christos   MVE_VORN,
    139   1.9  christos   MVE_VBIC_IMM,
    140   1.9  christos   MVE_VBIC_REG,
    141   1.9  christos   MVE_VMOVX,
    142   1.9  christos   MVE_VMOVL,
    143   1.9  christos   MVE_VMOVN,
    144   1.9  christos   MVE_VMULL_INT,
    145   1.9  christos   MVE_VMULL_POLY,
    146   1.9  christos   MVE_VQDMULL_T1,
    147   1.9  christos   MVE_VQDMULL_T2,
    148   1.9  christos   MVE_VQMOVN,
    149   1.9  christos   MVE_VQMOVUN,
    150   1.9  christos   MVE_VADDV,
    151   1.9  christos   MVE_VMLADAV_T1,
    152   1.9  christos   MVE_VMLADAV_T2,
    153   1.9  christos   MVE_VMLALDAV,
    154   1.9  christos   MVE_VMLAS,
    155   1.9  christos   MVE_VADDLV,
    156   1.9  christos   MVE_VMLSDAV_T1,
    157   1.9  christos   MVE_VMLSDAV_T2,
    158   1.9  christos   MVE_VMLSLDAV,
    159   1.9  christos   MVE_VRMLALDAVH,
    160   1.9  christos   MVE_VRMLSLDAVH,
    161   1.9  christos   MVE_VQDMLADH,
    162   1.9  christos   MVE_VQRDMLADH,
    163   1.9  christos   MVE_VQDMLAH,
    164   1.9  christos   MVE_VQRDMLAH,
    165   1.9  christos   MVE_VQDMLASH,
    166   1.9  christos   MVE_VQRDMLASH,
    167   1.9  christos   MVE_VQDMLSDH,
    168   1.9  christos   MVE_VQRDMLSDH,
    169   1.9  christos   MVE_VQDMULH_T1,
    170   1.9  christos   MVE_VQRDMULH_T2,
    171   1.9  christos   MVE_VQDMULH_T3,
    172   1.9  christos   MVE_VQRDMULH_T4,
    173   1.9  christos   MVE_VDDUP,
    174   1.9  christos   MVE_VDWDUP,
    175   1.9  christos   MVE_VIWDUP,
    176   1.9  christos   MVE_VIDUP,
    177   1.9  christos   MVE_VCADD_FP,
    178   1.9  christos   MVE_VCADD_VEC,
    179   1.9  christos   MVE_VHCADD,
    180   1.9  christos   MVE_VCMLA_FP,
    181   1.9  christos   MVE_VCMUL_FP,
    182   1.9  christos   MVE_VQRSHL_T1,
    183   1.9  christos   MVE_VQRSHL_T2,
    184   1.9  christos   MVE_VQRSHRN,
    185   1.9  christos   MVE_VQRSHRUN,
    186   1.9  christos   MVE_VQSHL_T1,
    187   1.9  christos   MVE_VQSHL_T2,
    188   1.9  christos   MVE_VQSHLU_T3,
    189   1.9  christos   MVE_VQSHL_T4,
    190   1.9  christos   MVE_VQSHRN,
    191   1.9  christos   MVE_VQSHRUN,
    192   1.9  christos   MVE_VRSHL_T1,
    193   1.9  christos   MVE_VRSHL_T2,
    194   1.9  christos   MVE_VRSHR,
    195   1.9  christos   MVE_VRSHRN,
    196   1.9  christos   MVE_VSHL_T1,
    197   1.9  christos   MVE_VSHL_T2,
    198   1.9  christos   MVE_VSHL_T3,
    199   1.9  christos   MVE_VSHLC,
    200   1.9  christos   MVE_VSHLL_T1,
    201   1.9  christos   MVE_VSHLL_T2,
    202   1.9  christos   MVE_VSHR,
    203   1.9  christos   MVE_VSHRN,
    204   1.9  christos   MVE_VSLI,
    205   1.9  christos   MVE_VSRI,
    206   1.9  christos   MVE_VADC,
    207   1.9  christos   MVE_VABAV,
    208   1.9  christos   MVE_VABD_FP,
    209   1.9  christos   MVE_VABD_VEC,
    210   1.9  christos   MVE_VABS_FP,
    211   1.9  christos   MVE_VABS_VEC,
    212   1.9  christos   MVE_VADD_FP_T1,
    213   1.9  christos   MVE_VADD_FP_T2,
    214   1.9  christos   MVE_VADD_VEC_T1,
    215   1.9  christos   MVE_VADD_VEC_T2,
    216   1.9  christos   MVE_VSBC,
    217   1.9  christos   MVE_VSUB_FP_T1,
    218   1.9  christos   MVE_VSUB_FP_T2,
    219   1.9  christos   MVE_VSUB_VEC_T1,
    220   1.9  christos   MVE_VSUB_VEC_T2,
    221   1.9  christos   MVE_VAND,
    222   1.9  christos   MVE_VBRSR,
    223   1.9  christos   MVE_VCLS,
    224   1.9  christos   MVE_VCLZ,
    225   1.9  christos   MVE_VCTP,
    226   1.9  christos   MVE_VMAX,
    227   1.9  christos   MVE_VMAXA,
    228   1.9  christos   MVE_VMAXNM_FP,
    229   1.9  christos   MVE_VMAXNMA_FP,
    230   1.9  christos   MVE_VMAXNMV_FP,
    231   1.9  christos   MVE_VMAXNMAV_FP,
    232   1.9  christos   MVE_VMAXV,
    233   1.9  christos   MVE_VMAXAV,
    234   1.9  christos   MVE_VMIN,
    235   1.9  christos   MVE_VMINA,
    236   1.9  christos   MVE_VMINNM_FP,
    237   1.9  christos   MVE_VMINNMA_FP,
    238   1.9  christos   MVE_VMINNMV_FP,
    239   1.9  christos   MVE_VMINNMAV_FP,
    240   1.9  christos   MVE_VMINV,
    241   1.9  christos   MVE_VMINAV,
    242   1.9  christos   MVE_VMLA,
    243   1.9  christos   MVE_VMUL_FP_T1,
    244   1.9  christos   MVE_VMUL_FP_T2,
    245   1.9  christos   MVE_VMUL_VEC_T1,
    246   1.9  christos   MVE_VMUL_VEC_T2,
    247   1.9  christos   MVE_VMULH,
    248   1.9  christos   MVE_VRMULH,
    249   1.9  christos   MVE_VNEG_FP,
    250   1.9  christos   MVE_VNEG_VEC,
    251   1.9  christos   MVE_VPNOT,
    252   1.9  christos   MVE_VPSEL,
    253   1.9  christos   MVE_VQABS,
    254   1.9  christos   MVE_VQADD_T1,
    255   1.9  christos   MVE_VQADD_T2,
    256   1.9  christos   MVE_VQSUB_T1,
    257   1.9  christos   MVE_VQSUB_T2,
    258   1.9  christos   MVE_VQNEG,
    259   1.9  christos   MVE_VREV16,
    260   1.9  christos   MVE_VREV32,
    261   1.9  christos   MVE_VREV64,
    262   1.9  christos   MVE_LSLL,
    263   1.9  christos   MVE_LSLLI,
    264   1.9  christos   MVE_LSRL,
    265   1.9  christos   MVE_ASRL,
    266   1.9  christos   MVE_ASRLI,
    267   1.9  christos   MVE_SQRSHRL,
    268   1.9  christos   MVE_SQRSHR,
    269   1.9  christos   MVE_UQRSHL,
    270   1.9  christos   MVE_UQRSHLL,
    271   1.9  christos   MVE_UQSHL,
    272   1.9  christos   MVE_UQSHLL,
    273   1.9  christos   MVE_URSHRL,
    274   1.9  christos   MVE_URSHR,
    275   1.9  christos   MVE_SRSHRL,
    276   1.9  christos   MVE_SRSHR,
    277   1.9  christos   MVE_SQSHLL,
    278   1.9  christos   MVE_SQSHL,
    279   1.9  christos   MVE_CINC,
    280   1.9  christos   MVE_CINV,
    281   1.9  christos   MVE_CNEG,
    282   1.9  christos   MVE_CSINC,
    283   1.9  christos   MVE_CSINV,
    284   1.9  christos   MVE_CSET,
    285   1.9  christos   MVE_CSETM,
    286   1.9  christos   MVE_CSNEG,
    287   1.9  christos   MVE_CSEL,
    288   1.9  christos   MVE_NONE
    289   1.9  christos };
    290   1.9  christos 
    291   1.9  christos enum mve_unpredictable
    292   1.9  christos {
    293   1.9  christos   UNPRED_IT_BLOCK,		/* Unpredictable because mve insn in it block.
    294   1.9  christos 				 */
    295   1.9  christos   UNPRED_FCA_0_FCB_1,		/* Unpredictable because fcA = 0 and
    296   1.9  christos 				   fcB = 1 (vpt).  */
    297   1.9  christos   UNPRED_R13,			/* Unpredictable because r13 (sp) or
    298   1.9  christos 				   r15 (sp) used.  */
    299   1.9  christos   UNPRED_R15,			/* Unpredictable because r15 (pc) is used.  */
    300   1.9  christos   UNPRED_Q_GT_4,		/* Unpredictable because
    301   1.9  christos 				   vec reg start > 4 (vld4/st4).  */
    302   1.9  christos   UNPRED_Q_GT_6,		/* Unpredictable because
    303   1.9  christos 				   vec reg start > 6 (vld2/st2).  */
    304   1.9  christos   UNPRED_R13_AND_WB,		/* Unpredictable becase gp reg = r13
    305   1.9  christos 				   and WB bit = 1.  */
    306   1.9  christos   UNPRED_Q_REGS_EQUAL,		/* Unpredictable because vector registers are
    307   1.9  christos 				   equal.  */
    308   1.9  christos   UNPRED_OS,			/* Unpredictable because offset scaled == 1.  */
    309   1.9  christos   UNPRED_GP_REGS_EQUAL,		/* Unpredictable because gp registers are the
    310   1.9  christos 				   same.  */
    311   1.9  christos   UNPRED_Q_REGS_EQ_AND_SIZE_1,	/* Unpredictable because q regs equal and
    312   1.9  christos 				   size = 1.  */
    313   1.9  christos   UNPRED_Q_REGS_EQ_AND_SIZE_2,	/* Unpredictable because q regs equal and
    314   1.9  christos 				   size = 2.  */
    315   1.9  christos   UNPRED_NONE			/* No unpredictable behavior.  */
    316   1.9  christos };
    317   1.9  christos 
    318   1.9  christos enum mve_undefined
    319   1.9  christos {
    320   1.9  christos   UNDEF_SIZE,			/* undefined size.  */
    321   1.9  christos   UNDEF_SIZE_0,			/* undefined because size == 0.  */
    322   1.9  christos   UNDEF_SIZE_2,			/* undefined because size == 2.  */
    323   1.9  christos   UNDEF_SIZE_3,			/* undefined because size == 3.  */
    324   1.9  christos   UNDEF_SIZE_LE_1,		/* undefined because size <= 1.  */
    325   1.9  christos   UNDEF_SIZE_NOT_0,		/* undefined because size != 0.  */
    326   1.9  christos   UNDEF_SIZE_NOT_2,		/* undefined because size != 2.  */
    327   1.9  christos   UNDEF_SIZE_NOT_3,		/* undefined because size != 3.  */
    328   1.9  christos   UNDEF_NOT_UNS_SIZE_0,		/* undefined because U == 0 and
    329   1.9  christos 				   size == 0.  */
    330   1.9  christos   UNDEF_NOT_UNS_SIZE_1,		/* undefined because U == 0 and
    331   1.9  christos 				   size == 1.  */
    332   1.9  christos   UNDEF_NOT_UNSIGNED,		/* undefined because U == 0.  */
    333   1.9  christos   UNDEF_VCVT_IMM6,		/* imm6 < 32.  */
    334   1.9  christos   UNDEF_VCVT_FSI_IMM6,		/* fsi = 0 and 32 >= imm6 <= 47.  */
    335   1.9  christos   UNDEF_BAD_OP1_OP2,		/* undefined with op2 = 2 and
    336   1.9  christos 				   op1 == (0 or 1).  */
    337   1.9  christos   UNDEF_BAD_U_OP1_OP2,		/* undefined with U = 1 and
    338   1.9  christos 				   op2 == 0 and op1 == (0 or 1).  */
    339   1.9  christos   UNDEF_OP_0_BAD_CMODE,		/* undefined because op == 0 and cmode
    340   1.9  christos 				   in {0xx1, x0x1}.  */
    341   1.9  christos   UNDEF_XCHG_UNS,		/* undefined because X == 1 and U == 1.  */
    342   1.9  christos   UNDEF_NONE			/* no undefined behavior.  */
    343   1.9  christos };
    344   1.9  christos 
    345   1.1  christos struct opcode32
    346   1.1  christos {
    347   1.5  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    348   1.5  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    349   1.1  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    350   1.1  christos   const char *  assembler;	/* How to disassemble this insn.  */
    351   1.1  christos };
    352   1.1  christos 
    353   1.9  christos struct cdeopcode32
    354   1.9  christos {
    355   1.9  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    356   1.9  christos   uint8_t coproc_shift;		/* coproc is this far into op.  */
    357   1.9  christos   uint16_t coproc_mask;		/* Length of coproc field in op.  */
    358   1.9  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    359   1.9  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    360   1.9  christos   const char *  assembler;	/* How to disassemble this insn.  */
    361   1.9  christos };
    362   1.9  christos 
    363   1.9  christos /* MVE opcodes.  */
    364   1.9  christos 
    365   1.9  christos struct mopcode32
    366   1.9  christos {
    367   1.9  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    368   1.9  christos   enum mve_instructions mve_op;  /* Specific mve instruction for faster
    369   1.9  christos 				    decoding.  */
    370   1.9  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    371   1.9  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    372   1.9  christos   const char *  assembler;	/* How to disassemble this insn.  */
    373   1.9  christos };
    374   1.9  christos 
    375   1.9  christos enum isa {
    376   1.9  christos   ANY,
    377   1.9  christos   T32,
    378   1.9  christos   ARM
    379   1.9  christos };
    380   1.9  christos 
    381   1.9  christos 
    382   1.9  christos /* Shared (between Arm and Thumb mode) opcode.  */
    383   1.9  christos struct sopcode32
    384   1.9  christos {
    385   1.9  christos   enum isa isa;			/* Execution mode instruction availability.  */
    386   1.9  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    387   1.9  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    388   1.9  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    389   1.9  christos   const char *  assembler;	/* How to disassemble this insn.  */
    390   1.9  christos };
    391   1.9  christos 
    392   1.1  christos struct opcode16
    393   1.1  christos {
    394   1.5  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    395   1.1  christos   unsigned short value, mask;	/* Recognise insn if (op & mask) == value.  */
    396   1.1  christos   const char *assembler;	/* How to disassemble this insn.  */
    397   1.1  christos };
    398   1.1  christos 
    399   1.1  christos /* print_insn_coprocessor recognizes the following format control codes:
    400   1.1  christos 
    401   1.1  christos    %%			%
    402   1.1  christos 
    403   1.1  christos    %c			print condition code (always bits 28-31 in ARM mode)
    404   1.9  christos    %b			print condition code allowing cp_num == 9
    405   1.1  christos    %q			print shifter argument
    406   1.1  christos    %u			print condition code (unconditional in ARM mode,
    407   1.1  christos                           UNPREDICTABLE if not AL in Thumb)
    408   1.1  christos    %A			print address for ldc/stc/ldf/stf instruction
    409   1.1  christos    %B			print vstm/vldm register list
    410   1.9  christos    %C			print vscclrm register list
    411   1.1  christos    %I                   print cirrus signed shift immediate: bits 0..3|4..6
    412   1.9  christos    %J			print register for VLDR instruction
    413   1.9  christos    %K			print address for VLDR instruction
    414   1.1  christos    %F			print the COUNT field of a LFM/SFM instruction.
    415   1.1  christos    %P			print floating point precision in arithmetic insn
    416   1.1  christos    %Q			print floating point precision in ldf/stf insn
    417   1.1  christos    %R			print floating point rounding mode
    418   1.1  christos 
    419   1.1  christos    %<bitfield>c		print as a condition code (for vsel)
    420   1.1  christos    %<bitfield>r		print as an ARM register
    421   1.1  christos    %<bitfield>R		as %<>r but r15 is UNPREDICTABLE
    422   1.1  christos    %<bitfield>ru        as %<>r but each u register must be unique.
    423   1.1  christos    %<bitfield>d		print the bitfield in decimal
    424   1.1  christos    %<bitfield>k		print immediate for VFPv3 conversion instruction
    425   1.1  christos    %<bitfield>x		print the bitfield in hex
    426   1.1  christos    %<bitfield>X		print the bitfield as 1 hex digit without leading "0x"
    427   1.1  christos    %<bitfield>f		print a floating point constant if >7 else a
    428   1.1  christos 			floating point register
    429   1.1  christos    %<bitfield>w         print as an iWMMXt width field - [bhwd]ss/us
    430   1.1  christos    %<bitfield>g         print as an iWMMXt 64-bit register
    431   1.1  christos    %<bitfield>G         print as an iWMMXt general purpose or control register
    432   1.1  christos    %<bitfield>D		print as a NEON D register
    433   1.1  christos    %<bitfield>Q		print as a NEON Q register
    434   1.7  christos    %<bitfield>V		print as a NEON D or Q register
    435   1.6  christos    %<bitfield>E		print a quarter-float immediate value
    436   1.1  christos 
    437   1.1  christos    %y<code>		print a single precision VFP reg.
    438   1.1  christos 			  Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
    439   1.1  christos    %z<code>		print a double precision VFP reg
    440   1.1  christos 			  Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
    441   1.1  christos 
    442   1.1  christos    %<bitfield>'c	print specified char iff bitfield is all ones
    443   1.1  christos    %<bitfield>`c	print specified char iff bitfield is all zeroes
    444   1.1  christos    %<bitfield>?ab...    select from array of values in big endian order
    445   1.6  christos 
    446   1.1  christos    %L			print as an iWMMXt N/M width field.
    447   1.1  christos    %Z			print the Immediate of a WSHUFH instruction.
    448   1.1  christos    %l			like 'A' except use byte offsets for 'B' & 'H'
    449   1.1  christos 			versions.
    450   1.1  christos    %i			print 5-bit immediate in bits 8,3..0
    451   1.1  christos 			(print "32" when 0)
    452   1.1  christos    %r			print register offset address for wldt/wstr instruction.  */
    453   1.1  christos 
    454   1.1  christos enum opcode_sentinel_enum
    455   1.1  christos {
    456   1.1  christos   SENTINEL_IWMMXT_START = 1,
    457   1.1  christos   SENTINEL_IWMMXT_END,
    458   1.1  christos   SENTINEL_GENERIC_START
    459   1.1  christos } opcode_sentinels;
    460   1.1  christos 
    461  1.10  christos #define UNDEFINED_INSTRUCTION      "\t\t@ <UNDEFINED> instruction: %0-31x"
    462  1.10  christos #define UNKNOWN_INSTRUCTION_32BIT  "\t\t@ <UNDEFINED> instruction: %08x"
    463  1.10  christos #define UNKNOWN_INSTRUCTION_16BIT  "\t\t@ <UNDEFINED> instruction: %04x"
    464  1.10  christos #define UNPREDICTABLE_INSTRUCTION  "\t@ <UNPREDICTABLE>"
    465   1.1  christos 
    466   1.1  christos /* Common coprocessor opcodes shared between Arm and Thumb-2.  */
    467   1.1  christos 
    468   1.9  christos /* print_insn_cde recognizes the following format control codes:
    469   1.9  christos 
    470   1.9  christos    %%			%
    471   1.9  christos 
    472   1.9  christos    %a			print 'a' iff bit 28 is 1
    473   1.9  christos    %p			print bits 8-10 as coprocessor
    474   1.9  christos    %<bitfield>d		print as decimal
    475   1.9  christos    %<bitfield>r		print as an ARM register
    476   1.9  christos    %<bitfield>n		print as an ARM register but r15 is APSR_nzcv
    477   1.9  christos    %<bitfield>T		print as an ARM register + 1
    478   1.9  christos    %<bitfield>R		as %r but r13 is UNPREDICTABLE
    479   1.9  christos    %<bitfield>S		as %r but rX where X > 10 is UNPREDICTABLE
    480   1.9  christos    %j			print immediate taken from bits (16..21,7,0..5)
    481   1.9  christos    %k			print immediate taken from bits (20..21,7,0..5).
    482   1.9  christos    %l			print immediate taken from bits (20..22,7,4..5).  */
    483   1.9  christos 
    484   1.9  christos /* At the moment there is only one valid position for the coprocessor number,
    485   1.9  christos    and hence that's encoded in the macro below.  */
    486   1.9  christos #define CDE_OPCODE(ARCH, VALUE, MASK, ASM) \
    487   1.9  christos   { ARCH, 8, 7, VALUE, MASK, ASM }
    488   1.9  christos static const struct cdeopcode32 cde_opcodes[] =
    489   1.9  christos {
    490   1.9  christos   /* Custom Datapath Extension instructions.  */
    491   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    492   1.9  christos 	      0xee000000, 0xefc00840,
    493  1.10  christos 	      "cx1%a\t%p, %12-15n, %{I:#%0-5,7,16-21d%}"),
    494   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    495   1.9  christos 	      0xee000040, 0xefc00840,
    496  1.10  christos 	      "cx1d%a\t%p, %12-15S, %12-15T, %{I:#%0-5,7,16-21d%}"),
    497   1.9  christos 
    498   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    499   1.9  christos 	      0xee400000, 0xefc00840,
    500  1.10  christos 	      "cx2%a\t%p, %12-15n, %16-19n, %{I:#%0-5,7,20-21d%}"),
    501   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    502   1.9  christos 	      0xee400040, 0xefc00840,
    503  1.10  christos 	      "cx2d%a\t%p, %12-15S, %12-15T, %16-19n, %{I:#%0-5,7,20-21d%}"),
    504   1.9  christos 
    505   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    506   1.9  christos 	      0xee800000, 0xef800840,
    507  1.10  christos 	      "cx3%a\t%p, %0-3n, %16-19n, %12-15n, %{I:#%4-5,7,20-22d%}"),
    508   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    509   1.9  christos 	      0xee800040, 0xef800840,
    510  1.10  christos 	     "cx3d%a\t%p, %0-3S, %0-3T, %16-19n, %12-15n, %{I:#%4-5,7,20-22d%}"),
    511   1.9  christos 
    512   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    513   1.9  christos 	      0xec200000, 0xeeb00840,
    514  1.10  christos 	      "vcx1%a\t%p, %12-15,22V, %{I:#%0-5,7,16-19d%}"),
    515   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    516   1.9  christos 	      0xec200040, 0xeeb00840,
    517  1.10  christos 	      "vcx1%a\t%p, %12-15,22V, %{I:#%0-5,7,16-19,24d%}"),
    518   1.9  christos 
    519   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    520   1.9  christos 	      0xec300000, 0xeeb00840,
    521  1.10  christos 	      "vcx2%a\t%p, %12-15,22V, %0-3,5V, %{I:#%4,7,16-19d%}"),
    522   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    523   1.9  christos 	      0xec300040, 0xeeb00840,
    524  1.10  christos 	      "vcx2%a\t%p, %12-15,22V, %0-3,5V, %{I:#%4,7,16-19,24d%}"),
    525   1.9  christos 
    526   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    527   1.9  christos 	      0xec800000, 0xee800840,
    528  1.10  christos 	      "vcx3%a\t%p, %12-15,22V, %16-19,7V, %0-3,5V, %{I:#%4,20-21d%}"),
    529   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    530   1.9  christos 	      0xec800040, 0xee800840,
    531  1.10  christos 	      "vcx3%a\t%p, %12-15,22V, %16-19,7V, %0-3,5V, %{I:#%4,20-21,24d%}"),
    532   1.9  christos 
    533   1.9  christos   CDE_OPCODE (ARM_FEATURE_CORE_LOW (0), 0, 0, 0)
    534   1.9  christos 
    535   1.9  christos };
    536   1.9  christos 
    537   1.9  christos static const struct sopcode32 coprocessor_opcodes[] =
    538   1.1  christos {
    539   1.1  christos   /* XScale instructions.  */
    540   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    541   1.5  christos     0x0e200010, 0x0fff0ff0,
    542  1.10  christos     "mia%c\t%{R:acc0%}, %0-3r, %12-15r"},
    543   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    544   1.5  christos     0x0e280010, 0x0fff0ff0,
    545  1.10  christos     "miaph%c\t%{R:acc0%}, %0-3r, %12-15r"},
    546   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    547  1.10  christos     0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\t%{R:acc0%}, %0-3r, %12-15r"},
    548   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    549  1.10  christos     0x0c400000, 0x0ff00fff, "mar%c\t%{R:acc0%}, %12-15r, %16-19r"},
    550   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    551  1.10  christos     0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, %{R:acc0%}"},
    552   1.1  christos 
    553   1.1  christos   /* Intel Wireless MMX technology instructions.  */
    554   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_IWMMXT_START, 0, "" },
    555   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_IWMMXT),
    556   1.5  christos     0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
    557   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    558   1.5  christos     0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
    559   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    560  1.10  christos     0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, %{I:#%0-2d%}"},
    561   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    562  1.10  christos     0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, %{I:#%0-2d%}"},
    563   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    564  1.10  christos     0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, %{I:#%0-2d%}"},
    565   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    566   1.5  christos     0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
    567   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    568   1.5  christos     0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
    569   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    570   1.5  christos     0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
    571   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    572   1.5  christos     0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
    573   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    574   1.5  christos     0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
    575   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    576   1.5  christos     0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
    577   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    578   1.5  christos     0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
    579   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    580   1.5  christos     0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
    581   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    582   1.5  christos     0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
    583   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    584   1.5  christos     0x0e120190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
    585   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    586   1.5  christos     0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
    587   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    588   1.5  christos     0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
    589   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    590   1.5  christos     0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
    591   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    592   1.5  christos     0x0e2001a0, 0x0fb00ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
    593   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    594   1.5  christos     0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
    595   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    596  1.10  christos     0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, %{I:#%20-22d%}"},
    597   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    598   1.5  christos     0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
    599   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    600   1.5  christos     0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
    601   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    602   1.5  christos     0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
    603   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    604   1.5  christos     0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
    605   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    606   1.5  christos     0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    607   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    608   1.5  christos     0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    609   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    610   1.5  christos     0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
    611   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    612   1.5  christos     0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
    613   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    614   1.5  christos     0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
    615   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    616   1.5  christos     0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
    617   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    618   1.5  christos     0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
    619   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    620   1.5  christos     0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
    621   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    622   1.5  christos     0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    623   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    624  1.10  christos     0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, %{I:#%21-23d%}"},
    625   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    626   1.5  christos     0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
    627   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    628   1.5  christos     0x0e800120, 0x0f800ff0,
    629   1.5  christos     "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
    630   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    631   1.5  christos     0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    632   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    633   1.5  christos     0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
    634   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    635   1.5  christos     0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
    636   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    637   1.5  christos     0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
    638   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    639   1.5  christos     0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
    640   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    641   1.5  christos     0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
    642   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    643   1.5  christos     0x0e8000a0, 0x0f800ff0,
    644   1.5  christos     "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
    645   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    646   1.5  christos     0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
    647   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    648   1.5  christos     0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
    649   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    650   1.5  christos     0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
    651   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    652   1.5  christos     0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
    653   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    654  1.10  christos     0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    655   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    656   1.5  christos     0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    657   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    658   1.5  christos     0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
    659   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    660   1.5  christos     0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
    661   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    662  1.10  christos     0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, %{I:#%Z%}"},
    663   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    664  1.10  christos     0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    665   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    666   1.5  christos     0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
    667   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    668   1.5  christos     0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
    669   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    670  1.10  christos     0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    671   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    672   1.5  christos     0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
    673   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    674   1.5  christos     0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
    675   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    676  1.10  christos     0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    677   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    678   1.5  christos     0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
    679   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    680   1.5  christos     0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
    681   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    682   1.5  christos     0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
    683   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    684   1.5  christos     0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
    685   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    686   1.5  christos     0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
    687   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    688   1.5  christos     0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
    689   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    690   1.5  christos     0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
    691   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    692   1.5  christos     0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    693   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    694   1.5  christos     0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
    695   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    696   1.5  christos     0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
    697   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    698   1.5  christos     0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
    699   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    700   1.5  christos     0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
    701   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    702   1.5  christos     0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    703   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    704   1.5  christos     0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    705   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    706   1.5  christos     0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
    707   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (0),
    708   1.5  christos     SENTINEL_IWMMXT_END, 0, "" },
    709   1.1  christos 
    710   1.1  christos   /* Floating point coprocessor (FPA) instructions.  */
    711   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    712   1.5  christos     0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    713   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    714   1.5  christos     0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    715   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    716   1.5  christos     0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    717   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    718   1.5  christos     0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    719   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    720   1.5  christos     0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    721   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    722   1.5  christos     0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    723   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    724   1.5  christos     0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
    725   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    726   1.5  christos     0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
    727   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    728   1.5  christos     0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
    729   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    730   1.5  christos     0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
    731   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    732   1.5  christos     0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
    733   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    734   1.5  christos     0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
    735   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    736   1.5  christos     0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
    737   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    738   1.5  christos     0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
    739   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    740   1.5  christos     0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
    741   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    742   1.5  christos     0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
    743   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    744   1.5  christos     0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
    745   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    746   1.5  christos     0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
    747   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    748   1.5  christos     0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
    749   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    750   1.5  christos     0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
    751   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    752   1.5  christos     0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
    753   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    754   1.5  christos     0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
    755   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    756   1.5  christos     0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
    757   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    758   1.5  christos     0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
    759   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    760   1.5  christos     0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
    761   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    762   1.5  christos     0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
    763   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    764   1.5  christos     0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
    765   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    766   1.5  christos     0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
    767   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    768   1.5  christos     0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
    769   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    770   1.5  christos     0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
    771   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    772   1.5  christos     0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
    773   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    774   1.5  christos     0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
    775   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    776   1.5  christos     0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
    777   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    778   1.5  christos     0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
    779   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    780   1.5  christos     0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
    781   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    782   1.5  christos     0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
    783   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    784   1.5  christos     0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
    785   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    786   1.5  christos     0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
    787   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    788   1.5  christos     0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
    789   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    790   1.5  christos     0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
    791   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
    792   1.5  christos     0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
    793   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
    794   1.5  christos     0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
    795   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
    796   1.5  christos     0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
    797   1.1  christos 
    798   1.9  christos   /* Armv8.1-M Mainline instructions.  */
    799   1.9  christos   {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    800   1.9  christos     0xec9f0b00, 0xffbf0f01, "vscclrm%c\t%C"},
    801   1.9  christos   {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    802   1.9  christos     0xec9f0a00, 0xffbf0f00, "vscclrm%c\t%C"},
    803   1.9  christos 
    804   1.6  christos   /* ARMv8-M Mainline Security Extensions instructions.  */
    805   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
    806   1.6  christos     0xec300a00, 0xfff0ffff, "vlldm\t%16-19r"},
    807   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
    808   1.6  christos     0xec200a00, 0xfff0ffff, "vlstm\t%16-19r"},
    809   1.6  christos 
    810   1.1  christos   /* Register load/store.  */
    811   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    812   1.5  christos     0x0d2d0b00, 0x0fbf0f01, "vpush%c\t%B"},
    813   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    814   1.5  christos     0x0d200b00, 0x0fb00f01, "vstmdb%c\t%16-19r!, %B"},
    815   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    816   1.5  christos     0x0d300b00, 0x0fb00f01, "vldmdb%c\t%16-19r!, %B"},
    817   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    818   1.5  christos     0x0c800b00, 0x0f900f01, "vstmia%c\t%16-19r%21'!, %B"},
    819   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    820   1.5  christos     0x0cbd0b00, 0x0fbf0f01, "vpop%c\t%B"},
    821   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    822   1.5  christos     0x0c900b00, 0x0f900f01, "vldmia%c\t%16-19r%21'!, %B"},
    823   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    824   1.5  christos     0x0d000b00, 0x0f300f00, "vstr%c\t%12-15,22D, %A"},
    825   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    826   1.5  christos     0x0d100b00, 0x0f300f00, "vldr%c\t%12-15,22D, %A"},
    827   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    828   1.5  christos     0x0d2d0a00, 0x0fbf0f00, "vpush%c\t%y3"},
    829   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    830   1.5  christos     0x0d200a00, 0x0fb00f00, "vstmdb%c\t%16-19r!, %y3"},
    831   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    832   1.5  christos     0x0d300a00, 0x0fb00f00, "vldmdb%c\t%16-19r!, %y3"},
    833   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    834   1.5  christos     0x0c800a00, 0x0f900f00, "vstmia%c\t%16-19r%21'!, %y3"},
    835   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    836   1.5  christos     0x0cbd0a00, 0x0fbf0f00, "vpop%c\t%y3"},
    837   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    838   1.5  christos     0x0c900a00, 0x0f900f00, "vldmia%c\t%16-19r%21'!, %y3"},
    839   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    840   1.5  christos     0x0d000a00, 0x0f300f00, "vstr%c\t%y1, %A"},
    841   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    842   1.5  christos     0x0d100a00, 0x0f300f00, "vldr%c\t%y1, %A"},
    843   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
    844   1.9  christos     0xec100f80, 0xfe101f80, "vldr%c\t%J, %K"},
    845   1.9  christos   {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
    846   1.9  christos     0xec000f80, 0xfe101f80, "vstr%c\t%J, %K"},
    847   1.5  christos 
    848   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    849  1.10  christos     0x0d200b01, 0x0fb00f01, "fstmdbx%c\t%16-19r!, %z3\t@ Deprecated"},
    850   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    851  1.10  christos     0x0d300b01, 0x0fb00f01, "fldmdbx%c\t%16-19r!, %z3\t@ Deprecated"},
    852   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    853  1.10  christos     0x0c800b01, 0x0f900f01, "fstmiax%c\t%16-19r%21'!, %z3\t@ Deprecated"},
    854   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    855  1.10  christos     0x0c900b01, 0x0f900f01, "fldmiax%c\t%16-19r%21'!, %z3\t@ Deprecated"},
    856   1.1  christos 
    857   1.1  christos   /* Data transfer between ARM and NEON registers.  */
    858   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    859   1.5  christos     0x0c400b10, 0x0ff00fd0, "vmov%c\t%0-3,5D, %12-15r, %16-19r"},
    860   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    861   1.5  christos     0x0c500b10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %0-3,5D"},
    862   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    863  1.10  christos     0x0e000b10, 0x0fd00f70, "vmov%c.32\t%{R:%16-19,7D[%21d]%}, %12-15r"},
    864   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    865  1.10  christos     0x0e100b10, 0x0f500f70, "vmov%c.32\t%12-15r, %{R:%16-19,7D[%21d]%}"},
    866   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    867  1.10  christos     0x0e000b30, 0x0fd00f30, "vmov%c.16\t%{R:%16-19,7D[%6,21d]%}, %12-15r"},
    868   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    869  1.10  christos     0x0e100b30, 0x0f500f30, "vmov%c.%23?us16\t%12-15r, %{R:%16-19,7D[%6,21d]%}"},
    870   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    871  1.10  christos     0x0e400b10, 0x0fd00f10, "vmov%c.8\t%{R:%16-19,7D[%5,6,21d]%}, %12-15r"},
    872   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    873  1.10  christos     0x0e500b10, 0x0f500f10, "vmov%c.%23?us8\t%12-15r, %{R:%16-19,7D[%5,6,21d]%}"},
    874   1.1  christos   /* Half-precision conversion instructions.  */
    875   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    876   1.5  christos     0x0eb20b40, 0x0fbf0f50, "vcvt%7?tb%c.f64.f16\t%z1, %y0"},
    877   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    878   1.5  christos     0x0eb30b40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f64\t%y1, %z0"},
    879   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
    880   1.5  christos     0x0eb20a40, 0x0fbf0f50, "vcvt%7?tb%c.f32.f16\t%y1, %y0"},
    881   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
    882   1.5  christos     0x0eb30a40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f32\t%y1, %y0"},
    883   1.1  christos 
    884   1.1  christos   /* Floating point coprocessor (VFP) instructions.  */
    885   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    886  1.10  christos     0x0ee00a10, 0x0fff0fff, "vmsr%c\t%{R:fpsid%}, %12-15r"},
    887   1.9  christos   {ANY, ARM_FEATURE (0, ARM_EXT2_V8_1M_MAIN, FPU_VFP_EXT_V1xD),
    888  1.10  christos     0x0ee10a10, 0x0fff0fff, "vmsr%c\t%{R:fpscr%}, %12-15r"},
    889   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    890  1.10  christos     0x0ee20a10, 0x0fff0fff, "vmsr%c\t%{R:fpscr_nzcvqc%}, %12-15r"},
    891   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    892  1.10  christos     0x0ee60a10, 0x0fff0fff, "vmsr%c\t%{R:mvfr1%}, %12-15r"},
    893   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    894  1.10  christos     0x0ee70a10, 0x0fff0fff, "vmsr%c\t%{R:mvfr0%}, %12-15r"},
    895   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    896  1.10  christos     0x0ee50a10, 0x0fff0fff, "vmsr%c\t%{R:mvfr2%}, %12-15r"},
    897   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    898  1.10  christos     0x0ee80a10, 0x0fff0fff, "vmsr%c\t%{R:fpexc%}, %12-15r"},
    899   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    900  1.10  christos     0x0ee90a10, 0x0fff0fff, "vmsr%c\t%{R:fpinst%}, %12-15r\t@ Impl def"},
    901   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    902  1.10  christos     0x0eea0a10, 0x0fff0fff, "vmsr%c\t%{R:fpinst2%}, %12-15r\t@ Impl def"},
    903   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    904  1.10  christos     0x0eec0a10, 0x0fff0fff, "vmsr%c\t%{R:vpr%}, %12-15r"},
    905   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    906  1.10  christos     0x0eed0a10, 0x0fff0fff, "vmsr%c\t%{R:p0%}, %12-15r"},
    907   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    908  1.10  christos     0x0eee0a10, 0x0fff0fff, "vmsr%c\t%{R:fpcxt_ns%}, %12-15r"},
    909   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    910  1.10  christos     0x0eef0a10, 0x0fff0fff, "vmsr%c\t%{R:fpcxt_s%}, %12-15r"},
    911   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    912  1.10  christos     0x0ef00a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpsid%}"},
    913   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    914  1.10  christos     0x0ef1fa10, 0x0fffffff, "vmrs%c\t%{R:APSR_nzcv%}, %{R:fpscr%}"},
    915   1.9  christos   {ANY, ARM_FEATURE (0, ARM_EXT2_V8_1M_MAIN, FPU_VFP_EXT_V1xD),
    916  1.10  christos     0x0ef10a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpscr%}"},
    917   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    918  1.10  christos     0x0ef20a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpscr_nzcvqc%}"},
    919   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    920  1.10  christos     0x0ef50a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:mvfr2%}"},
    921   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    922  1.10  christos     0x0ef60a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:mvfr1%}"},
    923   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    924  1.10  christos     0x0ef70a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:mvfr0%}"},
    925   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    926  1.10  christos     0x0ef80a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpexc%}"},
    927   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    928  1.10  christos     0x0ef90a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpinst%}\t@ Impl def"},
    929   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    930  1.10  christos     0x0efa0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpinst2%}\t@ Impl def"},
    931   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    932  1.10  christos     0x0efc0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:vpr%}"},
    933   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    934  1.10  christos     0x0efd0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:p0%}"},
    935   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    936  1.10  christos     0x0efe0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpcxt_ns%}"},
    937   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    938  1.10  christos     0x0eff0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpcxt_s%}"},
    939   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    940  1.10  christos     0x0e000b10, 0x0fd00fff, "vmov%c.32\t%z2[%{I:%21d%}], %12-15r"},
    941   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    942  1.10  christos     0x0e100b10, 0x0fd00fff, "vmov%c.32\t%12-15r, %z2[%{I:%21d%}]"},
    943   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    944   1.5  christos     0x0ee00a10, 0x0ff00fff, "vmsr%c\t<impl def %16-19x>, %12-15r"},
    945   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    946   1.5  christos     0x0ef00a10, 0x0ff00fff, "vmrs%c\t%12-15r, <impl def %16-19x>"},
    947   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    948   1.5  christos     0x0e000a10, 0x0ff00f7f, "vmov%c\t%y2, %12-15r"},
    949   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    950   1.5  christos     0x0e100a10, 0x0ff00f7f, "vmov%c\t%12-15r, %y2"},
    951   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    952  1.10  christos     0x0eb50a40, 0x0fbf0f70, "vcmp%7'e%c.f32\t%y1, %{I:#0.0%}"},
    953   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    954  1.10  christos     0x0eb50b40, 0x0fbf0f70, "vcmp%7'e%c.f64\t%z1, %{I:#0.0%}"},
    955   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    956   1.5  christos     0x0eb00a40, 0x0fbf0fd0, "vmov%c.f32\t%y1, %y0"},
    957   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    958   1.5  christos     0x0eb00ac0, 0x0fbf0fd0, "vabs%c.f32\t%y1, %y0"},
    959   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    960   1.5  christos     0x0eb00b40, 0x0fbf0fd0, "vmov%c.f64\t%z1, %z0"},
    961   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    962   1.5  christos     0x0eb00bc0, 0x0fbf0fd0, "vabs%c.f64\t%z1, %z0"},
    963   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    964   1.5  christos     0x0eb10a40, 0x0fbf0fd0, "vneg%c.f32\t%y1, %y0"},
    965   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    966   1.5  christos     0x0eb10ac0, 0x0fbf0fd0, "vsqrt%c.f32\t%y1, %y0"},
    967   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    968   1.5  christos     0x0eb10b40, 0x0fbf0fd0, "vneg%c.f64\t%z1, %z0"},
    969   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    970   1.5  christos     0x0eb10bc0, 0x0fbf0fd0, "vsqrt%c.f64\t%z1, %z0"},
    971   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    972   1.5  christos     0x0eb70ac0, 0x0fbf0fd0, "vcvt%c.f64.f32\t%z1, %y0"},
    973   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    974   1.5  christos     0x0eb70bc0, 0x0fbf0fd0, "vcvt%c.f32.f64\t%y1, %z0"},
    975   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    976   1.5  christos     0x0eb80a40, 0x0fbf0f50, "vcvt%c.f32.%7?su32\t%y1, %y0"},
    977   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    978   1.5  christos     0x0eb80b40, 0x0fbf0f50, "vcvt%c.f64.%7?su32\t%z1, %y0"},
    979   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    980   1.5  christos     0x0eb40a40, 0x0fbf0f50, "vcmp%7'e%c.f32\t%y1, %y0"},
    981   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    982   1.5  christos     0x0eb40b40, 0x0fbf0f50, "vcmp%7'e%c.f64\t%z1, %z0"},
    983   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
    984  1.10  christos     0x0eba0a40, 0x0fbe0f50, "vcvt%c.f32.%16?us%7?31%7?26\t%y1, %y1, %{I:#%5,0-3k%}"},
    985   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
    986  1.10  christos     0x0eba0b40, 0x0fbe0f50, "vcvt%c.f64.%16?us%7?31%7?26\t%z1, %z1, %{I:#%5,0-3k%}"},
    987   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    988   1.5  christos     0x0ebc0a40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f32\t%y1, %y0"},
    989   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    990   1.5  christos     0x0ebc0b40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f64\t%y1, %z0"},
    991   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
    992  1.10  christos     0x0ebe0a40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f32\t%y1, %y1, %{I:#%5,0-3k%}"},
    993   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
    994  1.10  christos     0x0ebe0b40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f64\t%z1, %z1, %{I:#%5,0-3k%}"},
    995   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    996   1.5  christos     0x0c500b10, 0x0fb00ff0, "vmov%c\t%12-15r, %16-19r, %z0"},
    997   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
    998  1.10  christos     0x0eb00a00, 0x0fb00ff0, "vmov%c.f32\t%y1, %{I:#%0-3,16-19E%}"},
    999   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
   1000  1.10  christos     0x0eb00b00, 0x0fb00ff0, "vmov%c.f64\t%z1, %{I:#%0-3,16-19E%}"},
   1001   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
   1002   1.5  christos     0x0c400a10, 0x0ff00fd0, "vmov%c\t%y4, %12-15r, %16-19r"},
   1003   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
   1004   1.5  christos     0x0c400b10, 0x0ff00fd0, "vmov%c\t%z0, %12-15r, %16-19r"},
   1005   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
   1006   1.5  christos     0x0c500a10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %y4"},
   1007   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1008   1.5  christos     0x0e000a00, 0x0fb00f50, "vmla%c.f32\t%y1, %y2, %y0"},
   1009   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1010   1.5  christos     0x0e000a40, 0x0fb00f50, "vmls%c.f32\t%y1, %y2, %y0"},
   1011   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1012   1.5  christos     0x0e000b00, 0x0fb00f50, "vmla%c.f64\t%z1, %z2, %z0"},
   1013   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1014   1.5  christos     0x0e000b40, 0x0fb00f50, "vmls%c.f64\t%z1, %z2, %z0"},
   1015   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1016   1.5  christos     0x0e100a00, 0x0fb00f50, "vnmls%c.f32\t%y1, %y2, %y0"},
   1017   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1018   1.5  christos     0x0e100a40, 0x0fb00f50, "vnmla%c.f32\t%y1, %y2, %y0"},
   1019   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1020   1.5  christos     0x0e100b00, 0x0fb00f50, "vnmls%c.f64\t%z1, %z2, %z0"},
   1021   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1022   1.5  christos     0x0e100b40, 0x0fb00f50, "vnmla%c.f64\t%z1, %z2, %z0"},
   1023   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1024   1.5  christos     0x0e200a00, 0x0fb00f50, "vmul%c.f32\t%y1, %y2, %y0"},
   1025   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1026   1.5  christos     0x0e200a40, 0x0fb00f50, "vnmul%c.f32\t%y1, %y2, %y0"},
   1027   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1028   1.5  christos     0x0e200b00, 0x0fb00f50, "vmul%c.f64\t%z1, %z2, %z0"},
   1029   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1030   1.5  christos     0x0e200b40, 0x0fb00f50, "vnmul%c.f64\t%z1, %z2, %z0"},
   1031   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1032   1.5  christos     0x0e300a00, 0x0fb00f50, "vadd%c.f32\t%y1, %y2, %y0"},
   1033   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1034   1.5  christos     0x0e300a40, 0x0fb00f50, "vsub%c.f32\t%y1, %y2, %y0"},
   1035   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1036   1.5  christos     0x0e300b00, 0x0fb00f50, "vadd%c.f64\t%z1, %z2, %z0"},
   1037   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1038   1.5  christos     0x0e300b40, 0x0fb00f50, "vsub%c.f64\t%z1, %z2, %z0"},
   1039   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
   1040   1.5  christos     0x0e800a00, 0x0fb00f50, "vdiv%c.f32\t%y1, %y2, %y0"},
   1041   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
   1042   1.5  christos     0x0e800b00, 0x0fb00f50, "vdiv%c.f64\t%z1, %z2, %z0"},
   1043   1.1  christos 
   1044   1.1  christos   /* VFP Fused multiply add instructions.  */
   1045   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1046   1.5  christos     0x0ea00a00, 0x0fb00f50, "vfma%c.f32\t%y1, %y2, %y0"},
   1047   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1048   1.5  christos     0x0ea00b00, 0x0fb00f50, "vfma%c.f64\t%z1, %z2, %z0"},
   1049   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1050   1.5  christos     0x0ea00a40, 0x0fb00f50, "vfms%c.f32\t%y1, %y2, %y0"},
   1051   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1052   1.5  christos     0x0ea00b40, 0x0fb00f50, "vfms%c.f64\t%z1, %z2, %z0"},
   1053   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1054   1.5  christos     0x0e900a40, 0x0fb00f50, "vfnma%c.f32\t%y1, %y2, %y0"},
   1055   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1056   1.5  christos     0x0e900b40, 0x0fb00f50, "vfnma%c.f64\t%z1, %z2, %z0"},
   1057   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1058   1.5  christos     0x0e900a00, 0x0fb00f50, "vfnms%c.f32\t%y1, %y2, %y0"},
   1059   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
   1060   1.5  christos     0x0e900b00, 0x0fb00f50, "vfnms%c.f64\t%z1, %z2, %z0"},
   1061   1.1  christos 
   1062   1.1  christos   /* FP v5.  */
   1063   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1064   1.6  christos     0xfe000a00, 0xff800f50, "vsel%20-21c%u.f32\t%y1, %y2, %y0"},
   1065   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1066   1.6  christos     0xfe000b00, 0xff800f50, "vsel%20-21c%u.f64\t%z1, %z2, %z0"},
   1067   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1068   1.6  christos     0xfe800a00, 0xffb00f50, "vmaxnm%u.f32\t%y1, %y2, %y0"},
   1069   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1070   1.6  christos     0xfe800b00, 0xffb00f50, "vmaxnm%u.f64\t%z1, %z2, %z0"},
   1071   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1072   1.6  christos     0xfe800a40, 0xffb00f50, "vminnm%u.f32\t%y1, %y2, %y0"},
   1073   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1074   1.6  christos     0xfe800b40, 0xffb00f50, "vminnm%u.f64\t%z1, %z2, %z0"},
   1075   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1076   1.5  christos     0xfebc0a40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f32\t%y1, %y0"},
   1077   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1078   1.5  christos     0xfebc0b40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f64\t%y1, %z0"},
   1079   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1080   1.5  christos     0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32\t%y1, %y0"},
   1081   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1082   1.5  christos     0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64\t%z1, %z0"},
   1083   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1084   1.6  christos     0xfeb80a40, 0xffbc0fd0, "vrint%16-17?mpna%u.f32\t%y1, %y0"},
   1085   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
   1086   1.6  christos     0xfeb80b40, 0xffbc0fd0, "vrint%16-17?mpna%u.f64\t%z1, %z0"},
   1087   1.1  christos 
   1088   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_GENERIC_START, 0, "" },
   1089   1.7  christos   /* ARMv8.3 AdvSIMD instructions in the space of coprocessor 8.  */
   1090   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1091  1.10  christos     0xfc800800, 0xfeb00f10, "vcadd%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%24?29%24'70%}"},
   1092   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1093  1.10  christos     0xfc900800, 0xfeb00f10, "vcadd%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%24?29%24'70%}"},
   1094   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1095  1.10  christos     0xfc200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23'90%}"},
   1096   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1097  1.10  christos     0xfd200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23?21%23?780%}"},
   1098   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1099  1.10  christos     0xfc300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23'90%}"},
   1100   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1101  1.10  christos     0xfd300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23?21%23?780%}"},
   1102   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1103  1.10  christos     0xfe000800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %{R:%0-3D[%5?10]%}, %{I:#%20'90%}"},
   1104   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1105  1.10  christos     0xfe200800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %{R:%0-3D[%5?10]%}, %{I:#%20?21%20?780%}"},
   1106   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1107  1.10  christos     0xfe800800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %{R:%0-3,5D[0]%}, %{I:#%20'90%}"},
   1108   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1109  1.10  christos     0xfea00800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %{R:%0-3,5D[0]%}, %{I:#%20?21%20?780%}"},
   1110   1.7  christos 
   1111   1.9  christos   /* BFloat16 instructions.  */
   1112   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1113   1.9  christos     0x0eb30940, 0x0fbf0f50, "vcvt%7?tb%b.bf16.f32\t%y1, %y0"},
   1114   1.9  christos 
   1115   1.8  christos   /* Dot Product instructions in the space of coprocessor 13.  */
   1116   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
   1117   1.8  christos     0xfc200d00, 0xffb00f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3,5V"},
   1118   1.9  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
   1119  1.10  christos     0xfe200d00, 0xff200f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %{R:%0-3D[%5?10]%}"},
   1120   1.8  christos 
   1121   1.8  christos   /* ARMv8.2 FMAC Long instructions in the space of coprocessor 8.  */
   1122   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1123  1.10  christos     0xfc200810, 0xffb00f50, "vfmal.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-3d%}"},
   1124   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1125  1.10  christos     0xfca00810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-3d%}"},
   1126   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1127  1.10  christos     0xfc200850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-3,5d%}"},
   1128   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1129  1.10  christos     0xfca00850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-3,5d%}"},
   1130   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1131  1.10  christos     0xfe000810, 0xffb00f50, "vfmal.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-2d[%3d]%}"},
   1132   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1133  1.10  christos     0xfe100810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-2d[%3d]%}"},
   1134   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1135  1.10  christos     0xfe000850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-2d[%3,5d]%}"},
   1136   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1137  1.10  christos     0xfe100850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-2d[%3,5d]%}"},
   1138   1.8  christos 
   1139   1.6  christos   /* ARMv8.2 half-precision Floating point coprocessor 9 (VFP) instructions.
   1140   1.6  christos      cp_num: bit <11:8> == 0b1001.
   1141   1.6  christos      cond: bit <31:28> == 0b1110, otherwise, it's UNPREDICTABLE.  */
   1142   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1143   1.6  christos     0x0eb009c0, 0x0fbf0fd0, "vabs%c.f16\t%y1, %y0"},
   1144   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1145   1.6  christos     0x0e300900, 0x0fb00f50, "vadd%c.f16\t%y1, %y2, %y0"},
   1146   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1147   1.6  christos     0x0eb40940, 0x0fbf0f50, "vcmp%7'e%c.f16\t%y1, %y0"},
   1148   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1149  1.10  christos     0x0eb50940, 0x0fbf0f70, "vcmp%7'e%c.f16\t%y1, %{I:#0.0%}"},
   1150   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1151  1.10  christos     0x0eba09c0, 0x0fbe0fd0, "vcvt%c.f16.%16?us%7?31%7?26\t%y1, %y1, %{I:#%5,0-3k%}"},
   1152   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1153  1.10  christos     0x0ebe09c0, 0x0fbe0fd0, "vcvt%c.%16?us%7?31%7?26.f16\t%y1, %y1, %{I:#%5,0-3k%}"},
   1154   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1155   1.6  christos     0x0ebc0940, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f16\t%y1, %y0"},
   1156   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1157   1.6  christos     0x0eb80940, 0x0fbf0f50, "vcvt%c.f16.%7?su32\t%y1, %y0"},
   1158   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1159   1.6  christos     0xfebc0940, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f16\t%y1, %y0"},
   1160   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1161   1.6  christos     0x0e800900, 0x0fb00f50, "vdiv%c.f16\t%y1, %y2, %y0"},
   1162   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1163   1.6  christos     0x0ea00900, 0x0fb00f50, "vfma%c.f16\t%y1, %y2, %y0"},
   1164   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1165   1.6  christos     0x0ea00940, 0x0fb00f50, "vfms%c.f16\t%y1, %y2, %y0"},
   1166   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1167   1.6  christos     0x0e900940, 0x0fb00f50, "vfnma%c.f16\t%y1, %y2, %y0"},
   1168   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1169   1.6  christos     0x0e900900, 0x0fb00f50, "vfnms%c.f16\t%y1, %y2, %y0"},
   1170   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1171   1.6  christos     0xfeb00ac0, 0xffbf0fd0, "vins.f16\t%y1, %y0"},
   1172   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1173   1.6  christos     0xfeb00a40, 0xffbf0fd0, "vmovx%c.f16\t%y1, %y0"},
   1174   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1175   1.6  christos     0x0d100900, 0x0f300f00, "vldr%c.16\t%y1, %A"},
   1176   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1177   1.6  christos     0x0d000900, 0x0f300f00, "vstr%c.16\t%y1, %A"},
   1178   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1179   1.6  christos     0xfe800900, 0xffb00f50, "vmaxnm%c.f16\t%y1, %y2, %y0"},
   1180   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1181   1.6  christos     0xfe800940, 0xffb00f50, "vminnm%c.f16\t%y1, %y2, %y0"},
   1182   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1183   1.6  christos     0x0e000900, 0x0fb00f50, "vmla%c.f16\t%y1, %y2, %y0"},
   1184   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1185   1.6  christos     0x0e000940, 0x0fb00f50, "vmls%c.f16\t%y1, %y2, %y0"},
   1186   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1187   1.6  christos     0x0e100910, 0x0ff00f7f, "vmov%c.f16\t%12-15r, %y2"},
   1188   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1189   1.6  christos     0x0e000910, 0x0ff00f7f, "vmov%c.f16\t%y2, %12-15r"},
   1190   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1191  1.10  christos     0xeb00900, 0x0fb00ff0, "vmov%c.f16\t%y1, %{I:#%0-3,16-19E%}"},
   1192   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1193   1.6  christos     0x0e200900, 0x0fb00f50, "vmul%c.f16\t%y1, %y2, %y0"},
   1194   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1195   1.6  christos     0x0eb10940, 0x0fbf0fd0, "vneg%c.f16\t%y1, %y0"},
   1196   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1197   1.6  christos     0x0e100940, 0x0fb00f50, "vnmla%c.f16\t%y1, %y2, %y0"},
   1198   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1199   1.6  christos     0x0e100900, 0x0fb00f50, "vnmls%c.f16\t%y1, %y2, %y0"},
   1200   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1201   1.6  christos     0x0e200940, 0x0fb00f50, "vnmul%c.f16\t%y1, %y2, %y0"},
   1202   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1203   1.6  christos     0x0eb60940, 0x0fbe0f50, "vrint%7,16??xzr%c.f16\t%y1, %y0"},
   1204   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1205   1.6  christos     0xfeb80940, 0xffbc0fd0, "vrint%16-17?mpna%u.f16\t%y1, %y0"},
   1206   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1207   1.6  christos     0xfe000900, 0xff800f50, "vsel%20-21c%u.f16\t%y1, %y2, %y0"},
   1208   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1209   1.6  christos     0x0eb109c0, 0x0fbf0fd0, "vsqrt%c.f16\t%y1, %y0"},
   1210   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1211   1.6  christos     0x0e300940, 0x0fb00f50, "vsub%c.f16\t%y1, %y2, %y0"},
   1212   1.6  christos 
   1213   1.7  christos   /* ARMv8.3 javascript conversion instruction.  */
   1214   1.9  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1215   1.7  christos     0x0eb90bc0, 0x0fbf0fd0, "vjcvt%c.s32.f64\t%y1, %z0"},
   1216   1.7  christos 
   1217   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   1218   1.9  christos };
   1219   1.9  christos 
   1220   1.9  christos /* Generic coprocessor instructions.  These are only matched if a more specific
   1221   1.9  christos    SIMD or co-processor instruction does not match first.  */
   1222   1.9  christos 
   1223   1.9  christos static const struct sopcode32 generic_coprocessor_opcodes[] =
   1224   1.9  christos {
   1225   1.9  christos   /* Generic coprocessor instructions.  */
   1226   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   1227  1.10  christos     0x0c400000, 0x0ff00000, "mcrr%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15R, %16-19r, %{R:cr%0-3d%}"},
   1228   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   1229   1.9  christos     0x0c500000, 0x0ff00000,
   1230  1.10  christos     "mrrc%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15Ru, %16-19Ru, %{R:cr%0-3d%}"},
   1231   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1232   1.9  christos     0x0e000000, 0x0f000010,
   1233  1.10  christos     "cdp%c\t%{I:%8-11d%}, %{I:%20-23d%}, %{R:cr%12-15d%}, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1234   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1235   1.9  christos     0x0e10f010, 0x0f10f010,
   1236  1.10  christos     "mrc%c\t%{I:%8-11d%}, %{I:%21-23d%}, %{R:APSR_nzcv%}, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1237   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1238   1.9  christos     0x0e100010, 0x0f100010,
   1239  1.10  christos     "mrc%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15r, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1240   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1241   1.9  christos     0x0e000010, 0x0f100010,
   1242  1.10  christos     "mcr%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15R, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1243   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1244  1.10  christos     0x0c000000, 0x0e100000, "stc%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1245   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1246  1.10  christos     0x0c100000, 0x0e100000, "ldc%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1247   1.9  christos 
   1248   1.9  christos   /* V6 coprocessor instructions.  */
   1249   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   1250   1.9  christos     0xfc500000, 0xfff00000,
   1251  1.10  christos     "mrrc2%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15Ru, %16-19Ru, %{R:cr%0-3d%}"},
   1252   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   1253   1.9  christos     0xfc400000, 0xfff00000,
   1254  1.10  christos     "mcrr2%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15R, %16-19R, %{R:cr%0-3d%}"},
   1255   1.9  christos 
   1256   1.9  christos   /* V5 coprocessor instructions.  */
   1257   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1258  1.10  christos     0xfc100000, 0xfe100000, "ldc2%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1259   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1260  1.10  christos     0xfc000000, 0xfe100000, "stc2%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1261   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1262   1.9  christos     0xfe000000, 0xff000010,
   1263  1.10  christos     "cdp2%c\t%{I:%8-11d%}, %{I:%20-23d%}, %{R:cr%12-15d%}, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1264   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1265   1.9  christos     0xfe000010, 0xff100010,
   1266  1.10  christos     "mcr2%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15R, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1267   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1268   1.9  christos     0xfe100010, 0xff100010,
   1269  1.10  christos     "mrc2%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15r, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1270   1.9  christos 
   1271   1.9  christos   {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   1272   1.1  christos };
   1273   1.1  christos 
   1274   1.1  christos /* Neon opcode table:  This does not encode the top byte -- that is
   1275   1.1  christos    checked by the print_insn_neon routine, as it depends on whether we are
   1276   1.1  christos    doing thumb32 or arm32 disassembly.  */
   1277   1.1  christos 
   1278   1.1  christos /* print_insn_neon recognizes the following format control codes:
   1279   1.1  christos 
   1280   1.1  christos    %%			%
   1281   1.1  christos 
   1282   1.1  christos    %c			print condition code
   1283   1.1  christos    %u			print condition code (unconditional in ARM mode,
   1284   1.1  christos                           UNPREDICTABLE if not AL in Thumb)
   1285   1.1  christos    %A			print v{st,ld}[1234] operands
   1286   1.1  christos    %B			print v{st,ld}[1234] any one operands
   1287   1.1  christos    %C			print v{st,ld}[1234] single->all operands
   1288   1.1  christos    %D			print scalar
   1289   1.1  christos    %E			print vmov, vmvn, vorr, vbic encoded constant
   1290   1.1  christos    %F			print vtbl,vtbx register list
   1291   1.1  christos 
   1292   1.1  christos    %<bitfield>r		print as an ARM register
   1293   1.1  christos    %<bitfield>d		print the bitfield in decimal
   1294   1.1  christos    %<bitfield>e         print the 2^N - bitfield in decimal
   1295   1.1  christos    %<bitfield>D		print as a NEON D register
   1296   1.1  christos    %<bitfield>Q		print as a NEON Q register
   1297   1.1  christos    %<bitfield>R		print as a NEON D or Q register
   1298   1.1  christos    %<bitfield>Sn	print byte scaled width limited by n
   1299   1.1  christos    %<bitfield>Tn	print short scaled width limited by n
   1300   1.1  christos    %<bitfield>Un	print long scaled width limited by n
   1301   1.6  christos 
   1302   1.1  christos    %<bitfield>'c	print specified char iff bitfield is all ones
   1303   1.1  christos    %<bitfield>`c	print specified char iff bitfield is all zeroes
   1304   1.1  christos    %<bitfield>?ab...    select from array of values in big endian order.  */
   1305   1.1  christos 
   1306   1.1  christos static const struct opcode32 neon_opcodes[] =
   1307   1.1  christos {
   1308   1.1  christos   /* Extract.  */
   1309   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1310   1.5  christos     0xf2b00840, 0xffb00850,
   1311  1.10  christos     "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, %{I:#%8-11d%}"},
   1312   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1313   1.5  christos     0xf2b00000, 0xffb00810,
   1314  1.10  christos     "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, %{I:#%8-11d%}"},
   1315   1.1  christos 
   1316   1.9  christos   /* Data transfer between ARM and NEON registers.  */
   1317   1.9  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1318   1.9  christos     0x0e800b10, 0x0ff00f70, "vdup%c.32\t%16-19,7D, %12-15r"},
   1319   1.9  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1320   1.9  christos     0x0e800b30, 0x0ff00f70, "vdup%c.16\t%16-19,7D, %12-15r"},
   1321   1.9  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1322   1.9  christos     0x0ea00b10, 0x0ff00f70, "vdup%c.32\t%16-19,7Q, %12-15r"},
   1323   1.9  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1324   1.9  christos     0x0ea00b30, 0x0ff00f70, "vdup%c.16\t%16-19,7Q, %12-15r"},
   1325   1.9  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1326   1.9  christos     0x0ec00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7D, %12-15r"},
   1327   1.9  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1328   1.9  christos     0x0ee00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7Q, %12-15r"},
   1329   1.9  christos 
   1330   1.1  christos   /* Move data element to all lanes.  */
   1331   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1332  1.10  christos     0xf3b40c00, 0xffb70f90, "vdup%c.32\t%12-15,22R, %{R:%0-3,5D[%19d]%}"},
   1333   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1334  1.10  christos     0xf3b20c00, 0xffb30f90, "vdup%c.16\t%12-15,22R, %{R:%0-3,5D[%18-19d]%}"},
   1335   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1336  1.10  christos     0xf3b10c00, 0xffb10f90, "vdup%c.8\t%12-15,22R, %{R:%0-3,5D[%17-19d]%}"},
   1337   1.1  christos 
   1338   1.1  christos   /* Table lookup.  */
   1339   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1340   1.5  christos     0xf3b00800, 0xffb00c50, "vtbl%c.8\t%12-15,22D, %F, %0-3,5D"},
   1341   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1342   1.5  christos     0xf3b00840, 0xffb00c50, "vtbx%c.8\t%12-15,22D, %F, %0-3,5D"},
   1343   1.5  christos 
   1344   1.1  christos   /* Half-precision conversions.  */
   1345   1.5  christos   {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
   1346   1.5  christos     0xf3b60600, 0xffbf0fd0, "vcvt%c.f16.f32\t%12-15,22D, %0-3,5Q"},
   1347   1.5  christos   {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
   1348   1.5  christos     0xf3b60700, 0xffbf0fd0, "vcvt%c.f32.f16\t%12-15,22Q, %0-3,5D"},
   1349   1.1  christos 
   1350   1.1  christos   /* NEON fused multiply add instructions.  */
   1351   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
   1352   1.6  christos     0xf2000c10, 0xffb00f10, "vfma%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1353   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1354   1.6  christos     0xf2100c10, 0xffb00f10, "vfma%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1355   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
   1356   1.6  christos     0xf2200c10, 0xffb00f10, "vfms%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1357   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1358   1.6  christos     0xf2300c10, 0xffb00f10, "vfms%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1359   1.1  christos 
   1360   1.9  christos   /* BFloat16 instructions.  */
   1361   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1362   1.9  christos     0xfc000d00, 0xffb00f10, "vdot.bf16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1363   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1364  1.10  christos     0xfe000d00, 0xffb00f10, "vdot.bf16\t%12-15,22R, %16-19,7R, %{R:d%0-3d[%5d]%}"},
   1365   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1366   1.9  christos     0xfc000c40, 0xffb00f50, "vmmla.bf16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1367   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1368   1.9  christos     0xf3b60640, 0xffbf0fd0, "vcvt%c.bf16.f32\t%12-15,22D, %0-3,5Q"},
   1369   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1370   1.9  christos     0xfc300810, 0xffb00f10, "vfma%6?tb.bf16\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1371   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1372  1.10  christos     0xfe300810, 0xffb00f10, "vfma%6?tb.bf16\t%12-15,22Q, %16-19,7Q, %{R:%0-2D[%3,5d]%}"},
   1373   1.9  christos 
   1374   1.9  christos   /* Matrix Multiply instructions.  */
   1375   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1376   1.9  christos     0xfc200c40, 0xffb00f50, "vsmmla.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1377   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1378   1.9  christos     0xfc200c50, 0xffb00f50, "vummla.u8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1379   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1380   1.9  christos     0xfca00c40, 0xffb00f50, "vusmmla.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1381   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1382   1.9  christos     0xfca00d00, 0xffb00f10, "vusdot.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1383   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1384  1.10  christos     0xfe800d00, 0xffb00f10, "vusdot.s8\t%12-15,22R, %16-19,7R, %{R:d%0-3d[%5d]%}"},
   1385   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1386  1.10  christos     0xfe800d10, 0xffb00f10, "vsudot.u8\t%12-15,22R, %16-19,7R, %{R:d%0-3d[%5d]%}"},
   1387   1.9  christos 
   1388   1.1  christos   /* Two registers, miscellaneous.  */
   1389   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1390   1.5  christos     0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32\t%12-15,22R, %0-3,5R"},
   1391   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1392   1.6  christos     0xf3b60400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f16\t%12-15,22R, %0-3,5R"},
   1393   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1394   1.5  christos     0xf3bb0000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us32.f32\t%12-15,22R, %0-3,5R"},
   1395   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1396   1.6  christos     0xf3b70000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us16.f16\t%12-15,22R, %0-3,5R"},
   1397   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1398   1.5  christos     0xf3b00300, 0xffbf0fd0, "aese%u.8\t%12-15,22Q, %0-3,5Q"},
   1399   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1400   1.5  christos     0xf3b00340, 0xffbf0fd0, "aesd%u.8\t%12-15,22Q, %0-3,5Q"},
   1401   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1402   1.5  christos     0xf3b00380, 0xffbf0fd0, "aesmc%u.8\t%12-15,22Q, %0-3,5Q"},
   1403   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1404   1.5  christos     0xf3b003c0, 0xffbf0fd0, "aesimc%u.8\t%12-15,22Q, %0-3,5Q"},
   1405   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1406   1.5  christos     0xf3b902c0, 0xffbf0fd0, "sha1h%u.32\t%12-15,22Q, %0-3,5Q"},
   1407   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1408   1.5  christos     0xf3ba0380, 0xffbf0fd0, "sha1su1%u.32\t%12-15,22Q, %0-3,5Q"},
   1409   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1410   1.5  christos     0xf3ba03c0, 0xffbf0fd0, "sha256su0%u.32\t%12-15,22Q, %0-3,5Q"},
   1411   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1412   1.5  christos     0xf2880a10, 0xfebf0fd0, "vmovl%c.%24?us8\t%12-15,22Q, %0-3,5D"},
   1413   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1414   1.5  christos     0xf2900a10, 0xfebf0fd0, "vmovl%c.%24?us16\t%12-15,22Q, %0-3,5D"},
   1415   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1416   1.5  christos     0xf2a00a10, 0xfebf0fd0, "vmovl%c.%24?us32\t%12-15,22Q, %0-3,5D"},
   1417   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1418   1.5  christos     0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
   1419   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1420   1.5  christos     0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
   1421   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1422   1.5  christos     0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
   1423   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1424   1.5  christos     0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
   1425   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1426   1.5  christos     0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
   1427   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1428   1.5  christos     0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
   1429   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1430   1.5  christos     0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
   1431   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1432   1.5  christos     0xf3b20300, 0xffb30fd0,
   1433  1.10  christos     "vshll%c.i%18-19S2\t%12-15,22Q, %0-3,5D, %{I:#%18-19S2%}"},
   1434   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1435   1.5  christos     0xf3bb0400, 0xffbf0e90, "vrecpe%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
   1436   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1437   1.6  christos     0xf3b70400, 0xffbf0e90, "vrecpe%c.%8?fu16\t%12-15,22R, %0-3,5R"},
   1438   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1439   1.5  christos     0xf3bb0480, 0xffbf0e90, "vrsqrte%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
   1440   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1441   1.6  christos     0xf3b70480, 0xffbf0e90, "vrsqrte%c.%8?fu16\t%12-15,22R, %0-3,5R"},
   1442   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1443   1.5  christos     0xf3b00000, 0xffb30f90, "vrev64%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1444   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1445   1.5  christos     0xf3b00080, 0xffb30f90, "vrev32%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1446   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1447   1.5  christos     0xf3b00100, 0xffb30f90, "vrev16%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1448   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1449   1.5  christos     0xf3b00400, 0xffb30f90, "vcls%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
   1450   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1451   1.5  christos     0xf3b00480, 0xffb30f90, "vclz%c.i%18-19S2\t%12-15,22R, %0-3,5R"},
   1452   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1453   1.5  christos     0xf3b00700, 0xffb30f90, "vqabs%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
   1454   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1455   1.5  christos     0xf3b00780, 0xffb30f90, "vqneg%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
   1456   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1457   1.5  christos     0xf3b20080, 0xffb30f90, "vtrn%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1458   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1459   1.5  christos     0xf3b20100, 0xffb30f90, "vuzp%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1460   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1461   1.5  christos     0xf3b20180, 0xffb30f90, "vzip%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1462   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1463  1.10  christos     0xf3b10000, 0xffb30b90, "vcgt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1464   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1465  1.10  christos     0xf3b10080, 0xffb30b90, "vcge%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1466   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1467  1.10  christos     0xf3b10100, 0xffb30b90, "vceq%c.%10?fi%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1468   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1469  1.10  christos     0xf3b10180, 0xffb30b90, "vcle%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1470   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1471  1.10  christos     0xf3b10200, 0xffb30b90, "vclt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1472   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1473   1.5  christos     0xf3b10300, 0xffb30b90, "vabs%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
   1474   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1475   1.5  christos     0xf3b10380, 0xffb30b90, "vneg%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
   1476   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1477   1.5  christos     0xf3b00200, 0xffb30f10, "vpaddl%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
   1478   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1479   1.5  christos     0xf3b00600, 0xffb30f10, "vpadal%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
   1480   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1481   1.6  christos     0xf3bb0600, 0xffbf0e10,
   1482   1.5  christos     "vcvt%c.%7-8?usff%18-19Sa.%7-8?ffus%18-19Sa\t%12-15,22R, %0-3,5R"},
   1483   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1484   1.6  christos     0xf3b70600, 0xffbf0e10,
   1485   1.6  christos     "vcvt%c.%7-8?usff16.%7-8?ffus16\t%12-15,22R, %0-3,5R"},
   1486   1.1  christos 
   1487   1.1  christos   /* Three registers of the same length.  */
   1488   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1489   1.5  christos     0xf2000c40, 0xffb00f50, "sha1c%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1490   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1491   1.5  christos     0xf2100c40, 0xffb00f50, "sha1p%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1492   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1493   1.5  christos     0xf2200c40, 0xffb00f50, "sha1m%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1494   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1495   1.5  christos     0xf2300c40, 0xffb00f50, "sha1su0%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1496   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1497   1.5  christos     0xf3000c40, 0xffb00f50, "sha256h%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1498   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1499   1.5  christos     0xf3100c40, 0xffb00f50, "sha256h2%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1500   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1501   1.5  christos     0xf3200c40, 0xffb00f50, "sha256su1%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1502   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1503   1.6  christos     0xf3000f10, 0xffb00f10, "vmaxnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1504   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1505   1.6  christos     0xf3100f10, 0xffb00f10, "vmaxnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1506   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1507   1.6  christos     0xf3200f10, 0xffb00f10, "vminnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1508   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1509   1.6  christos     0xf3300f10, 0xffb00f10, "vminnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1510   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1511   1.5  christos     0xf2000110, 0xffb00f10, "vand%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1512   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1513   1.5  christos     0xf2100110, 0xffb00f10, "vbic%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1514   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1515   1.5  christos     0xf2200110, 0xffb00f10, "vorr%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1516   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1517   1.5  christos     0xf2300110, 0xffb00f10, "vorn%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1518   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1519   1.5  christos     0xf3000110, 0xffb00f10, "veor%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1520   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1521   1.5  christos     0xf3100110, 0xffb00f10, "vbsl%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1522   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1523   1.5  christos     0xf3200110, 0xffb00f10, "vbit%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1524   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1525   1.5  christos     0xf3300110, 0xffb00f10, "vbif%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1526   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1527   1.6  christos     0xf2000d00, 0xffb00f10, "vadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1528   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1529   1.6  christos     0xf2100d00, 0xffb00f10, "vadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1530   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1531   1.6  christos     0xf2000d10, 0xffb00f10, "vmla%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1532   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1533   1.6  christos     0xf2100d10, 0xffb00f10, "vmla%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1534   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1535   1.6  christos     0xf2000e00, 0xffb00f10, "vceq%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1536   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1537   1.6  christos     0xf2100e00, 0xffb00f10, "vceq%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1538   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1539   1.6  christos     0xf2000f00, 0xffb00f10, "vmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1540   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1541   1.6  christos     0xf2100f00, 0xffb00f10, "vmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1542   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1543   1.6  christos     0xf2000f10, 0xffb00f10, "vrecps%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1544   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1545   1.6  christos     0xf2100f10, 0xffb00f10, "vrecps%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1546   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1547   1.6  christos     0xf2200d00, 0xffb00f10, "vsub%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1548   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1549   1.6  christos     0xf2300d00, 0xffb00f10, "vsub%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1550   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1551   1.6  christos     0xf2200d10, 0xffb00f10, "vmls%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1552   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1553   1.6  christos     0xf2300d10, 0xffb00f10, "vmls%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1554   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1555   1.6  christos     0xf2200f00, 0xffb00f10, "vmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1556   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1557   1.6  christos     0xf2300f00, 0xffb00f10, "vmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1558   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1559   1.6  christos     0xf2200f10, 0xffb00f10, "vrsqrts%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1560   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1561   1.6  christos     0xf2300f10, 0xffb00f10, "vrsqrts%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1562   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1563   1.6  christos     0xf3000d00, 0xffb00f10, "vpadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1564   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1565   1.6  christos     0xf3100d00, 0xffb00f10, "vpadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1566   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1567   1.6  christos     0xf3000d10, 0xffb00f10, "vmul%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1568   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1569   1.6  christos     0xf3100d10, 0xffb00f10, "vmul%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1570   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1571   1.6  christos     0xf3000e00, 0xffb00f10, "vcge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1572   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1573   1.6  christos     0xf3100e00, 0xffb00f10, "vcge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1574   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1575   1.6  christos     0xf3000e10, 0xffb00f10, "vacge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1576   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1577   1.6  christos     0xf3100e10, 0xffb00f10, "vacge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1578   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1579   1.6  christos     0xf3000f00, 0xffb00f10, "vpmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1580   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1581   1.6  christos     0xf3100f00, 0xffb00f10, "vpmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1582   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1583   1.6  christos     0xf3200d00, 0xffb00f10, "vabd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1584   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1585   1.6  christos     0xf3300d00, 0xffb00f10, "vabd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1586   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1587   1.6  christos     0xf3200e00, 0xffb00f10, "vcgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1588   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1589   1.6  christos     0xf3300e00, 0xffb00f10, "vcgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1590   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1591   1.6  christos     0xf3200e10, 0xffb00f10, "vacgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1592   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1593   1.6  christos     0xf3300e10, 0xffb00f10, "vacgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1594   1.6  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1595   1.6  christos     0xf3200f00, 0xffb00f10, "vpmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1596   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1597   1.6  christos     0xf3300f00, 0xffb00f10, "vpmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1598   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1599   1.5  christos     0xf2000800, 0xff800f10, "vadd%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1600   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1601   1.5  christos     0xf2000810, 0xff800f10, "vtst%c.%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1602   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1603   1.5  christos     0xf2000900, 0xff800f10, "vmla%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1604   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1605   1.5  christos     0xf2000b00, 0xff800f10,
   1606   1.5  christos     "vqdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1607   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1608   1.5  christos     0xf2000b10, 0xff800f10,
   1609   1.5  christos     "vpadd%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1610   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1611   1.5  christos     0xf3000800, 0xff800f10, "vsub%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1612   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1613   1.5  christos     0xf3000810, 0xff800f10, "vceq%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1614   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1615   1.5  christos     0xf3000900, 0xff800f10, "vmls%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1616   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1617   1.5  christos     0xf3000b00, 0xff800f10,
   1618   1.5  christos     "vqrdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1619   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1620   1.5  christos     0xf2000000, 0xfe800f10,
   1621   1.5  christos     "vhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1622   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1623   1.5  christos     0xf2000010, 0xfe800f10,
   1624   1.5  christos     "vqadd%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1625   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1626   1.5  christos     0xf2000100, 0xfe800f10,
   1627   1.5  christos     "vrhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1628   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1629   1.5  christos     0xf2000200, 0xfe800f10,
   1630   1.5  christos     "vhsub%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1631   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1632   1.5  christos     0xf2000210, 0xfe800f10,
   1633   1.5  christos     "vqsub%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1634   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1635   1.5  christos     0xf2000300, 0xfe800f10,
   1636   1.5  christos     "vcgt%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1637   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1638   1.5  christos     0xf2000310, 0xfe800f10,
   1639   1.5  christos     "vcge%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1640   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1641   1.5  christos     0xf2000400, 0xfe800f10,
   1642   1.5  christos     "vshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1643   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1644   1.5  christos     0xf2000410, 0xfe800f10,
   1645   1.5  christos     "vqshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1646   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1647   1.5  christos     0xf2000500, 0xfe800f10,
   1648   1.5  christos     "vrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1649   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1650   1.5  christos     0xf2000510, 0xfe800f10,
   1651   1.5  christos     "vqrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1652   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1653   1.5  christos     0xf2000600, 0xfe800f10,
   1654   1.5  christos     "vmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1655   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1656   1.5  christos     0xf2000610, 0xfe800f10,
   1657   1.5  christos     "vmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1658   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1659   1.5  christos     0xf2000700, 0xfe800f10,
   1660   1.5  christos     "vabd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1661   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1662   1.5  christos     0xf2000710, 0xfe800f10,
   1663   1.5  christos     "vaba%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1664   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1665   1.5  christos     0xf2000910, 0xfe800f10,
   1666   1.5  christos     "vmul%c.%24?pi%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1667   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1668   1.5  christos     0xf2000a00, 0xfe800f10,
   1669   1.5  christos     "vpmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1670   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1671   1.5  christos     0xf2000a10, 0xfe800f10,
   1672   1.5  christos     "vpmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1673   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1674   1.5  christos     0xf3000b10, 0xff800f10,
   1675   1.5  christos     "vqrdmlah%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1676   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1677   1.5  christos     0xf3000c10, 0xff800f10,
   1678   1.5  christos     "vqrdmlsh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1679   1.1  christos 
   1680   1.1  christos   /* One register and an immediate value.  */
   1681   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1682   1.5  christos     0xf2800e10, 0xfeb80fb0, "vmov%c.i8\t%12-15,22R, %E"},
   1683   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1684   1.5  christos     0xf2800e30, 0xfeb80fb0, "vmov%c.i64\t%12-15,22R, %E"},
   1685   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1686   1.5  christos     0xf2800f10, 0xfeb80fb0, "vmov%c.f32\t%12-15,22R, %E"},
   1687   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1688   1.5  christos     0xf2800810, 0xfeb80db0, "vmov%c.i16\t%12-15,22R, %E"},
   1689   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1690   1.5  christos     0xf2800830, 0xfeb80db0, "vmvn%c.i16\t%12-15,22R, %E"},
   1691   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1692   1.5  christos     0xf2800910, 0xfeb80db0, "vorr%c.i16\t%12-15,22R, %E"},
   1693   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1694   1.5  christos     0xf2800930, 0xfeb80db0, "vbic%c.i16\t%12-15,22R, %E"},
   1695   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1696   1.5  christos     0xf2800c10, 0xfeb80eb0, "vmov%c.i32\t%12-15,22R, %E"},
   1697   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1698   1.5  christos     0xf2800c30, 0xfeb80eb0, "vmvn%c.i32\t%12-15,22R, %E"},
   1699   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1700   1.5  christos     0xf2800110, 0xfeb809b0, "vorr%c.i32\t%12-15,22R, %E"},
   1701   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1702   1.5  christos     0xf2800130, 0xfeb809b0, "vbic%c.i32\t%12-15,22R, %E"},
   1703   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1704   1.5  christos     0xf2800010, 0xfeb808b0, "vmov%c.i32\t%12-15,22R, %E"},
   1705   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1706   1.5  christos     0xf2800030, 0xfeb808b0, "vmvn%c.i32\t%12-15,22R, %E"},
   1707   1.1  christos 
   1708   1.1  christos   /* Two registers and a shift amount.  */
   1709   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1710  1.10  christos     0xf2880810, 0xffb80fd0, "vshrn%c.i16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1711   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1712  1.10  christos     0xf2880850, 0xffb80fd0, "vrshrn%c.i16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1713   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1714  1.10  christos     0xf2880810, 0xfeb80fd0, "vqshrun%c.s16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1715   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1716  1.10  christos     0xf2880850, 0xfeb80fd0, "vqrshrun%c.s16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1717   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1718  1.10  christos     0xf2880910, 0xfeb80fd0, "vqshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1719   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1720   1.5  christos     0xf2880950, 0xfeb80fd0,
   1721  1.10  christos     "vqrshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1722   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1723  1.10  christos     0xf2880a10, 0xfeb80fd0, "vshll%c.%24?us8\t%12-15,22Q, %0-3,5D, %{I:#%16-18d%}"},
   1724   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1725  1.10  christos     0xf2900810, 0xffb00fd0, "vshrn%c.i32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1726   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1727  1.10  christos     0xf2900850, 0xffb00fd0, "vrshrn%c.i32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1728   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1729  1.10  christos     0xf2880510, 0xffb80f90, "vshl%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1730   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1731  1.10  christos     0xf3880410, 0xffb80f90, "vsri%c.8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1732   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1733  1.10  christos     0xf3880510, 0xffb80f90, "vsli%c.8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1734   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1735  1.10  christos     0xf3880610, 0xffb80f90, "vqshlu%c.s8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1736   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1737  1.10  christos     0xf2900810, 0xfeb00fd0, "vqshrun%c.s32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1738   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1739  1.10  christos     0xf2900850, 0xfeb00fd0, "vqrshrun%c.s32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1740   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1741  1.10  christos     0xf2900910, 0xfeb00fd0, "vqshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1742   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1743   1.5  christos     0xf2900950, 0xfeb00fd0,
   1744  1.10  christos     "vqrshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1745   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1746  1.10  christos     0xf2900a10, 0xfeb00fd0, "vshll%c.%24?us16\t%12-15,22Q, %0-3,5D, %{I:#%16-19d%}"},
   1747   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1748  1.10  christos     0xf2880010, 0xfeb80f90, "vshr%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1749   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1750  1.10  christos     0xf2880110, 0xfeb80f90, "vsra%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1751   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1752  1.10  christos     0xf2880210, 0xfeb80f90, "vrshr%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1753   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1754  1.10  christos     0xf2880310, 0xfeb80f90, "vrsra%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1755   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1756  1.10  christos     0xf2880710, 0xfeb80f90, "vqshl%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1757   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1758  1.10  christos     0xf2a00810, 0xffa00fd0, "vshrn%c.i64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1759   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1760  1.10  christos     0xf2a00850, 0xffa00fd0, "vrshrn%c.i64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1761   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1762  1.10  christos     0xf2900510, 0xffb00f90, "vshl%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1763   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1764  1.10  christos     0xf3900410, 0xffb00f90, "vsri%c.16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1765   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1766  1.10  christos     0xf3900510, 0xffb00f90, "vsli%c.16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1767   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1768  1.10  christos     0xf3900610, 0xffb00f90, "vqshlu%c.s16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1769   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1770  1.10  christos     0xf2a00a10, 0xfea00fd0, "vshll%c.%24?us32\t%12-15,22Q, %0-3,5D, %{I:#%16-20d%}"},
   1771   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1772  1.10  christos     0xf2900010, 0xfeb00f90, "vshr%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1773   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1774  1.10  christos     0xf2900110, 0xfeb00f90, "vsra%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1775   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1776  1.10  christos     0xf2900210, 0xfeb00f90, "vrshr%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1777   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1778  1.10  christos     0xf2900310, 0xfeb00f90, "vrsra%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1779   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1780  1.10  christos     0xf2900710, 0xfeb00f90, "vqshl%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1781   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1782  1.10  christos     0xf2a00810, 0xfea00fd0, "vqshrun%c.s64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1783   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1784  1.10  christos     0xf2a00850, 0xfea00fd0, "vqrshrun%c.s64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1785   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1786  1.10  christos     0xf2a00910, 0xfea00fd0, "vqshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1787   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1788   1.5  christos     0xf2a00950, 0xfea00fd0,
   1789  1.10  christos     "vqrshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1790   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1791  1.10  christos     0xf2a00510, 0xffa00f90, "vshl%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1792   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1793  1.10  christos     0xf3a00410, 0xffa00f90, "vsri%c.32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1794   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1795  1.10  christos     0xf3a00510, 0xffa00f90, "vsli%c.32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1796   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1797  1.10  christos     0xf3a00610, 0xffa00f90, "vqshlu%c.s32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1798   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1799  1.10  christos     0xf2a00010, 0xfea00f90, "vshr%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1800   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1801  1.10  christos     0xf2a00110, 0xfea00f90, "vsra%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1802   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1803  1.10  christos     0xf2a00210, 0xfea00f90, "vrshr%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1804   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1805  1.10  christos     0xf2a00310, 0xfea00f90, "vrsra%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1806   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1807  1.10  christos     0xf2a00710, 0xfea00f90, "vqshl%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1808   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1809  1.10  christos     0xf2800590, 0xff800f90, "vshl%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1810   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1811  1.10  christos     0xf3800490, 0xff800f90, "vsri%c.64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1812   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1813  1.10  christos     0xf3800590, 0xff800f90, "vsli%c.64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1814   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1815  1.10  christos     0xf3800690, 0xff800f90, "vqshlu%c.s64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1816   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1817  1.10  christos     0xf2800090, 0xfe800f90, "vshr%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1818   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1819  1.10  christos     0xf2800190, 0xfe800f90, "vsra%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1820   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1821  1.10  christos     0xf2800290, 0xfe800f90, "vrshr%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1822   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1823  1.10  christos     0xf2800390, 0xfe800f90, "vrsra%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1824   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1825  1.10  christos     0xf2800790, 0xfe800f90, "vqshl%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1826   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1827   1.5  christos     0xf2a00e10, 0xfea00e90,
   1828  1.10  christos     "vcvt%c.%24,8?usff32.%24,8?ffus32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1829   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1830   1.6  christos     0xf2a00c10, 0xfea00e90,
   1831  1.10  christos     "vcvt%c.%24,8?usff16.%24,8?ffus16\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1832   1.1  christos 
   1833   1.1  christos   /* Three registers of different lengths.  */
   1834   1.5  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1835   1.5  christos     0xf2a00e00, 0xfeb00f50, "vmull%c.p64\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1836   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1837   1.5  christos     0xf2800e00, 0xfea00f50, "vmull%c.p%20S0\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1838   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1839   1.5  christos     0xf2800400, 0xff800f50,
   1840   1.5  christos     "vaddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1841   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1842   1.5  christos     0xf2800600, 0xff800f50,
   1843   1.5  christos     "vsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1844   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1845   1.5  christos     0xf2800900, 0xff800f50,
   1846   1.5  christos     "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1847   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1848   1.5  christos     0xf2800b00, 0xff800f50,
   1849   1.5  christos     "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1850   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1851   1.5  christos     0xf2800d00, 0xff800f50,
   1852   1.5  christos     "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1853   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1854   1.5  christos     0xf3800400, 0xff800f50,
   1855   1.5  christos     "vraddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1856   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1857   1.5  christos     0xf3800600, 0xff800f50,
   1858   1.5  christos     "vrsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1859   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1860   1.5  christos     0xf2800000, 0xfe800f50,
   1861   1.5  christos     "vaddl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1862   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1863   1.5  christos     0xf2800100, 0xfe800f50,
   1864   1.5  christos     "vaddw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
   1865   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1866   1.5  christos     0xf2800200, 0xfe800f50,
   1867   1.5  christos     "vsubl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1868   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1869   1.5  christos     0xf2800300, 0xfe800f50,
   1870   1.5  christos     "vsubw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
   1871   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1872   1.5  christos     0xf2800500, 0xfe800f50,
   1873   1.5  christos     "vabal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1874   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1875   1.5  christos     0xf2800700, 0xfe800f50,
   1876   1.5  christos     "vabdl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1877   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1878   1.5  christos     0xf2800800, 0xfe800f50,
   1879   1.5  christos     "vmlal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1880   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1881   1.5  christos     0xf2800a00, 0xfe800f50,
   1882   1.5  christos     "vmlsl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1883   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1884   1.5  christos     0xf2800c00, 0xfe800f50,
   1885   1.5  christos     "vmull%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1886   1.1  christos 
   1887   1.1  christos   /* Two registers and a scalar.  */
   1888   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1889   1.5  christos     0xf2800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1890   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1891   1.6  christos     0xf2800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
   1892   1.6  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1893   1.6  christos     0xf2900140, 0xffb00f50, "vmla%c.f16\t%12-15,22D, %16-19,7D, %D"},
   1894   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1895   1.5  christos     0xf2800340, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1896   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1897   1.5  christos     0xf2800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1898   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1899   1.6  christos     0xf2800540, 0xff900f50, "vmls%c.f%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1900   1.6  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1901   1.6  christos     0xf2900540, 0xffb00f50, "vmls%c.f16\t%12-15,22D, %16-19,7D, %D"},
   1902   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1903   1.5  christos     0xf2800740, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1904   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1905   1.5  christos     0xf2800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1906   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1907   1.6  christos     0xf2800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
   1908   1.6  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1909   1.6  christos     0xf2900940, 0xffb00f50, "vmul%c.f16\t%12-15,22D, %16-19,7D, %D"},
   1910   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1911   1.5  christos     0xf2800b40, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1912   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1913   1.5  christos     0xf2800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1914   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1915   1.5  christos     0xf2800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1916   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1917   1.5  christos     0xf3800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1918   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1919   1.6  christos     0xf3800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
   1920   1.6  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1921   1.6  christos     0xf3900140, 0xffb00f50, "vmla%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
   1922   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1923   1.5  christos     0xf3800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1924   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1925   1.6  christos     0xf3800540, 0xff900f50, "vmls%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
   1926   1.6  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1927   1.6  christos     0xf3900540, 0xffb00f50, "vmls%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
   1928   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1929   1.5  christos     0xf3800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1930   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1931   1.6  christos     0xf3800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
   1932   1.6  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1933   1.6  christos     0xf3900940, 0xffb00f50, "vmul%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
   1934   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1935   1.5  christos     0xf3800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1936   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1937   1.5  christos     0xf3800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1938   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1939   1.5  christos     0xf2800240, 0xfe800f50,
   1940   1.5  christos     "vmlal%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1941   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1942   1.5  christos     0xf2800640, 0xfe800f50,
   1943   1.5  christos     "vmlsl%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1944   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1945   1.5  christos     0xf2800a40, 0xfe800f50,
   1946   1.5  christos     "vmull%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1947   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1948   1.5  christos     0xf2800e40, 0xff800f50,
   1949   1.5  christos    "vqrdmlah%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1950   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1951   1.5  christos     0xf2800f40, 0xff800f50,
   1952   1.5  christos    "vqrdmlsh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1953   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1954   1.5  christos     0xf3800e40, 0xff800f50,
   1955   1.5  christos    "vqrdmlah%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1956   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1957   1.5  christos     0xf3800f40, 0xff800f50,
   1958   1.5  christos    "vqrdmlsh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"
   1959   1.5  christos   },
   1960   1.1  christos 
   1961   1.1  christos   /* Element and structure load/store.  */
   1962   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1963   1.5  christos     0xf4a00fc0, 0xffb00fc0, "vld4%c.32\t%C"},
   1964   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1965   1.5  christos     0xf4a00c00, 0xffb00f00, "vld1%c.%6-7S2\t%C"},
   1966   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1967   1.5  christos     0xf4a00d00, 0xffb00f00, "vld2%c.%6-7S2\t%C"},
   1968   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1969   1.5  christos     0xf4a00e00, 0xffb00f00, "vld3%c.%6-7S2\t%C"},
   1970   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1971   1.5  christos     0xf4a00f00, 0xffb00f00, "vld4%c.%6-7S2\t%C"},
   1972   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1973   1.5  christos     0xf4000200, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1974   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1975   1.5  christos     0xf4000300, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
   1976   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1977   1.5  christos     0xf4000400, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
   1978   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1979   1.5  christos     0xf4000500, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
   1980   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1981   1.5  christos     0xf4000600, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1982   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1983   1.5  christos     0xf4000700, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1984   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1985   1.5  christos     0xf4000800, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
   1986   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1987   1.5  christos     0xf4000900, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
   1988   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1989   1.5  christos     0xf4000a00, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1990   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1991   1.5  christos     0xf4000000, 0xff900e00, "v%21?ls%21?dt4%c.%6-7S2\t%A"},
   1992   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1993   1.5  christos     0xf4800000, 0xff900300, "v%21?ls%21?dt1%c.%10-11S2\t%B"},
   1994   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1995   1.5  christos     0xf4800100, 0xff900300, "v%21?ls%21?dt2%c.%10-11S2\t%B"},
   1996   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1997   1.5  christos     0xf4800200, 0xff900300, "v%21?ls%21?dt3%c.%10-11S2\t%B"},
   1998   1.5  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1999   1.5  christos     0xf4800300, 0xff900300, "v%21?ls%21?dt4%c.%10-11S2\t%B"},
   2000   1.1  christos 
   2001   1.5  christos   {ARM_FEATURE_CORE_LOW (0), 0 ,0, 0}
   2002   1.1  christos };
   2003   1.1  christos 
   2004   1.9  christos /* mve opcode table.  */
   2005   1.9  christos 
   2006   1.9  christos /* print_insn_mve recognizes the following format control codes:
   2007   1.9  christos 
   2008   1.9  christos    %%			%
   2009   1.9  christos 
   2010   1.9  christos    %a			print '+' or '-' or imm offset in vldr[bhwd] and
   2011   1.9  christos 			vstr[bhwd]
   2012   1.9  christos    %c			print condition code
   2013   1.9  christos    %d			print addr mode of MVE vldr[bhw] and vstr[bhw]
   2014   1.9  christos    %u			print 'U' (unsigned) or 'S' for various mve instructions
   2015   1.9  christos    %i			print MVE predicate(s) for vpt and vpst
   2016   1.9  christos    %j			print a 5-bit immediate from hw2[14:12,7:6]
   2017   1.9  christos    %k			print 48 if the 7th position bit is set else print 64.
   2018   1.9  christos    %m			print rounding mode for vcvt and vrint
   2019   1.9  christos    %n			print vector comparison code for predicated instruction
   2020   1.9  christos    %s			print size for various vcvt instructions
   2021   1.9  christos    %v			print vector predicate for instruction in predicated
   2022   1.9  christos 			block
   2023   1.9  christos    %o			print offset scaled for vldr[hwd] and vstr[hwd]
   2024   1.9  christos    %w			print writeback mode for MVE v{st,ld}[24]
   2025   1.9  christos    %B			print v{st,ld}[24] any one operands
   2026   1.9  christos    %E			print vmov, vmvn, vorr, vbic encoded constant
   2027   1.9  christos    %N			print generic index for vmov
   2028   1.9  christos    %T			print bottom ('b') or top ('t') of source register
   2029   1.9  christos    %X			print exchange field in vmla* instructions
   2030   1.9  christos 
   2031   1.9  christos    %<bitfield>r		print as an ARM register
   2032   1.9  christos    %<bitfield>d		print the bitfield in decimal
   2033   1.9  christos    %<bitfield>A		print accumulate or not
   2034   1.9  christos    %<bitfield>c		print bitfield as a condition code
   2035   1.9  christos    %<bitfield>C		print bitfield as an inverted condition code
   2036   1.9  christos    %<bitfield>Q		print as a MVE Q register
   2037   1.9  christos    %<bitfield>F		print as a MVE S register
   2038   1.9  christos    %<bitfield>Z		as %<>r but r15 is ZR instead of PC and r13 is
   2039   1.9  christos 			UNPREDICTABLE
   2040   1.9  christos 
   2041   1.9  christos    %<bitfield>S		as %<>r but r15 or r13 is UNPREDICTABLE
   2042   1.9  christos    %<bitfield>s		print size for vector predicate & non VMOV instructions
   2043   1.9  christos    %<bitfield>I		print carry flag or not
   2044   1.9  christos    %<bitfield>i		print immediate for vstr/vldr reg +/- imm
   2045   1.9  christos    %<bitfield>h		print high half of 64-bit destination reg
   2046   1.9  christos    %<bitfield>k		print immediate for vector conversion instruction
   2047   1.9  christos    %<bitfield>l		print low half of 64-bit destination reg
   2048   1.9  christos    %<bitfield>o		print rotate value for vcmul
   2049   1.9  christos    %<bitfield>u		print immediate value for vddup/vdwdup
   2050   1.9  christos    %<bitfield>x		print the bitfield in hex.
   2051   1.9  christos   */
   2052   1.9  christos 
   2053   1.9  christos static const struct mopcode32 mve_opcodes[] =
   2054   1.9  christos {
   2055   1.9  christos   /* MVE.  */
   2056   1.9  christos 
   2057   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2058   1.9  christos    MVE_VPST,
   2059   1.9  christos    0xfe310f4d, 0xffbf1fff,
   2060   1.9  christos    "vpst%i"
   2061   1.9  christos   },
   2062   1.9  christos 
   2063   1.9  christos   /* Floating point VPT T1.  */
   2064   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2065   1.9  christos    MVE_VPT_FP_T1,
   2066   1.9  christos    0xee310f00, 0xefb10f50,
   2067   1.9  christos    "vpt%i.f%28s\t%n, %17-19Q, %1-3,5Q"},
   2068   1.9  christos   /* Floating point VPT T2.  */
   2069   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2070   1.9  christos    MVE_VPT_FP_T2,
   2071   1.9  christos    0xee310f40, 0xefb10f50,
   2072   1.9  christos    "vpt%i.f%28s\t%n, %17-19Q, %0-3Z"},
   2073   1.9  christos 
   2074   1.9  christos   /* Vector VPT T1.  */
   2075   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2076   1.9  christos    MVE_VPT_VEC_T1,
   2077   1.9  christos    0xfe010f00, 0xff811f51,
   2078   1.9  christos    "vpt%i.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2079   1.9  christos   /* Vector VPT T2.  */
   2080   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2081   1.9  christos    MVE_VPT_VEC_T2,
   2082   1.9  christos    0xfe010f01, 0xff811f51,
   2083   1.9  christos    "vpt%i.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2084   1.9  christos   /* Vector VPT T3.  */
   2085   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2086   1.9  christos    MVE_VPT_VEC_T3,
   2087   1.9  christos    0xfe011f00, 0xff811f50,
   2088   1.9  christos    "vpt%i.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2089   1.9  christos   /* Vector VPT T4.  */
   2090   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2091   1.9  christos    MVE_VPT_VEC_T4,
   2092   1.9  christos    0xfe010f40, 0xff811f70,
   2093   1.9  christos    "vpt%i.i%20-21s\t%n, %17-19Q, %0-3Z"},
   2094   1.9  christos   /* Vector VPT T5.  */
   2095   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2096   1.9  christos    MVE_VPT_VEC_T5,
   2097   1.9  christos    0xfe010f60, 0xff811f70,
   2098   1.9  christos    "vpt%i.u%20-21s\t%n, %17-19Q, %0-3Z"},
   2099   1.9  christos   /* Vector VPT T6.  */
   2100   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2101   1.9  christos    MVE_VPT_VEC_T6,
   2102   1.9  christos    0xfe011f40, 0xff811f50,
   2103   1.9  christos    "vpt%i.s%20-21s\t%n, %17-19Q, %0-3Z"},
   2104   1.9  christos 
   2105   1.9  christos   /* Vector VBIC immediate.  */
   2106   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2107   1.9  christos    MVE_VBIC_IMM,
   2108   1.9  christos    0xef800070, 0xefb81070,
   2109   1.9  christos    "vbic%v.i%8-11s\t%13-15,22Q, %E"},
   2110   1.9  christos 
   2111   1.9  christos   /* Vector VBIC register.  */
   2112   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2113   1.9  christos    MVE_VBIC_REG,
   2114   1.9  christos    0xef100150, 0xffb11f51,
   2115   1.9  christos    "vbic%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2116   1.9  christos 
   2117   1.9  christos   /* Vector VABAV.  */
   2118   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2119   1.9  christos    MVE_VABAV,
   2120   1.9  christos    0xee800f01, 0xefc10f51,
   2121   1.9  christos    "vabav%v.%u%20-21s\t%12-15r, %17-19,7Q, %1-3,5Q"},
   2122   1.9  christos 
   2123   1.9  christos   /* Vector VABD floating point.  */
   2124   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2125   1.9  christos    MVE_VABD_FP,
   2126   1.9  christos    0xff200d40, 0xffa11f51,
   2127   1.9  christos    "vabd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2128   1.9  christos 
   2129   1.9  christos   /* Vector VABD.  */
   2130   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2131   1.9  christos    MVE_VABD_VEC,
   2132   1.9  christos    0xef000740, 0xef811f51,
   2133   1.9  christos    "vabd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2134   1.9  christos 
   2135   1.9  christos   /* Vector VABS floating point.  */
   2136   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2137   1.9  christos    MVE_VABS_FP,
   2138   1.9  christos    0xFFB10740, 0xFFB31FD1,
   2139   1.9  christos    "vabs%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
   2140   1.9  christos   /* Vector VABS.  */
   2141   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2142   1.9  christos    MVE_VABS_VEC,
   2143   1.9  christos    0xffb10340, 0xffb31fd1,
   2144   1.9  christos    "vabs%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2145   1.9  christos 
   2146   1.9  christos   /* Vector VADD floating point T1.  */
   2147   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2148   1.9  christos    MVE_VADD_FP_T1,
   2149   1.9  christos    0xef000d40, 0xffa11f51,
   2150   1.9  christos    "vadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2151   1.9  christos   /* Vector VADD floating point T2.  */
   2152   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2153   1.9  christos    MVE_VADD_FP_T2,
   2154   1.9  christos    0xee300f40, 0xefb11f70,
   2155   1.9  christos    "vadd%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2156   1.9  christos   /* Vector VADD T1.  */
   2157   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2158   1.9  christos    MVE_VADD_VEC_T1,
   2159   1.9  christos    0xef000840, 0xff811f51,
   2160   1.9  christos    "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2161   1.9  christos   /* Vector VADD T2.  */
   2162   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2163   1.9  christos    MVE_VADD_VEC_T2,
   2164   1.9  christos    0xee010f40, 0xff811f70,
   2165   1.9  christos    "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2166   1.9  christos 
   2167   1.9  christos   /* Vector VADDLV.  */
   2168   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2169   1.9  christos    MVE_VADDLV,
   2170   1.9  christos    0xee890f00, 0xef8f1fd1,
   2171   1.9  christos    "vaddlv%5A%v.%u32\t%13-15l, %20-22h, %1-3Q"},
   2172   1.9  christos 
   2173   1.9  christos   /* Vector VADDV.  */
   2174   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2175   1.9  christos    MVE_VADDV,
   2176   1.9  christos    0xeef10f00, 0xeff31fd1,
   2177   1.9  christos    "vaddv%5A%v.%u%18-19s\t%13-15l, %1-3Q"},
   2178   1.9  christos 
   2179   1.9  christos   /* Vector VADC.  */
   2180   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2181   1.9  christos    MVE_VADC,
   2182   1.9  christos    0xee300f00, 0xffb10f51,
   2183   1.9  christos    "vadc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2184   1.9  christos 
   2185   1.9  christos   /* Vector VAND.  */
   2186   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2187   1.9  christos    MVE_VAND,
   2188   1.9  christos    0xef000150, 0xffb11f51,
   2189   1.9  christos    "vand%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2190   1.9  christos 
   2191   1.9  christos   /* Vector VBRSR register.  */
   2192   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2193   1.9  christos    MVE_VBRSR,
   2194   1.9  christos    0xfe011e60, 0xff811f70,
   2195   1.9  christos    "vbrsr%v.%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2196   1.9  christos 
   2197   1.9  christos   /* Vector VCADD floating point.  */
   2198   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2199   1.9  christos    MVE_VCADD_FP,
   2200   1.9  christos    0xfc800840, 0xfea11f51,
   2201  1.10  christos    "vcadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%24o%}"},
   2202   1.9  christos 
   2203   1.9  christos   /* Vector VCADD.  */
   2204   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2205   1.9  christos    MVE_VCADD_VEC,
   2206   1.9  christos    0xfe000f00, 0xff810f51,
   2207  1.10  christos    "vcadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%12o%}"},
   2208   1.9  christos 
   2209   1.9  christos   /* Vector VCLS.  */
   2210   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2211   1.9  christos    MVE_VCLS,
   2212   1.9  christos    0xffb00440, 0xffb31fd1,
   2213   1.9  christos    "vcls%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2214   1.9  christos 
   2215   1.9  christos   /* Vector VCLZ.  */
   2216   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2217   1.9  christos    MVE_VCLZ,
   2218   1.9  christos    0xffb004c0, 0xffb31fd1,
   2219   1.9  christos    "vclz%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
   2220   1.9  christos 
   2221   1.9  christos   /* Vector VCMLA.  */
   2222   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2223   1.9  christos    MVE_VCMLA_FP,
   2224   1.9  christos    0xfc200840, 0xfe211f51,
   2225  1.10  christos    "vcmla%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%23-24o%}"},
   2226   1.9  christos 
   2227   1.9  christos   /* Vector VCMP floating point T1.  */
   2228   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2229   1.9  christos    MVE_VCMP_FP_T1,
   2230   1.9  christos    0xee310f00, 0xeff1ef50,
   2231   1.9  christos    "vcmp%v.f%28s\t%n, %17-19Q, %1-3,5Q"},
   2232   1.9  christos 
   2233   1.9  christos   /* Vector VCMP floating point T2.  */
   2234   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2235   1.9  christos    MVE_VCMP_FP_T2,
   2236   1.9  christos    0xee310f40, 0xeff1ef50,
   2237   1.9  christos    "vcmp%v.f%28s\t%n, %17-19Q, %0-3Z"},
   2238   1.9  christos 
   2239   1.9  christos   /* Vector VCMP T1.  */
   2240   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2241   1.9  christos    MVE_VCMP_VEC_T1,
   2242   1.9  christos    0xfe010f00, 0xffc1ff51,
   2243   1.9  christos    "vcmp%v.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2244   1.9  christos   /* Vector VCMP T2.  */
   2245   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2246   1.9  christos    MVE_VCMP_VEC_T2,
   2247   1.9  christos    0xfe010f01, 0xffc1ff51,
   2248   1.9  christos    "vcmp%v.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2249   1.9  christos   /* Vector VCMP T3.  */
   2250   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2251   1.9  christos    MVE_VCMP_VEC_T3,
   2252   1.9  christos    0xfe011f00, 0xffc1ff50,
   2253   1.9  christos    "vcmp%v.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2254   1.9  christos   /* Vector VCMP T4.  */
   2255   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2256   1.9  christos    MVE_VCMP_VEC_T4,
   2257   1.9  christos    0xfe010f40, 0xffc1ff70,
   2258   1.9  christos    "vcmp%v.i%20-21s\t%n, %17-19Q, %0-3Z"},
   2259   1.9  christos   /* Vector VCMP T5.  */
   2260   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2261   1.9  christos    MVE_VCMP_VEC_T5,
   2262   1.9  christos    0xfe010f60, 0xffc1ff70,
   2263   1.9  christos    "vcmp%v.u%20-21s\t%n, %17-19Q, %0-3Z"},
   2264   1.9  christos   /* Vector VCMP T6.  */
   2265   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2266   1.9  christos    MVE_VCMP_VEC_T6,
   2267   1.9  christos    0xfe011f40, 0xffc1ff50,
   2268   1.9  christos    "vcmp%v.s%20-21s\t%n, %17-19Q, %0-3Z"},
   2269   1.9  christos 
   2270   1.9  christos   /* Vector VDUP.  */
   2271   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2272   1.9  christos    MVE_VDUP,
   2273   1.9  christos    0xeea00b10, 0xffb10f5f,
   2274   1.9  christos    "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
   2275   1.9  christos 
   2276   1.9  christos   /* Vector VEOR.  */
   2277   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2278   1.9  christos    MVE_VEOR,
   2279   1.9  christos    0xff000150, 0xffd11f51,
   2280   1.9  christos    "veor%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2281   1.9  christos 
   2282   1.9  christos   /* Vector VFMA, vector * scalar.  */
   2283   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2284   1.9  christos    MVE_VFMA_FP_SCALAR,
   2285   1.9  christos    0xee310e40, 0xefb11f70,
   2286   1.9  christos    "vfma%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2287   1.9  christos 
   2288   1.9  christos   /* Vector VFMA floating point.  */
   2289   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2290   1.9  christos    MVE_VFMA_FP,
   2291   1.9  christos    0xef000c50, 0xffa11f51,
   2292   1.9  christos    "vfma%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2293   1.9  christos 
   2294   1.9  christos   /* Vector VFMS floating point.  */
   2295   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2296   1.9  christos    MVE_VFMS_FP,
   2297   1.9  christos    0xef200c50, 0xffa11f51,
   2298   1.9  christos    "vfms%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2299   1.9  christos 
   2300   1.9  christos   /* Vector VFMAS, vector * scalar.  */
   2301   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2302   1.9  christos    MVE_VFMAS_FP_SCALAR,
   2303   1.9  christos    0xee311e40, 0xefb11f70,
   2304   1.9  christos    "vfmas%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2305   1.9  christos 
   2306   1.9  christos   /* Vector VHADD T1.  */
   2307   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2308   1.9  christos    MVE_VHADD_T1,
   2309   1.9  christos    0xef000040, 0xef811f51,
   2310   1.9  christos    "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2311   1.9  christos 
   2312   1.9  christos   /* Vector VHADD T2.  */
   2313   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2314   1.9  christos    MVE_VHADD_T2,
   2315   1.9  christos    0xee000f40, 0xef811f70,
   2316   1.9  christos    "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2317   1.9  christos 
   2318   1.9  christos   /* Vector VHSUB T1.  */
   2319   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2320   1.9  christos    MVE_VHSUB_T1,
   2321   1.9  christos    0xef000240, 0xef811f51,
   2322   1.9  christos    "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2323   1.9  christos 
   2324   1.9  christos   /* Vector VHSUB T2.  */
   2325   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2326   1.9  christos    MVE_VHSUB_T2,
   2327   1.9  christos    0xee001f40, 0xef811f70,
   2328   1.9  christos    "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2329   1.9  christos 
   2330   1.9  christos   /* Vector VCMUL.  */
   2331   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2332   1.9  christos    MVE_VCMUL_FP,
   2333   1.9  christos    0xee300e00, 0xefb10f50,
   2334  1.10  christos    "vcmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%0,12o%}"},
   2335   1.9  christos 
   2336   1.9  christos    /* Vector VCTP.  */
   2337   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2338   1.9  christos    MVE_VCTP,
   2339   1.9  christos    0xf000e801, 0xffc0ffff,
   2340   1.9  christos    "vctp%v.%20-21s\t%16-19r"},
   2341   1.9  christos 
   2342   1.9  christos   /* Vector VDUP.  */
   2343   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2344   1.9  christos    MVE_VDUP,
   2345   1.9  christos    0xeea00b10, 0xffb10f5f,
   2346   1.9  christos    "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
   2347   1.9  christos 
   2348   1.9  christos   /* Vector VRHADD.  */
   2349   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2350   1.9  christos    MVE_VRHADD,
   2351   1.9  christos    0xef000140, 0xef811f51,
   2352   1.9  christos    "vrhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2353   1.9  christos 
   2354   1.9  christos   /* Vector VCVT.  */
   2355   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2356   1.9  christos    MVE_VCVT_FP_FIX_VEC,
   2357   1.9  christos    0xef800c50, 0xef801cd1,
   2358  1.10  christos    "vcvt%v.%s\t%13-15,22Q, %1-3,5Q, %{I:#%16-21k%}"},
   2359   1.9  christos 
   2360   1.9  christos   /* Vector VCVT.  */
   2361   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2362   1.9  christos    MVE_VCVT_BETWEEN_FP_INT,
   2363   1.9  christos    0xffb30640, 0xffb31e51,
   2364   1.9  christos    "vcvt%v.%s\t%13-15,22Q, %1-3,5Q"},
   2365   1.9  christos 
   2366   1.9  christos   /* Vector VCVT between single and half-precision float, bottom half.  */
   2367   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2368   1.9  christos    MVE_VCVT_FP_HALF_FP,
   2369   1.9  christos    0xee3f0e01, 0xefbf1fd1,
   2370   1.9  christos    "vcvtb%v.%s\t%13-15,22Q, %1-3,5Q"},
   2371   1.9  christos 
   2372   1.9  christos   /* Vector VCVT between single and half-precision float, top half.  */
   2373   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2374   1.9  christos    MVE_VCVT_FP_HALF_FP,
   2375   1.9  christos    0xee3f1e01, 0xefbf1fd1,
   2376   1.9  christos    "vcvtt%v.%s\t%13-15,22Q, %1-3,5Q"},
   2377   1.9  christos 
   2378   1.9  christos   /* Vector VCVT.  */
   2379   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2380   1.9  christos    MVE_VCVT_FROM_FP_TO_INT,
   2381   1.9  christos    0xffb30040, 0xffb31c51,
   2382   1.9  christos    "vcvt%m%v.%s\t%13-15,22Q, %1-3,5Q"},
   2383   1.9  christos 
   2384   1.9  christos   /* Vector VDDUP.  */
   2385   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2386   1.9  christos    MVE_VDDUP,
   2387   1.9  christos    0xee011f6e, 0xff811f7e,
   2388  1.10  christos    "vddup%v.u%20-21s\t%13-15,22Q, %17-19l, %{I:#%0,7u%}"},
   2389   1.9  christos 
   2390   1.9  christos   /* Vector VDWDUP.  */
   2391   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2392   1.9  christos    MVE_VDWDUP,
   2393   1.9  christos    0xee011f60, 0xff811f70,
   2394  1.10  christos    "vdwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, %{I:#%0,7u%}"},
   2395   1.9  christos 
   2396   1.9  christos   /* Vector VHCADD.  */
   2397   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2398   1.9  christos    MVE_VHCADD,
   2399   1.9  christos    0xee000f00, 0xff810f51,
   2400  1.10  christos    "vhcadd%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%12o%}"},
   2401   1.9  christos 
   2402   1.9  christos   /* Vector VIWDUP.  */
   2403   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2404   1.9  christos    MVE_VIWDUP,
   2405   1.9  christos    0xee010f60, 0xff811f70,
   2406  1.10  christos    "viwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, %{I:#%0,7u%}"},
   2407   1.9  christos 
   2408   1.9  christos   /* Vector VIDUP.  */
   2409   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2410   1.9  christos    MVE_VIDUP,
   2411   1.9  christos    0xee010f6e, 0xff811f7e,
   2412  1.10  christos    "vidup%v.u%20-21s\t%13-15,22Q, %17-19l, %{I:#%0,7u%}"},
   2413   1.9  christos 
   2414   1.9  christos   /* Vector VLD2.  */
   2415   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2416   1.9  christos    MVE_VLD2,
   2417   1.9  christos    0xfc901e00, 0xff901e5f,
   2418   1.9  christos    "vld2%5d.%7-8s\t%B, [%16-19r]%w"},
   2419   1.9  christos 
   2420   1.9  christos   /* Vector VLD4.  */
   2421   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2422   1.9  christos    MVE_VLD4,
   2423   1.9  christos    0xfc901e01, 0xff901e1f,
   2424   1.9  christos    "vld4%5-6d.%7-8s\t%B, [%16-19r]%w"},
   2425   1.9  christos 
   2426   1.9  christos   /* Vector VLDRB gather load.  */
   2427   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2428   1.9  christos    MVE_VLDRB_GATHER_T1,
   2429   1.9  christos    0xec900e00, 0xefb01e50,
   2430   1.9  christos    "vldrb%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
   2431   1.9  christos 
   2432   1.9  christos   /* Vector VLDRH gather load.  */
   2433   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2434   1.9  christos    MVE_VLDRH_GATHER_T2,
   2435   1.9  christos    0xec900e10, 0xefb01e50,
   2436   1.9  christos    "vldrh%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   2437   1.9  christos 
   2438   1.9  christos   /* Vector VLDRW gather load.  */
   2439   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2440   1.9  christos    MVE_VLDRW_GATHER_T3,
   2441   1.9  christos    0xfc900f40, 0xffb01fd0,
   2442   1.9  christos    "vldrw%v.u32\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   2443   1.9  christos 
   2444   1.9  christos   /* Vector VLDRD gather load.  */
   2445   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2446   1.9  christos    MVE_VLDRD_GATHER_T4,
   2447   1.9  christos    0xec900fd0, 0xefb01fd0,
   2448   1.9  christos    "vldrd%v.u64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   2449   1.9  christos 
   2450   1.9  christos   /* Vector VLDRW gather load.  */
   2451   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2452   1.9  christos    MVE_VLDRW_GATHER_T5,
   2453   1.9  christos    0xfd101e00, 0xff111f00,
   2454  1.10  christos    "vldrw%v.u32\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   2455   1.9  christos 
   2456   1.9  christos   /* Vector VLDRD gather load, variant T6.  */
   2457   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2458   1.9  christos    MVE_VLDRD_GATHER_T6,
   2459   1.9  christos    0xfd101f00, 0xff111f00,
   2460  1.10  christos    "vldrd%v.u64\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   2461   1.9  christos 
   2462   1.9  christos   /* Vector VLDRB.  */
   2463   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2464   1.9  christos    MVE_VLDRB_T1,
   2465   1.9  christos    0xec100e00, 0xee581e00,
   2466   1.9  christos    "vldrb%v.%u%7-8s\t%13-15Q, %d"},
   2467   1.9  christos 
   2468   1.9  christos   /* Vector VLDRH.  */
   2469   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2470   1.9  christos    MVE_VLDRH_T2,
   2471   1.9  christos    0xec180e00, 0xee581e00,
   2472   1.9  christos    "vldrh%v.%u%7-8s\t%13-15Q, %d"},
   2473   1.9  christos 
   2474   1.9  christos   /* Vector VLDRB unsigned, variant T5.  */
   2475   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2476   1.9  christos    MVE_VLDRB_T5,
   2477   1.9  christos    0xec101e00, 0xfe101f80,
   2478   1.9  christos    "vldrb%v.u8\t%13-15,22Q, %d"},
   2479   1.9  christos 
   2480   1.9  christos   /* Vector VLDRH unsigned, variant T6.  */
   2481   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2482   1.9  christos    MVE_VLDRH_T6,
   2483   1.9  christos    0xec101e80, 0xfe101f80,
   2484   1.9  christos    "vldrh%v.u16\t%13-15,22Q, %d"},
   2485   1.9  christos 
   2486   1.9  christos   /* Vector VLDRW unsigned, variant T7.  */
   2487   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2488   1.9  christos    MVE_VLDRW_T7,
   2489   1.9  christos    0xec101f00, 0xfe101f80,
   2490   1.9  christos    "vldrw%v.u32\t%13-15,22Q, %d"},
   2491   1.9  christos 
   2492   1.9  christos   /* Vector VMAX.  */
   2493   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2494   1.9  christos    MVE_VMAX,
   2495   1.9  christos    0xef000640, 0xef811f51,
   2496   1.9  christos    "vmax%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2497   1.9  christos 
   2498   1.9  christos   /* Vector VMAXA.  */
   2499   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2500   1.9  christos    MVE_VMAXA,
   2501   1.9  christos    0xee330e81, 0xffb31fd1,
   2502   1.9  christos    "vmaxa%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2503   1.9  christos 
   2504   1.9  christos   /* Vector VMAXNM floating point.  */
   2505   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2506   1.9  christos    MVE_VMAXNM_FP,
   2507   1.9  christos    0xff000f50, 0xffa11f51,
   2508   1.9  christos    "vmaxnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2509   1.9  christos 
   2510   1.9  christos   /* Vector VMAXNMA floating point.  */
   2511   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2512   1.9  christos    MVE_VMAXNMA_FP,
   2513   1.9  christos    0xee3f0e81, 0xefbf1fd1,
   2514   1.9  christos    "vmaxnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
   2515   1.9  christos 
   2516   1.9  christos   /* Vector VMAXNMV floating point.  */
   2517   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2518   1.9  christos    MVE_VMAXNMV_FP,
   2519   1.9  christos    0xeeee0f00, 0xefff0fd1,
   2520   1.9  christos    "vmaxnmv%v.f%28s\t%12-15r, %1-3,5Q"},
   2521   1.9  christos 
   2522   1.9  christos   /* Vector VMAXNMAV floating point.  */
   2523   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2524   1.9  christos    MVE_VMAXNMAV_FP,
   2525   1.9  christos    0xeeec0f00, 0xefff0fd1,
   2526   1.9  christos    "vmaxnmav%v.f%28s\t%12-15r, %1-3,5Q"},
   2527   1.9  christos 
   2528   1.9  christos   /* Vector VMAXV.  */
   2529   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2530   1.9  christos    MVE_VMAXV,
   2531   1.9  christos    0xeee20f00, 0xeff30fd1,
   2532   1.9  christos    "vmaxv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
   2533   1.9  christos 
   2534   1.9  christos   /* Vector VMAXAV.  */
   2535   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2536   1.9  christos    MVE_VMAXAV,
   2537   1.9  christos    0xeee00f00, 0xfff30fd1,
   2538   1.9  christos    "vmaxav%v.s%18-19s\t%12-15r, %1-3,5Q"},
   2539   1.9  christos 
   2540   1.9  christos   /* Vector VMIN.  */
   2541   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2542   1.9  christos    MVE_VMIN,
   2543   1.9  christos    0xef000650, 0xef811f51,
   2544   1.9  christos    "vmin%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2545   1.9  christos 
   2546   1.9  christos   /* Vector VMINA.  */
   2547   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2548   1.9  christos    MVE_VMINA,
   2549   1.9  christos    0xee331e81, 0xffb31fd1,
   2550   1.9  christos    "vmina%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2551   1.9  christos 
   2552   1.9  christos   /* Vector VMINNM floating point.  */
   2553   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2554   1.9  christos    MVE_VMINNM_FP,
   2555   1.9  christos    0xff200f50, 0xffa11f51,
   2556   1.9  christos    "vminnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2557   1.9  christos 
   2558   1.9  christos   /* Vector VMINNMA floating point.  */
   2559   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2560   1.9  christos    MVE_VMINNMA_FP,
   2561   1.9  christos    0xee3f1e81, 0xefbf1fd1,
   2562   1.9  christos    "vminnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
   2563   1.9  christos 
   2564   1.9  christos   /* Vector VMINNMV floating point.  */
   2565   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2566   1.9  christos    MVE_VMINNMV_FP,
   2567   1.9  christos    0xeeee0f80, 0xefff0fd1,
   2568   1.9  christos    "vminnmv%v.f%28s\t%12-15r, %1-3,5Q"},
   2569   1.9  christos 
   2570   1.9  christos   /* Vector VMINNMAV floating point.  */
   2571   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2572   1.9  christos    MVE_VMINNMAV_FP,
   2573   1.9  christos    0xeeec0f80, 0xefff0fd1,
   2574   1.9  christos    "vminnmav%v.f%28s\t%12-15r, %1-3,5Q"},
   2575   1.9  christos 
   2576   1.9  christos   /* Vector VMINV.  */
   2577   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2578   1.9  christos    MVE_VMINV,
   2579   1.9  christos    0xeee20f80, 0xeff30fd1,
   2580   1.9  christos    "vminv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
   2581   1.9  christos 
   2582   1.9  christos   /* Vector VMINAV.  */
   2583   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2584   1.9  christos    MVE_VMINAV,
   2585   1.9  christos    0xeee00f80, 0xfff30fd1,
   2586   1.9  christos    "vminav%v.s%18-19s\t%12-15r, %1-3,5Q"},
   2587   1.9  christos 
   2588   1.9  christos   /* Vector VMLA.  */
   2589   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2590   1.9  christos    MVE_VMLA,
   2591   1.9  christos    0xee010e40, 0xef811f70,
   2592  1.11  christos    "vmla%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2593   1.9  christos 
   2594   1.9  christos   /* Vector VMLALDAV.  Note must appear before VMLADAV due to instruction
   2595   1.9  christos      opcode aliasing.  */
   2596   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2597   1.9  christos    MVE_VMLALDAV,
   2598   1.9  christos    0xee801e00, 0xef801f51,
   2599   1.9  christos    "vmlaldav%5Ax%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2600   1.9  christos 
   2601   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2602   1.9  christos    MVE_VMLALDAV,
   2603   1.9  christos    0xee800e00, 0xef801f51,
   2604   1.9  christos    "vmlalv%5A%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2605   1.9  christos 
   2606   1.9  christos   /* Vector VMLAV T1 variant, same as VMLADAV but with X == 0.  */
   2607   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2608   1.9  christos    MVE_VMLADAV_T1,
   2609   1.9  christos    0xeef00e00, 0xeff01f51,
   2610   1.9  christos    "vmlav%5A%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
   2611   1.9  christos 
   2612   1.9  christos   /* Vector VMLAV T2 variant, same as VMLADAV but with X == 0.  */
   2613   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2614   1.9  christos    MVE_VMLADAV_T2,
   2615   1.9  christos    0xeef00f00, 0xeff11f51,
   2616   1.9  christos    "vmlav%5A%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
   2617   1.9  christos 
   2618   1.9  christos   /* Vector VMLADAV T1 variant.  */
   2619   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2620   1.9  christos    MVE_VMLADAV_T1,
   2621   1.9  christos    0xeef01e00, 0xeff01f51,
   2622   1.9  christos    "vmladav%5Ax%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
   2623   1.9  christos 
   2624   1.9  christos   /* Vector VMLADAV T2 variant.  */
   2625   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2626   1.9  christos    MVE_VMLADAV_T2,
   2627   1.9  christos    0xeef01f00, 0xeff11f51,
   2628   1.9  christos    "vmladav%5Ax%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
   2629   1.9  christos 
   2630   1.9  christos   /* Vector VMLAS.  */
   2631   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2632   1.9  christos    MVE_VMLAS,
   2633   1.9  christos    0xee011e40, 0xef811f70,
   2634   1.9  christos    "vmlas%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2635   1.9  christos 
   2636   1.9  christos   /* Vector VRMLSLDAVH.  Note must appear before VMLSDAV due to instruction
   2637   1.9  christos      opcode aliasing.  */
   2638   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2639   1.9  christos    MVE_VRMLSLDAVH,
   2640   1.9  christos    0xfe800e01, 0xff810f51,
   2641   1.9  christos    "vrmlsldavh%5A%X%v.s32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2642   1.9  christos 
   2643   1.9  christos   /* Vector VMLSLDAV.  Note must appear before VMLSDAV due to instruction
   2644   1.9  christos      opcdoe aliasing.  */
   2645   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2646   1.9  christos    MVE_VMLSLDAV,
   2647   1.9  christos    0xee800e01, 0xff800f51,
   2648   1.9  christos    "vmlsldav%5A%X%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2649   1.9  christos 
   2650   1.9  christos   /* Vector VMLSDAV T1 Variant.  */
   2651   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2652   1.9  christos    MVE_VMLSDAV_T1,
   2653   1.9  christos    0xeef00e01, 0xfff00f51,
   2654   1.9  christos    "vmlsdav%5A%X%v.s%16s\t%13-15l, %17-19,7Q, %1-3Q"},
   2655   1.9  christos 
   2656   1.9  christos   /* Vector VMLSDAV T2 Variant.  */
   2657   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2658   1.9  christos    MVE_VMLSDAV_T2,
   2659   1.9  christos    0xfef00e01, 0xfff10f51,
   2660   1.9  christos    "vmlsdav%5A%X%v.s8\t%13-15l, %17-19,7Q, %1-3Q"},
   2661   1.9  christos 
   2662   1.9  christos   /* Vector VMOV between gpr and half precision register, op == 0.  */
   2663   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2664   1.9  christos    MVE_VMOV_HFP_TO_GP,
   2665   1.9  christos    0xee000910, 0xfff00f7f,
   2666   1.9  christos    "vmov.f16\t%7,16-19F, %12-15r"},
   2667   1.9  christos 
   2668   1.9  christos   /* Vector VMOV between gpr and half precision register, op == 1.  */
   2669   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2670   1.9  christos    MVE_VMOV_HFP_TO_GP,
   2671   1.9  christos    0xee100910, 0xfff00f7f,
   2672   1.9  christos    "vmov.f16\t%12-15r, %7,16-19F"},
   2673   1.9  christos 
   2674   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2675   1.9  christos    MVE_VMOV_GP_TO_VEC_LANE,
   2676   1.9  christos    0xee000b10, 0xff900f1f,
   2677  1.10  christos    "vmov%c.%5-6,21-22s\t%{R:%17-19,7Q[%N]%}, %12-15r"},
   2678   1.9  christos 
   2679   1.9  christos   /* Vector VORR immediate to vector.
   2680   1.9  christos      NOTE: MVE_VORR_IMM must appear in the table
   2681   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2682   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2683   1.9  christos    MVE_VORR_IMM,
   2684   1.9  christos    0xef800050, 0xefb810f0,
   2685   1.9  christos    "vorr%v.i%8-11s\t%13-15,22Q, %E"},
   2686   1.9  christos 
   2687   1.9  christos   /* Vector VQSHL T2 Variant.
   2688   1.9  christos      NOTE: MVE_VQSHL_T2 must appear in the table before
   2689   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2690   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2691   1.9  christos    MVE_VQSHL_T2,
   2692   1.9  christos    0xef800750, 0xef801fd1,
   2693  1.10  christos    "vqshl%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2694   1.9  christos 
   2695   1.9  christos   /* Vector VQSHLU T3 Variant
   2696   1.9  christos      NOTE: MVE_VQSHL_T2 must appear in the table before
   2697   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2698   1.9  christos 
   2699   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2700   1.9  christos    MVE_VQSHLU_T3,
   2701   1.9  christos    0xff800650, 0xff801fd1,
   2702  1.10  christos    "vqshlu%v.s%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2703   1.9  christos 
   2704   1.9  christos   /* Vector VRSHR
   2705   1.9  christos      NOTE: MVE_VRSHR must appear in the table before
   2706   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2707   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2708   1.9  christos    MVE_VRSHR,
   2709   1.9  christos    0xef800250, 0xef801fd1,
   2710  1.10  christos    "vrshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2711   1.9  christos 
   2712   1.9  christos   /* Vector VSHL.
   2713   1.9  christos      NOTE: MVE_VSHL must appear in the table before
   2714   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2715   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2716   1.9  christos    MVE_VSHL_T1,
   2717   1.9  christos    0xef800550, 0xff801fd1,
   2718  1.10  christos    "vshl%v.i%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2719   1.9  christos 
   2720   1.9  christos   /* Vector VSHR
   2721   1.9  christos      NOTE: MVE_VSHR must appear in the table before
   2722   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2723   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2724   1.9  christos    MVE_VSHR,
   2725   1.9  christos    0xef800050, 0xef801fd1,
   2726  1.10  christos    "vshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2727   1.9  christos 
   2728   1.9  christos   /* Vector VSLI
   2729   1.9  christos      NOTE: MVE_VSLI must appear in the table before
   2730   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2731   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2732   1.9  christos    MVE_VSLI,
   2733   1.9  christos    0xff800550, 0xff801fd1,
   2734  1.10  christos    "vsli%v.%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2735   1.9  christos 
   2736   1.9  christos   /* Vector VSRI
   2737   1.9  christos      NOTE: MVE_VSRI must appear in the table before
   2738   1.9  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2739   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2740   1.9  christos    MVE_VSRI,
   2741   1.9  christos    0xff800450, 0xff801fd1,
   2742  1.10  christos    "vsri%v.%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2743   1.9  christos 
   2744   1.9  christos   /* Vector VMOV immediate to vector,
   2745   1.9  christos      undefinded for cmode == 1111 */
   2746   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2747   1.9  christos    MVE_VMVN_IMM, 0xef800f70, 0xefb81ff0, UNDEFINED_INSTRUCTION},
   2748   1.9  christos 
   2749   1.9  christos   /* Vector VMOV immediate to vector,
   2750   1.9  christos      cmode == 1101 */
   2751   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2752   1.9  christos    MVE_VMOV_IMM_TO_VEC, 0xef800d50, 0xefb81fd0,
   2753   1.9  christos    "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
   2754   1.9  christos 
   2755   1.9  christos   /* Vector VMOV immediate to vector.  */
   2756   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2757   1.9  christos    MVE_VMOV_IMM_TO_VEC,
   2758   1.9  christos    0xef800050, 0xefb810d0,
   2759   1.9  christos    "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
   2760   1.9  christos 
   2761   1.9  christos   /* Vector VMOV two 32-bit lanes to two gprs, idx = 0.  */
   2762   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2763   1.9  christos    MVE_VMOV2_VEC_LANE_TO_GP,
   2764   1.9  christos    0xec000f00, 0xffb01ff0,
   2765  1.10  christos    "vmov%c\t%0-3r, %16-19r, %{R:%13-15,22Q[2]%}, %{R:%13-15,22Q[0]%}"},
   2766   1.9  christos 
   2767   1.9  christos   /* Vector VMOV two 32-bit lanes to two gprs, idx = 1.  */
   2768   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2769   1.9  christos    MVE_VMOV2_VEC_LANE_TO_GP,
   2770   1.9  christos    0xec000f10, 0xffb01ff0,
   2771  1.10  christos    "vmov%c\t%0-3r, %16-19r, %{R:%13-15,22Q[3]%}, %{R:%13-15,22Q[1]%}"},
   2772   1.9  christos 
   2773   1.9  christos   /* Vector VMOV Two gprs to two 32-bit lanes, idx = 0.  */
   2774   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2775   1.9  christos    MVE_VMOV2_GP_TO_VEC_LANE,
   2776   1.9  christos    0xec100f00, 0xffb01ff0,
   2777  1.10  christos    "vmov%c\t%{R:%13-15,22Q[2]%}, %{R:%13-15,22Q[0]%}, %0-3r, %16-19r"},
   2778   1.9  christos 
   2779   1.9  christos   /* Vector VMOV Two gprs to two 32-bit lanes, idx = 1.  */
   2780   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2781   1.9  christos    MVE_VMOV2_GP_TO_VEC_LANE,
   2782   1.9  christos    0xec100f10, 0xffb01ff0,
   2783  1.10  christos    "vmov%c\t%{R:%13-15,22Q[3]%}, %{R:%13-15,22Q[1]%}, %0-3r, %16-19r"},
   2784   1.9  christos 
   2785   1.9  christos   /* Vector VMOV Vector lane to gpr.  */
   2786   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2787   1.9  christos    MVE_VMOV_VEC_LANE_TO_GP,
   2788   1.9  christos    0xee100b10, 0xff100f1f,
   2789  1.10  christos    "vmov%c.%u%5-6,21-22s\t%12-15r, %{R:%17-19,7Q[%N]%}"},
   2790   1.9  christos 
   2791   1.9  christos   /* Vector VSHLL T1 Variant.  Note: VSHLL T1 must appear before MVE_VMOVL due
   2792   1.9  christos      to instruction opcode aliasing.  */
   2793   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2794   1.9  christos    MVE_VSHLL_T1,
   2795   1.9  christos    0xeea00f40, 0xefa00fd1,
   2796  1.10  christos    "vshll%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2797   1.9  christos 
   2798   1.9  christos   /* Vector VMOVL long.  */
   2799   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2800   1.9  christos    MVE_VMOVL,
   2801   1.9  christos    0xeea00f40, 0xefa70fd1,
   2802   1.9  christos    "vmovl%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q"},
   2803   1.9  christos 
   2804   1.9  christos   /* Vector VMOV and narrow.  */
   2805   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2806   1.9  christos    MVE_VMOVN,
   2807   1.9  christos    0xfe310e81, 0xffb30fd1,
   2808   1.9  christos    "vmovn%T%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
   2809   1.9  christos 
   2810   1.9  christos   /* Floating point move extract.  */
   2811   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2812   1.9  christos    MVE_VMOVX,
   2813   1.9  christos    0xfeb00a40, 0xffbf0fd0,
   2814   1.9  christos    "vmovx.f16\t%22,12-15F, %5,0-3F"},
   2815   1.9  christos 
   2816   1.9  christos   /* Vector VMUL floating-point T1 variant.  */
   2817   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2818   1.9  christos    MVE_VMUL_FP_T1,
   2819   1.9  christos    0xff000d50, 0xffa11f51,
   2820   1.9  christos    "vmul%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2821   1.9  christos 
   2822   1.9  christos   /* Vector VMUL floating-point T2 variant.  */
   2823   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2824   1.9  christos    MVE_VMUL_FP_T2,
   2825   1.9  christos    0xee310e60, 0xefb11f70,
   2826   1.9  christos    "vmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2827   1.9  christos 
   2828   1.9  christos   /* Vector VMUL T1 variant.  */
   2829   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2830   1.9  christos    MVE_VMUL_VEC_T1,
   2831   1.9  christos    0xef000950, 0xff811f51,
   2832   1.9  christos    "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2833   1.9  christos 
   2834   1.9  christos   /* Vector VMUL T2 variant.  */
   2835   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2836   1.9  christos    MVE_VMUL_VEC_T2,
   2837   1.9  christos    0xee011e60, 0xff811f70,
   2838   1.9  christos    "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2839   1.9  christos 
   2840   1.9  christos   /* Vector VMULH.  */
   2841   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2842   1.9  christos    MVE_VMULH,
   2843   1.9  christos    0xee010e01, 0xef811f51,
   2844   1.9  christos    "vmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2845   1.9  christos 
   2846   1.9  christos   /* Vector VRMULH.  */
   2847   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2848   1.9  christos    MVE_VRMULH,
   2849   1.9  christos    0xee011e01, 0xef811f51,
   2850   1.9  christos    "vrmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2851   1.9  christos 
   2852   1.9  christos   /* Vector VMULL integer.  */
   2853   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2854   1.9  christos    MVE_VMULL_INT,
   2855   1.9  christos    0xee010e00, 0xef810f51,
   2856   1.9  christos    "vmull%T%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2857   1.9  christos 
   2858   1.9  christos   /* Vector VMULL polynomial.  */
   2859   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2860   1.9  christos    MVE_VMULL_POLY,
   2861   1.9  christos    0xee310e00, 0xefb10f51,
   2862   1.9  christos    "vmull%T%v.%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2863   1.9  christos 
   2864   1.9  christos   /* Vector VMVN immediate to vector.  */
   2865   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2866   1.9  christos    MVE_VMVN_IMM,
   2867   1.9  christos    0xef800070, 0xefb810f0,
   2868   1.9  christos    "vmvn%v.i%8-11s\t%13-15,22Q, %E"},
   2869   1.9  christos 
   2870   1.9  christos   /* Vector VMVN register.  */
   2871   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2872   1.9  christos    MVE_VMVN_REG,
   2873   1.9  christos    0xffb005c0, 0xffbf1fd1,
   2874   1.9  christos    "vmvn%v\t%13-15,22Q, %1-3,5Q"},
   2875   1.9  christos 
   2876   1.9  christos   /* Vector VNEG floating point.  */
   2877   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2878   1.9  christos    MVE_VNEG_FP,
   2879   1.9  christos    0xffb107c0, 0xffb31fd1,
   2880   1.9  christos    "vneg%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
   2881   1.9  christos 
   2882   1.9  christos   /* Vector VNEG.  */
   2883   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2884   1.9  christos    MVE_VNEG_VEC,
   2885   1.9  christos    0xffb103c0, 0xffb31fd1,
   2886   1.9  christos    "vneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2887   1.9  christos 
   2888   1.9  christos   /* Vector VORN, vector bitwise or not.  */
   2889   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2890   1.9  christos    MVE_VORN,
   2891   1.9  christos    0xef300150, 0xffb11f51,
   2892   1.9  christos    "vorn%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2893   1.9  christos 
   2894   1.9  christos   /* Vector VORR register.  */
   2895   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2896   1.9  christos    MVE_VORR_REG,
   2897   1.9  christos    0xef200150, 0xffb11f51,
   2898   1.9  christos    "vorr%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2899   1.9  christos 
   2900   1.9  christos   /* Vector VMOV, vector to vector move. While decoding MVE_VORR_REG if
   2901   1.9  christos      "Qm==Qn", VORR should replaced by its alias VMOV. For that to happen
   2902   1.9  christos      MVE_VMOV_VEC_TO_VEC need to placed after MVE_VORR_REG in this mve_opcodes
   2903   1.9  christos      array.  */
   2904   1.9  christos 
   2905   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2906   1.9  christos    MVE_VMOV_VEC_TO_VEC,
   2907   1.9  christos    0xef200150, 0xffb11f51,
   2908   1.9  christos    "vmov%v\t%13-15,22Q, %17-19,7Q"},
   2909   1.9  christos 
   2910   1.9  christos   /* Vector VQDMULL T1 variant.  */
   2911   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2912   1.9  christos    MVE_VQDMULL_T1,
   2913   1.9  christos    0xee300f01, 0xefb10f51,
   2914   1.9  christos    "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2915   1.9  christos 
   2916   1.9  christos   /* Vector VPNOT.  */
   2917   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2918   1.9  christos    MVE_VPNOT,
   2919   1.9  christos    0xfe310f4d, 0xffffffff,
   2920   1.9  christos    "vpnot%v"},
   2921   1.9  christos 
   2922   1.9  christos   /* Vector VPSEL.  */
   2923   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2924   1.9  christos    MVE_VPSEL,
   2925   1.9  christos    0xfe310f01, 0xffb11f51,
   2926   1.9  christos    "vpsel%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2927   1.9  christos 
   2928   1.9  christos   /* Vector VQABS.  */
   2929   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2930   1.9  christos    MVE_VQABS,
   2931   1.9  christos    0xffb00740, 0xffb31fd1,
   2932   1.9  christos    "vqabs%v.s%18-19s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2933   1.9  christos 
   2934   1.9  christos   /* Vector VQADD T1 variant.  */
   2935   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2936   1.9  christos    MVE_VQADD_T1,
   2937   1.9  christos    0xef000050, 0xef811f51,
   2938   1.9  christos    "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2939   1.9  christos 
   2940   1.9  christos   /* Vector VQADD T2 variant.  */
   2941   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2942   1.9  christos    MVE_VQADD_T2,
   2943   1.9  christos    0xee000f60, 0xef811f70,
   2944   1.9  christos    "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2945   1.9  christos 
   2946   1.9  christos   /* Vector VQDMULL T2 variant.  */
   2947   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2948   1.9  christos    MVE_VQDMULL_T2,
   2949   1.9  christos    0xee300f60, 0xefb10f70,
   2950   1.9  christos    "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2951   1.9  christos 
   2952   1.9  christos   /* Vector VQMOVN.  */
   2953   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2954   1.9  christos    MVE_VQMOVN,
   2955   1.9  christos    0xee330e01, 0xefb30fd1,
   2956   1.9  christos    "vqmovn%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q"},
   2957   1.9  christos 
   2958   1.9  christos   /* Vector VQMOVUN.  */
   2959   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2960   1.9  christos    MVE_VQMOVUN,
   2961   1.9  christos    0xee310e81, 0xffb30fd1,
   2962   1.9  christos    "vqmovun%T%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2963   1.9  christos 
   2964   1.9  christos   /* Vector VQDMLADH.  */
   2965   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2966   1.9  christos    MVE_VQDMLADH,
   2967   1.9  christos    0xee000e00, 0xff810f51,
   2968   1.9  christos    "vqdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2969   1.9  christos 
   2970   1.9  christos   /* Vector VQRDMLADH.  */
   2971   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2972   1.9  christos    MVE_VQRDMLADH,
   2973   1.9  christos    0xee000e01, 0xff810f51,
   2974   1.9  christos    "vqrdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2975   1.9  christos 
   2976   1.9  christos   /* Vector VQDMLAH.  */
   2977   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2978   1.9  christos    MVE_VQDMLAH,
   2979   1.9  christos    0xee000e60, 0xff811f70,
   2980   1.9  christos    "vqdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2981   1.9  christos 
   2982   1.9  christos   /* Vector VQRDMLAH.  */
   2983   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2984   1.9  christos    MVE_VQRDMLAH,
   2985   1.9  christos    0xee000e40, 0xff811f70,
   2986   1.9  christos    "vqrdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2987   1.9  christos 
   2988   1.9  christos   /* Vector VQDMLASH.  */
   2989   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2990   1.9  christos    MVE_VQDMLASH,
   2991   1.9  christos    0xee001e60, 0xff811f70,
   2992   1.9  christos    "vqdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2993   1.9  christos 
   2994   1.9  christos   /* Vector VQRDMLASH.  */
   2995   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2996   1.9  christos    MVE_VQRDMLASH,
   2997   1.9  christos    0xee001e40, 0xff811f70,
   2998   1.9  christos    "vqrdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2999   1.9  christos 
   3000   1.9  christos   /* Vector VQDMLSDH.  */
   3001   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3002   1.9  christos    MVE_VQDMLSDH,
   3003   1.9  christos    0xfe000e00, 0xff810f51,
   3004   1.9  christos    "vqdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3005   1.9  christos 
   3006   1.9  christos   /* Vector VQRDMLSDH.  */
   3007   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3008   1.9  christos    MVE_VQRDMLSDH,
   3009   1.9  christos    0xfe000e01, 0xff810f51,
   3010   1.9  christos    "vqrdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3011   1.9  christos 
   3012   1.9  christos   /* Vector VQDMULH T1 variant.  */
   3013   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3014   1.9  christos    MVE_VQDMULH_T1,
   3015   1.9  christos    0xef000b40, 0xff811f51,
   3016   1.9  christos    "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3017   1.9  christos 
   3018   1.9  christos   /* Vector VQRDMULH T2 variant.  */
   3019   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3020   1.9  christos    MVE_VQRDMULH_T2,
   3021   1.9  christos    0xff000b40, 0xff811f51,
   3022   1.9  christos    "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3023   1.9  christos 
   3024   1.9  christos   /* Vector VQDMULH T3 variant.  */
   3025   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3026   1.9  christos    MVE_VQDMULH_T3,
   3027   1.9  christos    0xee010e60, 0xff811f70,
   3028   1.9  christos    "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3029   1.9  christos 
   3030   1.9  christos   /* Vector VQRDMULH T4 variant.  */
   3031   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3032   1.9  christos    MVE_VQRDMULH_T4,
   3033   1.9  christos    0xfe010e60, 0xff811f70,
   3034   1.9  christos    "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3035   1.9  christos 
   3036   1.9  christos   /* Vector VQNEG.  */
   3037   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3038   1.9  christos    MVE_VQNEG,
   3039   1.9  christos    0xffb007c0, 0xffb31fd1,
   3040   1.9  christos    "vqneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   3041   1.9  christos 
   3042   1.9  christos   /* Vector VQRSHL T1 variant.  */
   3043   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3044   1.9  christos    MVE_VQRSHL_T1,
   3045   1.9  christos    0xef000550, 0xef811f51,
   3046   1.9  christos    "vqrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   3047   1.9  christos 
   3048   1.9  christos   /* Vector VQRSHL T2 variant.  */
   3049   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3050   1.9  christos    MVE_VQRSHL_T2,
   3051   1.9  christos    0xee331ee0, 0xefb31ff0,
   3052   1.9  christos    "vqrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   3053   1.9  christos 
   3054   1.9  christos   /* Vector VQRSHRN.  */
   3055   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3056   1.9  christos    MVE_VQRSHRN,
   3057   1.9  christos    0xee800f41, 0xefa00fd1,
   3058  1.10  christos    "vqrshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3059   1.9  christos 
   3060   1.9  christos   /* Vector VQRSHRUN.  */
   3061   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3062   1.9  christos    MVE_VQRSHRUN,
   3063   1.9  christos    0xfe800fc0, 0xffa00fd1,
   3064  1.10  christos    "vqrshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3065   1.9  christos 
   3066   1.9  christos   /* Vector VQSHL T1 Variant.  */
   3067   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3068   1.9  christos    MVE_VQSHL_T1,
   3069   1.9  christos    0xee311ee0, 0xefb31ff0,
   3070   1.9  christos    "vqshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   3071   1.9  christos 
   3072   1.9  christos   /* Vector VQSHL T4 Variant.  */
   3073   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3074   1.9  christos    MVE_VQSHL_T4,
   3075   1.9  christos    0xef000450, 0xef811f51,
   3076   1.9  christos    "vqshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   3077   1.9  christos 
   3078   1.9  christos   /* Vector VQSHRN.  */
   3079   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3080   1.9  christos    MVE_VQSHRN,
   3081   1.9  christos    0xee800f40, 0xefa00fd1,
   3082  1.10  christos    "vqshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3083   1.9  christos 
   3084   1.9  christos   /* Vector VQSHRUN.  */
   3085   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3086   1.9  christos    MVE_VQSHRUN,
   3087   1.9  christos    0xee800fc0, 0xffa00fd1,
   3088  1.10  christos    "vqshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3089   1.9  christos 
   3090   1.9  christos   /* Vector VQSUB T1 Variant.  */
   3091   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3092   1.9  christos    MVE_VQSUB_T1,
   3093   1.9  christos    0xef000250, 0xef811f51,
   3094   1.9  christos    "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3095   1.9  christos 
   3096   1.9  christos   /* Vector VQSUB T2 Variant.  */
   3097   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3098   1.9  christos    MVE_VQSUB_T2,
   3099   1.9  christos    0xee001f60, 0xef811f70,
   3100   1.9  christos    "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3101   1.9  christos 
   3102   1.9  christos   /* Vector VREV16.  */
   3103   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3104   1.9  christos    MVE_VREV16,
   3105   1.9  christos    0xffb00140, 0xffb31fd1,
   3106   1.9  christos    "vrev16%v.8\t%13-15,22Q, %1-3,5Q"},
   3107   1.9  christos 
   3108   1.9  christos   /* Vector VREV32.  */
   3109   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3110   1.9  christos    MVE_VREV32,
   3111   1.9  christos    0xffb000c0, 0xffb31fd1,
   3112   1.9  christos    "vrev32%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
   3113   1.9  christos 
   3114   1.9  christos   /* Vector VREV64.  */
   3115   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3116   1.9  christos    MVE_VREV64,
   3117   1.9  christos    0xffb00040, 0xffb31fd1,
   3118   1.9  christos    "vrev64%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
   3119   1.9  christos 
   3120   1.9  christos   /* Vector VRINT floating point.  */
   3121   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   3122   1.9  christos    MVE_VRINT_FP,
   3123   1.9  christos    0xffb20440, 0xffb31c51,
   3124   1.9  christos    "vrint%m%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
   3125   1.9  christos 
   3126   1.9  christos   /* Vector VRMLALDAVH.  */
   3127   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3128   1.9  christos    MVE_VRMLALDAVH,
   3129   1.9  christos    0xee800f00, 0xef811f51,
   3130   1.9  christos    "vrmlalvh%5A%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   3131   1.9  christos 
   3132   1.9  christos   /* Vector VRMLALDAVH.  */
   3133   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3134   1.9  christos    MVE_VRMLALDAVH,
   3135   1.9  christos    0xee801f00, 0xef811f51,
   3136   1.9  christos    "vrmlaldavh%5Ax%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   3137   1.9  christos 
   3138   1.9  christos   /* Vector VRSHL T1 Variant.  */
   3139   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3140   1.9  christos    MVE_VRSHL_T1,
   3141   1.9  christos    0xef000540, 0xef811f51,
   3142   1.9  christos    "vrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   3143   1.9  christos 
   3144   1.9  christos   /* Vector VRSHL T2 Variant.  */
   3145   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3146   1.9  christos    MVE_VRSHL_T2,
   3147   1.9  christos    0xee331e60, 0xefb31ff0,
   3148   1.9  christos    "vrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   3149   1.9  christos 
   3150   1.9  christos   /* Vector VRSHRN.  */
   3151   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3152   1.9  christos    MVE_VRSHRN,
   3153   1.9  christos    0xfe800fc1, 0xffa00fd1,
   3154  1.10  christos    "vrshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3155   1.9  christos 
   3156   1.9  christos   /* Vector VSBC.  */
   3157   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3158   1.9  christos    MVE_VSBC,
   3159   1.9  christos    0xfe300f00, 0xffb10f51,
   3160   1.9  christos    "vsbc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3161   1.9  christos 
   3162   1.9  christos   /* Vector VSHL T2 Variant.  */
   3163   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3164   1.9  christos    MVE_VSHL_T2,
   3165   1.9  christos    0xee311e60, 0xefb31ff0,
   3166   1.9  christos    "vshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   3167   1.9  christos 
   3168   1.9  christos   /* Vector VSHL T3 Variant.  */
   3169   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3170   1.9  christos    MVE_VSHL_T3,
   3171   1.9  christos    0xef000440, 0xef811f51,
   3172   1.9  christos    "vshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   3173   1.9  christos 
   3174   1.9  christos   /* Vector VSHLC.  */
   3175   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3176   1.9  christos    MVE_VSHLC,
   3177   1.9  christos    0xeea00fc0, 0xffa01ff0,
   3178  1.10  christos    "vshlc%v\t%13-15,22Q, %0-3r, %{I:#%16-20d%}"},
   3179   1.9  christos 
   3180   1.9  christos   /* Vector VSHLL T2 Variant.  */
   3181   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3182   1.9  christos    MVE_VSHLL_T2,
   3183   1.9  christos    0xee310e01, 0xefb30fd1,
   3184  1.10  christos    "vshll%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q, %{I:#%18-19d%}"},
   3185   1.9  christos 
   3186   1.9  christos   /* Vector VSHRN.  */
   3187   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3188   1.9  christos    MVE_VSHRN,
   3189   1.9  christos    0xee800fc1, 0xffa00fd1,
   3190  1.10  christos    "vshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3191   1.9  christos 
   3192   1.9  christos   /* Vector VST2 no writeback.  */
   3193   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3194   1.9  christos    MVE_VST2,
   3195   1.9  christos    0xfc801e00, 0xffb01e5f,
   3196   1.9  christos    "vst2%5d.%7-8s\t%B, [%16-19r]"},
   3197   1.9  christos 
   3198   1.9  christos   /* Vector VST2 writeback.  */
   3199   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3200   1.9  christos    MVE_VST2,
   3201   1.9  christos    0xfca01e00, 0xffb01e5f,
   3202   1.9  christos    "vst2%5d.%7-8s\t%B, [%16-19r]!"},
   3203   1.9  christos 
   3204   1.9  christos   /* Vector VST4 no writeback.  */
   3205   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3206   1.9  christos    MVE_VST4,
   3207   1.9  christos    0xfc801e01, 0xffb01e1f,
   3208   1.9  christos    "vst4%5-6d.%7-8s\t%B, [%16-19r]"},
   3209   1.9  christos 
   3210   1.9  christos   /* Vector VST4 writeback.  */
   3211   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3212   1.9  christos    MVE_VST4,
   3213   1.9  christos    0xfca01e01, 0xffb01e1f,
   3214   1.9  christos    "vst4%5-6d.%7-8s\t%B, [%16-19r]!"},
   3215   1.9  christos 
   3216   1.9  christos   /* Vector VSTRB scatter store, T1 variant.  */
   3217   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3218   1.9  christos    MVE_VSTRB_SCATTER_T1,
   3219   1.9  christos    0xec800e00, 0xffb01e50,
   3220   1.9  christos    "vstrb%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
   3221   1.9  christos 
   3222   1.9  christos   /* Vector VSTRH scatter store, T2 variant.  */
   3223   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3224   1.9  christos    MVE_VSTRH_SCATTER_T2,
   3225   1.9  christos    0xec800e10, 0xffb01e50,
   3226   1.9  christos    "vstrh%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   3227   1.9  christos 
   3228   1.9  christos   /* Vector VSTRW scatter store, T3 variant.  */
   3229   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3230   1.9  christos    MVE_VSTRW_SCATTER_T3,
   3231   1.9  christos    0xec800e40, 0xffb01e50,
   3232   1.9  christos    "vstrw%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   3233   1.9  christos 
   3234   1.9  christos   /* Vector VSTRD scatter store, T4 variant.  */
   3235   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3236   1.9  christos    MVE_VSTRD_SCATTER_T4,
   3237   1.9  christos    0xec800fd0, 0xffb01fd0,
   3238   1.9  christos    "vstrd%v.64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   3239   1.9  christos 
   3240   1.9  christos   /* Vector VSTRW scatter store, T5 variant.  */
   3241   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3242   1.9  christos    MVE_VSTRW_SCATTER_T5,
   3243   1.9  christos    0xfd001e00, 0xff111f00,
   3244  1.10  christos    "vstrw%v.32\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   3245   1.9  christos 
   3246   1.9  christos   /* Vector VSTRD scatter store, T6 variant.  */
   3247   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3248   1.9  christos    MVE_VSTRD_SCATTER_T6,
   3249   1.9  christos    0xfd001f00, 0xff111f00,
   3250  1.10  christos    "vstrd%v.64\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   3251   1.9  christos 
   3252   1.9  christos   /* Vector VSTRB.  */
   3253   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3254   1.9  christos    MVE_VSTRB_T1,
   3255   1.9  christos    0xec000e00, 0xfe581e00,
   3256   1.9  christos    "vstrb%v.%7-8s\t%13-15Q, %d"},
   3257   1.9  christos 
   3258   1.9  christos   /* Vector VSTRH.  */
   3259   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3260   1.9  christos    MVE_VSTRH_T2,
   3261   1.9  christos    0xec080e00, 0xfe581e00,
   3262   1.9  christos    "vstrh%v.%7-8s\t%13-15Q, %d"},
   3263   1.9  christos 
   3264   1.9  christos   /* Vector VSTRB variant T5.  */
   3265   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3266   1.9  christos    MVE_VSTRB_T5,
   3267   1.9  christos    0xec001e00, 0xfe101f80,
   3268   1.9  christos    "vstrb%v.8\t%13-15,22Q, %d"},
   3269   1.9  christos 
   3270   1.9  christos   /* Vector VSTRH variant T6.  */
   3271   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3272   1.9  christos    MVE_VSTRH_T6,
   3273   1.9  christos    0xec001e80, 0xfe101f80,
   3274   1.9  christos    "vstrh%v.16\t%13-15,22Q, %d"},
   3275   1.9  christos 
   3276   1.9  christos   /* Vector VSTRW variant T7.  */
   3277   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3278   1.9  christos    MVE_VSTRW_T7,
   3279   1.9  christos    0xec001f00, 0xfe101f80,
   3280   1.9  christos    "vstrw%v.32\t%13-15,22Q, %d"},
   3281   1.9  christos 
   3282   1.9  christos   /* Vector VSUB floating point T1 variant.  */
   3283   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   3284   1.9  christos    MVE_VSUB_FP_T1,
   3285   1.9  christos    0xef200d40, 0xffa11f51,
   3286   1.9  christos    "vsub%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3287   1.9  christos 
   3288   1.9  christos   /* Vector VSUB floating point T2 variant.  */
   3289   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   3290   1.9  christos    MVE_VSUB_FP_T2,
   3291   1.9  christos    0xee301f40, 0xefb11f70,
   3292   1.9  christos    "vsub%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3293   1.9  christos 
   3294   1.9  christos   /* Vector VSUB T1 variant.  */
   3295   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3296   1.9  christos    MVE_VSUB_VEC_T1,
   3297   1.9  christos    0xff000840, 0xff811f51,
   3298   1.9  christos    "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3299   1.9  christos 
   3300   1.9  christos   /* Vector VSUB T2 variant.  */
   3301   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3302   1.9  christos    MVE_VSUB_VEC_T2,
   3303   1.9  christos    0xee011f40, 0xff811f70,
   3304   1.9  christos    "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3305   1.9  christos 
   3306   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3307   1.9  christos    MVE_ASRLI,
   3308   1.9  christos    0xea50012f, 0xfff1813f,
   3309   1.9  christos    "asrl%c\t%17-19l, %9-11h, %j"},
   3310   1.9  christos 
   3311   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3312   1.9  christos    MVE_ASRL,
   3313   1.9  christos    0xea50012d, 0xfff101ff,
   3314   1.9  christos    "asrl%c\t%17-19l, %9-11h, %12-15S"},
   3315   1.9  christos 
   3316   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3317   1.9  christos    MVE_LSLLI,
   3318   1.9  christos    0xea50010f, 0xfff1813f,
   3319   1.9  christos    "lsll%c\t%17-19l, %9-11h, %j"},
   3320   1.9  christos 
   3321   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3322   1.9  christos    MVE_LSLL,
   3323   1.9  christos    0xea50010d, 0xfff101ff,
   3324   1.9  christos    "lsll%c\t%17-19l, %9-11h, %12-15S"},
   3325   1.9  christos 
   3326   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3327   1.9  christos    MVE_LSRL,
   3328   1.9  christos    0xea50011f, 0xfff1813f,
   3329   1.9  christos    "lsrl%c\t%17-19l, %9-11h, %j"},
   3330   1.9  christos 
   3331   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3332   1.9  christos    MVE_SQRSHRL,
   3333   1.9  christos    0xea51012d, 0xfff1017f,
   3334   1.9  christos    "sqrshrl%c\t%17-19l, %9-11h, %k, %12-15S"},
   3335   1.9  christos 
   3336   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3337   1.9  christos    MVE_SQRSHR,
   3338   1.9  christos    0xea500f2d, 0xfff00fff,
   3339   1.9  christos    "sqrshr%c\t%16-19S, %12-15S"},
   3340   1.9  christos 
   3341   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3342   1.9  christos    MVE_SQSHLL,
   3343   1.9  christos    0xea51013f, 0xfff1813f,
   3344   1.9  christos    "sqshll%c\t%17-19l, %9-11h, %j"},
   3345   1.9  christos 
   3346   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3347   1.9  christos    MVE_SQSHL,
   3348   1.9  christos    0xea500f3f, 0xfff08f3f,
   3349   1.9  christos    "sqshl%c\t%16-19S, %j"},
   3350   1.9  christos 
   3351   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3352   1.9  christos    MVE_SRSHRL,
   3353   1.9  christos    0xea51012f, 0xfff1813f,
   3354   1.9  christos    "srshrl%c\t%17-19l, %9-11h, %j"},
   3355   1.9  christos 
   3356   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3357   1.9  christos    MVE_SRSHR,
   3358   1.9  christos    0xea500f2f, 0xfff08f3f,
   3359   1.9  christos    "srshr%c\t%16-19S, %j"},
   3360   1.9  christos 
   3361   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3362   1.9  christos    MVE_UQRSHLL,
   3363   1.9  christos    0xea51010d, 0xfff1017f,
   3364   1.9  christos    "uqrshll%c\t%17-19l, %9-11h, %k, %12-15S"},
   3365   1.9  christos 
   3366   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3367   1.9  christos    MVE_UQRSHL,
   3368   1.9  christos    0xea500f0d, 0xfff00fff,
   3369   1.9  christos    "uqrshl%c\t%16-19S, %12-15S"},
   3370   1.9  christos 
   3371   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3372   1.9  christos    MVE_UQSHLL,
   3373   1.9  christos     0xea51010f, 0xfff1813f,
   3374   1.9  christos    "uqshll%c\t%17-19l, %9-11h, %j"},
   3375   1.9  christos 
   3376   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3377   1.9  christos    MVE_UQSHL,
   3378   1.9  christos    0xea500f0f, 0xfff08f3f,
   3379   1.9  christos    "uqshl%c\t%16-19S, %j"},
   3380   1.9  christos 
   3381   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3382   1.9  christos    MVE_URSHRL,
   3383   1.9  christos     0xea51011f, 0xfff1813f,
   3384   1.9  christos    "urshrl%c\t%17-19l, %9-11h, %j"},
   3385   1.9  christos 
   3386   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3387   1.9  christos    MVE_URSHR,
   3388   1.9  christos    0xea500f1f, 0xfff08f3f,
   3389   1.9  christos    "urshr%c\t%16-19S, %j"},
   3390   1.9  christos 
   3391   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3392   1.9  christos    MVE_CSINC,
   3393   1.9  christos    0xea509000, 0xfff0f000,
   3394   1.9  christos    "csinc\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3395   1.9  christos 
   3396   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3397   1.9  christos    MVE_CSINV,
   3398   1.9  christos    0xea50a000, 0xfff0f000,
   3399   1.9  christos    "csinv\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3400   1.9  christos 
   3401   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3402   1.9  christos    MVE_CSET,
   3403   1.9  christos    0xea5f900f, 0xfffff00f,
   3404   1.9  christos    "cset\t%8-11S, %4-7C"},
   3405   1.9  christos 
   3406   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3407   1.9  christos    MVE_CSETM,
   3408   1.9  christos    0xea5fa00f, 0xfffff00f,
   3409   1.9  christos    "csetm\t%8-11S, %4-7C"},
   3410   1.9  christos 
   3411   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3412   1.9  christos    MVE_CSEL,
   3413   1.9  christos    0xea508000, 0xfff0f000,
   3414   1.9  christos    "csel\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3415   1.9  christos 
   3416   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3417   1.9  christos    MVE_CSNEG,
   3418   1.9  christos    0xea50b000, 0xfff0f000,
   3419   1.9  christos    "csneg\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3420   1.9  christos 
   3421   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3422   1.9  christos    MVE_CINC,
   3423   1.9  christos    0xea509000, 0xfff0f000,
   3424   1.9  christos    "cinc\t%8-11S, %16-19Z, %4-7C"},
   3425   1.9  christos 
   3426   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3427   1.9  christos    MVE_CINV,
   3428   1.9  christos    0xea50a000, 0xfff0f000,
   3429   1.9  christos    "cinv\t%8-11S, %16-19Z, %4-7C"},
   3430   1.9  christos 
   3431   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3432   1.9  christos    MVE_CNEG,
   3433   1.9  christos    0xea50b000, 0xfff0f000,
   3434   1.9  christos    "cneg\t%8-11S, %16-19Z, %4-7C"},
   3435   1.9  christos 
   3436   1.9  christos   {ARM_FEATURE_CORE_LOW (0),
   3437   1.9  christos    MVE_NONE,
   3438   1.9  christos    0x00000000, 0x00000000, 0}
   3439   1.9  christos };
   3440   1.9  christos 
   3441   1.1  christos /* Opcode tables: ARM, 16-bit Thumb, 32-bit Thumb.  All three are partially
   3442   1.1  christos    ordered: they must be searched linearly from the top to obtain a correct
   3443   1.1  christos    match.  */
   3444   1.1  christos 
   3445   1.1  christos /* print_insn_arm recognizes the following format control codes:
   3446   1.1  christos 
   3447   1.1  christos    %%			%
   3448   1.1  christos 
   3449   1.1  christos    %a			print address for ldr/str instruction
   3450   1.1  christos    %s                   print address for ldr/str halfword/signextend instruction
   3451   1.1  christos    %S                   like %s but allow UNPREDICTABLE addressing
   3452   1.1  christos    %b			print branch destination
   3453   1.1  christos    %c			print condition code (always bits 28-31)
   3454   1.1  christos    %m			print register mask for ldm/stm instruction
   3455   1.1  christos    %o			print operand2 (immediate or register + shift)
   3456   1.1  christos    %p			print 'p' iff bits 12-15 are 15
   3457   1.1  christos    %t			print 't' iff bit 21 set and bit 24 clear
   3458   1.1  christos    %B			print arm BLX(1) destination
   3459   1.1  christos    %C			print the PSR sub type.
   3460   1.1  christos    %U			print barrier type.
   3461   1.1  christos    %P			print address for pli instruction.
   3462   1.1  christos 
   3463   1.1  christos    %<bitfield>r		print as an ARM register
   3464   1.1  christos    %<bitfield>T		print as an ARM register + 1
   3465   1.1  christos    %<bitfield>R		as %r but r15 is UNPREDICTABLE
   3466   1.1  christos    %<bitfield>{r|R}u    as %{r|R} but if matches the other %u field then is UNPREDICTABLE
   3467   1.1  christos    %<bitfield>{r|R}U    as %{r|R} but if matches the other %U field then is UNPREDICTABLE
   3468   1.1  christos    %<bitfield>d		print the bitfield in decimal
   3469   1.6  christos    %<bitfield>W         print the bitfield plus one in decimal
   3470   1.1  christos    %<bitfield>x		print the bitfield in hex
   3471   1.1  christos    %<bitfield>X		print the bitfield as 1 hex digit without leading "0x"
   3472   1.6  christos 
   3473   1.1  christos    %<bitfield>'c	print specified char iff bitfield is all ones
   3474   1.1  christos    %<bitfield>`c	print specified char iff bitfield is all zeroes
   3475   1.1  christos    %<bitfield>?ab...    select from array of values in big endian order
   3476   1.1  christos 
   3477   1.1  christos    %e                   print arm SMI operand (bits 0..7,8..19).
   3478   1.1  christos    %E			print the LSB and WIDTH fields of a BFI or BFC instruction.
   3479   1.1  christos    %V                   print the 16-bit immediate field of a MOVT or MOVW instruction.
   3480   1.1  christos    %R			print the SPSR/CPSR or banked register of an MRS.  */
   3481   1.1  christos 
   3482   1.1  christos static const struct opcode32 arm_opcodes[] =
   3483   1.1  christos {
   3484   1.1  christos   /* ARM instructions.  */
   3485   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3486  1.10  christos     0xe1a00000, 0xffffffff, "nop\t\t\t@ (mov r0, r0)"},
   3487   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3488  1.10  christos     0xe7f000f0, 0xfff000f0, "udf\t%{I:#%e%}"},
   3489   1.5  christos 
   3490   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T | ARM_EXT_V5),
   3491   1.5  christos     0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
   3492   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   3493   1.5  christos     0x00000090, 0x0fe000f0, "mul%20's%c\t%16-19R, %0-3R, %8-11R"},
   3494   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   3495   1.5  christos     0x00200090, 0x0fe000f0, "mla%20's%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3496   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V2S),
   3497   1.5  christos     0x01000090, 0x0fb00ff0, "swp%22'b%c\t%12-15RU, %0-3Ru, [%16-19RuU]"},
   3498   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
   3499   1.5  christos     0x00800090, 0x0fa000f0,
   3500   1.5  christos     "%22?sumull%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3501   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
   3502   1.5  christos     0x00a00090, 0x0fa000f0,
   3503   1.5  christos     "%22?sumlal%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3504   1.1  christos 
   3505   1.6  christos   /* V8.2 RAS extension instructions.  */
   3506   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
   3507   1.6  christos     0xe320f010, 0xffffffff, "esb"},
   3508   1.6  christos 
   3509   1.9  christos   /* V8-R instructions.  */
   3510   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R),
   3511   1.9  christos     0xf57ff04c, 0xffffffff, "dfb"},
   3512   1.9  christos 
   3513   1.1  christos   /* V8 instructions.  */
   3514   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   3515   1.5  christos     0x0320f005, 0x0fffffff, "sevl"},
   3516   1.8  christos   /* Defined in V8 but is in NOP space so available to all arch.  */
   3517   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3518  1.10  christos     0xe1000070, 0xfff000f0, "hlt\t%{I:0x%16-19X%12-15X%8-11X%0-3X%}"},
   3519   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_ATOMICS),
   3520   1.5  christos     0x01800e90, 0x0ff00ff0, "stlex%c\t%12-15r, %0-3r, [%16-19R]"},
   3521   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3522   1.5  christos     0x01900e9f, 0x0ff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
   3523   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   3524   1.5  christos     0x01a00e90, 0x0ff00ff0, "stlexd%c\t%12-15r, %0-3r, %0-3T, [%16-19R]"},
   3525   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   3526   1.5  christos     0x01b00e9f, 0x0ff00fff, "ldaexd%c\t%12-15r, %12-15T, [%16-19R]"},
   3527   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3528   1.5  christos     0x01c00e90, 0x0ff00ff0, "stlexb%c\t%12-15r, %0-3r, [%16-19R]"},
   3529   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3530   1.5  christos     0x01d00e9f, 0x0ff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
   3531   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3532   1.5  christos     0x01e00e90, 0x0ff00ff0, "stlexh%c\t%12-15r, %0-3r, [%16-19R]"},
   3533   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3534   1.5  christos     0x01f00e9f, 0x0ff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
   3535   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3536   1.5  christos     0x0180fc90, 0x0ff0fff0, "stl%c\t%0-3r, [%16-19R]"},
   3537   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3538   1.5  christos     0x01900c9f, 0x0ff00fff, "lda%c\t%12-15r, [%16-19R]"},
   3539   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3540   1.5  christos     0x01c0fc90, 0x0ff0fff0, "stlb%c\t%0-3r, [%16-19R]"},
   3541   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3542   1.5  christos     0x01d00c9f, 0x0ff00fff, "ldab%c\t%12-15r, [%16-19R]"},
   3543   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3544   1.5  christos     0x01e0fc90, 0x0ff0fff0, "stlh%c\t%0-3r, [%16-19R]"},
   3545   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3546   1.6  christos     0x01f00c9f, 0x0ff00fff, "ldah%c\t%12-15r, [%16-19R]"},
   3547   1.1  christos   /* CRC32 instructions.  */
   3548   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3549   1.5  christos     0xe1000040, 0xfff00ff0, "crc32b\t%12-15R, %16-19R, %0-3R"},
   3550   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3551   1.5  christos     0xe1200040, 0xfff00ff0, "crc32h\t%12-15R, %16-19R, %0-3R"},
   3552   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3553   1.5  christos     0xe1400040, 0xfff00ff0, "crc32w\t%12-15R, %16-19R, %0-3R"},
   3554   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3555   1.5  christos     0xe1000240, 0xfff00ff0, "crc32cb\t%12-15R, %16-19R, %0-3R"},
   3556   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3557   1.5  christos     0xe1200240, 0xfff00ff0, "crc32ch\t%12-15R, %16-19R, %0-3R"},
   3558   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3559   1.5  christos     0xe1400240, 0xfff00ff0, "crc32cw\t%12-15R, %16-19R, %0-3R"},
   3560   1.5  christos 
   3561   1.5  christos   /* Privileged Access Never extension instructions.  */
   3562   1.5  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),
   3563  1.10  christos     0xf1100000, 0xfffffdff, "setpan\t%{I:#%9-9d%}"},
   3564   1.1  christos 
   3565   1.1  christos   /* Virtualization Extension instructions.  */
   3566   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x0160006e, 0x0fffffff, "eret%c"},
   3567   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x01400070, 0x0ff000f0, "hvc%c\t%e"},
   3568   1.1  christos 
   3569   1.1  christos   /* Integer Divide Extension instructions.  */
   3570   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
   3571   1.5  christos     0x0710f010, 0x0ff0f0f0, "sdiv%c\t%16-19r, %0-3r, %8-11r"},
   3572   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
   3573   1.5  christos     0x0730f010, 0x0ff0f0f0, "udiv%c\t%16-19r, %0-3r, %8-11r"},
   3574   1.1  christos 
   3575   1.1  christos   /* MP Extension instructions.  */
   3576   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf410f000, 0xfc70f000, "pldw\t%a"},
   3577   1.1  christos 
   3578   1.8  christos   /* Speculation Barriers.  */
   3579   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xe320f014, 0xffffffff, "csdb"},
   3580   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff040, 0xffffffff, "ssbb"},
   3581   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff044, 0xffffffff, "pssbb"},
   3582   1.8  christos 
   3583   1.1  christos   /* V7 instructions.  */
   3584   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf450f000, 0xfd70f000, "pli\t%P"},
   3585  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0x0320f0f0, 0x0ffffff0, "dbg%c\t%{I:#%0-3d%}"},
   3586   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff051, 0xfffffff3, "dmb\t%U"},
   3587   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff041, 0xfffffff3, "dsb\t%U"},
   3588   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff050, 0xfffffff0, "dmb\t%U"},
   3589   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff040, 0xfffffff0, "dsb\t%U"},
   3590   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff060, 0xfffffff0, "isb\t%U"},
   3591   1.6  christos    {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
   3592  1.10  christos     0x0320f000, 0x0fffffff, "nop%c\t{%{I:%0-7d%}}"},
   3593   1.1  christos 
   3594   1.1  christos   /* ARM V6T2 instructions.  */
   3595   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3596   1.5  christos     0x07c0001f, 0x0fe0007f, "bfc%c\t%12-15R, %E"},
   3597   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3598   1.5  christos     0x07c00010, 0x0fe00070, "bfi%c\t%12-15R, %0-3r, %E"},
   3599   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3600   1.5  christos     0x00600090, 0x0ff000f0, "mls%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3601   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3602   1.5  christos     0x002000b0, 0x0f3000f0, "strht%c\t%12-15R, %S"},
   3603   1.5  christos 
   3604   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3605   1.5  christos     0x00300090, 0x0f3000f0, UNDEFINED_INSTRUCTION },
   3606   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3607   1.5  christos     0x00300090, 0x0f300090, "ldr%6's%5?hbt%c\t%12-15R, %S"},
   3608   1.5  christos 
   3609   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   3610   1.5  christos     0x03000000, 0x0ff00000, "movw%c\t%12-15R, %V"},
   3611   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   3612   1.5  christos     0x03400000, 0x0ff00000, "movt%c\t%12-15R, %V"},
   3613   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3614   1.5  christos     0x06ff0f30, 0x0fff0ff0, "rbit%c\t%12-15R, %0-3R"},
   3615   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3616  1.10  christos     0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, %{I:#%7-11d%}, %{I:#%16-20W%}"},
   3617   1.1  christos 
   3618   1.1  christos   /* ARM Security extension instructions.  */
   3619   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),
   3620   1.5  christos     0x01600070, 0x0ff000f0, "smc%c\t%e"},
   3621   1.1  christos 
   3622   1.1  christos   /* ARM V6K instructions.  */
   3623   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3624   1.5  christos     0xf57ff01f, 0xffffffff, "clrex"},
   3625   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3626   1.5  christos     0x01d00f9f, 0x0ff00fff, "ldrexb%c\t%12-15R, [%16-19R]"},
   3627   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3628   1.5  christos     0x01b00f9f, 0x0ff00fff, "ldrexd%c\t%12-15r, [%16-19R]"},
   3629   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3630   1.5  christos     0x01f00f9f, 0x0ff00fff, "ldrexh%c\t%12-15R, [%16-19R]"},
   3631   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3632   1.5  christos     0x01c00f90, 0x0ff00ff0, "strexb%c\t%12-15R, %0-3R, [%16-19R]"},
   3633   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3634   1.5  christos     0x01a00f90, 0x0ff00ff0, "strexd%c\t%12-15R, %0-3r, [%16-19R]"},
   3635   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3636   1.5  christos     0x01e00f90, 0x0ff00ff0, "strexh%c\t%12-15R, %0-3R, [%16-19R]"},
   3637   1.1  christos 
   3638   1.8  christos   /* ARMv8.5-A instructions.  */
   3639   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf57ff070, 0xffffffff, "sb"},
   3640   1.8  christos 
   3641   1.1  christos   /* ARM V6K NOP hints.  */
   3642   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3643   1.5  christos     0x0320f001, 0x0fffffff, "yield%c"},
   3644   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3645   1.5  christos     0x0320f002, 0x0fffffff, "wfe%c"},
   3646   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3647   1.5  christos     0x0320f003, 0x0fffffff, "wfi%c"},
   3648   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3649   1.5  christos     0x0320f004, 0x0fffffff, "sev%c"},
   3650   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3651  1.10  christos     0x0320f000, 0x0fffff00, "nop%c\t{%{I:%0-7d%}}"},
   3652   1.1  christos 
   3653   1.1  christos   /* ARM V6 instructions.  */
   3654   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3655  1.10  christos     0xf1080000, 0xfffffe3f, "cpsie\t%{B:%8'a%7'i%6'f%}"},
   3656   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3657  1.11  christos     0xf10a0000, 0xfffffe20, "cpsie\t%{B:%8'a%7'i%6'f%}, %{I:#%0-4d%}"},
   3658   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3659  1.10  christos     0xf10C0000, 0xfffffe3f, "cpsid\t%{B:%8'a%7'i%6'f%}"},
   3660   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3661  1.11  christos     0xf10e0000, 0xfffffe20, "cpsid\t%{B:%8'a%7'i%6'f%}, %{I:#%0-4d%}"},
   3662   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3663  1.10  christos     0xf1000000, 0xfff1fe20, "cps\t%{I:#%0-4d%}"},
   3664   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3665   1.5  christos     0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15R, %16-19R, %0-3R"},
   3666   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3667  1.10  christos     0x06800010, 0x0ff00070, "pkhbt%c\t%12-15R, %16-19R, %0-3R, %{B:lsl%} %{I:#%7-11d%}"},
   3668   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3669  1.10  christos     0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15R, %16-19R, %0-3R, %{B:asr%} %{I:#32%}"},
   3670   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3671  1.10  christos     0x06800050, 0x0ff00070, "pkhtb%c\t%12-15R, %16-19R, %0-3R, %{B:asr%} %{I:#%7-11d%}"},
   3672   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3673  1.10  christos     0x01900f9f, 0x0ff00fff, "ldrex%c\t%{R:r%12-15d%}, [%16-19R]"},
   3674   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3675   1.5  christos     0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15R, %16-19R, %0-3R"},
   3676   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3677   1.5  christos     0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15R, %16-19R, %0-3R"},
   3678   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3679   1.5  christos     0x06200f30, 0x0ff00ff0, "qasx%c\t%12-15R, %16-19R, %0-3R"},
   3680   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3681   1.5  christos     0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15R, %16-19R, %0-3R"},
   3682   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3683   1.5  christos     0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15R, %16-19R, %0-3R"},
   3684   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3685   1.5  christos     0x06200f50, 0x0ff00ff0, "qsax%c\t%12-15R, %16-19R, %0-3R"},
   3686   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3687   1.5  christos     0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15R, %16-19R, %0-3R"},
   3688   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3689   1.5  christos     0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15R, %16-19R, %0-3R"},
   3690   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3691   1.5  christos     0x06100f30, 0x0ff00ff0, "sasx%c\t%12-15R, %16-19R, %0-3R"},
   3692   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3693   1.5  christos     0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15R, %16-19R, %0-3R"},
   3694   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3695   1.5  christos     0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15R, %16-19R, %0-3R"},
   3696   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3697   1.5  christos     0x06300f30, 0x0ff00ff0, "shasx%c\t%12-15R, %16-19R, %0-3R"},
   3698   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3699   1.5  christos     0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15R, %16-19R, %0-3R"},
   3700   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3701   1.5  christos     0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15R, %16-19R, %0-3R"},
   3702   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3703   1.5  christos     0x06300f50, 0x0ff00ff0, "shsax%c\t%12-15R, %16-19R, %0-3R"},
   3704   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3705   1.5  christos     0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15R, %16-19R, %0-3R"},
   3706   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3707   1.5  christos     0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15R, %16-19R, %0-3R"},
   3708   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3709   1.5  christos     0x06100f50, 0x0ff00ff0, "ssax%c\t%12-15R, %16-19R, %0-3R"},
   3710   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3711   1.5  christos     0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15R, %16-19R, %0-3R"},
   3712   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3713   1.5  christos     0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15R, %16-19R, %0-3R"},
   3714   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3715   1.5  christos     0x06500f30, 0x0ff00ff0, "uasx%c\t%12-15R, %16-19R, %0-3R"},
   3716   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3717   1.5  christos     0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15R, %16-19R, %0-3R"},
   3718   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3719   1.5  christos     0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15R, %16-19R, %0-3R"},
   3720   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3721   1.5  christos     0x06700f30, 0x0ff00ff0, "uhasx%c\t%12-15R, %16-19R, %0-3R"},
   3722   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3723   1.5  christos     0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15R, %16-19R, %0-3R"},
   3724   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3725   1.5  christos     0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15R, %16-19R, %0-3R"},
   3726   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3727   1.5  christos     0x06700f50, 0x0ff00ff0, "uhsax%c\t%12-15R, %16-19R, %0-3R"},
   3728   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3729   1.5  christos     0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15R, %16-19R, %0-3R"},
   3730   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3731   1.5  christos     0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15R, %16-19R, %0-3R"},
   3732   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3733   1.5  christos     0x06600f30, 0x0ff00ff0, "uqasx%c\t%12-15R, %16-19R, %0-3R"},
   3734   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3735   1.5  christos     0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15R, %16-19R, %0-3R"},
   3736   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3737   1.5  christos     0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15R, %16-19R, %0-3R"},
   3738   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3739   1.5  christos     0x06600f50, 0x0ff00ff0, "uqsax%c\t%12-15R, %16-19R, %0-3R"},
   3740   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3741   1.5  christos     0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15R, %16-19R, %0-3R"},
   3742   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3743   1.5  christos     0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15R, %16-19R, %0-3R"},
   3744   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3745   1.5  christos     0x06500f50, 0x0ff00ff0, "usax%c\t%12-15R, %16-19R, %0-3R"},
   3746   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3747   1.5  christos     0x06bf0f30, 0x0fff0ff0, "rev%c\t%12-15R, %0-3R"},
   3748   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3749   1.5  christos     0x06bf0fb0, 0x0fff0ff0, "rev16%c\t%12-15R, %0-3R"},
   3750   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3751   1.5  christos     0x06ff0fb0, 0x0fff0ff0, "revsh%c\t%12-15R, %0-3R"},
   3752   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3753   1.5  christos     0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t%16-19r%21'!"},
   3754   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3755   1.5  christos     0x06bf0070, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R"},
   3756   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3757  1.10  christos     0x06bf0470, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3758   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3759  1.10  christos     0x06bf0870, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3760   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3761  1.10  christos     0x06bf0c70, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3762   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3763   1.5  christos     0x068f0070, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R"},
   3764   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3765  1.10  christos     0x068f0470, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3766   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3767  1.10  christos     0x068f0870, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3768   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3769  1.10  christos     0x068f0c70, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3770   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3771   1.5  christos     0x06af0070, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R"},
   3772   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3773  1.10  christos     0x06af0470, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3774   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3775  1.10  christos     0x06af0870, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3776   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3777  1.10  christos     0x06af0c70, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3778   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3779   1.5  christos     0x06ff0070, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R"},
   3780   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3781  1.10  christos     0x06ff0470, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3782   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3783  1.10  christos     0x06ff0870, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3784   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3785  1.10  christos     0x06ff0c70, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3786   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3787   1.5  christos     0x06cf0070, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R"},
   3788   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3789  1.10  christos     0x06cf0470, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3790   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3791  1.10  christos     0x06cf0870, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3792   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3793  1.10  christos     0x06cf0c70, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3794   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3795   1.5  christos     0x06ef0070, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R"},
   3796   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3797  1.10  christos     0x06ef0470, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3798   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3799  1.10  christos     0x06ef0870, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3800   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3801  1.10  christos     0x06ef0c70, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3802   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3803   1.5  christos     0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R"},
   3804   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3805  1.10  christos     0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3806   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3807  1.10  christos     0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3808   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3809  1.10  christos     0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3810   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3811   1.5  christos     0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R"},
   3812   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3813  1.10  christos     0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3814   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3815  1.10  christos     0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3816   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3817  1.10  christos     0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3818   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3819   1.5  christos     0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R"},
   3820   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3821  1.10  christos     0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3822   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3823  1.10  christos     0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3824   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3825  1.10  christos     0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3826   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3827   1.5  christos     0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R"},
   3828   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3829  1.10  christos     0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3830   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3831  1.10  christos     0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3832   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3833  1.10  christos     0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3834   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3835   1.5  christos     0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R"},
   3836   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3837  1.10  christos     0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3838   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3839  1.10  christos     0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3840   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3841  1.10  christos     0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ROR %{I:#24%}"},
   3842   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3843   1.5  christos     0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R"},
   3844   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3845  1.10  christos     0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3846   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3847  1.10  christos     0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3848   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3849  1.10  christos     0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3850   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3851   1.5  christos     0x06800fb0, 0x0ff00ff0, "sel%c\t%12-15R, %16-19R, %0-3R"},
   3852   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3853  1.10  christos     0xf1010000, 0xfffffc00, "setend\t%{B:%9?ble%}"},
   3854   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3855   1.5  christos     0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19R, %0-3R, %8-11R"},
   3856   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3857   1.5  christos     0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19R, %0-3R, %8-11R"},
   3858   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3859   1.5  christos     0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3860   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3861   1.5  christos     0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3862   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3863   1.5  christos     0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3864   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3865   1.5  christos     0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3866   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3867   1.5  christos     0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19R, %0-3R, %8-11R"},
   3868   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3869   1.5  christos     0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3870   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3871   1.5  christos     0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3872   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3873  1.10  christos     0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t%16-19r%21'!, %{I:#%0-4d%}"},
   3874   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3875  1.10  christos     0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15R, %{I:#%16-20W%}, %0-3R"},
   3876   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3877  1.10  christos     0x06a00010, 0x0fe00070, "ssat%c\t%12-15R, %{I:#%16-20W%}, %0-3R, %{B:lsl%} %{I:#%7-11d%}"},
   3878   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3879  1.10  christos     0x06a00050, 0x0fe00070, "ssat%c\t%12-15R, %{I:#%16-20W%}, %0-3R, %{B:asr%} %{I:#%7-11d%}"},
   3880   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3881  1.10  christos     0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, %{I:#%16-19W%}, %0-3r"},
   3882   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3883   1.5  christos     0x01800f90, 0x0ff00ff0, "strex%c\t%12-15R, %0-3R, [%16-19R]"},
   3884   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3885   1.5  christos     0x00400090, 0x0ff000f0, "umaal%c\t%12-15R, %16-19R, %0-3R, %8-11R"},
   3886   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3887   1.5  christos     0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19R, %0-3R, %8-11R"},
   3888   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3889   1.5  christos     0x07800010, 0x0ff000f0, "usada8%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3890   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3891  1.10  christos     0x06e00010, 0x0fe00ff0, "usat%c\t%12-15R, %{I:#%16-20d%}, %0-3R"},
   3892   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3893  1.10  christos     0x06e00010, 0x0fe00070, "usat%c\t%12-15R, %{I:#%16-20d%}, %0-3R, %{B:lsl%} %{I:#%7-11d%}"},
   3894   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3895  1.10  christos     0x06e00050, 0x0fe00070, "usat%c\t%12-15R, %{I:#%16-20d%}, %0-3R, %{B:asr%} %{I:#%7-11d%}"},
   3896   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3897  1.10  christos     0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15R, %{I:#%16-19d%}, %0-3R"},
   3898   1.1  christos 
   3899   1.1  christos   /* V5J instruction.  */
   3900   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5J),
   3901   1.5  christos     0x012fff20, 0x0ffffff0, "bxj%c\t%0-3R"},
   3902   1.1  christos 
   3903   1.1  christos   /* V5 Instructions.  */
   3904   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3905   1.5  christos     0xe1200070, 0xfff000f0,
   3906  1.10  christos     "bkpt\t%{I:0x%16-19X%12-15X%8-11X%0-3X%}"},
   3907   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3908   1.5  christos     0xfa000000, 0xfe000000, "blx\t%B"},
   3909   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3910   1.5  christos     0x012fff30, 0x0ffffff0, "blx%c\t%0-3R"},
   3911   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3912   1.5  christos     0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15R, %0-3R"},
   3913   1.5  christos 
   3914   1.5  christos   /* V5E "El Segundo" Instructions.  */
   3915   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   3916   1.5  christos     0x000000d0, 0x0e1000f0, "ldrd%c\t%12-15r, %s"},
   3917   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   3918   1.5  christos     0x000000f0, 0x0e1000f0, "strd%c\t%12-15r, %s"},
   3919   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   3920   1.5  christos     0xf450f000, 0xfc70f000, "pld\t%a"},
   3921   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3922   1.5  christos     0x01000080, 0x0ff000f0, "smlabb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3923   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3924   1.5  christos     0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3925   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3926   1.5  christos     0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3927   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3928   1.5  christos     0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11R, %12-15R"},
   3929   1.5  christos 
   3930   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3931   1.5  christos     0x01200080, 0x0ff000f0, "smlawb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3932   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3933   1.5  christos     0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19R, %0-3r, %8-11R, %12-15R"},
   3934   1.5  christos 
   3935   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3936   1.5  christos     0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3937   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3938   1.5  christos     0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3939   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3940   1.5  christos     0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3941   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3942   1.5  christos     0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3943   1.5  christos 
   3944   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3945   1.5  christos     0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19R, %0-3R, %8-11R"},
   3946   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3947   1.5  christos     0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19R, %0-3R, %8-11R"},
   3948   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3949   1.5  christos     0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19R, %0-3R, %8-11R"},
   3950   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3951   1.5  christos     0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19R, %0-3R, %8-11R"},
   3952   1.5  christos 
   3953   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3954   1.5  christos     0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19R, %0-3R, %8-11R"},
   3955   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3956   1.5  christos     0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19R, %0-3R, %8-11R"},
   3957   1.5  christos 
   3958   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3959   1.5  christos     0x01000050, 0x0ff00ff0,  "qadd%c\t%12-15R, %0-3R, %16-19R"},
   3960   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3961   1.5  christos     0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15R, %0-3R, %16-19R"},
   3962   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3963   1.5  christos     0x01200050, 0x0ff00ff0,  "qsub%c\t%12-15R, %0-3R, %16-19R"},
   3964   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3965   1.5  christos     0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15R, %0-3R, %16-19R"},
   3966   1.1  christos 
   3967   1.1  christos   /* ARM Instructions.  */
   3968   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3969  1.10  christos     0x052d0004, 0x0fff0fff, "push%c\t{%12-15r}\t\t@ (str%c %12-15r, %a)"},
   3970   1.1  christos 
   3971   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3972   1.5  christos     0x04400000, 0x0e500000, "strb%t%c\t%12-15R, %a"},
   3973   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3974   1.5  christos     0x04000000, 0x0e500000, "str%t%c\t%12-15r, %a"},
   3975   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3976   1.5  christos     0x06400000, 0x0e500ff0, "strb%t%c\t%12-15R, %a"},
   3977   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3978   1.5  christos     0x06000000, 0x0e500ff0, "str%t%c\t%12-15r, %a"},
   3979   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3980   1.5  christos     0x04400000, 0x0c500010, "strb%t%c\t%12-15R, %a"},
   3981   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3982   1.5  christos     0x04000000, 0x0c500010, "str%t%c\t%12-15r, %a"},
   3983   1.5  christos 
   3984   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3985   1.5  christos     0x04400000, 0x0e500000, "strb%c\t%12-15R, %a"},
   3986   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3987   1.5  christos     0x06400000, 0x0e500010, "strb%c\t%12-15R, %a"},
   3988   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3989   1.5  christos     0x004000b0, 0x0e5000f0, "strh%c\t%12-15R, %s"},
   3990   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3991   1.5  christos     0x000000b0, 0x0e500ff0, "strh%c\t%12-15R, %s"},
   3992   1.5  christos 
   3993   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3994   1.5  christos     0x00500090, 0x0e5000f0, UNDEFINED_INSTRUCTION},
   3995   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3996   1.5  christos     0x00500090, 0x0e500090, "ldr%6's%5?hb%c\t%12-15R, %s"},
   3997   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3998   1.5  christos     0x00100090, 0x0e500ff0, UNDEFINED_INSTRUCTION},
   3999   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4000   1.5  christos     0x00100090, 0x0e500f90, "ldr%6's%5?hb%c\t%12-15R, %s"},
   4001   1.5  christos 
   4002   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4003   1.5  christos     0x02000000, 0x0fe00000, "and%20's%c\t%12-15r, %16-19r, %o"},
   4004   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4005   1.5  christos     0x00000000, 0x0fe00010, "and%20's%c\t%12-15r, %16-19r, %o"},
   4006   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4007   1.5  christos     0x00000010, 0x0fe00090, "and%20's%c\t%12-15R, %16-19R, %o"},
   4008   1.5  christos 
   4009   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4010   1.5  christos     0x02200000, 0x0fe00000, "eor%20's%c\t%12-15r, %16-19r, %o"},
   4011   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4012   1.5  christos     0x00200000, 0x0fe00010, "eor%20's%c\t%12-15r, %16-19r, %o"},
   4013   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4014   1.5  christos     0x00200010, 0x0fe00090, "eor%20's%c\t%12-15R, %16-19R, %o"},
   4015   1.5  christos 
   4016   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4017   1.5  christos     0x02400000, 0x0fe00000, "sub%20's%c\t%12-15r, %16-19r, %o"},
   4018   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4019   1.5  christos     0x00400000, 0x0fe00010, "sub%20's%c\t%12-15r, %16-19r, %o"},
   4020   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4021   1.5  christos     0x00400010, 0x0fe00090, "sub%20's%c\t%12-15R, %16-19R, %o"},
   4022   1.5  christos 
   4023   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4024   1.5  christos     0x02600000, 0x0fe00000, "rsb%20's%c\t%12-15r, %16-19r, %o"},
   4025   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4026   1.5  christos     0x00600000, 0x0fe00010, "rsb%20's%c\t%12-15r, %16-19r, %o"},
   4027   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4028   1.5  christos     0x00600010, 0x0fe00090, "rsb%20's%c\t%12-15R, %16-19R, %o"},
   4029   1.5  christos 
   4030   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4031   1.5  christos     0x02800000, 0x0fe00000, "add%20's%c\t%12-15r, %16-19r, %o"},
   4032   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4033   1.5  christos     0x00800000, 0x0fe00010, "add%20's%c\t%12-15r, %16-19r, %o"},
   4034   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4035   1.5  christos     0x00800010, 0x0fe00090, "add%20's%c\t%12-15R, %16-19R, %o"},
   4036   1.5  christos 
   4037   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4038   1.5  christos     0x02a00000, 0x0fe00000, "adc%20's%c\t%12-15r, %16-19r, %o"},
   4039   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4040   1.5  christos     0x00a00000, 0x0fe00010, "adc%20's%c\t%12-15r, %16-19r, %o"},
   4041   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4042   1.5  christos     0x00a00010, 0x0fe00090, "adc%20's%c\t%12-15R, %16-19R, %o"},
   4043   1.5  christos 
   4044   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4045   1.5  christos     0x02c00000, 0x0fe00000, "sbc%20's%c\t%12-15r, %16-19r, %o"},
   4046   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4047   1.5  christos     0x00c00000, 0x0fe00010, "sbc%20's%c\t%12-15r, %16-19r, %o"},
   4048   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4049   1.5  christos     0x00c00010, 0x0fe00090, "sbc%20's%c\t%12-15R, %16-19R, %o"},
   4050   1.5  christos 
   4051   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4052   1.5  christos     0x02e00000, 0x0fe00000, "rsc%20's%c\t%12-15r, %16-19r, %o"},
   4053   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4054   1.5  christos     0x00e00000, 0x0fe00010, "rsc%20's%c\t%12-15r, %16-19r, %o"},
   4055   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4056   1.5  christos     0x00e00010, 0x0fe00090, "rsc%20's%c\t%12-15R, %16-19R, %o"},
   4057   1.5  christos 
   4058   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT),
   4059   1.5  christos     0x0120f200, 0x0fb0f200, "msr%c\t%C, %0-3r"},
   4060   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
   4061   1.5  christos     0x0120f000, 0x0db0f000, "msr%c\t%C, %o"},
   4062   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
   4063   1.5  christos     0x01000000, 0x0fb00cff, "mrs%c\t%12-15R, %R"},
   4064   1.5  christos 
   4065   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4066   1.5  christos     0x03000000, 0x0fe00000, "tst%p%c\t%16-19r, %o"},
   4067   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4068   1.5  christos     0x01000000, 0x0fe00010, "tst%p%c\t%16-19r, %o"},
   4069   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4070   1.5  christos     0x01000010, 0x0fe00090, "tst%p%c\t%16-19R, %o"},
   4071   1.5  christos 
   4072   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4073   1.6  christos     0x03300000, 0x0ff00000, "teq%p%c\t%16-19r, %o"},
   4074   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4075   1.6  christos     0x01300000, 0x0ff00010, "teq%p%c\t%16-19r, %o"},
   4076   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4077   1.6  christos     0x01300010, 0x0ff00010, "teq%p%c\t%16-19R, %o"},
   4078   1.5  christos 
   4079   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4080   1.5  christos     0x03400000, 0x0fe00000, "cmp%p%c\t%16-19r, %o"},
   4081   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4082   1.5  christos     0x01400000, 0x0fe00010, "cmp%p%c\t%16-19r, %o"},
   4083   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4084   1.5  christos     0x01400010, 0x0fe00090, "cmp%p%c\t%16-19R, %o"},
   4085   1.5  christos 
   4086   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4087   1.5  christos     0x03600000, 0x0fe00000, "cmn%p%c\t%16-19r, %o"},
   4088   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4089   1.5  christos     0x01600000, 0x0fe00010, "cmn%p%c\t%16-19r, %o"},
   4090   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4091   1.5  christos     0x01600010, 0x0fe00090, "cmn%p%c\t%16-19R, %o"},
   4092   1.5  christos 
   4093   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4094   1.5  christos     0x03800000, 0x0fe00000, "orr%20's%c\t%12-15r, %16-19r, %o"},
   4095   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4096   1.5  christos     0x01800000, 0x0fe00010, "orr%20's%c\t%12-15r, %16-19r, %o"},
   4097   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4098   1.5  christos     0x01800010, 0x0fe00090, "orr%20's%c\t%12-15R, %16-19R, %o"},
   4099   1.5  christos 
   4100   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4101   1.5  christos     0x03a00000, 0x0fef0000, "mov%20's%c\t%12-15r, %o"},
   4102   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4103   1.5  christos     0x01a00000, 0x0def0ff0, "mov%20's%c\t%12-15r, %0-3r"},
   4104   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4105   1.5  christos     0x01a00000, 0x0def0060, "lsl%20's%c\t%12-15R, %q"},
   4106   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4107   1.5  christos     0x01a00020, 0x0def0060, "lsr%20's%c\t%12-15R, %q"},
   4108   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4109   1.5  christos     0x01a00040, 0x0def0060, "asr%20's%c\t%12-15R, %q"},
   4110   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4111   1.5  christos     0x01a00060, 0x0def0ff0, "rrx%20's%c\t%12-15r, %0-3r"},
   4112   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4113   1.5  christos     0x01a00060, 0x0def0060, "ror%20's%c\t%12-15R, %q"},
   4114   1.5  christos 
   4115   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4116   1.5  christos     0x03c00000, 0x0fe00000, "bic%20's%c\t%12-15r, %16-19r, %o"},
   4117   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4118   1.5  christos     0x01c00000, 0x0fe00010, "bic%20's%c\t%12-15r, %16-19r, %o"},
   4119   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4120   1.5  christos     0x01c00010, 0x0fe00090, "bic%20's%c\t%12-15R, %16-19R, %o"},
   4121   1.5  christos 
   4122   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4123   1.5  christos     0x03e00000, 0x0fe00000, "mvn%20's%c\t%12-15r, %o"},
   4124   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4125   1.5  christos     0x01e00000, 0x0fe00010, "mvn%20's%c\t%12-15r, %o"},
   4126   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4127   1.5  christos     0x01e00010, 0x0fe00090, "mvn%20's%c\t%12-15R, %o"},
   4128   1.5  christos 
   4129   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4130   1.5  christos     0x06000010, 0x0e000010, UNDEFINED_INSTRUCTION},
   4131   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4132  1.10  christos     0x049d0004, 0x0fff0fff, "pop%c\t{%12-15r}\t\t@ (ldr%c %12-15r, %a)"},
   4133   1.5  christos 
   4134   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4135   1.5  christos     0x04500000, 0x0c500000, "ldrb%t%c\t%12-15R, %a"},
   4136   1.5  christos 
   4137   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4138   1.5  christos     0x04300000, 0x0d700000, "ldrt%c\t%12-15R, %a"},
   4139   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4140   1.5  christos     0x04100000, 0x0c500000, "ldr%c\t%12-15r, %a"},
   4141   1.5  christos 
   4142   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4143   1.5  christos     0x092d0001, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4144   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4145   1.5  christos     0x092d0002, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4146   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4147   1.5  christos     0x092d0004, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4148   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4149   1.5  christos     0x092d0008, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4150   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4151   1.5  christos     0x092d0010, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4152   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4153   1.5  christos     0x092d0020, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4154   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4155   1.5  christos     0x092d0040, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4156   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4157   1.5  christos     0x092d0080, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4158   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4159   1.5  christos     0x092d0100, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4160   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4161   1.5  christos     0x092d0200, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4162   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4163   1.5  christos     0x092d0400, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4164   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4165   1.5  christos     0x092d0800, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4166   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4167   1.5  christos     0x092d1000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4168   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4169   1.5  christos     0x092d2000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4170   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4171   1.5  christos     0x092d4000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4172   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4173   1.5  christos     0x092d8000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4174   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4175   1.5  christos     0x092d0000, 0x0fff0000, "push%c\t%m"},
   4176   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4177   1.5  christos     0x08800000, 0x0ff00000, "stm%c\t%16-19R%21'!, %m%22'^"},
   4178   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4179   1.5  christos     0x08000000, 0x0e100000, "stm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
   4180   1.5  christos 
   4181   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4182   1.5  christos     0x08bd0001, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4183   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4184   1.5  christos     0x08bd0002, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4185   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4186   1.5  christos     0x08bd0004, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4187   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4188   1.5  christos     0x08bd0008, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4189   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4190   1.5  christos     0x08bd0010, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4191   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4192   1.5  christos     0x08bd0020, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4193   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4194   1.5  christos     0x08bd0040, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4195   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4196   1.5  christos     0x08bd0080, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4197   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4198   1.5  christos     0x08bd0100, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4199   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4200   1.5  christos     0x08bd0200, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4201   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4202   1.5  christos     0x08bd0400, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4203   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4204   1.5  christos     0x08bd0800, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4205   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4206   1.5  christos     0x08bd1000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4207   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4208   1.5  christos     0x08bd2000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4209   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4210   1.5  christos     0x08bd4000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4211   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4212   1.5  christos     0x08bd8000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4213   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4214   1.5  christos     0x08bd0000, 0x0fff0000, "pop%c\t%m"},
   4215   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4216   1.5  christos     0x08900000, 0x0f900000, "ldm%c\t%16-19R%21'!, %m%22'^"},
   4217   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4218   1.5  christos     0x08100000, 0x0e100000, "ldm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
   4219   1.5  christos 
   4220   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4221   1.5  christos     0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
   4222   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4223   1.5  christos     0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
   4224   1.1  christos 
   4225   1.1  christos   /* The rest.  */
   4226   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
   4227  1.10  christos     0x03200000, 0x0fff00ff, "nop%c\t{%{I:%0-7d%}}" UNPREDICTABLE_INSTRUCTION},
   4228   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4229   1.5  christos     0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
   4230   1.5  christos   {ARM_FEATURE_CORE_LOW (0),
   4231   1.5  christos     0x00000000, 0x00000000, 0}
   4232   1.1  christos };
   4233   1.1  christos 
   4234   1.1  christos /* print_insn_thumb16 recognizes the following format control codes:
   4235   1.1  christos 
   4236   1.1  christos    %S                   print Thumb register (bits 3..5 as high number if bit 6 set)
   4237   1.1  christos    %D                   print Thumb register (bits 0..2 as high number if bit 7 set)
   4238   1.1  christos    %<bitfield>I         print bitfield as a signed decimal
   4239   1.1  christos    				(top bit of range being the sign bit)
   4240   1.1  christos    %N                   print Thumb register mask (with LR)
   4241   1.1  christos    %O                   print Thumb register mask (with PC)
   4242   1.1  christos    %M                   print Thumb register mask
   4243   1.1  christos    %b			print CZB's 6-bit unsigned branch destination
   4244   1.1  christos    %s			print Thumb right-shift immediate (6..10; 0 == 32).
   4245   1.1  christos    %c			print the condition code
   4246   1.1  christos    %C			print the condition code, or "s" if not conditional
   4247   1.1  christos    %x			print warning if conditional an not at end of IT block"
   4248  1.10  christos    %X			print "\t@ unpredictable <IT:code>" if conditional
   4249   1.1  christos    %I			print IT instruction suffix and operands
   4250   1.1  christos    %W			print Thumb Writeback indicator for LDMIA
   4251   1.1  christos    %<bitfield>r		print bitfield as an ARM register
   4252   1.1  christos    %<bitfield>d		print bitfield as a decimal
   4253   1.1  christos    %<bitfield>H         print (bitfield * 2) as a decimal
   4254   1.1  christos    %<bitfield>W         print (bitfield * 4) as a decimal
   4255   1.1  christos    %<bitfield>a         print (bitfield * 4) as a pc-rel offset + decoded symbol
   4256   1.1  christos    %<bitfield>B         print Thumb branch destination (signed displacement)
   4257   1.1  christos    %<bitfield>c         print bitfield as a condition code
   4258   1.1  christos    %<bitnum>'c		print specified char iff bit is one
   4259   1.1  christos    %<bitnum>?ab		print a if bit is one else print b.  */
   4260   1.1  christos 
   4261   1.1  christos static const struct opcode16 thumb_opcodes[] =
   4262   1.1  christos {
   4263   1.1  christos   /* Thumb instructions.  */
   4264   1.1  christos 
   4265   1.6  christos   /* ARMv8-M Security Extensions instructions.  */
   4266   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4784, 0xff87, "blxns\t%3-6r"},
   4267   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4704, 0xff87, "bxns\t%3-6r"},
   4268   1.6  christos 
   4269   1.1  christos   /* ARM V8 instructions.  */
   4270   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),  0xbf50, 0xffff, "sevl%c"},
   4271   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),  0xba80, 0xffc0, "hlt\t%0-5x"},
   4272  1.10  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),  0xb610, 0xfff7, "setpan\t%{I:#%3-3d%}"},
   4273   1.1  christos 
   4274   1.1  christos   /* ARM V6K no-argument instructions.  */
   4275   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xffff, "nop%c"},
   4276   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf10, 0xffff, "yield%c"},
   4277   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf20, 0xffff, "wfe%c"},
   4278   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf30, 0xffff, "wfi%c"},
   4279   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf40, 0xffff, "sev%c"},
   4280   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xff0f, "nop%c\t{%4-7d}"},
   4281   1.1  christos 
   4282   1.1  christos   /* ARM V6T2 instructions.  */
   4283   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4284   1.6  christos     0xb900, 0xfd00, "cbnz\t%0-2r, %b%X"},
   4285   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4286   1.6  christos     0xb100, 0xfd00, "cbz\t%0-2r, %b%X"},
   4287   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xbf00, 0xff00, "it%I%X"},
   4288   1.1  christos 
   4289   1.1  christos   /* ARM V6.  */
   4290  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb660, 0xfff8, "cpsie\t%{B:%2'a%1'i%0'f%}%X"},
   4291  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb670, 0xfff8, "cpsid\t%{B:%2'a%1'i%0'f%}%X"},
   4292   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0x4600, 0xffc0, "mov%c\t%0-2r, %3-5r"},
   4293   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba00, 0xffc0, "rev%c\t%0-2r, %3-5r"},
   4294   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba40, 0xffc0, "rev16%c\t%0-2r, %3-5r"},
   4295   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xbac0, 0xffc0, "revsh%c\t%0-2r, %3-5r"},
   4296  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb650, 0xfff7, "setend\t%{B:%3?ble%}%X"},
   4297   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb200, 0xffc0, "sxth%c\t%0-2r, %3-5r"},
   4298   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb240, 0xffc0, "sxtb%c\t%0-2r, %3-5r"},
   4299   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb280, 0xffc0, "uxth%c\t%0-2r, %3-5r"},
   4300   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb2c0, 0xffc0, "uxtb%c\t%0-2r, %3-5r"},
   4301   1.1  christos 
   4302   1.1  christos   /* ARM V5 ISA extends Thumb.  */
   4303   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
   4304   1.5  christos     0xbe00, 0xff00, "bkpt\t%0-7x"}, /* Is always unconditional.  */
   4305   1.1  christos   /* This is BLX(2).  BLX(1) is a 32-bit instruction.  */
   4306   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
   4307   1.5  christos     0x4780, 0xff87, "blx%c\t%3-6r%x"},	/* note: 4 bit register number.  */
   4308   1.1  christos   /* ARM V4T ISA (Thumb v1).  */
   4309   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4310  1.10  christos     0x46C0, 0xFFFF, "nop%c\t\t\t@ (mov r8, r8)"},
   4311   1.1  christos   /* Format 4.  */
   4312   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4000, 0xFFC0, "and%C\t%0-2r, %3-5r"},
   4313   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4040, 0xFFC0, "eor%C\t%0-2r, %3-5r"},
   4314   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4080, 0xFFC0, "lsl%C\t%0-2r, %3-5r"},
   4315   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x40C0, 0xFFC0, "lsr%C\t%0-2r, %3-5r"},
   4316   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4100, 0xFFC0, "asr%C\t%0-2r, %3-5r"},
   4317   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4140, 0xFFC0, "adc%C\t%0-2r, %3-5r"},
   4318   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4180, 0xFFC0, "sbc%C\t%0-2r, %3-5r"},
   4319   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x41C0, 0xFFC0, "ror%C\t%0-2r, %3-5r"},
   4320   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4200, 0xFFC0, "tst%c\t%0-2r, %3-5r"},
   4321   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4240, 0xFFC0, "neg%C\t%0-2r, %3-5r"},
   4322   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4280, 0xFFC0, "cmp%c\t%0-2r, %3-5r"},
   4323   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x42C0, 0xFFC0, "cmn%c\t%0-2r, %3-5r"},
   4324   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4300, 0xFFC0, "orr%C\t%0-2r, %3-5r"},
   4325   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4340, 0xFFC0, "mul%C\t%0-2r, %3-5r"},
   4326   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4380, 0xFFC0, "bic%C\t%0-2r, %3-5r"},
   4327   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x43C0, 0xFFC0, "mvn%C\t%0-2r, %3-5r"},
   4328   1.1  christos   /* format 13 */
   4329  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB000, 0xFF80, "add%c\t%{R:sp%}, %{I:#%0-6W%}"},
   4330  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB080, 0xFF80, "sub%c\t%{R:sp%}, %{I:#%0-6W%}"},
   4331   1.1  christos   /* format 5 */
   4332   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4700, 0xFF80, "bx%c\t%S%x"},
   4333   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4400, 0xFF00, "add%c\t%D, %S"},
   4334   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4500, 0xFF00, "cmp%c\t%D, %S"},
   4335   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4600, 0xFF00, "mov%c\t%D, %S"},
   4336   1.1  christos   /* format 14 */
   4337   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB400, 0xFE00, "push%c\t%N"},
   4338   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xBC00, 0xFE00, "pop%c\t%O"},
   4339   1.1  christos   /* format 2 */
   4340   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4341   1.5  christos     0x1800, 0xFE00, "add%C\t%0-2r, %3-5r, %6-8r"},
   4342   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4343   1.5  christos     0x1A00, 0xFE00, "sub%C\t%0-2r, %3-5r, %6-8r"},
   4344   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4345  1.10  christos     0x1C00, 0xFE00, "add%C\t%0-2r, %3-5r, %{I:#%6-8d%}"},
   4346   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4347  1.10  christos     0x1E00, 0xFE00, "sub%C\t%0-2r, %3-5r, %{I:#%6-8d%}"},
   4348   1.1  christos   /* format 8 */
   4349   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4350   1.5  christos     0x5200, 0xFE00, "strh%c\t%0-2r, [%3-5r, %6-8r]"},
   4351   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4352   1.5  christos     0x5A00, 0xFE00, "ldrh%c\t%0-2r, [%3-5r, %6-8r]"},
   4353   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4354   1.5  christos     0x5600, 0xF600, "ldrs%11?hb%c\t%0-2r, [%3-5r, %6-8r]"},
   4355   1.1  christos   /* format 7 */
   4356   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4357   1.5  christos     0x5000, 0xFA00, "str%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
   4358   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4359   1.5  christos     0x5800, 0xFA00, "ldr%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
   4360   1.1  christos   /* format 1 */
   4361   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0000, 0xFFC0, "mov%C\t%0-2r, %3-5r"},
   4362   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4363  1.10  christos     0x0000, 0xF800, "lsl%C\t%0-2r, %3-5r, %{I:#%6-10d%}"},
   4364   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0800, 0xF800, "lsr%C\t%0-2r, %3-5r, %s"},
   4365   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x1000, 0xF800, "asr%C\t%0-2r, %3-5r, %s"},
   4366   1.1  christos   /* format 3 */
   4367  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2000, 0xF800, "mov%C\t%8-10r, %{I:#%0-7d%}"},
   4368  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2800, 0xF800, "cmp%c\t%8-10r, %{I:#%0-7d%}"},
   4369  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3000, 0xF800, "add%C\t%8-10r, %{I:#%0-7d%}"},
   4370  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3800, 0xF800, "sub%C\t%8-10r, %{I:#%0-7d%}"},
   4371   1.1  christos   /* format 6 */
   4372   1.5  christos   /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
   4373   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4374   1.5  christos     0x4800, 0xF800,
   4375  1.10  christos     "ldr%c\t%8-10r, [%{R:pc%}, %{I:#%0-7W%}]\t@ (%0-7a)"},
   4376   1.1  christos   /* format 9 */
   4377   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4378  1.10  christos     0x6000, 0xF800, "str%c\t%0-2r, [%3-5r, %{I:#%6-10W%}]"},
   4379   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4380  1.10  christos     0x6800, 0xF800, "ldr%c\t%0-2r, [%3-5r, %{I:#%6-10W%}]"},
   4381   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4382  1.10  christos     0x7000, 0xF800, "strb%c\t%0-2r, [%3-5r, %{I:#%6-10d%}]"},
   4383   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4384  1.10  christos     0x7800, 0xF800, "ldrb%c\t%0-2r, [%3-5r, %{I:#%6-10d%}]"},
   4385   1.1  christos   /* format 10 */
   4386   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4387  1.10  christos     0x8000, 0xF800, "strh%c\t%0-2r, [%3-5r, %{I:#%6-10H%}]"},
   4388   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4389  1.10  christos     0x8800, 0xF800, "ldrh%c\t%0-2r, [%3-5r, %{I:#%6-10H%}]"},
   4390   1.1  christos   /* format 11 */
   4391   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4392  1.10  christos     0x9000, 0xF800, "str%c\t%8-10r, [%{R:sp%}, %{I:#%0-7W%}]"},
   4393   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4394  1.10  christos     0x9800, 0xF800, "ldr%c\t%8-10r, [%{R:sp%}, %{I:#%0-7W%}]"},
   4395   1.1  christos   /* format 12 */
   4396   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4397  1.10  christos     0xA000, 0xF800, "add%c\t%8-10r, %{R:pc%}, %{I:#%0-7W%}\t@ (adr %8-10r, %0-7a)"},
   4398   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4399  1.10  christos     0xA800, 0xF800, "add%c\t%8-10r, %{R:sp%}, %{I:#%0-7W%}"},
   4400   1.1  christos   /* format 15 */
   4401   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC000, 0xF800, "stmia%c\t%8-10r!, %M"},
   4402   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC800, 0xF800, "ldmia%c\t%8-10r%W, %M"},
   4403   1.1  christos   /* format 17 */
   4404   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDF00, 0xFF00, "svc%c\t%0-7d"},
   4405   1.1  christos   /* format 16 */
   4406  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFF00, "udf%c\t%{I:#%0-7d%}"},
   4407   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFE00, UNDEFINED_INSTRUCTION},
   4408   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xD000, 0xF000, "b%8-11c.n\t%0-7B%X"},
   4409   1.1  christos   /* format 18 */
   4410   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xE000, 0xF800, "b%c.n\t%0-10B%x"},
   4411   1.1  christos 
   4412   1.1  christos   /* The E800 .. FFFF range is unconditionally redirected to the
   4413   1.1  christos      32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
   4414   1.1  christos      are processed via that table.  Thus, we can never encounter a
   4415   1.1  christos      bare "second half of BL/BLX(1)" instruction here.  */
   4416   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),  0x0000, 0x0000, UNDEFINED_INSTRUCTION},
   4417   1.5  christos   {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   4418   1.1  christos };
   4419   1.1  christos 
   4420   1.1  christos /* Thumb32 opcodes use the same table structure as the ARM opcodes.
   4421   1.1  christos    We adopt the convention that hw1 is the high 16 bits of .value and
   4422   1.1  christos    .mask, hw2 the low 16 bits.
   4423   1.1  christos 
   4424   1.1  christos    print_insn_thumb32 recognizes the following format control codes:
   4425   1.1  christos 
   4426   1.1  christos        %%		%
   4427   1.1  christos 
   4428   1.1  christos        %I		print a 12-bit immediate from hw1[10],hw2[14:12,7:0]
   4429   1.1  christos        %M		print a modified 12-bit immediate (same location)
   4430   1.1  christos        %J		print a 16-bit immediate from hw1[3:0,10],hw2[14:12,7:0]
   4431   1.1  christos        %K		print a 16-bit immediate from hw2[3:0],hw1[3:0],hw2[11:4]
   4432   1.1  christos        %H		print a 16-bit immediate from hw2[3:0],hw1[11:0]
   4433   1.1  christos        %S		print a possibly-shifted Rm
   4434   1.1  christos 
   4435   1.1  christos        %L		print address for a ldrd/strd instruction
   4436   1.1  christos        %a		print the address of a plain load/store
   4437   1.1  christos        %w		print the width and signedness of a core load/store
   4438   1.1  christos        %m		print register mask for ldm/stm
   4439   1.9  christos        %n		print register mask for clrm
   4440   1.1  christos 
   4441   1.1  christos        %E		print the lsb and width fields of a bfc/bfi instruction
   4442   1.1  christos        %F		print the lsb and width fields of a sbfx/ubfx instruction
   4443   1.9  christos        %G		print a fallback offset for Branch Future instructions
   4444   1.9  christos        %W		print an offset for BF instruction
   4445   1.9  christos        %Y		print an offset for BFL instruction
   4446   1.9  christos        %Z		print an offset for BFCSEL instruction
   4447   1.9  christos        %Q		print an offset for Low Overhead Loop instructions
   4448   1.9  christos        %P		print an offset for Low Overhead Loop end instructions
   4449   1.1  christos        %b		print a conditional branch offset
   4450   1.1  christos        %B		print an unconditional branch offset
   4451   1.1  christos        %s		print the shift field of an SSAT instruction
   4452   1.1  christos        %R		print the rotation field of an SXT instruction
   4453   1.1  christos        %U		print barrier type.
   4454   1.1  christos        %P		print address for pli instruction.
   4455   1.1  christos        %c		print the condition code
   4456   1.1  christos        %x		print warning if conditional an not at end of IT block"
   4457  1.10  christos        %X		print "\t@ unpredictable <IT:code>" if conditional
   4458   1.1  christos 
   4459   1.1  christos        %<bitfield>d	print bitfield in decimal
   4460   1.5  christos        %<bitfield>D     print bitfield plus one in decimal
   4461   1.1  christos        %<bitfield>W	print bitfield*4 in decimal
   4462   1.1  christos        %<bitfield>r	print bitfield as an ARM register
   4463   1.1  christos        %<bitfield>R	as %<>r but r15 is UNPREDICTABLE
   4464   1.9  christos        %<bitfield>S	as %<>r but r13 and r15 is UNPREDICTABLE
   4465   1.1  christos        %<bitfield>c	print bitfield as a condition code
   4466   1.1  christos 
   4467   1.1  christos        %<bitfield>'c	print specified char iff bitfield is all ones
   4468   1.1  christos        %<bitfield>`c	print specified char iff bitfield is all zeroes
   4469   1.1  christos        %<bitfield>?ab... select from array of values in big endian order
   4470   1.1  christos 
   4471   1.1  christos    With one exception at the bottom (done because BL and BLX(1) need
   4472   1.1  christos    to come dead last), this table was machine-sorted first in
   4473   1.1  christos    decreasing order of number of bits set in the mask, then in
   4474   1.1  christos    increasing numeric order of mask, then in increasing numeric order
   4475   1.1  christos    of opcode.  This order is not the clearest for a human reader, but
   4476   1.1  christos    is guaranteed never to catch a special-case bit pattern with a more
   4477   1.1  christos    general mask, which is important, because this instruction encoding
   4478   1.1  christos    makes heavy use of special-case bit patterns.  */
   4479   1.1  christos static const struct opcode32 thumb32_opcodes[] =
   4480   1.1  christos {
   4481  1.10  christos   /* Arm v8.1-M Mainline Pointer Authentication and Branch Target
   4482  1.10  christos      Identification Extension.  */
   4483  1.10  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4484  1.10  christos    0xf3af802d, 0xffffffff, "aut\t%{R:r12%}, %{R:lr%}, %{R:sp%}"},
   4485  1.10  christos   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
   4486  1.10  christos    0xfb500f00, 0xfff00ff0, "autg%c\t%12-15r, %16-19r, %0-3r"},
   4487  1.10  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4488  1.10  christos    0xf3af800f, 0xffffffff, "bti"},
   4489  1.10  christos   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
   4490  1.10  christos    0xfb500f10, 0xfff00ff0, "bxaut%c\t%12-15r, %16-19r, %0-3r"},
   4491  1.10  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4492  1.10  christos    0xf3af801d, 0xffffffff, "pac\t%{R:r12%}, %{R:lr%}, %{R:sp%}"},
   4493  1.10  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4494  1.10  christos    0xf3af800d, 0xffffffff, "pacbti\t%{R:r12%}, %{R:lr%}, %{R:sp%}"},
   4495  1.10  christos   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
   4496  1.10  christos    0xfb60f000, 0xfff0f0f0, "pacg%c\t%8-11r, %16-19r, %0-3r"},
   4497  1.10  christos 
   4498   1.9  christos   /* Armv8.1-M Mainline and Armv8.1-M Mainline Security Extensions
   4499   1.9  christos      instructions.  */
   4500   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4501   1.9  christos     0xf00fe001, 0xffffffff, "lctp%c"},
   4502   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4503   1.9  christos     0xf02fc001, 0xfffff001, "le\t%P"},
   4504   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4505  1.10  christos     0xf00fc001, 0xfffff001, "le\t%{R:lr%}, %P"},
   4506   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4507  1.10  christos     0xf01fc001, 0xfffff001, "letp\t%{R:lr%}, %P"},
   4508   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4509  1.10  christos     0xf040c001, 0xfff0f001, "wls\t%{R:lr%}, %16-19S, %Q"},
   4510   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4511  1.10  christos     0xf000c001, 0xffc0f001, "wlstp.%20-21s\t%{R:lr%}, %16-19S, %Q"},
   4512   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4513  1.10  christos     0xf040e001, 0xfff0ffff, "dls\t%{R:lr%}, %16-19S"},
   4514   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4515  1.10  christos     0xf000e001, 0xffc0ffff, "dlstp.%20-21s\t%{R:lr%}, %16-19S"},
   4516   1.9  christos 
   4517   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4518   1.9  christos     0xf040e001, 0xf860f001, "bf%c\t%G, %W"},
   4519   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4520   1.9  christos     0xf060e001, 0xf8f0f001, "bfx%c\t%G, %16-19S"},
   4521   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4522   1.9  christos     0xf000c001, 0xf800f001, "bfl%c\t%G, %Y"},
   4523   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4524   1.9  christos     0xf070e001, 0xf8f0f001, "bflx%c\t%G, %16-19S"},
   4525   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4526  1.10  christos     0xf000e001, 0xf840f001, "bfcsel\t%G, %Z, %{B:%18-21c%}"},
   4527   1.9  christos 
   4528   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4529   1.9  christos     0xe89f0000, 0xffff2000, "clrm%c\t%n"},
   4530   1.9  christos 
   4531   1.6  christos   /* ARMv8-M and ARMv8-M Security Extensions instructions.  */
   4532   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0xe97fe97f, 0xffffffff, "sg"},
   4533   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4534   1.6  christos     0xe840f000, 0xfff0f0ff, "tt\t%8-11r, %16-19r"},
   4535   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4536   1.6  christos     0xe840f040, 0xfff0f0ff, "ttt\t%8-11r, %16-19r"},
   4537   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4538   1.6  christos     0xe840f080, 0xfff0f0ff, "tta\t%8-11r, %16-19r"},
   4539   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4540   1.6  christos     0xe840f0c0, 0xfff0f0ff, "ttat\t%8-11r, %16-19r"},
   4541   1.6  christos 
   4542   1.6  christos   /* ARM V8.2 RAS extension instructions.  */
   4543   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
   4544   1.6  christos     0xf3af8010, 0xffffffff, "esb"},
   4545   1.6  christos 
   4546   1.1  christos   /* V8 instructions.  */
   4547   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4548   1.5  christos     0xf3af8005, 0xffffffff, "sevl%c.w"},
   4549   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4550   1.5  christos     0xf78f8000, 0xfffffffc, "dcps%0-1d"},
   4551   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4552   1.5  christos     0xe8c00f8f, 0xfff00fff, "stlb%c\t%12-15r, [%16-19R]"},
   4553   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4554   1.5  christos     0xe8c00f9f, 0xfff00fff, "stlh%c\t%12-15r, [%16-19R]"},
   4555   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4556   1.5  christos     0xe8c00faf, 0xfff00fff, "stl%c\t%12-15r, [%16-19R]"},
   4557   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4558   1.5  christos     0xe8c00fc0, 0xfff00ff0, "stlexb%c\t%0-3r, %12-15r, [%16-19R]"},
   4559   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4560   1.5  christos     0xe8c00fd0, 0xfff00ff0, "stlexh%c\t%0-3r, %12-15r, [%16-19R]"},
   4561   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4562   1.5  christos     0xe8c00fe0, 0xfff00ff0, "stlex%c\t%0-3r, %12-15r, [%16-19R]"},
   4563   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4564   1.5  christos     0xe8c000f0, 0xfff000f0, "stlexd%c\t%0-3r, %12-15r, %8-11r, [%16-19R]"},
   4565   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4566   1.5  christos     0xe8d00f8f, 0xfff00fff, "ldab%c\t%12-15r, [%16-19R]"},
   4567   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4568   1.5  christos     0xe8d00f9f, 0xfff00fff, "ldah%c\t%12-15r, [%16-19R]"},
   4569   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4570   1.5  christos     0xe8d00faf, 0xfff00fff, "lda%c\t%12-15r, [%16-19R]"},
   4571   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4572   1.5  christos     0xe8d00fcf, 0xfff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
   4573   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4574   1.5  christos     0xe8d00fdf, 0xfff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
   4575   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4576   1.5  christos     0xe8d00fef, 0xfff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
   4577   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4578   1.5  christos     0xe8d000ff, 0xfff000ff, "ldaexd%c\t%12-15r, %8-11r, [%16-19R]"},
   4579   1.1  christos 
   4580   1.9  christos   /* V8-R instructions.  */
   4581   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R),
   4582   1.9  christos     0xf3bf8f4c, 0xffffffff, "dfb%c"},
   4583   1.9  christos 
   4584   1.1  christos   /* CRC32 instructions.  */
   4585   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4586   1.8  christos     0xfac0f080, 0xfff0f0f0, "crc32b\t%8-11R, %16-19R, %0-3R"},
   4587   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4588   1.8  christos     0xfac0f090, 0xfff0f0f0, "crc32h\t%9-11R, %16-19R, %0-3R"},
   4589   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4590   1.8  christos     0xfac0f0a0, 0xfff0f0f0, "crc32w\t%8-11R, %16-19R, %0-3R"},
   4591   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4592   1.8  christos     0xfad0f080, 0xfff0f0f0, "crc32cb\t%8-11R, %16-19R, %0-3R"},
   4593   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4594   1.8  christos     0xfad0f090, 0xfff0f0f0, "crc32ch\t%8-11R, %16-19R, %0-3R"},
   4595   1.9  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4596   1.8  christos     0xfad0f0a0, 0xfff0f0f0, "crc32cw\t%8-11R, %16-19R, %0-3R"},
   4597   1.8  christos 
   4598   1.8  christos   /* Speculation Barriers.  */
   4599   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8014, 0xffffffff, "csdb"},
   4600   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f40, 0xffffffff, "ssbb"},
   4601   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f44, 0xffffffff, "pssbb"},
   4602   1.1  christos 
   4603   1.1  christos   /* V7 instructions.  */
   4604   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf910f000, 0xff70f000, "pli%c\t%a"},
   4605  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3af80f0, 0xfffffff0, "dbg%c\t%{I:#%0-3d%}"},
   4606   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f51, 0xfffffff3, "dmb%c\t%U"},
   4607   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f41, 0xfffffff3, "dsb%c\t%U"},
   4608   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f50, 0xfffffff0, "dmb%c\t%U"},
   4609   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f40, 0xfffffff0, "dsb%c\t%U"},
   4610   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f60, 0xfffffff0, "isb%c\t%U"},
   4611   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
   4612   1.5  christos     0xfb90f0f0, 0xfff0f0f0, "sdiv%c\t%8-11r, %16-19r, %0-3r"},
   4613   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
   4614   1.5  christos     0xfbb0f0f0, 0xfff0f0f0, "udiv%c\t%8-11r, %16-19r, %0-3r"},
   4615   1.1  christos 
   4616   1.1  christos   /* Virtualization Extension instructions.  */
   4617   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0xf7e08000, 0xfff0f000, "hvc%c\t%V"},
   4618   1.1  christos   /* We skip ERET as that is SUBS pc, lr, #0.  */
   4619   1.1  christos 
   4620   1.1  christos   /* MP Extension instructions.  */
   4621   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_MP),   0xf830f000, 0xff70f000, "pldw%c\t%a"},
   4622   1.1  christos 
   4623   1.1  christos   /* Security extension instructions.  */
   4624   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),  0xf7f08000, 0xfff0f000, "smc%c\t%K"},
   4625   1.1  christos 
   4626   1.8  christos   /* ARMv8.5-A instructions.  */
   4627   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf3bf8f70, 0xffffffff, "sb"},
   4628   1.8  christos 
   4629   1.1  christos   /* Instructions defined in the basic V6T2 set.  */
   4630   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8000, 0xffffffff, "nop%c.w"},
   4631   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8001, 0xffffffff, "yield%c.w"},
   4632   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8002, 0xffffffff, "wfe%c.w"},
   4633   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8003, 0xffffffff, "wfi%c.w"},
   4634   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8004, 0xffffffff, "sev%c.w"},
   4635   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4636  1.10  christos     0xf3af8000, 0xffffff00, "nop%c.w\t{%{I:%0-7d%}}"},
   4637   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf7f0a000, 0xfff0f000, "udf%c.w\t%H"},
   4638   1.5  christos 
   4639   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4640   1.5  christos     0xf3bf8f2f, 0xffffffff, "clrex%c"},
   4641   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4642  1.10  christos     0xf3af8400, 0xffffff1f, "cpsie.w\t%{B:%7'a%6'i%5'f%}%X"},
   4643   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4644  1.10  christos     0xf3af8600, 0xffffff1f, "cpsid.w\t%{B:%7'a%6'i%5'f%}%X"},
   4645   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4646   1.5  christos     0xf3c08f00, 0xfff0ffff, "bxj%c\t%16-19r%x"},
   4647   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4648   1.5  christos     0xe810c000, 0xffd0ffff, "rfedb%c\t%16-19r%21'!"},
   4649   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4650   1.5  christos     0xe990c000, 0xffd0ffff, "rfeia%c\t%16-19r%21'!"},
   4651   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4652   1.5  christos     0xf3e08000, 0xffe0f000, "mrs%c\t%8-11r, %D"},
   4653   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4654  1.10  christos     0xf3af8100, 0xffffffe0, "cps\t%{I:#%0-4d%}%X"},
   4655   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4656   1.5  christos     0xe8d0f000, 0xfff0fff0, "tbb%c\t[%16-19r, %0-3r]%x"},
   4657   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4658  1.10  christos     0xe8d0f010, 0xfff0fff0, "tbh%c\t[%16-19r, %0-3r, %{B:lsl%} %{I:#1%}]%x"},
   4659   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4660  1.10  christos     0xf3af8500, 0xffffff00, "cpsie\t%{B:%7'a%6'i%5'f%}, %{I:#%0-4d%}%X"},
   4661   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4662  1.10  christos     0xf3af8700, 0xffffff00, "cpsid\t%{B:%7'a%6'i%5'f%}, %{I:#%0-4d%}%X"},
   4663   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4664  1.10  christos     0xf3de8f00, 0xffffff00, "subs%c\t%{R:pc%}, %{R:lr%}, %{I:#%0-7d%}"},
   4665   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4666   1.5  christos     0xf3808000, 0xffe0f000, "msr%c\t%C, %16-19r"},
   4667   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4668   1.5  christos     0xe8500f00, 0xfff00fff, "ldrex%c\t%12-15r, [%16-19r]"},
   4669   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4670   1.5  christos     0xe8d00f4f, 0xfff00fef, "ldrex%4?hb%c\t%12-15r, [%16-19r]"},
   4671   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4672  1.10  christos     0xe800c000, 0xffd0ffe0, "srsdb%c\t%16-19r%21'!, %{I:#%0-4d%}"},
   4673   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4674  1.10  christos     0xe980c000, 0xffd0ffe0, "srsia%c\t%16-19r%21'!, %{I:#%0-4d%}"},
   4675   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4676   1.5  christos     0xfa0ff080, 0xfffff0c0, "sxth%c.w\t%8-11r, %0-3r%R"},
   4677   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4678   1.5  christos     0xfa1ff080, 0xfffff0c0, "uxth%c.w\t%8-11r, %0-3r%R"},
   4679   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4680   1.5  christos     0xfa2ff080, 0xfffff0c0, "sxtb16%c\t%8-11r, %0-3r%R"},
   4681   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4682   1.5  christos     0xfa3ff080, 0xfffff0c0, "uxtb16%c\t%8-11r, %0-3r%R"},
   4683   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4684   1.5  christos     0xfa4ff080, 0xfffff0c0, "sxtb%c.w\t%8-11r, %0-3r%R"},
   4685   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4686   1.5  christos     0xfa5ff080, 0xfffff0c0, "uxtb%c.w\t%8-11r, %0-3r%R"},
   4687   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4688   1.5  christos     0xe8400000, 0xfff000ff, "strex%c\t%8-11r, %12-15r, [%16-19r]"},
   4689   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4690   1.5  christos     0xe8d0007f, 0xfff000ff, "ldrexd%c\t%12-15r, %8-11r, [%16-19r]"},
   4691   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4692   1.5  christos     0xfa80f000, 0xfff0f0f0, "sadd8%c\t%8-11r, %16-19r, %0-3r"},
   4693   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4694   1.5  christos     0xfa80f010, 0xfff0f0f0, "qadd8%c\t%8-11r, %16-19r, %0-3r"},
   4695   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4696   1.5  christos     0xfa80f020, 0xfff0f0f0, "shadd8%c\t%8-11r, %16-19r, %0-3r"},
   4697   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4698   1.5  christos     0xfa80f040, 0xfff0f0f0, "uadd8%c\t%8-11r, %16-19r, %0-3r"},
   4699   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4700   1.5  christos     0xfa80f050, 0xfff0f0f0, "uqadd8%c\t%8-11r, %16-19r, %0-3r"},
   4701   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4702   1.5  christos     0xfa80f060, 0xfff0f0f0, "uhadd8%c\t%8-11r, %16-19r, %0-3r"},
   4703   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4704   1.5  christos     0xfa80f080, 0xfff0f0f0, "qadd%c\t%8-11r, %0-3r, %16-19r"},
   4705   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4706   1.5  christos     0xfa80f090, 0xfff0f0f0, "qdadd%c\t%8-11r, %0-3r, %16-19r"},
   4707   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4708   1.5  christos     0xfa80f0a0, 0xfff0f0f0, "qsub%c\t%8-11r, %0-3r, %16-19r"},
   4709   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4710   1.5  christos     0xfa80f0b0, 0xfff0f0f0, "qdsub%c\t%8-11r, %0-3r, %16-19r"},
   4711   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4712   1.5  christos     0xfa90f000, 0xfff0f0f0, "sadd16%c\t%8-11r, %16-19r, %0-3r"},
   4713   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4714   1.5  christos     0xfa90f010, 0xfff0f0f0, "qadd16%c\t%8-11r, %16-19r, %0-3r"},
   4715   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4716   1.5  christos     0xfa90f020, 0xfff0f0f0, "shadd16%c\t%8-11r, %16-19r, %0-3r"},
   4717   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4718   1.5  christos     0xfa90f040, 0xfff0f0f0, "uadd16%c\t%8-11r, %16-19r, %0-3r"},
   4719   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4720   1.5  christos     0xfa90f050, 0xfff0f0f0, "uqadd16%c\t%8-11r, %16-19r, %0-3r"},
   4721   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4722   1.5  christos     0xfa90f060, 0xfff0f0f0, "uhadd16%c\t%8-11r, %16-19r, %0-3r"},
   4723   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4724   1.5  christos     0xfa90f080, 0xfff0f0f0, "rev%c.w\t%8-11r, %16-19r"},
   4725   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4726   1.5  christos     0xfa90f090, 0xfff0f0f0, "rev16%c.w\t%8-11r, %16-19r"},
   4727   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4728   1.5  christos     0xfa90f0a0, 0xfff0f0f0, "rbit%c\t%8-11r, %16-19r"},
   4729   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4730   1.5  christos     0xfa90f0b0, 0xfff0f0f0, "revsh%c.w\t%8-11r, %16-19r"},
   4731   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4732   1.5  christos     0xfaa0f000, 0xfff0f0f0, "sasx%c\t%8-11r, %16-19r, %0-3r"},
   4733   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4734   1.5  christos     0xfaa0f010, 0xfff0f0f0, "qasx%c\t%8-11r, %16-19r, %0-3r"},
   4735   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4736   1.5  christos     0xfaa0f020, 0xfff0f0f0, "shasx%c\t%8-11r, %16-19r, %0-3r"},
   4737   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4738   1.5  christos     0xfaa0f040, 0xfff0f0f0, "uasx%c\t%8-11r, %16-19r, %0-3r"},
   4739   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4740   1.5  christos     0xfaa0f050, 0xfff0f0f0, "uqasx%c\t%8-11r, %16-19r, %0-3r"},
   4741   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4742   1.5  christos     0xfaa0f060, 0xfff0f0f0, "uhasx%c\t%8-11r, %16-19r, %0-3r"},
   4743   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4744   1.5  christos     0xfaa0f080, 0xfff0f0f0, "sel%c\t%8-11r, %16-19r, %0-3r"},
   4745   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4746   1.5  christos     0xfab0f080, 0xfff0f0f0, "clz%c\t%8-11r, %16-19r"},
   4747   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4748   1.5  christos     0xfac0f000, 0xfff0f0f0, "ssub8%c\t%8-11r, %16-19r, %0-3r"},
   4749   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4750   1.5  christos     0xfac0f010, 0xfff0f0f0, "qsub8%c\t%8-11r, %16-19r, %0-3r"},
   4751   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4752   1.5  christos     0xfac0f020, 0xfff0f0f0, "shsub8%c\t%8-11r, %16-19r, %0-3r"},
   4753   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4754   1.5  christos     0xfac0f040, 0xfff0f0f0, "usub8%c\t%8-11r, %16-19r, %0-3r"},
   4755   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4756   1.5  christos     0xfac0f050, 0xfff0f0f0, "uqsub8%c\t%8-11r, %16-19r, %0-3r"},
   4757   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4758   1.5  christos     0xfac0f060, 0xfff0f0f0, "uhsub8%c\t%8-11r, %16-19r, %0-3r"},
   4759   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4760   1.5  christos     0xfad0f000, 0xfff0f0f0, "ssub16%c\t%8-11r, %16-19r, %0-3r"},
   4761   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4762   1.5  christos     0xfad0f010, 0xfff0f0f0, "qsub16%c\t%8-11r, %16-19r, %0-3r"},
   4763   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4764   1.5  christos     0xfad0f020, 0xfff0f0f0, "shsub16%c\t%8-11r, %16-19r, %0-3r"},
   4765   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4766   1.5  christos     0xfad0f040, 0xfff0f0f0, "usub16%c\t%8-11r, %16-19r, %0-3r"},
   4767   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4768   1.5  christos     0xfad0f050, 0xfff0f0f0, "uqsub16%c\t%8-11r, %16-19r, %0-3r"},
   4769   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4770   1.5  christos     0xfad0f060, 0xfff0f0f0, "uhsub16%c\t%8-11r, %16-19r, %0-3r"},
   4771   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4772   1.5  christos     0xfae0f000, 0xfff0f0f0, "ssax%c\t%8-11r, %16-19r, %0-3r"},
   4773   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4774   1.5  christos     0xfae0f010, 0xfff0f0f0, "qsax%c\t%8-11r, %16-19r, %0-3r"},
   4775   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4776   1.5  christos     0xfae0f020, 0xfff0f0f0, "shsax%c\t%8-11r, %16-19r, %0-3r"},
   4777   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4778   1.5  christos     0xfae0f040, 0xfff0f0f0, "usax%c\t%8-11r, %16-19r, %0-3r"},
   4779   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4780   1.5  christos     0xfae0f050, 0xfff0f0f0, "uqsax%c\t%8-11r, %16-19r, %0-3r"},
   4781   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4782   1.5  christos     0xfae0f060, 0xfff0f0f0, "uhsax%c\t%8-11r, %16-19r, %0-3r"},
   4783   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4784   1.5  christos     0xfb00f000, 0xfff0f0f0, "mul%c.w\t%8-11r, %16-19r, %0-3r"},
   4785   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4786   1.5  christos     0xfb70f000, 0xfff0f0f0, "usad8%c\t%8-11r, %16-19r, %0-3r"},
   4787   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4788   1.5  christos     0xfa00f000, 0xffe0f0f0, "lsl%20's%c.w\t%8-11R, %16-19R, %0-3R"},
   4789   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4790   1.5  christos     0xfa20f000, 0xffe0f0f0, "lsr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
   4791   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4792   1.5  christos     0xfa40f000, 0xffe0f0f0, "asr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
   4793   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4794   1.5  christos     0xfa60f000, 0xffe0f0f0, "ror%20's%c.w\t%8-11r, %16-19r, %0-3r"},
   4795   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4796   1.5  christos     0xe8c00f40, 0xfff00fe0, "strex%4?hb%c\t%0-3r, %12-15r, [%16-19r]"},
   4797   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4798  1.10  christos     0xf3200000, 0xfff0f0e0, "ssat16%c\t%8-11r, %{I:#%0-4D%}, %16-19r"},
   4799   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4800  1.10  christos     0xf3a00000, 0xfff0f0e0, "usat16%c\t%8-11r, %{I:#%0-4d%}, %16-19r"},
   4801   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4802   1.5  christos     0xfb20f000, 0xfff0f0e0, "smuad%4'x%c\t%8-11r, %16-19r, %0-3r"},
   4803   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4804   1.5  christos     0xfb30f000, 0xfff0f0e0, "smulw%4?tb%c\t%8-11r, %16-19r, %0-3r"},
   4805   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4806   1.5  christos     0xfb40f000, 0xfff0f0e0, "smusd%4'x%c\t%8-11r, %16-19r, %0-3r"},
   4807   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4808   1.5  christos     0xfb50f000, 0xfff0f0e0, "smmul%4'r%c\t%8-11r, %16-19r, %0-3r"},
   4809   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4810   1.5  christos     0xfa00f080, 0xfff0f0c0, "sxtah%c\t%8-11r, %16-19r, %0-3r%R"},
   4811   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4812   1.5  christos     0xfa10f080, 0xfff0f0c0, "uxtah%c\t%8-11r, %16-19r, %0-3r%R"},
   4813   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4814   1.5  christos     0xfa20f080, 0xfff0f0c0, "sxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
   4815   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4816   1.5  christos     0xfa30f080, 0xfff0f0c0, "uxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
   4817   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4818   1.5  christos     0xfa40f080, 0xfff0f0c0, "sxtab%c\t%8-11r, %16-19r, %0-3r%R"},
   4819   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4820   1.5  christos     0xfa50f080, 0xfff0f0c0, "uxtab%c\t%8-11r, %16-19r, %0-3r%R"},
   4821   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4822   1.5  christos     0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r"},
   4823   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4824   1.5  christos     0xf36f0000, 0xffff8020, "bfc%c\t%8-11r, %E"},
   4825   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4826   1.5  christos     0xea100f00, 0xfff08f00, "tst%c.w\t%16-19r, %S"},
   4827   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4828   1.5  christos     0xea900f00, 0xfff08f00, "teq%c\t%16-19r, %S"},
   4829   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4830   1.5  christos     0xeb100f00, 0xfff08f00, "cmn%c.w\t%16-19r, %S"},
   4831   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4832   1.5  christos     0xebb00f00, 0xfff08f00, "cmp%c.w\t%16-19r, %S"},
   4833   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4834   1.5  christos     0xf0100f00, 0xfbf08f00, "tst%c.w\t%16-19r, %M"},
   4835   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4836   1.5  christos     0xf0900f00, 0xfbf08f00, "teq%c\t%16-19r, %M"},
   4837   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4838   1.5  christos     0xf1100f00, 0xfbf08f00, "cmn%c.w\t%16-19r, %M"},
   4839   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4840   1.5  christos     0xf1b00f00, 0xfbf08f00, "cmp%c.w\t%16-19r, %M"},
   4841   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4842   1.5  christos     0xea4f0000, 0xffef8000, "mov%20's%c.w\t%8-11r, %S"},
   4843   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4844   1.5  christos     0xea6f0000, 0xffef8000, "mvn%20's%c.w\t%8-11r, %S"},
   4845   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4846   1.5  christos     0xe8c00070, 0xfff000f0, "strexd%c\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
   4847   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4848   1.5  christos     0xfb000000, 0xfff000f0, "mla%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
   4849   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4850   1.5  christos     0xfb000010, 0xfff000f0, "mls%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
   4851   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4852   1.5  christos     0xfb700000, 0xfff000f0, "usada8%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4853   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4854   1.5  christos     0xfb800000, 0xfff000f0, "smull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4855   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4856   1.5  christos     0xfba00000, 0xfff000f0, "umull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4857   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4858   1.5  christos     0xfbc00000, 0xfff000f0, "smlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4859   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4860   1.5  christos     0xfbe00000, 0xfff000f0, "umlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4861   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4862   1.5  christos     0xfbe00060, 0xfff000f0, "umaal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4863   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4864  1.10  christos     0xe8500f00, 0xfff00f00, "ldrex%c\t%12-15r, [%16-19r, %{I:#%0-7W%}]"},
   4865   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4866   1.5  christos     0xf04f0000, 0xfbef8000, "mov%20's%c.w\t%8-11r, %M"},
   4867   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4868   1.5  christos     0xf06f0000, 0xfbef8000, "mvn%20's%c.w\t%8-11r, %M"},
   4869   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4870   1.5  christos     0xf810f000, 0xff70f000, "pld%c\t%a"},
   4871   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4872   1.5  christos     0xfb200000, 0xfff000e0, "smlad%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4873   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4874   1.5  christos     0xfb300000, 0xfff000e0, "smlaw%4?tb%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4875   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4876   1.5  christos     0xfb400000, 0xfff000e0, "smlsd%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4877   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4878   1.5  christos     0xfb500000, 0xfff000e0, "smmla%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4879   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4880   1.5  christos     0xfb600000, 0xfff000e0, "smmls%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4881   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4882   1.5  christos     0xfbc000c0, 0xfff000e0, "smlald%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4883   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4884   1.5  christos     0xfbd000c0, 0xfff000e0, "smlsld%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4885   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4886   1.5  christos     0xeac00000, 0xfff08030, "pkhbt%c\t%8-11r, %16-19r, %S"},
   4887   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4888   1.5  christos     0xeac00020, 0xfff08030, "pkhtb%c\t%8-11r, %16-19r, %S"},
   4889   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4890   1.5  christos     0xf3400000, 0xfff08020, "sbfx%c\t%8-11r, %16-19r, %F"},
   4891   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4892   1.5  christos     0xf3c00000, 0xfff08020, "ubfx%c\t%8-11r, %16-19r, %F"},
   4893   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4894   1.5  christos     0xf8000e00, 0xff900f00, "str%wt%c\t%12-15r, %a"},
   4895   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4896   1.5  christos     0xfb100000, 0xfff000c0,
   4897   1.5  christos     "smla%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
   4898   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4899   1.5  christos     0xfbc00080, 0xfff000c0,
   4900   1.5  christos     "smlal%5?tb%4?tb%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
   4901   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4902   1.5  christos     0xf3600000, 0xfff08020, "bfi%c\t%8-11r, %16-19r, %E"},
   4903   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4904   1.5  christos     0xf8100e00, 0xfe900f00, "ldr%wt%c\t%12-15r, %a"},
   4905   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4906  1.10  christos     0xf3000000, 0xffd08020, "ssat%c\t%8-11r, %{I:#%0-4D%}, %16-19r%s"},
   4907   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4908  1.10  christos     0xf3800000, 0xffd08020, "usat%c\t%8-11r, %{I:#%0-4d%}, %16-19r%s"},
   4909   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4910   1.5  christos     0xf2000000, 0xfbf08000, "addw%c\t%8-11r, %16-19r, %I"},
   4911   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4912   1.5  christos     0xf2400000, 0xfbf08000, "movw%c\t%8-11r, %J"},
   4913   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4914   1.5  christos     0xf2a00000, 0xfbf08000, "subw%c\t%8-11r, %16-19r, %I"},
   4915   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4916   1.5  christos     0xf2c00000, 0xfbf08000, "movt%c\t%8-11r, %J"},
   4917   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4918   1.5  christos     0xea000000, 0xffe08000, "and%20's%c.w\t%8-11r, %16-19r, %S"},
   4919   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4920   1.5  christos     0xea200000, 0xffe08000, "bic%20's%c.w\t%8-11r, %16-19r, %S"},
   4921   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4922   1.5  christos     0xea400000, 0xffe08000, "orr%20's%c.w\t%8-11r, %16-19r, %S"},
   4923   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4924   1.5  christos     0xea600000, 0xffe08000, "orn%20's%c\t%8-11r, %16-19r, %S"},
   4925   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4926   1.5  christos     0xea800000, 0xffe08000, "eor%20's%c.w\t%8-11r, %16-19r, %S"},
   4927   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4928   1.5  christos     0xeb000000, 0xffe08000, "add%20's%c.w\t%8-11r, %16-19r, %S"},
   4929   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4930   1.5  christos     0xeb400000, 0xffe08000, "adc%20's%c.w\t%8-11r, %16-19r, %S"},
   4931   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4932   1.5  christos     0xeb600000, 0xffe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %S"},
   4933   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4934   1.5  christos     0xeba00000, 0xffe08000, "sub%20's%c.w\t%8-11r, %16-19r, %S"},
   4935   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4936   1.5  christos     0xebc00000, 0xffe08000, "rsb%20's%c\t%8-11r, %16-19r, %S"},
   4937   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4938  1.10  christos     0xe8400000, 0xfff00000, "strex%c\t%8-11r, %12-15r, [%16-19r, %{I:#%0-7W%}]"},
   4939   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4940   1.5  christos     0xf0000000, 0xfbe08000, "and%20's%c.w\t%8-11r, %16-19r, %M"},
   4941   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4942   1.5  christos     0xf0200000, 0xfbe08000, "bic%20's%c.w\t%8-11r, %16-19r, %M"},
   4943   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4944   1.5  christos     0xf0400000, 0xfbe08000, "orr%20's%c.w\t%8-11r, %16-19r, %M"},
   4945   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4946   1.5  christos     0xf0600000, 0xfbe08000, "orn%20's%c\t%8-11r, %16-19r, %M"},
   4947   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4948   1.5  christos     0xf0800000, 0xfbe08000, "eor%20's%c.w\t%8-11r, %16-19r, %M"},
   4949   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4950   1.5  christos     0xf1000000, 0xfbe08000, "add%20's%c.w\t%8-11r, %16-19r, %M"},
   4951   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4952   1.5  christos     0xf1400000, 0xfbe08000, "adc%20's%c.w\t%8-11r, %16-19r, %M"},
   4953   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4954   1.5  christos     0xf1600000, 0xfbe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %M"},
   4955   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4956   1.5  christos     0xf1a00000, 0xfbe08000, "sub%20's%c.w\t%8-11r, %16-19r, %M"},
   4957   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4958   1.5  christos     0xf1c00000, 0xfbe08000, "rsb%20's%c\t%8-11r, %16-19r, %M"},
   4959   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4960   1.5  christos     0xe8800000, 0xffd00000, "stmia%c.w\t%16-19r%21'!, %m"},
   4961   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4962   1.5  christos     0xe8900000, 0xffd00000, "ldmia%c.w\t%16-19r%21'!, %m"},
   4963   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4964   1.5  christos     0xe9000000, 0xffd00000, "stmdb%c\t%16-19r%21'!, %m"},
   4965   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4966   1.5  christos     0xe9100000, 0xffd00000, "ldmdb%c\t%16-19r%21'!, %m"},
   4967   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4968   1.5  christos     0xe9c00000, 0xffd000ff, "strd%c\t%12-15r, %8-11r, [%16-19r]"},
   4969   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4970   1.5  christos     0xe9d00000, 0xffd000ff, "ldrd%c\t%12-15r, %8-11r, [%16-19r]"},
   4971   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4972   1.5  christos     0xe9400000, 0xff500000,
   4973  1.10  christos     "strd%c\t%12-15r, %8-11r, [%16-19r, %{I:#%23`-%0-7W%}]%21'!%L"},
   4974   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4975   1.5  christos     0xe9500000, 0xff500000,
   4976  1.10  christos     "ldrd%c\t%12-15r, %8-11r, [%16-19r, %{I:#%23`-%0-7W%}]%21'!%L"},
   4977   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4978   1.5  christos     0xe8600000, 0xff700000,
   4979  1.10  christos     "strd%c\t%12-15r, %8-11r, [%16-19r], %{I:#%23`-%0-7W%}%L"},
   4980   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4981   1.5  christos     0xe8700000, 0xff700000,
   4982  1.10  christos     "ldrd%c\t%12-15r, %8-11r, [%16-19r], %{I:#%23`-%0-7W%}%L"},
   4983   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4984   1.5  christos     0xf8000000, 0xff100000, "str%w%c.w\t%12-15r, %a"},
   4985   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4986   1.5  christos     0xf8100000, 0xfe100000, "ldr%w%c.w\t%12-15r, %a"},
   4987   1.1  christos 
   4988   1.1  christos   /* Filter out Bcc with cond=E or F, which are used for other instructions.  */
   4989   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4990   1.5  christos     0xf3c08000, 0xfbc0d000, "undefined (bcc, cond=0xF)"},
   4991   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4992   1.5  christos     0xf3808000, 0xfbc0d000, "undefined (bcc, cond=0xE)"},
   4993   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4994   1.5  christos     0xf0008000, 0xf800d000, "b%22-25c.w\t%b%X"},
   4995   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4996   1.5  christos     0xf0009000, 0xf800d000, "b%c.w\t%B%x"},
   4997   1.1  christos 
   4998   1.1  christos   /* These have been 32-bit since the invention of Thumb.  */
   4999   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   5000   1.5  christos      0xf000c000, 0xf800d001, "blx%c\t%B%x"},
   5001   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   5002   1.5  christos      0xf000d000, 0xf800d000, "bl%c\t%B%x"},
   5003   1.1  christos 
   5004   1.1  christos   /* Fallback.  */
   5005   1.5  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   5006   1.5  christos       0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
   5007   1.5  christos   {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   5008   1.1  christos };
   5009   1.1  christos 
   5010   1.1  christos static const char *const arm_conditional[] =
   5011   1.1  christos {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
   5012   1.1  christos  "hi", "ls", "ge", "lt", "gt", "le", "al", "<und>", ""};
   5013   1.1  christos 
   5014   1.1  christos static const char *const arm_fp_const[] =
   5015   1.1  christos {"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
   5016   1.1  christos 
   5017   1.1  christos static const char *const arm_shift[] =
   5018   1.1  christos {"lsl", "lsr", "asr", "ror"};
   5019   1.1  christos 
   5020   1.1  christos typedef struct
   5021   1.1  christos {
   5022   1.1  christos   const char *name;
   5023   1.1  christos   const char *description;
   5024   1.1  christos   const char *reg_names[16];
   5025   1.1  christos }
   5026   1.1  christos arm_regname;
   5027   1.1  christos 
   5028   1.1  christos static const arm_regname regnames[] =
   5029   1.1  christos {
   5030   1.7  christos   { "reg-names-raw", N_("Select raw register names"),
   5031   1.1  christos     { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
   5032   1.7  christos   { "reg-names-gcc", N_("Select register names used by GCC"),
   5033   1.1  christos     { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "sl",  "fp",  "ip",  "sp",  "lr",  "pc" }},
   5034   1.7  christos   { "reg-names-std", N_("Select register names used in ARM's ISA documentation"),
   5035   1.1  christos     { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp",  "lr",  "pc" }},
   5036   1.7  christos   { "force-thumb", N_("Assume all insns are Thumb insns"), {NULL} },
   5037   1.7  christos   { "no-force-thumb", N_("Examine preceding label to determine an insn's type"), {NULL} },
   5038   1.7  christos   { "reg-names-apcs", N_("Select register names used in the APCS"),
   5039   1.1  christos     { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl",  "fp",  "ip",  "sp",  "lr",  "pc" }},
   5040   1.7  christos   { "reg-names-atpcs", N_("Select register names used in the ATPCS"),
   5041   1.1  christos     { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7",  "v8",  "IP",  "SP",  "LR",  "PC" }},
   5042   1.7  christos   { "reg-names-special-atpcs", N_("Select special register names used in the ATPCS"),
   5043   1.9  christos     { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL",  "FP",  "IP",  "SP",  "LR",  "PC" }},
   5044   1.9  christos   { "coproc<N>=(cde|generic)", N_("Enable CDE extensions for coprocessor N space"), { NULL } }
   5045   1.1  christos };
   5046   1.1  christos 
   5047   1.1  christos static const char *const iwmmxt_wwnames[] =
   5048   1.1  christos {"b", "h", "w", "d"};
   5049   1.1  christos 
   5050   1.1  christos static const char *const iwmmxt_wwssnames[] =
   5051   1.1  christos {"b", "bus", "bc", "bss",
   5052   1.1  christos  "h", "hus", "hc", "hss",
   5053   1.1  christos  "w", "wus", "wc", "wss",
   5054   1.1  christos  "d", "dus", "dc", "dss"
   5055   1.1  christos };
   5056   1.1  christos 
   5057   1.1  christos static const char *const iwmmxt_regnames[] =
   5058   1.1  christos { "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7",
   5059   1.1  christos   "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"
   5060   1.1  christos };
   5061   1.1  christos 
   5062   1.1  christos static const char *const iwmmxt_cregnames[] =
   5063   1.1  christos { "wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved",
   5064   1.1  christos   "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"
   5065   1.1  christos };
   5066   1.1  christos 
   5067   1.9  christos static const char *const vec_condnames[] =
   5068   1.9  christos { "eq", "ne", "cs", "hi", "ge", "lt", "gt", "le"
   5069   1.9  christos };
   5070   1.9  christos 
   5071   1.9  christos static const char *const mve_predicatenames[] =
   5072   1.9  christos { "", "ttt", "tt", "tte", "t", "tee", "te", "tet", "",
   5073   1.9  christos   "eee", "ee", "eet", "e", "ett", "et", "ete"
   5074   1.9  christos };
   5075   1.9  christos 
   5076   1.9  christos /* Names for 2-bit size field for mve vector isntructions.  */
   5077   1.9  christos static const char *const mve_vec_sizename[] =
   5078   1.9  christos   { "8", "16", "32", "64"};
   5079   1.9  christos 
   5080   1.9  christos /* Indicates whether we are processing a then predicate,
   5081   1.9  christos    else predicate or none at all.  */
   5082   1.9  christos enum vpt_pred_state
   5083   1.9  christos {
   5084   1.9  christos   PRED_NONE,
   5085   1.9  christos   PRED_THEN,
   5086   1.9  christos   PRED_ELSE
   5087   1.9  christos };
   5088   1.9  christos 
   5089   1.9  christos /* Information used to process a vpt block and subsequent instructions.  */
   5090   1.9  christos struct vpt_block
   5091   1.9  christos {
   5092   1.9  christos   /* Are we in a vpt block.  */
   5093  1.10  christos   bool in_vpt_block;
   5094   1.9  christos 
   5095   1.9  christos   /* Next predicate state if in vpt block.  */
   5096   1.9  christos   enum vpt_pred_state next_pred_state;
   5097   1.9  christos 
   5098   1.9  christos   /* Mask from vpt/vpst instruction.  */
   5099   1.9  christos   long predicate_mask;
   5100   1.9  christos 
   5101   1.9  christos   /* Instruction number in vpt block.  */
   5102   1.9  christos   long current_insn_num;
   5103   1.9  christos 
   5104   1.9  christos   /* Number of instructions in vpt block..   */
   5105   1.9  christos   long num_pred_insn;
   5106   1.9  christos };
   5107   1.9  christos 
   5108   1.9  christos static struct vpt_block vpt_block_state =
   5109   1.9  christos {
   5110  1.10  christos   false,
   5111   1.9  christos   PRED_NONE,
   5112   1.9  christos   0,
   5113   1.9  christos   0,
   5114   1.9  christos   0
   5115   1.9  christos };
   5116   1.9  christos 
   5117   1.1  christos /* Default to GCC register name set.  */
   5118   1.1  christos static unsigned int regname_selected = 1;
   5119   1.1  christos 
   5120   1.7  christos #define NUM_ARM_OPTIONS   ARRAY_SIZE (regnames)
   5121   1.1  christos #define arm_regnames      regnames[regname_selected].reg_names
   5122   1.1  christos 
   5123  1.10  christos static bool force_thumb = false;
   5124   1.9  christos static uint16_t cde_coprocs = 0;
   5125   1.1  christos 
   5126   1.1  christos /* Current IT instruction state.  This contains the same state as the IT
   5127   1.1  christos    bits in the CPSR.  */
   5128   1.1  christos static unsigned int ifthen_state;
   5129   1.1  christos /* IT state for the next instruction.  */
   5130   1.1  christos static unsigned int ifthen_next_state;
   5131   1.1  christos /* The address of the insn for which the IT state is valid.  */
   5132   1.1  christos static bfd_vma ifthen_address;
   5133   1.1  christos #define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
   5134   1.1  christos /* Indicates that the current Conditional state is unconditional or outside
   5135   1.1  christos    an IT block.  */
   5136   1.1  christos #define COND_UNCOND 16
   5137   1.1  christos 
   5138   1.1  christos 
   5139   1.1  christos /* Functions.  */
   5141   1.9  christos /* Extract the predicate mask for a VPT or VPST instruction.
   5142   1.1  christos    The mask is composed of bits 13-15 (Mkl) and bit 22 (Mkh).  */
   5143   1.9  christos 
   5144   1.9  christos static long
   5145   1.9  christos mve_extract_pred_mask (long given)
   5146   1.9  christos {
   5147   1.9  christos   return ((given & 0x00400000) >> 19) | ((given & 0xe000) >> 13);
   5148   1.1  christos }
   5149   1.9  christos 
   5150   1.9  christos /* Return the number of instructions in a MVE predicate block.  */
   5151   1.9  christos static long
   5152   1.1  christos num_instructions_vpt_block (long given)
   5153   1.9  christos {
   5154   1.9  christos   long mask = mve_extract_pred_mask (given);
   5155   1.9  christos   if (mask == 0)
   5156   1.9  christos     return 0;
   5157   1.9  christos 
   5158   1.9  christos   if (mask == 8)
   5159   1.6  christos     return 1;
   5160   1.9  christos 
   5161   1.9  christos   if ((mask & 7) == 4)
   5162   1.9  christos     return 2;
   5163   1.9  christos 
   5164   1.9  christos   if ((mask & 3) == 2)
   5165   1.9  christos     return 3;
   5166   1.9  christos 
   5167   1.9  christos   if ((mask & 1) == 1)
   5168   1.9  christos     return 4;
   5169   1.9  christos 
   5170   1.9  christos   return 0;
   5171   1.9  christos }
   5172   1.9  christos 
   5173   1.9  christos static void
   5174   1.9  christos mark_outside_vpt_block (void)
   5175  1.10  christos {
   5176   1.9  christos   vpt_block_state.in_vpt_block = false;
   5177   1.9  christos   vpt_block_state.next_pred_state = PRED_NONE;
   5178   1.9  christos   vpt_block_state.predicate_mask = 0;
   5179   1.9  christos   vpt_block_state.current_insn_num = 0;
   5180   1.9  christos   vpt_block_state.num_pred_insn = 0;
   5181   1.9  christos }
   5182   1.9  christos 
   5183   1.9  christos static void
   5184   1.9  christos mark_inside_vpt_block (long given)
   5185  1.10  christos {
   5186   1.9  christos   vpt_block_state.in_vpt_block = true;
   5187   1.9  christos   vpt_block_state.next_pred_state = PRED_THEN;
   5188   1.9  christos   vpt_block_state.predicate_mask = mve_extract_pred_mask (given);
   5189   1.9  christos   vpt_block_state.current_insn_num = 0;
   5190   1.9  christos   vpt_block_state.num_pred_insn = num_instructions_vpt_block (given);
   5191   1.9  christos   assert (vpt_block_state.num_pred_insn >= 1);
   5192   1.9  christos }
   5193   1.9  christos 
   5194   1.9  christos static enum vpt_pred_state
   5195   1.9  christos invert_next_predicate_state (enum vpt_pred_state astate)
   5196   1.9  christos {
   5197   1.9  christos   if (astate == PRED_THEN)
   5198   1.9  christos     return PRED_ELSE;
   5199   1.9  christos   else if (astate == PRED_ELSE)
   5200   1.9  christos     return PRED_THEN;
   5201   1.9  christos   else
   5202   1.9  christos     return PRED_NONE;
   5203   1.9  christos }
   5204   1.9  christos 
   5205   1.9  christos static enum vpt_pred_state
   5206   1.9  christos update_next_predicate_state (void)
   5207   1.9  christos {
   5208   1.9  christos   long pred_mask = vpt_block_state.predicate_mask;
   5209   1.9  christos   long mask_for_insn = 0;
   5210   1.9  christos 
   5211   1.9  christos   switch (vpt_block_state.current_insn_num)
   5212   1.9  christos     {
   5213   1.9  christos     case 1:
   5214   1.9  christos       mask_for_insn = 8;
   5215   1.9  christos       break;
   5216   1.9  christos 
   5217   1.9  christos     case 2:
   5218   1.9  christos       mask_for_insn = 4;
   5219   1.9  christos       break;
   5220   1.9  christos 
   5221   1.9  christos     case 3:
   5222   1.9  christos       mask_for_insn = 2;
   5223   1.9  christos       break;
   5224   1.9  christos 
   5225   1.9  christos     case 4:
   5226   1.9  christos       return PRED_NONE;
   5227   1.9  christos     }
   5228   1.9  christos 
   5229   1.9  christos   if (pred_mask & mask_for_insn)
   5230   1.9  christos     return invert_next_predicate_state (vpt_block_state.next_pred_state);
   5231   1.9  christos   else
   5232   1.9  christos     return vpt_block_state.next_pred_state;
   5233   1.9  christos }
   5234   1.9  christos 
   5235   1.9  christos static void
   5236   1.9  christos update_vpt_block_state (void)
   5237   1.9  christos {
   5238   1.9  christos   vpt_block_state.current_insn_num++;
   5239   1.9  christos   if (vpt_block_state.current_insn_num == vpt_block_state.num_pred_insn)
   5240   1.9  christos     {
   5241   1.9  christos       /* No more instructions to process in vpt block.  */
   5242   1.9  christos       mark_outside_vpt_block ();
   5243   1.9  christos       return;
   5244   1.9  christos     }
   5245   1.9  christos 
   5246   1.9  christos   vpt_block_state.next_pred_state = update_next_predicate_state ();
   5247   1.9  christos }
   5248   1.9  christos 
   5249   1.9  christos /* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
   5250   1.9  christos    Returns pointer to following character of the format string and
   5251   1.9  christos    fills in *VALUEP and *WIDTHP with the extracted value and number of
   5252   1.9  christos    bits extracted.  WIDTHP can be NULL.  */
   5253   1.9  christos 
   5254   1.9  christos static const char *
   5255   1.9  christos arm_decode_bitfield (const char *ptr,
   5256   1.9  christos 		     unsigned long insn,
   5257   1.9  christos 		     unsigned long *valuep,
   5258   1.9  christos 		     int *widthp)
   5259   1.9  christos {
   5260   1.9  christos   unsigned long value = 0;
   5261   1.9  christos   int width = 0;
   5262   1.9  christos 
   5263   1.9  christos   do
   5264   1.9  christos     {
   5265   1.9  christos       int start, end;
   5266   1.9  christos       int bits;
   5267   1.9  christos 
   5268   1.9  christos       for (start = 0; *ptr >= '0' && *ptr <= '9'; ptr++)
   5269   1.9  christos 	start = start * 10 + *ptr - '0';
   5270   1.9  christos       if (*ptr == '-')
   5271   1.9  christos 	for (end = 0, ptr++; *ptr >= '0' && *ptr <= '9'; ptr++)
   5272   1.9  christos 	  end = end * 10 + *ptr - '0';
   5273   1.9  christos       else
   5274   1.9  christos 	end = start;
   5275   1.9  christos       bits = end - start;
   5276   1.9  christos       if (bits < 0)
   5277   1.9  christos 	abort ();
   5278   1.9  christos       value |= ((insn >> start) & ((2ul << bits) - 1)) << width;
   5279   1.9  christos       width += bits + 1;
   5280   1.9  christos     }
   5281   1.9  christos   while (*ptr++ == ',');
   5282   1.9  christos   *valuep = value;
   5283   1.9  christos   if (widthp)
   5284   1.9  christos     *widthp = width;
   5285   1.9  christos   return ptr - 1;
   5286   1.9  christos }
   5287   1.9  christos 
   5288  1.10  christos static void
   5289  1.10  christos arm_decode_shift (long given, fprintf_styled_ftype func, void *stream,
   5290   1.9  christos 		  bool print_shift)
   5291  1.10  christos {
   5292   1.9  christos   func (stream, dis_style_register, "%s", arm_regnames[given & 0xf]);
   5293   1.9  christos 
   5294   1.9  christos   if ((given & 0xff0) != 0)
   5295   1.9  christos     {
   5296   1.9  christos       if ((given & 0x10) == 0)
   5297   1.9  christos 	{
   5298   1.9  christos 	  int amount = (given & 0xf80) >> 7;
   5299   1.9  christos 	  int shift = (given & 0x60) >> 5;
   5300   1.9  christos 
   5301   1.9  christos 	  if (amount == 0)
   5302   1.9  christos 	    {
   5303   1.9  christos 	      if (shift == 3)
   5304  1.10  christos 		{
   5305  1.10  christos 		  func (stream, dis_style_text, ", ");
   5306   1.9  christos 		  func (stream, dis_style_sub_mnemonic, "rrx");
   5307   1.9  christos 		  return;
   5308   1.9  christos 		}
   5309   1.9  christos 
   5310   1.9  christos 	      amount = 32;
   5311   1.9  christos 	    }
   5312   1.9  christos 
   5313  1.10  christos 	  if (print_shift)
   5314  1.10  christos 	    {
   5315  1.10  christos 	      func (stream, dis_style_text, ", ");
   5316  1.10  christos 	      func (stream, dis_style_sub_mnemonic, "%s ", arm_shift[shift]);
   5317  1.10  christos 	      func (stream, dis_style_immediate, "#%d", amount);
   5318   1.9  christos 	    }
   5319  1.10  christos 	  else
   5320  1.10  christos 	    {
   5321  1.10  christos 	      func (stream, dis_style_text, ", ");
   5322  1.10  christos 	      func (stream, dis_style_immediate, "#%d", amount);
   5323   1.9  christos 	    }
   5324   1.9  christos 	}
   5325  1.10  christos       else if ((given & 0x80) == 0x80)
   5326  1.10  christos 	func (stream, dis_style_comment_start,
   5327   1.9  christos 	      "\t@ <illegal shifter operand>");
   5328  1.10  christos       else if (print_shift)
   5329  1.10  christos 	{
   5330  1.10  christos 	  func (stream, dis_style_text, ", ");
   5331  1.10  christos 	  func (stream, dis_style_sub_mnemonic, "%s ",
   5332  1.10  christos 		arm_shift[(given & 0x60) >> 5]);
   5333  1.10  christos 	  func (stream, dis_style_register, "%s",
   5334  1.10  christos 		arm_regnames[(given & 0xf00) >> 8]);
   5335   1.9  christos 	}
   5336  1.10  christos       else
   5337  1.10  christos 	{
   5338  1.10  christos 	  func (stream, dis_style_text, ", ");
   5339  1.10  christos 	  func (stream, dis_style_register, "%s",
   5340  1.10  christos 		arm_regnames[(given & 0xf00) >> 8]);
   5341   1.9  christos 	}
   5342   1.9  christos     }
   5343   1.9  christos }
   5344   1.9  christos 
   5345   1.9  christos /* Return TRUE if the MATCHED_INSN can be inside an IT block.  */
   5346  1.10  christos 
   5347   1.9  christos static bool
   5348   1.9  christos is_mve_okay_in_it (enum mve_instructions matched_insn)
   5349   1.9  christos {
   5350   1.9  christos   switch (matched_insn)
   5351   1.9  christos     {
   5352   1.9  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   5353   1.9  christos     case MVE_VMOV2_VEC_LANE_TO_GP:
   5354   1.9  christos     case MVE_VMOV2_GP_TO_VEC_LANE:
   5355   1.9  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   5356   1.9  christos     case MVE_LSLL:
   5357   1.9  christos     case MVE_LSLLI:
   5358   1.9  christos     case MVE_LSRL:
   5359   1.9  christos     case MVE_ASRL:
   5360   1.9  christos     case MVE_ASRLI:
   5361   1.9  christos     case MVE_SQRSHRL:
   5362   1.9  christos     case MVE_SQRSHR:
   5363   1.9  christos     case MVE_UQRSHL:
   5364   1.9  christos     case MVE_UQRSHLL:
   5365   1.9  christos     case MVE_UQSHL:
   5366   1.9  christos     case MVE_UQSHLL:
   5367   1.9  christos     case MVE_URSHRL:
   5368   1.9  christos     case MVE_URSHR:
   5369   1.9  christos     case MVE_SRSHRL:
   5370   1.9  christos     case MVE_SRSHR:
   5371   1.9  christos     case MVE_SQSHLL:
   5372  1.10  christos     case MVE_SQSHL:
   5373   1.9  christos       return true;
   5374  1.10  christos     default:
   5375   1.9  christos       return false;
   5376   1.9  christos     }
   5377   1.9  christos }
   5378  1.10  christos 
   5379   1.9  christos static bool
   5380   1.9  christos is_mve_architecture (struct disassemble_info *info)
   5381   1.9  christos {
   5382   1.9  christos   struct arm_private_data *private_data = info->private_data;
   5383   1.9  christos   arm_feature_set allowed_arches = private_data->features;
   5384   1.9  christos 
   5385   1.9  christos   arm_feature_set arm_ext_v8_1m_main
   5386   1.9  christos     = ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
   5387   1.9  christos 
   5388   1.9  christos   if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
   5389  1.10  christos       && !ARM_CPU_IS_ANY (allowed_arches))
   5390   1.9  christos     return true;
   5391  1.10  christos   else
   5392   1.9  christos     return false;
   5393   1.9  christos }
   5394  1.10  christos 
   5395   1.9  christos static bool
   5396   1.9  christos is_vpt_instruction (long given)
   5397   1.9  christos {
   5398   1.9  christos 
   5399   1.9  christos   /* If mkh:mkl is '0000' then its not a vpt/vpst instruction.  */
   5400  1.10  christos   if ((given & 0x0040e000) == 0)
   5401   1.9  christos     return false;
   5402   1.9  christos 
   5403   1.9  christos   /* VPT floating point T1 variant.  */
   5404   1.9  christos   if (((given & 0xefb10f50) == 0xee310f00 && ((given & 0x1001) != 0x1))
   5405   1.9  christos   /* VPT floating point T2 variant.  */
   5406   1.9  christos       || ((given & 0xefb10f50) == 0xee310f40)
   5407   1.9  christos   /* VPT vector T1 variant.  */
   5408   1.9  christos       || ((given & 0xff811f51) == 0xfe010f00)
   5409   1.9  christos   /* VPT vector T2 variant.  */
   5410   1.9  christos       || ((given & 0xff811f51) == 0xfe010f01
   5411   1.9  christos 	  && ((given & 0x300000) != 0x300000))
   5412   1.9  christos   /* VPT vector T3 variant.  */
   5413   1.9  christos       || ((given & 0xff811f50) == 0xfe011f00)
   5414   1.9  christos   /* VPT vector T4 variant.  */
   5415   1.9  christos       || ((given & 0xff811f70) == 0xfe010f40)
   5416   1.9  christos   /* VPT vector T5 variant.  */
   5417   1.9  christos       || ((given & 0xff811f70) == 0xfe010f60)
   5418   1.9  christos   /* VPT vector T6 variant.  */
   5419   1.9  christos       || ((given & 0xff811f50) == 0xfe011f40)
   5420   1.9  christos   /* VPST vector T variant.  */
   5421  1.10  christos       || ((given & 0xffbf1fff) == 0xfe310f4d))
   5422   1.9  christos     return true;
   5423  1.10  christos   else
   5424   1.9  christos     return false;
   5425   1.9  christos }
   5426   1.9  christos 
   5427   1.9  christos /* Decode a bitfield from opcode GIVEN, with starting bitfield = START
   5428   1.9  christos    and ending bitfield = END.  END must be greater than START.  */
   5429   1.9  christos 
   5430   1.9  christos static unsigned long
   5431   1.9  christos arm_decode_field (unsigned long given, unsigned int start, unsigned int end)
   5432   1.9  christos {
   5433   1.9  christos   int bits = end - start;
   5434   1.9  christos 
   5435   1.9  christos   if (bits < 0)
   5436   1.9  christos     abort ();
   5437   1.9  christos 
   5438   1.9  christos   return ((given >> start) & ((2ul << bits) - 1));
   5439   1.9  christos }
   5440   1.9  christos 
   5441   1.9  christos /* Decode a bitfield from opcode GIVEN, with multiple bitfields:
   5442   1.9  christos    START:END and START2:END2.  END/END2 must be greater than
   5443   1.9  christos    START/START2.  */
   5444   1.9  christos 
   5445   1.9  christos static unsigned long
   5446   1.9  christos arm_decode_field_multiple (unsigned long given, unsigned int start,
   5447   1.9  christos 			   unsigned int end, unsigned int start2,
   5448   1.9  christos 			   unsigned int end2)
   5449   1.9  christos {
   5450   1.9  christos   int bits = end - start;
   5451   1.9  christos   int bits2 = end2 - start2;
   5452   1.9  christos   unsigned long value = 0;
   5453   1.9  christos   int width = 0;
   5454   1.9  christos 
   5455   1.9  christos   if (bits2 < 0)
   5456   1.9  christos     abort ();
   5457   1.9  christos 
   5458   1.9  christos   value = arm_decode_field (given, start, end);
   5459   1.9  christos   width += bits + 1;
   5460   1.9  christos 
   5461   1.9  christos   value |= ((given >> start2) & ((2ul << bits2) - 1)) << width;
   5462   1.9  christos   return value;
   5463   1.9  christos }
   5464   1.9  christos 
   5465   1.9  christos /* Return TRUE if the GIVEN encoding should not be decoded as MATCHED_INSN.
   5466   1.9  christos    This helps us decode instructions that change mnemonic depending on specific
   5467   1.9  christos    operand values/encodings.  */
   5468  1.10  christos 
   5469   1.9  christos static bool
   5470   1.9  christos is_mve_encoding_conflict (unsigned long given,
   5471   1.9  christos 			  enum mve_instructions matched_insn)
   5472   1.9  christos {
   5473   1.9  christos   switch (matched_insn)
   5474   1.9  christos     {
   5475   1.9  christos     case MVE_VPST:
   5476  1.10  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5477   1.9  christos 	return true;
   5478  1.10  christos       else
   5479   1.9  christos 	return false;
   5480   1.9  christos 
   5481   1.9  christos     case MVE_VPT_FP_T1:
   5482  1.10  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5483   1.9  christos 	return true;
   5484   1.9  christos       if ((arm_decode_field (given, 12, 12) == 0)
   5485  1.10  christos 	  && (arm_decode_field (given, 0, 0) == 1))
   5486  1.10  christos 	return true;
   5487   1.9  christos       return false;
   5488   1.9  christos 
   5489   1.9  christos     case MVE_VPT_FP_T2:
   5490  1.10  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5491   1.9  christos 	return true;
   5492  1.10  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   5493  1.10  christos 	return true;
   5494   1.9  christos       return false;
   5495   1.9  christos 
   5496   1.9  christos     case MVE_VPT_VEC_T1:
   5497   1.9  christos     case MVE_VPT_VEC_T2:
   5498   1.9  christos     case MVE_VPT_VEC_T3:
   5499   1.9  christos     case MVE_VPT_VEC_T4:
   5500   1.9  christos     case MVE_VPT_VEC_T5:
   5501   1.9  christos     case MVE_VPT_VEC_T6:
   5502  1.10  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5503   1.9  christos 	return true;
   5504  1.10  christos       if (arm_decode_field (given, 20, 21) == 3)
   5505  1.10  christos 	return true;
   5506   1.9  christos       return false;
   5507   1.9  christos 
   5508   1.9  christos     case MVE_VCMP_FP_T1:
   5509   1.9  christos       if ((arm_decode_field (given, 12, 12) == 0)
   5510  1.10  christos 	  && (arm_decode_field (given, 0, 0) == 1))
   5511   1.9  christos 	return true;
   5512  1.10  christos       else
   5513   1.9  christos 	return false;
   5514   1.9  christos 
   5515   1.9  christos     case MVE_VCMP_FP_T2:
   5516  1.10  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   5517   1.9  christos 	return true;
   5518  1.10  christos       else
   5519   1.9  christos 	return false;
   5520   1.9  christos 
   5521   1.9  christos     case MVE_VQADD_T2:
   5522   1.9  christos     case MVE_VQSUB_T2:
   5523   1.9  christos     case MVE_VMUL_VEC_T2:
   5524   1.9  christos     case MVE_VMULH:
   5525   1.9  christos     case MVE_VRMULH:
   5526   1.9  christos     case MVE_VMLA:
   5527   1.9  christos     case MVE_VMAX:
   5528   1.9  christos     case MVE_VMIN:
   5529   1.9  christos     case MVE_VBRSR:
   5530   1.9  christos     case MVE_VADD_VEC_T2:
   5531   1.9  christos     case MVE_VSUB_VEC_T2:
   5532   1.9  christos     case MVE_VABAV:
   5533   1.9  christos     case MVE_VQRSHL_T1:
   5534   1.9  christos     case MVE_VQSHL_T4:
   5535   1.9  christos     case MVE_VRSHL_T1:
   5536   1.9  christos     case MVE_VSHL_T3:
   5537   1.9  christos     case MVE_VCADD_VEC:
   5538   1.9  christos     case MVE_VHCADD:
   5539   1.9  christos     case MVE_VDDUP:
   5540   1.9  christos     case MVE_VIDUP:
   5541   1.9  christos     case MVE_VQRDMLADH:
   5542   1.9  christos     case MVE_VQDMLAH:
   5543   1.9  christos     case MVE_VQRDMLAH:
   5544   1.9  christos     case MVE_VQDMLASH:
   5545   1.9  christos     case MVE_VQRDMLASH:
   5546   1.9  christos     case MVE_VQDMLSDH:
   5547   1.9  christos     case MVE_VQRDMLSDH:
   5548   1.9  christos     case MVE_VQDMULH_T3:
   5549   1.9  christos     case MVE_VQRDMULH_T4:
   5550   1.9  christos     case MVE_VQDMLADH:
   5551   1.9  christos     case MVE_VMLAS:
   5552   1.9  christos     case MVE_VMULL_INT:
   5553   1.9  christos     case MVE_VHADD_T2:
   5554   1.9  christos     case MVE_VHSUB_T2:
   5555   1.9  christos     case MVE_VCMP_VEC_T1:
   5556   1.9  christos     case MVE_VCMP_VEC_T2:
   5557   1.9  christos     case MVE_VCMP_VEC_T3:
   5558   1.9  christos     case MVE_VCMP_VEC_T4:
   5559   1.9  christos     case MVE_VCMP_VEC_T5:
   5560   1.9  christos     case MVE_VCMP_VEC_T6:
   5561  1.10  christos       if (arm_decode_field (given, 20, 21) == 3)
   5562   1.9  christos 	return true;
   5563  1.10  christos       else
   5564   1.9  christos 	return false;
   5565   1.9  christos 
   5566   1.9  christos     case MVE_VLD2:
   5567   1.9  christos     case MVE_VLD4:
   5568   1.9  christos     case MVE_VST2:
   5569   1.9  christos     case MVE_VST4:
   5570  1.10  christos       if (arm_decode_field (given, 7, 8) == 3)
   5571   1.9  christos 	return true;
   5572  1.10  christos       else
   5573   1.9  christos 	return false;
   5574   1.9  christos 
   5575   1.9  christos     case MVE_VSTRB_T1:
   5576   1.9  christos     case MVE_VSTRH_T2:
   5577   1.9  christos       if ((arm_decode_field (given, 24, 24) == 0)
   5578   1.9  christos 	  && (arm_decode_field (given, 21, 21) == 0))
   5579  1.10  christos 	{
   5580   1.9  christos 	    return true;
   5581   1.9  christos 	}
   5582  1.10  christos       else if ((arm_decode_field (given, 7, 8) == 3))
   5583   1.9  christos 	return true;
   5584  1.10  christos       else
   5585   1.9  christos 	return false;
   5586  1.10  christos 
   5587  1.10  christos     case MVE_VLDRB_T1:
   5588  1.10  christos     case MVE_VLDRH_T2:
   5589   1.9  christos     case MVE_VLDRW_T7:
   5590   1.9  christos     case MVE_VSTRB_T5:
   5591   1.9  christos     case MVE_VSTRH_T6:
   5592   1.9  christos     case MVE_VSTRW_T7:
   5593   1.9  christos       if ((arm_decode_field (given, 24, 24) == 0)
   5594   1.9  christos 	  && (arm_decode_field (given, 21, 21) == 0))
   5595  1.10  christos 	{
   5596   1.9  christos 	    return true;
   5597   1.9  christos 	}
   5598  1.10  christos       else
   5599   1.9  christos 	return false;
   5600   1.9  christos 
   5601   1.9  christos     case MVE_VCVT_FP_FIX_VEC:
   5602   1.9  christos       return (arm_decode_field (given, 16, 21) & 0x38) == 0;
   5603   1.9  christos 
   5604   1.9  christos     case MVE_VBIC_IMM:
   5605   1.9  christos     case MVE_VORR_IMM:
   5606   1.9  christos       {
   5607   1.9  christos 	unsigned long cmode = arm_decode_field (given, 8, 11);
   5608   1.9  christos 
   5609  1.10  christos 	if ((cmode & 1) == 0)
   5610   1.9  christos 	  return true;
   5611  1.10  christos 	else if ((cmode & 0xc) == 0xc)
   5612   1.9  christos 	  return true;
   5613  1.10  christos 	else
   5614   1.9  christos 	  return false;
   5615   1.9  christos       }
   5616   1.9  christos 
   5617   1.9  christos     case MVE_VMVN_IMM:
   5618   1.9  christos       {
   5619   1.9  christos 	unsigned long cmode = arm_decode_field (given, 8, 11);
   5620   1.9  christos 
   5621  1.10  christos 	if (cmode == 0xe)
   5622   1.9  christos 	  return true;
   5623  1.10  christos 	else if ((cmode & 0x9) == 1)
   5624   1.9  christos 	  return true;
   5625  1.10  christos 	else if ((cmode & 0xd) == 9)
   5626   1.9  christos 	  return true;
   5627  1.10  christos 	else
   5628   1.9  christos 	  return false;
   5629   1.9  christos       }
   5630   1.9  christos 
   5631   1.9  christos     case MVE_VMOV_IMM_TO_VEC:
   5632   1.9  christos       if ((arm_decode_field (given, 5, 5) == 1)
   5633  1.10  christos 	  && (arm_decode_field (given, 8, 11) != 0xe))
   5634   1.9  christos 	return true;
   5635  1.10  christos       else
   5636   1.9  christos 	return false;
   5637   1.9  christos 
   5638   1.9  christos     case MVE_VMOVL:
   5639   1.9  christos       {
   5640   1.9  christos 	unsigned long size = arm_decode_field (given, 19, 20);
   5641  1.10  christos 	if ((size == 0) || (size == 3))
   5642   1.9  christos 	  return true;
   5643  1.10  christos 	else
   5644   1.9  christos 	  return false;
   5645   1.9  christos       }
   5646   1.9  christos 
   5647   1.9  christos     case MVE_VMAXA:
   5648   1.9  christos     case MVE_VMINA:
   5649   1.9  christos     case MVE_VMAXV:
   5650   1.9  christos     case MVE_VMAXAV:
   5651   1.9  christos     case MVE_VMINV:
   5652   1.9  christos     case MVE_VMINAV:
   5653   1.9  christos     case MVE_VQRSHL_T2:
   5654   1.9  christos     case MVE_VQSHL_T1:
   5655   1.9  christos     case MVE_VRSHL_T2:
   5656   1.9  christos     case MVE_VSHL_T2:
   5657   1.9  christos     case MVE_VSHLL_T2:
   5658   1.9  christos     case MVE_VADDV:
   5659   1.9  christos     case MVE_VMOVN:
   5660   1.9  christos     case MVE_VQMOVUN:
   5661   1.9  christos     case MVE_VQMOVN:
   5662  1.10  christos       if (arm_decode_field (given, 18, 19) == 3)
   5663   1.9  christos 	return true;
   5664  1.10  christos       else
   5665   1.9  christos 	return false;
   5666   1.9  christos 
   5667   1.9  christos     case MVE_VMLSLDAV:
   5668   1.9  christos     case MVE_VRMLSLDAVH:
   5669   1.9  christos     case MVE_VMLALDAV:
   5670   1.9  christos     case MVE_VADDLV:
   5671  1.10  christos       if (arm_decode_field (given, 20, 22) == 7)
   5672   1.9  christos 	return true;
   5673  1.10  christos       else
   5674   1.9  christos 	return false;
   5675   1.9  christos 
   5676   1.9  christos     case MVE_VRMLALDAVH:
   5677  1.10  christos       if ((arm_decode_field (given, 20, 22) & 6) == 6)
   5678   1.9  christos 	return true;
   5679  1.10  christos       else
   5680   1.9  christos 	return false;
   5681   1.9  christos 
   5682   1.9  christos     case MVE_VDWDUP:
   5683   1.9  christos     case MVE_VIWDUP:
   5684   1.9  christos       if ((arm_decode_field (given, 20, 21) == 3)
   5685  1.10  christos 	  || (arm_decode_field (given, 1, 3) == 7))
   5686   1.9  christos 	return true;
   5687  1.10  christos       else
   5688   1.9  christos 	return false;
   5689   1.9  christos 
   5690   1.9  christos 
   5691   1.9  christos     case MVE_VSHLL_T1:
   5692   1.9  christos       if (arm_decode_field (given, 16, 18) == 0)
   5693   1.9  christos 	{
   5694   1.9  christos 	  unsigned long sz = arm_decode_field (given, 19, 20);
   5695   1.9  christos 
   5696  1.10  christos 	  if ((sz == 1) || (sz == 2))
   5697   1.9  christos 	    return true;
   5698  1.10  christos 	  else
   5699   1.9  christos 	    return false;
   5700   1.9  christos 	}
   5701  1.10  christos       else
   5702   1.9  christos 	return false;
   5703   1.9  christos 
   5704   1.9  christos     case MVE_VQSHL_T2:
   5705   1.9  christos     case MVE_VQSHLU_T3:
   5706   1.9  christos     case MVE_VRSHR:
   5707   1.9  christos     case MVE_VSHL_T1:
   5708   1.9  christos     case MVE_VSHR:
   5709   1.9  christos     case MVE_VSLI:
   5710   1.9  christos     case MVE_VSRI:
   5711  1.10  christos       if (arm_decode_field (given, 19, 21) == 0)
   5712   1.9  christos 	return true;
   5713  1.10  christos       else
   5714   1.9  christos 	return false;
   5715   1.9  christos 
   5716   1.9  christos     case MVE_VCTP:
   5717  1.10  christos     if (arm_decode_field (given, 16, 19) == 0xf)
   5718   1.9  christos       return true;
   5719  1.10  christos     else
   5720   1.9  christos       return false;
   5721   1.9  christos 
   5722   1.9  christos     case MVE_ASRLI:
   5723   1.9  christos     case MVE_ASRL:
   5724   1.9  christos     case MVE_LSLLI:
   5725   1.9  christos     case MVE_LSLL:
   5726   1.9  christos     case MVE_LSRL:
   5727   1.9  christos     case MVE_SQRSHRL:
   5728   1.9  christos     case MVE_SQSHLL:
   5729   1.9  christos     case MVE_SRSHRL:
   5730   1.9  christos     case MVE_UQRSHLL:
   5731   1.9  christos     case MVE_UQSHLL:
   5732   1.9  christos     case MVE_URSHRL:
   5733  1.10  christos       if (arm_decode_field (given, 9, 11) == 0x7)
   5734   1.9  christos 	return true;
   5735  1.10  christos       else
   5736   1.9  christos 	return false;
   5737   1.9  christos 
   5738   1.9  christos     case MVE_CSINC:
   5739   1.9  christos     case MVE_CSINV:
   5740   1.9  christos       {
   5741   1.9  christos 	unsigned long rm, rn;
   5742   1.9  christos 	rm = arm_decode_field (given, 0, 3);
   5743   1.9  christos 	rn = arm_decode_field (given, 16, 19);
   5744   1.9  christos 	/* CSET/CSETM.  */
   5745  1.10  christos 	if (rm == 0xf && rn == 0xf)
   5746   1.9  christos 	  return true;
   5747   1.9  christos 	/* CINC/CINV.  */
   5748  1.10  christos 	else if (rn == rm && rn != 0xf)
   5749   1.9  christos 	  return true;
   5750   1.9  christos       }
   5751   1.9  christos     /* Fall through.  */
   5752   1.9  christos     case MVE_CSEL:
   5753   1.9  christos     case MVE_CSNEG:
   5754  1.10  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   5755   1.9  christos 	return true;
   5756   1.9  christos       /* CNEG.  */
   5757   1.9  christos       else if (matched_insn == MVE_CSNEG)
   5758  1.10  christos 	if (arm_decode_field (given, 0, 3) == arm_decode_field (given, 16, 19))
   5759  1.10  christos 	  return true;
   5760   1.9  christos       return false;
   5761   1.9  christos 
   5762   1.9  christos     default:
   5763   1.9  christos     case MVE_VADD_FP_T1:
   5764   1.9  christos     case MVE_VADD_FP_T2:
   5765  1.10  christos     case MVE_VADD_VEC_T1:
   5766   1.9  christos       return false;
   5767   1.9  christos 
   5768   1.9  christos     }
   5769   1.9  christos }
   5770   1.9  christos 
   5771   1.9  christos static void
   5772   1.9  christos print_mve_vld_str_addr (struct disassemble_info *info,
   5773   1.9  christos 			unsigned long given,
   5774   1.9  christos 			enum mve_instructions matched_insn)
   5775   1.9  christos {
   5776  1.10  christos   void *stream = info->stream;
   5777   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   5778   1.9  christos 
   5779   1.9  christos   unsigned long p, w, gpr, imm, add, mod_imm;
   5780   1.9  christos 
   5781   1.9  christos   imm = arm_decode_field (given, 0, 6);
   5782   1.9  christos   mod_imm = imm;
   5783   1.9  christos 
   5784   1.9  christos   switch (matched_insn)
   5785   1.9  christos     {
   5786   1.9  christos     case MVE_VLDRB_T1:
   5787   1.9  christos     case MVE_VSTRB_T1:
   5788   1.9  christos       gpr = arm_decode_field (given, 16, 18);
   5789   1.9  christos       break;
   5790   1.9  christos 
   5791   1.9  christos     case MVE_VLDRH_T2:
   5792   1.9  christos     case MVE_VSTRH_T2:
   5793   1.9  christos       gpr = arm_decode_field (given, 16, 18);
   5794   1.9  christos       mod_imm = imm << 1;
   5795   1.9  christos       break;
   5796   1.9  christos 
   5797   1.9  christos     case MVE_VLDRH_T6:
   5798   1.9  christos     case MVE_VSTRH_T6:
   5799   1.9  christos       gpr = arm_decode_field (given, 16, 19);
   5800   1.9  christos       mod_imm = imm << 1;
   5801   1.9  christos       break;
   5802   1.9  christos 
   5803   1.9  christos     case MVE_VLDRW_T7:
   5804   1.9  christos     case MVE_VSTRW_T7:
   5805   1.9  christos       gpr = arm_decode_field (given, 16, 19);
   5806   1.9  christos       mod_imm = imm << 2;
   5807   1.9  christos       break;
   5808   1.9  christos 
   5809   1.9  christos     case MVE_VLDRB_T5:
   5810   1.9  christos     case MVE_VSTRB_T5:
   5811   1.9  christos       gpr = arm_decode_field (given, 16, 19);
   5812   1.9  christos       break;
   5813   1.9  christos 
   5814   1.9  christos     default:
   5815   1.9  christos       return;
   5816   1.9  christos     }
   5817   1.9  christos 
   5818   1.9  christos   p = arm_decode_field (given, 24, 24);
   5819   1.9  christos   w = arm_decode_field (given, 21, 21);
   5820   1.9  christos 
   5821   1.9  christos   add = arm_decode_field (given, 23, 23);
   5822   1.9  christos 
   5823   1.9  christos   char * add_sub;
   5824   1.9  christos 
   5825   1.9  christos   /* Don't print anything for '+' as it is implied.  */
   5826   1.9  christos   if (add == 1)
   5827   1.9  christos     add_sub = "";
   5828   1.9  christos   else
   5829   1.9  christos     add_sub = "-";
   5830  1.10  christos 
   5831  1.10  christos   func (stream, dis_style_text, "[");
   5832   1.9  christos   func (stream, dis_style_register, "%s", arm_regnames[gpr]);
   5833   1.9  christos   if (p == 1)
   5834  1.10  christos     {
   5835  1.10  christos       func (stream, dis_style_text, ", ");
   5836   1.9  christos       func (stream, dis_style_immediate, "#%s%lu", add_sub, mod_imm);
   5837   1.9  christos       /* Offset mode.  */
   5838  1.10  christos       if (w == 0)
   5839   1.9  christos 	func (stream, dis_style_text, "]");
   5840   1.9  christos       /* Pre-indexed mode.  */
   5841  1.10  christos       else
   5842   1.9  christos 	func (stream, dis_style_text, "]!");
   5843   1.9  christos     }
   5844  1.10  christos   else if ((p == 0) && (w == 1))
   5845  1.10  christos     {
   5846  1.10  christos       /* Post-index mode.  */
   5847  1.10  christos       func (stream, dis_style_text, "], ");
   5848  1.10  christos       func (stream, dis_style_immediate, "#%s%lu", add_sub, mod_imm);
   5849   1.9  christos     }
   5850   1.9  christos }
   5851   1.9  christos 
   5852   1.9  christos /* Return FALSE if GIVEN is not an undefined encoding for MATCHED_INSN.
   5853   1.9  christos    Otherwise, return TRUE and set UNDEFINED_CODE to give a reason as to why
   5854   1.9  christos    this encoding is undefined.  */
   5855  1.10  christos 
   5856   1.9  christos static bool
   5857   1.9  christos is_mve_undefined (unsigned long given, enum mve_instructions matched_insn,
   5858   1.9  christos 		  enum mve_undefined *undefined_code)
   5859   1.9  christos {
   5860   1.9  christos   *undefined_code = UNDEF_NONE;
   5861   1.9  christos 
   5862   1.9  christos   switch (matched_insn)
   5863   1.9  christos     {
   5864   1.9  christos     case MVE_VDUP:
   5865   1.9  christos       if (arm_decode_field_multiple (given, 5, 5, 22, 22) == 3)
   5866   1.9  christos 	{
   5867  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   5868   1.9  christos 	  return true;
   5869   1.9  christos 	}
   5870  1.10  christos       else
   5871   1.9  christos 	return false;
   5872   1.9  christos 
   5873   1.9  christos     case MVE_VQADD_T1:
   5874   1.9  christos     case MVE_VQSUB_T1:
   5875   1.9  christos     case MVE_VMUL_VEC_T1:
   5876   1.9  christos     case MVE_VABD_VEC:
   5877   1.9  christos     case MVE_VADD_VEC_T1:
   5878   1.9  christos     case MVE_VSUB_VEC_T1:
   5879   1.9  christos     case MVE_VQDMULH_T1:
   5880   1.9  christos     case MVE_VQRDMULH_T2:
   5881   1.9  christos     case MVE_VRHADD:
   5882   1.9  christos     case MVE_VHADD_T1:
   5883   1.9  christos     case MVE_VHSUB_T1:
   5884   1.9  christos       if (arm_decode_field (given, 20, 21) == 3)
   5885   1.9  christos 	{
   5886  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   5887   1.9  christos 	  return true;
   5888   1.9  christos 	}
   5889  1.10  christos       else
   5890   1.9  christos 	return false;
   5891   1.9  christos 
   5892   1.9  christos     case MVE_VLDRB_T1:
   5893   1.9  christos       if (arm_decode_field (given, 7, 8) == 3)
   5894   1.9  christos 	{
   5895  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   5896   1.9  christos 	  return true;
   5897   1.9  christos 	}
   5898  1.10  christos       else
   5899   1.9  christos 	return false;
   5900   1.9  christos 
   5901   1.9  christos     case MVE_VLDRH_T2:
   5902   1.9  christos       if (arm_decode_field (given, 7, 8) <= 1)
   5903   1.9  christos 	{
   5904  1.10  christos 	  *undefined_code = UNDEF_SIZE_LE_1;
   5905   1.9  christos 	  return true;
   5906   1.9  christos 	}
   5907  1.10  christos       else
   5908   1.9  christos 	return false;
   5909   1.9  christos 
   5910   1.9  christos     case MVE_VSTRB_T1:
   5911   1.9  christos       if ((arm_decode_field (given, 7, 8) == 0))
   5912   1.9  christos 	{
   5913  1.10  christos 	  *undefined_code = UNDEF_SIZE_0;
   5914   1.9  christos 	  return true;
   5915   1.9  christos 	}
   5916  1.10  christos       else
   5917   1.9  christos 	return false;
   5918   1.9  christos 
   5919   1.9  christos     case MVE_VSTRH_T2:
   5920   1.9  christos       if ((arm_decode_field (given, 7, 8) <= 1))
   5921   1.9  christos 	{
   5922  1.10  christos 	  *undefined_code = UNDEF_SIZE_LE_1;
   5923   1.9  christos 	  return true;
   5924   1.9  christos 	}
   5925  1.10  christos       else
   5926   1.9  christos 	return false;
   5927   1.9  christos 
   5928   1.9  christos     case MVE_VLDRB_GATHER_T1:
   5929   1.9  christos       if (arm_decode_field (given, 7, 8) == 3)
   5930   1.9  christos 	{
   5931  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   5932   1.9  christos 	  return true;
   5933   1.9  christos 	}
   5934   1.9  christos       else if ((arm_decode_field (given, 28, 28) == 0)
   5935   1.9  christos 	       && (arm_decode_field (given, 7, 8) == 0))
   5936   1.9  christos 	{
   5937  1.10  christos 	  *undefined_code = UNDEF_NOT_UNS_SIZE_0;
   5938   1.9  christos 	  return true;
   5939   1.9  christos 	}
   5940  1.10  christos       else
   5941   1.9  christos 	return false;
   5942   1.9  christos 
   5943   1.9  christos     case MVE_VLDRH_GATHER_T2:
   5944   1.9  christos       if (arm_decode_field (given, 7, 8) == 3)
   5945   1.9  christos 	{
   5946  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   5947   1.9  christos 	  return true;
   5948   1.9  christos 	}
   5949   1.9  christos       else if ((arm_decode_field (given, 28, 28) == 0)
   5950   1.9  christos 	       && (arm_decode_field (given, 7, 8) == 1))
   5951   1.9  christos 	{
   5952  1.10  christos 	  *undefined_code = UNDEF_NOT_UNS_SIZE_1;
   5953   1.9  christos 	  return true;
   5954   1.9  christos 	}
   5955   1.9  christos       else if (arm_decode_field (given, 7, 8) == 0)
   5956   1.9  christos 	{
   5957  1.10  christos 	  *undefined_code = UNDEF_SIZE_0;
   5958   1.9  christos 	  return true;
   5959   1.9  christos 	}
   5960  1.10  christos       else
   5961   1.9  christos 	return false;
   5962   1.9  christos 
   5963   1.9  christos     case MVE_VLDRW_GATHER_T3:
   5964   1.9  christos       if (arm_decode_field (given, 7, 8) != 2)
   5965   1.9  christos 	{
   5966  1.10  christos 	  *undefined_code = UNDEF_SIZE_NOT_2;
   5967   1.9  christos 	  return true;
   5968   1.9  christos 	}
   5969   1.9  christos       else if (arm_decode_field (given, 28, 28) == 0)
   5970   1.9  christos 	{
   5971  1.10  christos 	  *undefined_code = UNDEF_NOT_UNSIGNED;
   5972   1.9  christos 	  return true;
   5973   1.9  christos 	}
   5974  1.10  christos       else
   5975   1.9  christos 	return false;
   5976   1.9  christos 
   5977   1.9  christos     case MVE_VLDRD_GATHER_T4:
   5978   1.9  christos       if (arm_decode_field (given, 7, 8) != 3)
   5979   1.9  christos 	{
   5980  1.10  christos 	  *undefined_code = UNDEF_SIZE_NOT_3;
   5981   1.9  christos 	  return true;
   5982   1.9  christos 	}
   5983   1.9  christos       else if (arm_decode_field (given, 28, 28) == 0)
   5984   1.9  christos 	{
   5985  1.10  christos 	  *undefined_code = UNDEF_NOT_UNSIGNED;
   5986   1.9  christos 	  return true;
   5987   1.9  christos 	}
   5988  1.10  christos       else
   5989   1.9  christos 	return false;
   5990   1.9  christos 
   5991   1.9  christos     case MVE_VSTRB_SCATTER_T1:
   5992   1.9  christos       if (arm_decode_field (given, 7, 8) == 3)
   5993   1.9  christos 	{
   5994  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   5995   1.9  christos 	  return true;
   5996   1.9  christos 	}
   5997  1.10  christos       else
   5998   1.9  christos 	return false;
   5999   1.9  christos 
   6000   1.9  christos     case MVE_VSTRH_SCATTER_T2:
   6001   1.9  christos       {
   6002   1.9  christos 	unsigned long size = arm_decode_field (given, 7, 8);
   6003   1.9  christos 	if (size == 3)
   6004   1.9  christos 	  {
   6005  1.10  christos 	    *undefined_code = UNDEF_SIZE_3;
   6006   1.9  christos 	    return true;
   6007   1.9  christos 	  }
   6008   1.9  christos 	else if (size == 0)
   6009   1.9  christos 	  {
   6010  1.10  christos 	    *undefined_code = UNDEF_SIZE_0;
   6011   1.9  christos 	    return true;
   6012   1.9  christos 	  }
   6013  1.10  christos 	else
   6014   1.9  christos 	  return false;
   6015   1.9  christos       }
   6016   1.9  christos 
   6017   1.9  christos     case MVE_VSTRW_SCATTER_T3:
   6018   1.9  christos       if (arm_decode_field (given, 7, 8) != 2)
   6019   1.9  christos 	{
   6020  1.10  christos 	  *undefined_code = UNDEF_SIZE_NOT_2;
   6021   1.9  christos 	  return true;
   6022   1.9  christos 	}
   6023  1.10  christos       else
   6024   1.9  christos 	return false;
   6025   1.9  christos 
   6026   1.9  christos     case MVE_VSTRD_SCATTER_T4:
   6027   1.9  christos       if (arm_decode_field (given, 7, 8) != 3)
   6028   1.9  christos 	{
   6029  1.10  christos 	  *undefined_code = UNDEF_SIZE_NOT_3;
   6030   1.9  christos 	  return true;
   6031   1.9  christos 	}
   6032  1.10  christos       else
   6033   1.9  christos 	return false;
   6034   1.9  christos 
   6035   1.9  christos     case MVE_VCVT_FP_FIX_VEC:
   6036   1.9  christos       {
   6037   1.9  christos 	unsigned long imm6 = arm_decode_field (given, 16, 21);
   6038   1.9  christos 	if ((imm6 & 0x20) == 0)
   6039   1.9  christos 	  {
   6040  1.10  christos 	    *undefined_code = UNDEF_VCVT_IMM6;
   6041   1.9  christos 	    return true;
   6042   1.9  christos 	  }
   6043   1.9  christos 
   6044   1.9  christos 	if ((arm_decode_field (given, 9, 9) == 0)
   6045   1.9  christos 	    && ((imm6 & 0x30) == 0x20))
   6046   1.9  christos 	  {
   6047  1.10  christos 	    *undefined_code = UNDEF_VCVT_FSI_IMM6;
   6048   1.9  christos 	    return true;
   6049   1.9  christos 	  }
   6050  1.10  christos 
   6051   1.9  christos 	return false;
   6052   1.9  christos       }
   6053   1.9  christos 
   6054   1.9  christos     case MVE_VNEG_FP:
   6055   1.9  christos     case MVE_VABS_FP:
   6056   1.9  christos     case MVE_VCVT_BETWEEN_FP_INT:
   6057   1.9  christos     case MVE_VCVT_FROM_FP_TO_INT:
   6058   1.9  christos       {
   6059   1.9  christos 	unsigned long size = arm_decode_field (given, 18, 19);
   6060   1.9  christos 	if (size == 0)
   6061   1.9  christos 	  {
   6062  1.10  christos 	    *undefined_code = UNDEF_SIZE_0;
   6063   1.9  christos 	    return true;
   6064   1.9  christos 	  }
   6065   1.9  christos 	else if (size == 3)
   6066   1.9  christos 	  {
   6067  1.10  christos 	    *undefined_code = UNDEF_SIZE_3;
   6068   1.9  christos 	    return true;
   6069   1.9  christos 	  }
   6070  1.10  christos 	else
   6071   1.9  christos 	  return false;
   6072   1.9  christos       }
   6073   1.9  christos 
   6074   1.9  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   6075   1.9  christos       {
   6076   1.9  christos 	unsigned long op1 = arm_decode_field (given, 21, 22);
   6077   1.9  christos 	unsigned long op2 = arm_decode_field (given, 5, 6);
   6078   1.9  christos 	unsigned long u = arm_decode_field (given, 23, 23);
   6079   1.9  christos 
   6080   1.9  christos 	if ((op2 == 0) && (u == 1))
   6081   1.9  christos 	  {
   6082   1.9  christos 	    if ((op1 == 0) || (op1 == 1))
   6083   1.9  christos 	      {
   6084  1.10  christos 		*undefined_code = UNDEF_BAD_U_OP1_OP2;
   6085   1.9  christos 		return true;
   6086   1.9  christos 	      }
   6087  1.10  christos 	    else
   6088   1.9  christos 	      return false;
   6089   1.9  christos 	  }
   6090   1.9  christos 	else if (op2 == 2)
   6091   1.9  christos 	  {
   6092   1.9  christos 	    if ((op1 == 0) || (op1 == 1))
   6093   1.9  christos 	      {
   6094  1.10  christos 		*undefined_code = UNDEF_BAD_OP1_OP2;
   6095   1.9  christos 		return true;
   6096   1.9  christos 	      }
   6097  1.10  christos 	    else
   6098   1.9  christos 	      return false;
   6099   1.9  christos 	  }
   6100  1.10  christos 
   6101   1.9  christos 	return false;
   6102   1.9  christos       }
   6103   1.9  christos 
   6104   1.9  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   6105   1.9  christos       if (arm_decode_field (given, 5, 6) == 2)
   6106   1.9  christos 	{
   6107   1.9  christos 	  unsigned long op1 = arm_decode_field (given, 21, 22);
   6108   1.9  christos 	  if ((op1 == 0) || (op1 == 1))
   6109   1.9  christos 	    {
   6110  1.10  christos 	      *undefined_code = UNDEF_BAD_OP1_OP2;
   6111   1.9  christos 	      return true;
   6112   1.9  christos 	    }
   6113  1.10  christos 	  else
   6114   1.9  christos 	    return false;
   6115   1.9  christos 	}
   6116  1.10  christos       else
   6117   1.9  christos 	return false;
   6118   1.9  christos 
   6119   1.9  christos     case MVE_VMOV_VEC_TO_VEC:
   6120   1.9  christos       if ((arm_decode_field (given, 5, 5) == 1)
   6121  1.10  christos 	  || (arm_decode_field (given, 22, 22) == 1))
   6122  1.10  christos 	  return true;
   6123   1.9  christos       return false;
   6124   1.9  christos 
   6125   1.9  christos     case MVE_VMOV_IMM_TO_VEC:
   6126   1.9  christos       if (arm_decode_field (given, 5, 5) == 0)
   6127   1.9  christos       {
   6128   1.9  christos 	unsigned long cmode = arm_decode_field (given, 8, 11);
   6129   1.9  christos 
   6130   1.9  christos 	if (((cmode & 9) == 1) || ((cmode & 5) == 1))
   6131   1.9  christos 	  {
   6132  1.10  christos 	    *undefined_code = UNDEF_OP_0_BAD_CMODE;
   6133   1.9  christos 	    return true;
   6134   1.9  christos 	  }
   6135  1.10  christos 	else
   6136   1.9  christos 	  return false;
   6137   1.9  christos       }
   6138  1.10  christos       else
   6139   1.9  christos 	return false;
   6140   1.9  christos 
   6141   1.9  christos     case MVE_VSHLL_T2:
   6142   1.9  christos     case MVE_VMOVN:
   6143   1.9  christos       if (arm_decode_field (given, 18, 19) == 2)
   6144   1.9  christos 	{
   6145  1.10  christos 	  *undefined_code = UNDEF_SIZE_2;
   6146   1.9  christos 	  return true;
   6147   1.9  christos 	}
   6148  1.10  christos       else
   6149   1.9  christos 	return false;
   6150   1.9  christos 
   6151   1.9  christos     case MVE_VRMLALDAVH:
   6152   1.9  christos     case MVE_VMLADAV_T1:
   6153   1.9  christos     case MVE_VMLADAV_T2:
   6154   1.9  christos     case MVE_VMLALDAV:
   6155   1.9  christos       if ((arm_decode_field (given, 28, 28) == 1)
   6156   1.9  christos 	  && (arm_decode_field (given, 12, 12) == 1))
   6157   1.9  christos 	{
   6158  1.10  christos 	  *undefined_code = UNDEF_XCHG_UNS;
   6159   1.9  christos 	  return true;
   6160   1.9  christos 	}
   6161  1.10  christos       else
   6162   1.9  christos 	return false;
   6163   1.9  christos 
   6164   1.9  christos     case MVE_VQSHRN:
   6165   1.9  christos     case MVE_VQSHRUN:
   6166   1.9  christos     case MVE_VSHLL_T1:
   6167   1.9  christos     case MVE_VSHRN:
   6168   1.9  christos       {
   6169   1.9  christos 	unsigned long sz = arm_decode_field (given, 19, 20);
   6170  1.10  christos 	if (sz == 1)
   6171   1.9  christos 	  return false;
   6172  1.10  christos 	else if ((sz & 2) == 2)
   6173   1.9  christos 	  return false;
   6174   1.9  christos 	else
   6175   1.9  christos 	  {
   6176  1.10  christos 	    *undefined_code = UNDEF_SIZE;
   6177   1.9  christos 	    return true;
   6178   1.9  christos 	  }
   6179   1.9  christos       }
   6180   1.9  christos       break;
   6181   1.9  christos 
   6182   1.9  christos     case MVE_VQSHL_T2:
   6183   1.9  christos     case MVE_VQSHLU_T3:
   6184   1.9  christos     case MVE_VRSHR:
   6185   1.9  christos     case MVE_VSHL_T1:
   6186   1.9  christos     case MVE_VSHR:
   6187   1.9  christos     case MVE_VSLI:
   6188   1.9  christos     case MVE_VSRI:
   6189   1.9  christos       {
   6190   1.9  christos 	unsigned long sz = arm_decode_field (given, 19, 21);
   6191  1.10  christos 	if ((sz & 7) == 1)
   6192   1.9  christos 	  return false;
   6193  1.10  christos 	else if ((sz & 6) == 2)
   6194   1.9  christos 	  return false;
   6195  1.10  christos 	else if ((sz & 4) == 4)
   6196   1.9  christos 	  return false;
   6197   1.9  christos 	else
   6198   1.9  christos 	  {
   6199  1.10  christos 	    *undefined_code = UNDEF_SIZE;
   6200   1.9  christos 	    return true;
   6201   1.9  christos 	  }
   6202   1.9  christos       }
   6203   1.9  christos 
   6204   1.9  christos     case MVE_VQRSHRN:
   6205   1.9  christos     case MVE_VQRSHRUN:
   6206   1.9  christos       if (arm_decode_field (given, 19, 20) == 0)
   6207   1.9  christos 	{
   6208  1.10  christos 	  *undefined_code = UNDEF_SIZE_0;
   6209   1.9  christos 	  return true;
   6210   1.9  christos 	}
   6211  1.10  christos       else
   6212   1.9  christos 	return false;
   6213   1.9  christos 
   6214   1.9  christos     case MVE_VABS_VEC:
   6215   1.9  christos 	if (arm_decode_field (given, 18, 19) == 3)
   6216   1.9  christos 	{
   6217  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   6218   1.9  christos 	  return true;
   6219   1.9  christos 	}
   6220  1.10  christos 	else
   6221   1.9  christos 	  return false;
   6222   1.9  christos 
   6223   1.9  christos     case MVE_VQNEG:
   6224   1.9  christos     case MVE_VQABS:
   6225   1.9  christos     case MVE_VNEG_VEC:
   6226   1.9  christos     case MVE_VCLS:
   6227   1.9  christos     case MVE_VCLZ:
   6228   1.9  christos       if (arm_decode_field (given, 18, 19) == 3)
   6229   1.9  christos 	{
   6230  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   6231   1.9  christos 	  return true;
   6232   1.9  christos 	}
   6233  1.10  christos       else
   6234   1.9  christos 	return false;
   6235   1.9  christos 
   6236   1.9  christos     case MVE_VREV16:
   6237  1.10  christos       if (arm_decode_field (given, 18, 19) == 0)
   6238   1.9  christos 	return false;
   6239   1.9  christos       else
   6240   1.9  christos 	{
   6241  1.10  christos 	  *undefined_code = UNDEF_SIZE_NOT_0;
   6242   1.9  christos 	  return true;
   6243   1.9  christos 	}
   6244   1.9  christos 
   6245   1.9  christos     case MVE_VREV32:
   6246   1.9  christos       {
   6247   1.9  christos 	unsigned long size = arm_decode_field (given, 18, 19);
   6248   1.9  christos 	if ((size & 2) == 2)
   6249   1.9  christos 	  {
   6250  1.10  christos 	    *undefined_code = UNDEF_SIZE_2;
   6251   1.9  christos 	    return true;
   6252   1.9  christos 	  }
   6253  1.10  christos 	else
   6254   1.9  christos 	  return false;
   6255   1.9  christos       }
   6256   1.9  christos 
   6257   1.9  christos     case MVE_VREV64:
   6258  1.10  christos       if (arm_decode_field (given, 18, 19) != 3)
   6259   1.9  christos 	return false;
   6260   1.9  christos       else
   6261   1.9  christos 	{
   6262  1.10  christos 	  *undefined_code = UNDEF_SIZE_3;
   6263   1.9  christos 	  return true;
   6264   1.9  christos 	}
   6265   1.9  christos 
   6266  1.10  christos     default:
   6267   1.9  christos       return false;
   6268   1.9  christos     }
   6269   1.9  christos }
   6270   1.9  christos 
   6271   1.9  christos /* Return FALSE if GIVEN is not an unpredictable encoding for MATCHED_INSN.
   6272   1.9  christos    Otherwise, return TRUE and set UNPREDICTABLE_CODE to give a reason as to
   6273   1.9  christos    why this encoding is unpredictable.  */
   6274  1.10  christos 
   6275   1.9  christos static bool
   6276   1.9  christos is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
   6277   1.9  christos 		      enum mve_unpredictable *unpredictable_code)
   6278   1.9  christos {
   6279   1.9  christos   *unpredictable_code = UNPRED_NONE;
   6280   1.9  christos 
   6281   1.9  christos   switch (matched_insn)
   6282   1.9  christos     {
   6283   1.9  christos     case MVE_VCMP_FP_T2:
   6284   1.9  christos     case MVE_VPT_FP_T2:
   6285   1.9  christos       if ((arm_decode_field (given, 12, 12) == 0)
   6286   1.9  christos 	  && (arm_decode_field (given, 5, 5) == 1))
   6287   1.9  christos 	{
   6288  1.10  christos 	  *unpredictable_code = UNPRED_FCA_0_FCB_1;
   6289   1.9  christos 	  return true;
   6290   1.9  christos 	}
   6291  1.10  christos       else
   6292   1.9  christos 	return false;
   6293   1.9  christos 
   6294   1.9  christos     case MVE_VPT_VEC_T4:
   6295   1.9  christos     case MVE_VPT_VEC_T5:
   6296   1.9  christos     case MVE_VPT_VEC_T6:
   6297   1.9  christos     case MVE_VCMP_VEC_T4:
   6298   1.9  christos     case MVE_VCMP_VEC_T5:
   6299   1.9  christos     case MVE_VCMP_VEC_T6:
   6300   1.9  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   6301   1.9  christos 	{
   6302  1.10  christos 	  *unpredictable_code = UNPRED_R13;
   6303   1.9  christos 	  return true;
   6304   1.9  christos 	}
   6305  1.10  christos       else
   6306   1.9  christos 	return false;
   6307   1.9  christos 
   6308   1.9  christos     case MVE_VDUP:
   6309   1.9  christos       {
   6310   1.9  christos 	unsigned long gpr = arm_decode_field (given, 12, 15);
   6311   1.9  christos 	if (gpr == 0xd)
   6312   1.9  christos 	  {
   6313  1.10  christos 	    *unpredictable_code = UNPRED_R13;
   6314   1.9  christos 	    return true;
   6315   1.9  christos 	  }
   6316   1.9  christos 	else if (gpr == 0xf)
   6317   1.9  christos 	  {
   6318  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6319   1.9  christos 	    return true;
   6320   1.9  christos 	  }
   6321  1.10  christos 
   6322   1.9  christos 	return false;
   6323   1.9  christos       }
   6324   1.9  christos 
   6325   1.9  christos     case MVE_VQADD_T2:
   6326   1.9  christos     case MVE_VQSUB_T2:
   6327   1.9  christos     case MVE_VMUL_FP_T2:
   6328   1.9  christos     case MVE_VMUL_VEC_T2:
   6329   1.9  christos     case MVE_VMLA:
   6330   1.9  christos     case MVE_VBRSR:
   6331   1.9  christos     case MVE_VADD_FP_T2:
   6332   1.9  christos     case MVE_VSUB_FP_T2:
   6333   1.9  christos     case MVE_VADD_VEC_T2:
   6334   1.9  christos     case MVE_VSUB_VEC_T2:
   6335   1.9  christos     case MVE_VQRSHL_T2:
   6336   1.9  christos     case MVE_VQSHL_T1:
   6337   1.9  christos     case MVE_VRSHL_T2:
   6338   1.9  christos     case MVE_VSHL_T2:
   6339   1.9  christos     case MVE_VSHLC:
   6340   1.9  christos     case MVE_VQDMLAH:
   6341   1.9  christos     case MVE_VQRDMLAH:
   6342   1.9  christos     case MVE_VQDMLASH:
   6343   1.9  christos     case MVE_VQRDMLASH:
   6344   1.9  christos     case MVE_VQDMULH_T3:
   6345   1.9  christos     case MVE_VQRDMULH_T4:
   6346   1.9  christos     case MVE_VMLAS:
   6347   1.9  christos     case MVE_VFMA_FP_SCALAR:
   6348   1.9  christos     case MVE_VFMAS_FP_SCALAR:
   6349   1.9  christos     case MVE_VHADD_T2:
   6350   1.9  christos     case MVE_VHSUB_T2:
   6351   1.9  christos       {
   6352   1.9  christos 	unsigned long gpr = arm_decode_field (given, 0, 3);
   6353   1.9  christos 	if (gpr == 0xd)
   6354   1.9  christos 	  {
   6355  1.10  christos 	    *unpredictable_code = UNPRED_R13;
   6356   1.9  christos 	    return true;
   6357   1.9  christos 	  }
   6358   1.9  christos 	else if (gpr == 0xf)
   6359   1.9  christos 	  {
   6360  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6361   1.9  christos 	    return true;
   6362   1.9  christos 	  }
   6363  1.10  christos 
   6364   1.9  christos 	return false;
   6365   1.9  christos       }
   6366   1.9  christos 
   6367   1.9  christos     case MVE_VLD2:
   6368   1.9  christos     case MVE_VST2:
   6369   1.9  christos       {
   6370   1.9  christos 	unsigned long rn = arm_decode_field (given, 16, 19);
   6371   1.9  christos 
   6372   1.9  christos 	if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
   6373   1.9  christos 	  {
   6374  1.10  christos 	    *unpredictable_code = UNPRED_R13_AND_WB;
   6375   1.9  christos 	    return true;
   6376   1.9  christos 	  }
   6377   1.9  christos 
   6378   1.9  christos 	if (rn == 0xf)
   6379   1.9  christos 	  {
   6380  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6381   1.9  christos 	    return true;
   6382   1.9  christos 	  }
   6383   1.9  christos 
   6384   1.9  christos 	if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 6)
   6385   1.9  christos 	  {
   6386  1.10  christos 	    *unpredictable_code = UNPRED_Q_GT_6;
   6387   1.9  christos 	    return true;
   6388   1.9  christos 	  }
   6389  1.10  christos 	else
   6390   1.9  christos 	  return false;
   6391   1.9  christos       }
   6392   1.9  christos 
   6393   1.9  christos     case MVE_VLD4:
   6394   1.9  christos     case MVE_VST4:
   6395   1.9  christos       {
   6396   1.9  christos 	unsigned long rn = arm_decode_field (given, 16, 19);
   6397   1.9  christos 
   6398   1.9  christos 	if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
   6399   1.9  christos 	  {
   6400  1.10  christos 	    *unpredictable_code = UNPRED_R13_AND_WB;
   6401   1.9  christos 	    return true;
   6402   1.9  christos 	  }
   6403   1.9  christos 
   6404   1.9  christos 	if (rn == 0xf)
   6405   1.9  christos 	  {
   6406  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6407   1.9  christos 	    return true;
   6408   1.9  christos 	  }
   6409   1.9  christos 
   6410   1.9  christos 	if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 4)
   6411   1.9  christos 	  {
   6412  1.10  christos 	    *unpredictable_code = UNPRED_Q_GT_4;
   6413   1.9  christos 	    return true;
   6414   1.9  christos 	  }
   6415  1.10  christos 	else
   6416   1.9  christos 	  return false;
   6417   1.9  christos       }
   6418   1.9  christos 
   6419   1.9  christos     case MVE_VLDRB_T5:
   6420   1.9  christos     case MVE_VLDRH_T6:
   6421   1.9  christos     case MVE_VLDRW_T7:
   6422   1.9  christos     case MVE_VSTRB_T5:
   6423   1.9  christos     case MVE_VSTRH_T6:
   6424   1.9  christos     case MVE_VSTRW_T7:
   6425   1.9  christos       {
   6426   1.9  christos 	unsigned long rn = arm_decode_field (given, 16, 19);
   6427   1.9  christos 
   6428   1.9  christos 	if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
   6429   1.9  christos 	  {
   6430  1.10  christos 	    *unpredictable_code = UNPRED_R13_AND_WB;
   6431   1.9  christos 	    return true;
   6432   1.9  christos 	  }
   6433   1.9  christos 	else if (rn == 0xf)
   6434   1.9  christos 	  {
   6435  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6436   1.9  christos 	    return true;
   6437   1.9  christos 	  }
   6438  1.10  christos 	else
   6439   1.9  christos 	  return false;
   6440   1.9  christos       }
   6441   1.9  christos 
   6442   1.9  christos     case MVE_VLDRB_GATHER_T1:
   6443   1.9  christos       if (arm_decode_field (given, 0, 0) == 1)
   6444   1.9  christos 	{
   6445  1.10  christos 	  *unpredictable_code = UNPRED_OS;
   6446   1.9  christos 	  return true;
   6447   1.9  christos 	}
   6448   1.9  christos 
   6449   1.9  christos       /*  fall through.  */
   6450   1.9  christos       /* To handle common code with T2-T4 variants.  */
   6451   1.9  christos     case MVE_VLDRH_GATHER_T2:
   6452   1.9  christos     case MVE_VLDRW_GATHER_T3:
   6453   1.9  christos     case MVE_VLDRD_GATHER_T4:
   6454   1.9  christos       {
   6455   1.9  christos 	unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6456   1.9  christos 	unsigned long qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6457   1.9  christos 
   6458   1.9  christos 	if (qd == qm)
   6459   1.9  christos 	  {
   6460  1.10  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQUAL;
   6461   1.9  christos 	    return true;
   6462   1.9  christos 	  }
   6463   1.9  christos 
   6464   1.9  christos 	if (arm_decode_field (given, 16, 19) == 0xf)
   6465   1.9  christos 	  {
   6466  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6467   1.9  christos 	    return true;
   6468   1.9  christos 	  }
   6469  1.10  christos 
   6470   1.9  christos 	return false;
   6471   1.9  christos       }
   6472   1.9  christos 
   6473   1.9  christos     case MVE_VLDRW_GATHER_T5:
   6474   1.9  christos     case MVE_VLDRD_GATHER_T6:
   6475   1.9  christos       {
   6476   1.9  christos 	unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6477   1.9  christos 	unsigned long qm = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6478   1.9  christos 
   6479   1.9  christos 	if (qd == qm)
   6480   1.9  christos 	  {
   6481  1.10  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQUAL;
   6482   1.9  christos 	    return true;
   6483   1.9  christos 	  }
   6484  1.10  christos 	else
   6485   1.9  christos 	  return false;
   6486   1.9  christos       }
   6487   1.9  christos 
   6488   1.9  christos     case MVE_VSTRB_SCATTER_T1:
   6489   1.9  christos       if (arm_decode_field (given, 16, 19) == 0xf)
   6490   1.9  christos 	{
   6491  1.10  christos 	  *unpredictable_code = UNPRED_R15;
   6492   1.9  christos 	  return true;
   6493   1.9  christos 	}
   6494   1.9  christos       else if (arm_decode_field (given, 0, 0) == 1)
   6495   1.9  christos 	{
   6496  1.10  christos 	  *unpredictable_code = UNPRED_OS;
   6497   1.9  christos 	  return true;
   6498   1.9  christos 	}
   6499  1.10  christos       else
   6500   1.9  christos 	return false;
   6501   1.9  christos 
   6502   1.9  christos     case MVE_VSTRH_SCATTER_T2:
   6503   1.9  christos     case MVE_VSTRW_SCATTER_T3:
   6504   1.9  christos     case MVE_VSTRD_SCATTER_T4:
   6505   1.9  christos       if (arm_decode_field (given, 16, 19) == 0xf)
   6506   1.9  christos 	{
   6507  1.10  christos 	  *unpredictable_code = UNPRED_R15;
   6508   1.9  christos 	  return true;
   6509   1.9  christos 	}
   6510  1.10  christos       else
   6511   1.9  christos 	return false;
   6512   1.9  christos 
   6513   1.9  christos     case MVE_VMOV2_VEC_LANE_TO_GP:
   6514   1.9  christos     case MVE_VMOV2_GP_TO_VEC_LANE:
   6515   1.9  christos     case MVE_VCVT_BETWEEN_FP_INT:
   6516   1.9  christos     case MVE_VCVT_FROM_FP_TO_INT:
   6517   1.9  christos       {
   6518   1.9  christos 	unsigned long rt = arm_decode_field (given, 0, 3);
   6519   1.9  christos 	unsigned long rt2 = arm_decode_field (given, 16, 19);
   6520   1.9  christos 
   6521   1.9  christos 	if ((rt == 0xd) || (rt2 == 0xd))
   6522   1.9  christos 	  {
   6523  1.10  christos 	    *unpredictable_code = UNPRED_R13;
   6524   1.9  christos 	    return true;
   6525   1.9  christos 	  }
   6526   1.9  christos 	else if ((rt == 0xf) || (rt2 == 0xf))
   6527   1.9  christos 	  {
   6528  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6529   1.9  christos 	    return true;
   6530  1.10  christos 	  }
   6531   1.9  christos 	else if (rt == rt2 && matched_insn != MVE_VMOV2_GP_TO_VEC_LANE)
   6532   1.9  christos 	  {
   6533  1.10  christos 	    *unpredictable_code = UNPRED_GP_REGS_EQUAL;
   6534   1.9  christos 	    return true;
   6535   1.9  christos 	  }
   6536  1.10  christos 
   6537   1.9  christos 	return false;
   6538   1.9  christos       }
   6539   1.9  christos 
   6540   1.9  christos     case MVE_VMAXV:
   6541   1.9  christos     case MVE_VMAXAV:
   6542   1.9  christos     case MVE_VMAXNMV_FP:
   6543   1.9  christos     case MVE_VMAXNMAV_FP:
   6544   1.9  christos     case MVE_VMINNMV_FP:
   6545   1.9  christos     case MVE_VMINNMAV_FP:
   6546   1.9  christos     case MVE_VMINV:
   6547   1.9  christos     case MVE_VMINAV:
   6548   1.9  christos     case MVE_VABAV:
   6549   1.9  christos     case MVE_VMOV_HFP_TO_GP:
   6550   1.9  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   6551   1.9  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   6552   1.9  christos       {
   6553   1.9  christos 	unsigned long rda = arm_decode_field (given, 12, 15);
   6554   1.9  christos 	if (rda == 0xd)
   6555   1.9  christos 	  {
   6556  1.10  christos 	    *unpredictable_code = UNPRED_R13;
   6557   1.9  christos 	    return true;
   6558   1.9  christos 	  }
   6559   1.9  christos 	else if (rda == 0xf)
   6560   1.9  christos 	  {
   6561  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6562   1.9  christos 	    return true;
   6563   1.9  christos 	  }
   6564  1.10  christos 
   6565   1.9  christos 	return false;
   6566   1.9  christos       }
   6567   1.9  christos 
   6568   1.9  christos     case MVE_VMULL_INT:
   6569   1.9  christos       {
   6570   1.9  christos 	unsigned long Qd;
   6571   1.9  christos 	unsigned long Qm;
   6572   1.9  christos 	unsigned long Qn;
   6573   1.9  christos 
   6574   1.9  christos 	if (arm_decode_field (given, 20, 21) == 2)
   6575   1.9  christos 	  {
   6576   1.9  christos 	    Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6577   1.9  christos 	    Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6578   1.9  christos 	    Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6579   1.9  christos 
   6580   1.9  christos 	    if ((Qd == Qn) || (Qd == Qm))
   6581   1.9  christos 	      {
   6582  1.10  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
   6583   1.9  christos 		return true;
   6584   1.9  christos 	      }
   6585  1.10  christos 	    else
   6586   1.9  christos 	      return false;
   6587   1.9  christos 	  }
   6588  1.10  christos 	else
   6589   1.9  christos 	  return false;
   6590   1.9  christos       }
   6591   1.9  christos 
   6592   1.9  christos     case MVE_VCMUL_FP:
   6593   1.9  christos     case MVE_VQDMULL_T1:
   6594   1.9  christos       {
   6595   1.9  christos 	unsigned long Qd;
   6596   1.9  christos 	unsigned long Qm;
   6597   1.9  christos 	unsigned long Qn;
   6598   1.9  christos 
   6599   1.9  christos 	if (arm_decode_field (given, 28, 28) == 1)
   6600   1.9  christos 	  {
   6601   1.9  christos 	    Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6602   1.9  christos 	    Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6603   1.9  christos 	    Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6604   1.9  christos 
   6605   1.9  christos 	    if ((Qd == Qn) || (Qd == Qm))
   6606   1.9  christos 	      {
   6607  1.10  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6608   1.9  christos 		return true;
   6609   1.9  christos 	      }
   6610  1.10  christos 	    else
   6611   1.9  christos 	      return false;
   6612   1.9  christos 	  }
   6613  1.10  christos 	else
   6614   1.9  christos 	  return false;
   6615   1.9  christos       }
   6616   1.9  christos 
   6617   1.9  christos     case MVE_VQDMULL_T2:
   6618   1.9  christos       {
   6619   1.9  christos 	unsigned long gpr = arm_decode_field (given, 0, 3);
   6620   1.9  christos 	if (gpr == 0xd)
   6621   1.9  christos 	  {
   6622  1.10  christos 	    *unpredictable_code = UNPRED_R13;
   6623   1.9  christos 	    return true;
   6624   1.9  christos 	  }
   6625   1.9  christos 	else if (gpr == 0xf)
   6626   1.9  christos 	  {
   6627  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6628   1.9  christos 	    return true;
   6629   1.9  christos 	  }
   6630   1.9  christos 
   6631   1.9  christos 	if (arm_decode_field (given, 28, 28) == 1)
   6632   1.9  christos 	  {
   6633   1.9  christos 	    unsigned long Qd
   6634   1.9  christos 	      = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6635   1.9  christos 	    unsigned long Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6636   1.9  christos 
   6637   1.9  christos 	    if (Qd == Qn)
   6638   1.9  christos 	      {
   6639  1.10  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6640   1.9  christos 		return true;
   6641   1.9  christos 	      }
   6642  1.10  christos 	    else
   6643   1.9  christos 	      return false;
   6644   1.9  christos 	  }
   6645  1.10  christos 
   6646   1.9  christos 	return false;
   6647   1.9  christos       }
   6648   1.9  christos 
   6649   1.9  christos     case MVE_VMLSLDAV:
   6650   1.9  christos     case MVE_VRMLSLDAVH:
   6651   1.9  christos     case MVE_VMLALDAV:
   6652   1.9  christos     case MVE_VADDLV:
   6653   1.9  christos       if (arm_decode_field (given, 20, 22) == 6)
   6654   1.9  christos 	{
   6655  1.10  christos 	  *unpredictable_code = UNPRED_R13;
   6656   1.9  christos 	  return true;
   6657   1.9  christos 	}
   6658  1.10  christos       else
   6659   1.9  christos 	return false;
   6660   1.9  christos 
   6661   1.9  christos     case MVE_VDWDUP:
   6662   1.9  christos     case MVE_VIWDUP:
   6663   1.9  christos       if (arm_decode_field (given, 1, 3) == 6)
   6664   1.9  christos 	{
   6665  1.10  christos 	  *unpredictable_code = UNPRED_R13;
   6666   1.9  christos 	  return true;
   6667   1.9  christos 	}
   6668  1.10  christos       else
   6669   1.9  christos 	return false;
   6670   1.9  christos 
   6671   1.9  christos     case MVE_VCADD_VEC:
   6672   1.9  christos     case MVE_VHCADD:
   6673   1.9  christos       {
   6674   1.9  christos 	unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6675   1.9  christos 	unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6676   1.9  christos 	if ((Qd == Qm) && arm_decode_field (given, 20, 21) == 2)
   6677   1.9  christos 	  {
   6678  1.10  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
   6679   1.9  christos 	    return true;
   6680   1.9  christos 	  }
   6681  1.10  christos 	else
   6682   1.9  christos 	  return false;
   6683   1.9  christos       }
   6684   1.9  christos 
   6685   1.9  christos     case MVE_VCADD_FP:
   6686   1.9  christos       {
   6687   1.9  christos 	unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6688   1.9  christos 	unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6689   1.9  christos 	if ((Qd == Qm) && arm_decode_field (given, 20, 20) == 1)
   6690   1.9  christos 	  {
   6691  1.10  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6692   1.9  christos 	    return true;
   6693   1.9  christos 	  }
   6694  1.10  christos 	else
   6695   1.9  christos 	  return false;
   6696   1.9  christos       }
   6697   1.9  christos 
   6698   1.9  christos     case MVE_VCMLA_FP:
   6699   1.9  christos       {
   6700   1.9  christos 	unsigned long Qda;
   6701   1.9  christos 	unsigned long Qm;
   6702   1.9  christos 	unsigned long Qn;
   6703   1.9  christos 
   6704   1.9  christos 	if (arm_decode_field (given, 20, 20) == 1)
   6705   1.9  christos 	  {
   6706   1.9  christos 	    Qda = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6707   1.9  christos 	    Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6708   1.9  christos 	    Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6709   1.9  christos 
   6710   1.9  christos 	    if ((Qda == Qn) || (Qda == Qm))
   6711   1.9  christos 	      {
   6712  1.10  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6713   1.9  christos 		return true;
   6714   1.9  christos 	      }
   6715  1.10  christos 	    else
   6716   1.9  christos 	      return false;
   6717   1.9  christos 	  }
   6718  1.10  christos 	else
   6719   1.9  christos 	  return false;
   6720   1.9  christos 
   6721   1.9  christos       }
   6722   1.9  christos 
   6723   1.9  christos     case MVE_VCTP:
   6724   1.9  christos       if (arm_decode_field (given, 16, 19) == 0xd)
   6725   1.9  christos 	{
   6726  1.10  christos 	  *unpredictable_code = UNPRED_R13;
   6727   1.9  christos 	  return true;
   6728   1.9  christos 	}
   6729  1.10  christos       else
   6730   1.9  christos 	return false;
   6731   1.9  christos 
   6732   1.9  christos     case MVE_VREV64:
   6733   1.9  christos       {
   6734   1.9  christos 	unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6735   1.9  christos 	unsigned long qm = arm_decode_field_multiple (given, 1, 3, 6, 6);
   6736   1.9  christos 
   6737   1.9  christos 	if (qd == qm)
   6738   1.9  christos 	  {
   6739  1.10  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQUAL;
   6740   1.9  christos 	    return true;
   6741   1.9  christos 	  }
   6742  1.10  christos 	else
   6743   1.9  christos 	  return false;
   6744   1.9  christos       }
   6745   1.9  christos 
   6746   1.9  christos     case MVE_LSLL:
   6747   1.9  christos     case MVE_LSLLI:
   6748   1.9  christos     case MVE_LSRL:
   6749   1.9  christos     case MVE_ASRL:
   6750   1.9  christos     case MVE_ASRLI:
   6751   1.9  christos     case MVE_UQSHLL:
   6752   1.9  christos     case MVE_UQRSHLL:
   6753   1.9  christos     case MVE_URSHRL:
   6754   1.9  christos     case MVE_SRSHRL:
   6755   1.9  christos     case MVE_SQSHLL:
   6756   1.9  christos     case MVE_SQRSHRL:
   6757   1.9  christos       {
   6758   1.9  christos 	unsigned long gpr = arm_decode_field (given, 9, 11);
   6759   1.9  christos 	gpr = ((gpr << 1) | 1);
   6760   1.9  christos 	if (gpr == 0xd)
   6761   1.9  christos 	  {
   6762  1.10  christos 	    *unpredictable_code = UNPRED_R13;
   6763   1.9  christos 	    return true;
   6764   1.9  christos 	  }
   6765   1.9  christos 	else if (gpr == 0xf)
   6766   1.9  christos 	  {
   6767  1.10  christos 	    *unpredictable_code = UNPRED_R15;
   6768   1.9  christos 	    return true;
   6769   1.9  christos 	  }
   6770  1.10  christos 
   6771   1.9  christos 	return false;
   6772   1.9  christos       }
   6773   1.9  christos 
   6774  1.10  christos     default:
   6775   1.9  christos       return false;
   6776   1.9  christos     }
   6777   1.9  christos }
   6778   1.9  christos 
   6779   1.9  christos static void
   6780   1.9  christos print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
   6781   1.9  christos {
   6782   1.9  christos   unsigned long op1 = arm_decode_field (given, 21, 22);
   6783   1.9  christos   unsigned long op2 = arm_decode_field (given, 5, 6);
   6784   1.9  christos   unsigned long h = arm_decode_field (given, 16, 16);
   6785   1.9  christos   unsigned long index_operand, esize, targetBeat, idx;
   6786  1.10  christos   void *stream = info->stream;
   6787   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6788   1.9  christos 
   6789   1.9  christos   if ((op1 & 0x2) == 0x2)
   6790   1.9  christos     {
   6791   1.9  christos       index_operand = op2;
   6792   1.9  christos       esize = 8;
   6793   1.9  christos     }
   6794   1.9  christos   else if (((op1 & 0x2) == 0x0) && ((op2 & 0x1) == 0x1))
   6795   1.9  christos     {
   6796   1.9  christos       index_operand = op2  >> 1;
   6797   1.9  christos       esize = 16;
   6798   1.9  christos     }
   6799   1.9  christos   else if (((op1 & 0x2) == 0) && ((op2 & 0x3) == 0))
   6800   1.9  christos     {
   6801   1.9  christos       index_operand = 0;
   6802   1.9  christos       esize = 32;
   6803   1.9  christos     }
   6804   1.9  christos   else
   6805  1.10  christos     {
   6806   1.9  christos       func (stream, dis_style_text, "<undefined index>");
   6807   1.9  christos       return;
   6808   1.9  christos     }
   6809   1.9  christos 
   6810   1.9  christos   targetBeat =  (op1 & 0x1) | (h << 1);
   6811   1.9  christos   idx = index_operand + targetBeat * (32/esize);
   6812  1.10  christos 
   6813   1.9  christos   func (stream, dis_style_immediate, "%lu", idx);
   6814   1.9  christos }
   6815   1.9  christos 
   6816   1.9  christos /* Print neon and mve 8-bit immediate that can be a 8, 16, 32, or 64-bits
   6817   1.9  christos    in length and integer of floating-point type.  */
   6818   1.9  christos static void
   6819   1.9  christos print_simd_imm8 (struct disassemble_info *info, unsigned long given,
   6820   1.9  christos 		 unsigned int ibit_loc, const struct mopcode32 *insn)
   6821   1.9  christos {
   6822   1.9  christos   int bits = 0;
   6823   1.9  christos   int cmode = (given >> 8) & 0xf;
   6824   1.9  christos   int op = (given >> 5) & 0x1;
   6825   1.9  christos   unsigned long value = 0, hival = 0;
   6826   1.9  christos   unsigned shift;
   6827   1.9  christos   int size = 0;
   6828   1.9  christos   int isfloat = 0;
   6829  1.10  christos   void *stream = info->stream;
   6830   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6831   1.9  christos 
   6832   1.9  christos   /* On Neon the 'i' bit is at bit 24, on mve it is
   6833   1.9  christos      at bit 28.  */
   6834   1.9  christos   bits |= ((given >> ibit_loc) & 1) << 7;
   6835   1.9  christos   bits |= ((given >> 16) & 7) << 4;
   6836   1.9  christos   bits |= ((given >> 0) & 15) << 0;
   6837   1.9  christos 
   6838   1.9  christos   if (cmode < 8)
   6839   1.9  christos     {
   6840   1.9  christos       shift = (cmode >> 1) & 3;
   6841   1.9  christos       value = (unsigned long) bits << (8 * shift);
   6842   1.9  christos       size = 32;
   6843   1.9  christos     }
   6844   1.9  christos   else if (cmode < 12)
   6845   1.9  christos     {
   6846   1.9  christos       shift = (cmode >> 1) & 1;
   6847   1.9  christos       value = (unsigned long) bits << (8 * shift);
   6848   1.9  christos       size = 16;
   6849   1.9  christos     }
   6850   1.9  christos   else if (cmode < 14)
   6851   1.9  christos     {
   6852   1.9  christos       shift = (cmode & 1) + 1;
   6853   1.9  christos       value = (unsigned long) bits << (8 * shift);
   6854   1.9  christos       value |= (1ul << (8 * shift)) - 1;
   6855   1.9  christos       size = 32;
   6856   1.9  christos     }
   6857   1.9  christos   else if (cmode == 14)
   6858   1.9  christos     {
   6859   1.9  christos       if (op)
   6860   1.9  christos 	{
   6861   1.9  christos 	  /* Bit replication into bytes.  */
   6862   1.9  christos 	  int ix;
   6863   1.9  christos 	  unsigned long mask;
   6864   1.9  christos 
   6865   1.9  christos 	  value = 0;
   6866   1.9  christos 	  hival = 0;
   6867   1.9  christos 	  for (ix = 7; ix >= 0; ix--)
   6868   1.9  christos 	    {
   6869   1.9  christos 	      mask = ((bits >> ix) & 1) ? 0xff : 0;
   6870   1.9  christos 	      if (ix <= 3)
   6871   1.9  christos 		value = (value << 8) | mask;
   6872   1.9  christos 	      else
   6873   1.9  christos 		hival = (hival << 8) | mask;
   6874   1.9  christos 	    }
   6875   1.9  christos 	  size = 64;
   6876   1.9  christos 	}
   6877   1.9  christos       else
   6878   1.9  christos 	{
   6879   1.9  christos 	  /* Byte replication.  */
   6880   1.9  christos 	  value = (unsigned long) bits;
   6881   1.9  christos 	  size = 8;
   6882   1.9  christos 	}
   6883   1.9  christos     }
   6884   1.9  christos   else if (!op)
   6885   1.9  christos     {
   6886   1.9  christos       /* Floating point encoding.  */
   6887   1.9  christos       int tmp;
   6888   1.9  christos 
   6889   1.9  christos       value = (unsigned long)  (bits & 0x7f) << 19;
   6890   1.9  christos       value |= (unsigned long) (bits & 0x80) << 24;
   6891   1.9  christos       tmp = bits & 0x40 ? 0x3c : 0x40;
   6892   1.9  christos       value |= (unsigned long) tmp << 24;
   6893   1.9  christos       size = 32;
   6894   1.9  christos       isfloat = 1;
   6895   1.9  christos     }
   6896   1.9  christos   else
   6897  1.10  christos     {
   6898   1.9  christos       func (stream, dis_style_text, "<illegal constant %.8x:%x:%x>",
   6899   1.9  christos 	    bits, cmode, op);
   6900   1.9  christos       size = 32;
   6901   1.9  christos       return;
   6902   1.9  christos     }
   6903   1.9  christos 
   6904   1.9  christos   /* printU determines whether the immediate value should be printed as
   6905   1.9  christos      unsigned.  */
   6906   1.9  christos   unsigned printU = 0;
   6907   1.9  christos   switch (insn->mve_op)
   6908   1.9  christos     {
   6909   1.9  christos     default:
   6910   1.9  christos       break;
   6911   1.9  christos     /* We want this for instructions that don't have a 'signed' type.  */
   6912   1.9  christos     case MVE_VBIC_IMM:
   6913   1.9  christos     case MVE_VORR_IMM:
   6914   1.9  christos     case MVE_VMVN_IMM:
   6915   1.9  christos     case MVE_VMOV_IMM_TO_VEC:
   6916   1.9  christos       printU = 1;
   6917   1.9  christos       break;
   6918   1.9  christos     }
   6919   1.9  christos   switch (size)
   6920   1.9  christos     {
   6921  1.10  christos     case 8:
   6922  1.10  christos       func (stream, dis_style_immediate, "#%ld", value);
   6923   1.9  christos       func (stream, dis_style_comment_start, "\t@ 0x%.2lx", value);
   6924   1.9  christos       break;
   6925   1.9  christos 
   6926  1.10  christos     case 16:
   6927  1.10  christos       func (stream, dis_style_immediate, printU ? "#%lu" : "#%ld", value);
   6928   1.9  christos       func (stream, dis_style_comment_start, "\t@ 0x%.4lx", value);
   6929   1.9  christos       break;
   6930   1.9  christos 
   6931   1.9  christos     case 32:
   6932   1.9  christos       if (isfloat)
   6933   1.9  christos 	{
   6934   1.9  christos 	  unsigned char valbytes[4];
   6935   1.9  christos 	  double fvalue;
   6936   1.9  christos 
   6937   1.9  christos 	  /* Do this a byte at a time so we don't have to
   6938   1.9  christos 	     worry about the host's endianness.  */
   6939   1.9  christos 	  valbytes[0] = value & 0xff;
   6940   1.9  christos 	  valbytes[1] = (value >> 8) & 0xff;
   6941   1.9  christos 	  valbytes[2] = (value >> 16) & 0xff;
   6942   1.9  christos 	  valbytes[3] = (value >> 24) & 0xff;
   6943   1.9  christos 
   6944   1.9  christos 	  floatformat_to_double
   6945   1.9  christos 	    (& floatformat_ieee_single_little, valbytes,
   6946   1.9  christos 	     & fvalue);
   6947  1.10  christos 
   6948  1.10  christos 	  func (stream, dis_style_immediate, "#%.7g", fvalue);
   6949   1.9  christos 	  func (stream, dis_style_comment_start, "\t@ 0x%.8lx", value);
   6950   1.9  christos 	}
   6951  1.10  christos       else
   6952  1.10  christos 	{
   6953  1.10  christos 	  func (stream, dis_style_immediate,
   6954  1.10  christos 		printU ? "#%lu" : "#%ld",
   6955  1.10  christos 		(long) (((value & 0x80000000L) != 0)
   6956  1.10  christos 			&& !printU
   6957  1.10  christos 			? value | ~0xffffffffL : value));
   6958  1.10  christos 	  func (stream, dis_style_comment_start, "\t@ 0x%.8lx", value);
   6959   1.9  christos 	}
   6960   1.9  christos       break;
   6961   1.9  christos 
   6962  1.10  christos     case 64:
   6963   1.9  christos       func (stream, dis_style_immediate, "#0x%.8lx%.8lx", hival, value);
   6964   1.9  christos       break;
   6965   1.9  christos 
   6966   1.9  christos     default:
   6967   1.9  christos       abort ();
   6968   1.9  christos     }
   6969   1.9  christos 
   6970   1.9  christos }
   6971   1.9  christos 
   6972   1.9  christos static void
   6973   1.9  christos print_mve_undefined (struct disassemble_info *info,
   6974   1.9  christos 		     enum mve_undefined undefined_code)
   6975   1.9  christos {
   6976  1.10  christos   void *stream = info->stream;
   6977  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6978  1.10  christos   /* Initialize REASON to avoid compiler warning about uninitialized
   6979  1.10  christos      usage, though such usage should be impossible.  */
   6980   1.9  christos   const char *reason = "??";
   6981   1.9  christos 
   6982   1.9  christos   switch (undefined_code)
   6983   1.9  christos     {
   6984  1.10  christos     case UNDEF_SIZE:
   6985   1.9  christos       reason = "illegal size";
   6986   1.9  christos       break;
   6987   1.9  christos 
   6988  1.10  christos     case UNDEF_SIZE_0:
   6989   1.9  christos       reason = "size equals zero";
   6990   1.9  christos       break;
   6991   1.9  christos 
   6992  1.10  christos     case UNDEF_SIZE_2:
   6993   1.9  christos       reason = "size equals two";
   6994   1.9  christos       break;
   6995   1.9  christos 
   6996  1.10  christos     case UNDEF_SIZE_3:
   6997   1.9  christos       reason = "size equals three";
   6998   1.9  christos       break;
   6999   1.9  christos 
   7000  1.10  christos     case UNDEF_SIZE_LE_1:
   7001   1.9  christos       reason = "size <= 1";
   7002   1.9  christos       break;
   7003   1.9  christos 
   7004  1.10  christos     case UNDEF_SIZE_NOT_0:
   7005   1.9  christos       reason = "size not equal to 0";
   7006   1.9  christos       break;
   7007   1.9  christos 
   7008  1.10  christos     case UNDEF_SIZE_NOT_2:
   7009   1.9  christos       reason = "size not equal to 2";
   7010   1.9  christos       break;
   7011   1.9  christos 
   7012  1.10  christos     case UNDEF_SIZE_NOT_3:
   7013   1.9  christos       reason = "size not equal to 3";
   7014   1.9  christos       break;
   7015   1.9  christos 
   7016  1.10  christos     case UNDEF_NOT_UNS_SIZE_0:
   7017   1.9  christos       reason = "not unsigned and size = zero";
   7018   1.9  christos       break;
   7019   1.9  christos 
   7020  1.10  christos     case UNDEF_NOT_UNS_SIZE_1:
   7021   1.9  christos       reason = "not unsigned and size = one";
   7022   1.9  christos       break;
   7023   1.9  christos 
   7024  1.10  christos     case UNDEF_NOT_UNSIGNED:
   7025   1.9  christos       reason = "not unsigned";
   7026   1.9  christos       break;
   7027   1.9  christos 
   7028  1.10  christos     case UNDEF_VCVT_IMM6:
   7029   1.9  christos       reason = "invalid imm6";
   7030   1.9  christos       break;
   7031   1.9  christos 
   7032  1.10  christos     case UNDEF_VCVT_FSI_IMM6:
   7033   1.9  christos       reason = "fsi = 0 and invalid imm6";
   7034   1.9  christos       break;
   7035   1.9  christos 
   7036  1.10  christos     case UNDEF_BAD_OP1_OP2:
   7037   1.9  christos       reason = "bad size with op2 = 2 and op1 = 0 or 1";
   7038   1.9  christos       break;
   7039   1.9  christos 
   7040  1.10  christos     case UNDEF_BAD_U_OP1_OP2:
   7041   1.9  christos       reason = "unsigned with op2 = 0 and op1 = 0 or 1";
   7042   1.9  christos       break;
   7043   1.9  christos 
   7044  1.10  christos     case UNDEF_OP_0_BAD_CMODE:
   7045   1.9  christos       reason = "op field equal 0 and bad cmode";
   7046   1.9  christos       break;
   7047   1.9  christos 
   7048  1.10  christos     case UNDEF_XCHG_UNS:
   7049   1.9  christos       reason = "exchange and unsigned together";
   7050   1.9  christos       break;
   7051   1.9  christos 
   7052  1.10  christos     case UNDEF_NONE:
   7053   1.9  christos       reason = "";
   7054   1.9  christos       break;
   7055   1.9  christos     }
   7056  1.10  christos 
   7057   1.9  christos   func (stream, dis_style_text, "\t\tundefined instruction: %s", reason);
   7058   1.9  christos }
   7059   1.9  christos 
   7060   1.9  christos static void
   7061   1.9  christos print_mve_unpredictable (struct disassemble_info *info,
   7062   1.9  christos 			 enum mve_unpredictable unpredict_code)
   7063   1.9  christos {
   7064  1.10  christos   void *stream = info->stream;
   7065  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7066  1.10  christos   /* Initialize REASON to avoid compiler warning about uninitialized
   7067  1.10  christos      usage, though such usage should be impossible.  */
   7068   1.9  christos   const char *reason = "??";
   7069   1.9  christos 
   7070   1.9  christos   switch (unpredict_code)
   7071   1.9  christos     {
   7072  1.10  christos     case UNPRED_IT_BLOCK:
   7073   1.9  christos       reason = "mve instruction in it block";
   7074   1.9  christos       break;
   7075   1.9  christos 
   7076  1.10  christos     case UNPRED_FCA_0_FCB_1:
   7077   1.9  christos       reason = "condition bits, fca = 0 and fcb = 1";
   7078   1.9  christos       break;
   7079   1.9  christos 
   7080  1.10  christos     case UNPRED_R13:
   7081   1.9  christos       reason = "use of r13 (sp)";
   7082   1.9  christos       break;
   7083   1.9  christos 
   7084  1.10  christos     case UNPRED_R15:
   7085   1.9  christos       reason = "use of r15 (pc)";
   7086   1.9  christos       break;
   7087   1.9  christos 
   7088  1.10  christos     case UNPRED_Q_GT_4:
   7089   1.9  christos       reason = "start register block > r4";
   7090   1.9  christos       break;
   7091   1.9  christos 
   7092  1.10  christos     case UNPRED_Q_GT_6:
   7093   1.9  christos       reason = "start register block > r6";
   7094   1.9  christos       break;
   7095   1.9  christos 
   7096  1.10  christos     case UNPRED_R13_AND_WB:
   7097   1.9  christos       reason = "use of r13 and write back";
   7098   1.9  christos       break;
   7099   1.9  christos 
   7100  1.10  christos     case UNPRED_Q_REGS_EQUAL:
   7101   1.9  christos       reason = "same vector register used for destination and other operand";
   7102   1.9  christos       break;
   7103   1.9  christos 
   7104  1.10  christos     case UNPRED_OS:
   7105   1.9  christos       reason = "use of offset scaled";
   7106   1.9  christos       break;
   7107   1.9  christos 
   7108  1.10  christos     case UNPRED_GP_REGS_EQUAL:
   7109   1.9  christos       reason = "same general-purpose register used for both operands";
   7110   1.9  christos       break;
   7111   1.9  christos 
   7112  1.10  christos     case UNPRED_Q_REGS_EQ_AND_SIZE_1:
   7113   1.9  christos       reason = "use of identical q registers and size = 1";
   7114   1.9  christos       break;
   7115   1.9  christos 
   7116  1.10  christos     case UNPRED_Q_REGS_EQ_AND_SIZE_2:
   7117   1.9  christos       reason = "use of identical q registers and size = 1";
   7118   1.9  christos       break;
   7119   1.9  christos 
   7120  1.10  christos     case UNPRED_NONE:
   7121   1.9  christos       reason = "";
   7122   1.9  christos       break;
   7123  1.10  christos     }
   7124  1.10  christos 
   7125  1.10  christos   func (stream, dis_style_comment_start, "%s: %s",
   7126   1.9  christos 	UNPREDICTABLE_INSTRUCTION, reason);
   7127   1.9  christos }
   7128   1.9  christos 
   7129   1.9  christos /* Print register block operand for mve vld2/vld4/vst2/vld4.  */
   7130   1.9  christos 
   7131   1.9  christos static void
   7132   1.9  christos print_mve_register_blocks (struct disassemble_info *info,
   7133   1.9  christos 			   unsigned long given,
   7134   1.9  christos 			   enum mve_instructions matched_insn)
   7135   1.9  christos {
   7136  1.10  christos   void *stream = info->stream;
   7137   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7138   1.9  christos 
   7139   1.9  christos   unsigned long q_reg_start = arm_decode_field_multiple (given,
   7140   1.9  christos 							 13, 15,
   7141   1.9  christos 							 22, 22);
   7142   1.9  christos   switch (matched_insn)
   7143   1.9  christos     {
   7144   1.9  christos     case MVE_VLD2:
   7145   1.9  christos     case MVE_VST2:
   7146  1.10  christos       if (q_reg_start <= 6)
   7147  1.10  christos 	{
   7148  1.10  christos 	  func (stream, dis_style_text, "{");
   7149  1.10  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start);
   7150  1.10  christos 	  func (stream, dis_style_text, ", ");
   7151  1.10  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 1);
   7152  1.10  christos 	  func (stream, dis_style_text, "}");
   7153   1.9  christos 	}
   7154  1.10  christos       else
   7155   1.9  christos 	func (stream, dis_style_text, "<illegal reg q%ld>", q_reg_start);
   7156   1.9  christos       break;
   7157   1.9  christos 
   7158   1.9  christos     case MVE_VLD4:
   7159   1.9  christos     case MVE_VST4:
   7160  1.10  christos       if (q_reg_start <= 4)
   7161  1.10  christos 	{
   7162  1.10  christos 	  func (stream, dis_style_text, "{");
   7163  1.10  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start);
   7164  1.10  christos 	  func (stream, dis_style_text, ", ");
   7165  1.10  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 1);
   7166  1.10  christos 	  func (stream, dis_style_text, ", ");
   7167  1.10  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 2);
   7168  1.10  christos 	  func (stream, dis_style_text, ", ");
   7169  1.10  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 3);
   7170  1.10  christos 	  func (stream, dis_style_text, "}");
   7171   1.9  christos 	}
   7172  1.10  christos       else
   7173   1.9  christos 	func (stream, dis_style_text, "<illegal reg q%ld>", q_reg_start);
   7174   1.9  christos       break;
   7175   1.9  christos 
   7176   1.9  christos     default:
   7177   1.9  christos       break;
   7178   1.9  christos     }
   7179   1.9  christos }
   7180   1.9  christos 
   7181   1.9  christos static void
   7182   1.9  christos print_mve_rounding_mode (struct disassemble_info *info,
   7183   1.9  christos 			 unsigned long given,
   7184   1.9  christos 			 enum mve_instructions matched_insn)
   7185   1.9  christos {
   7186  1.10  christos   void *stream = info->stream;
   7187   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7188   1.9  christos 
   7189   1.9  christos   switch (matched_insn)
   7190   1.9  christos     {
   7191   1.9  christos     case MVE_VCVT_FROM_FP_TO_INT:
   7192   1.9  christos       {
   7193   1.9  christos 	switch (arm_decode_field (given, 8, 9))
   7194   1.9  christos 	  {
   7195  1.10  christos 	  case 0:
   7196   1.9  christos 	    func (stream, dis_style_mnemonic, "a");
   7197   1.9  christos 	    break;
   7198   1.9  christos 
   7199  1.10  christos 	  case 1:
   7200   1.9  christos 	    func (stream, dis_style_mnemonic, "n");
   7201   1.9  christos 	    break;
   7202   1.9  christos 
   7203  1.10  christos 	  case 2:
   7204   1.9  christos 	    func (stream, dis_style_mnemonic, "p");
   7205   1.9  christos 	    break;
   7206   1.9  christos 
   7207  1.10  christos 	  case 3:
   7208   1.9  christos 	    func (stream, dis_style_mnemonic, "m");
   7209   1.9  christos 	    break;
   7210   1.9  christos 
   7211   1.9  christos 	  default:
   7212   1.9  christos 	    break;
   7213   1.9  christos 	  }
   7214   1.9  christos       }
   7215   1.9  christos       break;
   7216   1.9  christos 
   7217   1.9  christos     case MVE_VRINT_FP:
   7218   1.9  christos       {
   7219   1.9  christos 	switch (arm_decode_field (given, 7, 9))
   7220   1.9  christos 	  {
   7221  1.10  christos 	  case 0:
   7222   1.9  christos 	    func (stream, dis_style_mnemonic, "n");
   7223   1.9  christos 	    break;
   7224   1.9  christos 
   7225  1.10  christos 	  case 1:
   7226   1.9  christos 	    func (stream, dis_style_mnemonic, "x");
   7227   1.9  christos 	    break;
   7228   1.9  christos 
   7229  1.10  christos 	  case 2:
   7230   1.9  christos 	    func (stream, dis_style_mnemonic, "a");
   7231   1.9  christos 	    break;
   7232   1.9  christos 
   7233  1.10  christos 	  case 3:
   7234   1.9  christos 	    func (stream, dis_style_mnemonic, "z");
   7235   1.9  christos 	    break;
   7236   1.9  christos 
   7237  1.10  christos 	  case 5:
   7238   1.9  christos 	    func (stream, dis_style_mnemonic, "m");
   7239   1.9  christos 	    break;
   7240   1.9  christos 
   7241  1.10  christos 	  case 7:
   7242   1.9  christos 	    func (stream, dis_style_mnemonic, "p");
   7243   1.9  christos 
   7244   1.9  christos 	  case 4:
   7245   1.9  christos 	  case 6:
   7246   1.9  christos 	  default:
   7247   1.9  christos 	    break;
   7248   1.9  christos 	  }
   7249   1.9  christos       }
   7250   1.9  christos       break;
   7251   1.9  christos 
   7252   1.9  christos     default:
   7253   1.9  christos       break;
   7254   1.9  christos     }
   7255   1.9  christos }
   7256   1.9  christos 
   7257   1.9  christos static void
   7258   1.9  christos print_mve_vcvt_size (struct disassemble_info *info,
   7259   1.9  christos 		     unsigned long given,
   7260   1.9  christos 		     enum mve_instructions matched_insn)
   7261   1.9  christos {
   7262   1.9  christos   unsigned long mode = 0;
   7263  1.10  christos   void *stream = info->stream;
   7264   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7265   1.9  christos 
   7266   1.9  christos   switch (matched_insn)
   7267   1.9  christos     {
   7268   1.9  christos     case MVE_VCVT_FP_FIX_VEC:
   7269   1.9  christos       {
   7270   1.9  christos 	mode = (((given & 0x200) >> 7)
   7271   1.9  christos 		| ((given & 0x10000000) >> 27)
   7272   1.9  christos 		| ((given & 0x100) >> 8));
   7273   1.9  christos 
   7274   1.9  christos 	switch (mode)
   7275   1.9  christos 	  {
   7276  1.10  christos 	  case 0:
   7277   1.9  christos 	    func (stream, dis_style_mnemonic, "f16.s16");
   7278   1.9  christos 	    break;
   7279   1.9  christos 
   7280  1.10  christos 	  case 1:
   7281   1.9  christos 	    func (stream, dis_style_mnemonic, "s16.f16");
   7282   1.9  christos 	    break;
   7283   1.9  christos 
   7284  1.10  christos 	  case 2:
   7285   1.9  christos 	    func (stream, dis_style_mnemonic, "f16.u16");
   7286   1.9  christos 	    break;
   7287   1.9  christos 
   7288  1.10  christos 	  case 3:
   7289   1.9  christos 	    func (stream, dis_style_mnemonic, "u16.f16");
   7290   1.9  christos 	    break;
   7291   1.9  christos 
   7292  1.10  christos 	  case 4:
   7293   1.9  christos 	    func (stream, dis_style_mnemonic, "f32.s32");
   7294   1.9  christos 	    break;
   7295   1.9  christos 
   7296  1.10  christos 	  case 5:
   7297   1.9  christos 	    func (stream, dis_style_mnemonic, "s32.f32");
   7298   1.9  christos 	    break;
   7299   1.9  christos 
   7300  1.10  christos 	  case 6:
   7301   1.9  christos 	    func (stream, dis_style_mnemonic, "f32.u32");
   7302   1.9  christos 	    break;
   7303   1.9  christos 
   7304  1.10  christos 	  case 7:
   7305   1.9  christos 	    func (stream, dis_style_mnemonic, "u32.f32");
   7306   1.9  christos 	    break;
   7307   1.9  christos 
   7308   1.9  christos 	  default:
   7309   1.9  christos 	    break;
   7310   1.9  christos 	  }
   7311   1.9  christos 	break;
   7312   1.9  christos       }
   7313   1.9  christos     case MVE_VCVT_BETWEEN_FP_INT:
   7314   1.9  christos       {
   7315   1.9  christos 	unsigned long size = arm_decode_field (given, 18, 19);
   7316   1.9  christos 	unsigned long op = arm_decode_field (given, 7, 8);
   7317   1.9  christos 
   7318   1.9  christos 	if (size == 1)
   7319   1.9  christos 	  {
   7320   1.9  christos 	    switch (op)
   7321   1.9  christos 	      {
   7322  1.10  christos 	      case 0:
   7323   1.9  christos 		func (stream, dis_style_mnemonic, "f16.s16");
   7324   1.9  christos 		break;
   7325   1.9  christos 
   7326  1.10  christos 	      case 1:
   7327   1.9  christos 		func (stream, dis_style_mnemonic, "f16.u16");
   7328   1.9  christos 		break;
   7329   1.9  christos 
   7330  1.10  christos 	      case 2:
   7331   1.9  christos 		func (stream, dis_style_mnemonic, "s16.f16");
   7332   1.9  christos 		break;
   7333   1.9  christos 
   7334  1.10  christos 	      case 3:
   7335   1.9  christos 		func (stream, dis_style_mnemonic, "u16.f16");
   7336   1.9  christos 		break;
   7337   1.9  christos 
   7338   1.9  christos 	      default:
   7339   1.9  christos 		break;
   7340   1.9  christos 	      }
   7341   1.9  christos 	  }
   7342   1.9  christos 	else if (size == 2)
   7343   1.9  christos 	  {
   7344   1.9  christos 	    switch (op)
   7345   1.9  christos 	      {
   7346  1.10  christos 	      case 0:
   7347   1.9  christos 		func (stream, dis_style_mnemonic, "f32.s32");
   7348   1.9  christos 		break;
   7349   1.9  christos 
   7350  1.10  christos 	      case 1:
   7351   1.9  christos 		func (stream, dis_style_mnemonic, "f32.u32");
   7352   1.9  christos 		break;
   7353   1.9  christos 
   7354  1.10  christos 	      case 2:
   7355   1.9  christos 		func (stream, dis_style_mnemonic, "s32.f32");
   7356   1.9  christos 		break;
   7357   1.9  christos 
   7358  1.10  christos 	      case 3:
   7359   1.9  christos 		func (stream, dis_style_mnemonic, "u32.f32");
   7360   1.9  christos 		break;
   7361   1.9  christos 	      }
   7362   1.9  christos 	  }
   7363   1.9  christos       }
   7364   1.9  christos       break;
   7365   1.9  christos 
   7366   1.9  christos     case MVE_VCVT_FP_HALF_FP:
   7367   1.9  christos       {
   7368   1.9  christos 	unsigned long op = arm_decode_field (given, 28, 28);
   7369  1.10  christos 	if (op == 0)
   7370   1.9  christos 	  func (stream, dis_style_mnemonic, "f16.f32");
   7371  1.10  christos 	else if (op == 1)
   7372   1.9  christos 	  func (stream, dis_style_mnemonic, "f32.f16");
   7373   1.9  christos       }
   7374   1.9  christos       break;
   7375   1.9  christos 
   7376   1.9  christos     case MVE_VCVT_FROM_FP_TO_INT:
   7377   1.9  christos       {
   7378   1.9  christos 	unsigned long size = arm_decode_field_multiple (given, 7, 7, 18, 19);
   7379   1.9  christos 
   7380   1.9  christos 	switch (size)
   7381   1.9  christos 	  {
   7382  1.10  christos 	  case 2:
   7383   1.9  christos 	    func (stream, dis_style_mnemonic, "s16.f16");
   7384   1.9  christos 	    break;
   7385   1.9  christos 
   7386  1.10  christos 	  case 3:
   7387   1.9  christos 	    func (stream, dis_style_mnemonic, "u16.f16");
   7388   1.9  christos 	    break;
   7389   1.9  christos 
   7390  1.10  christos 	  case 4:
   7391   1.9  christos 	    func (stream, dis_style_mnemonic, "s32.f32");
   7392   1.9  christos 	    break;
   7393   1.9  christos 
   7394  1.10  christos 	  case 5:
   7395   1.9  christos 	    func (stream, dis_style_mnemonic, "u32.f32");
   7396   1.9  christos 	    break;
   7397   1.9  christos 
   7398   1.9  christos 	  default:
   7399   1.9  christos 	    break;
   7400   1.9  christos 	  }
   7401   1.9  christos       }
   7402   1.9  christos       break;
   7403   1.9  christos 
   7404   1.9  christos     default:
   7405   1.9  christos       break;
   7406   1.9  christos     }
   7407   1.9  christos }
   7408   1.9  christos 
   7409   1.9  christos static void
   7410   1.9  christos print_mve_rotate (struct disassemble_info *info, unsigned long rot,
   7411   1.9  christos 		  unsigned long rot_width)
   7412   1.9  christos {
   7413  1.10  christos   void *stream = info->stream;
   7414   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7415   1.9  christos 
   7416   1.9  christos   if (rot_width == 1)
   7417   1.9  christos     {
   7418   1.9  christos       switch (rot)
   7419   1.9  christos 	{
   7420  1.10  christos 	case 0:
   7421   1.9  christos 	  func (stream, dis_style_immediate, "90");
   7422   1.9  christos 	  break;
   7423  1.10  christos 	case 1:
   7424   1.9  christos 	  func (stream, dis_style_immediate, "270");
   7425   1.9  christos 	  break;
   7426   1.9  christos 	default:
   7427   1.9  christos 	  break;
   7428   1.9  christos 	}
   7429   1.9  christos     }
   7430   1.1  christos   else if (rot_width == 2)
   7431   1.9  christos     {
   7432   1.9  christos       switch (rot)
   7433   1.9  christos 	{
   7434  1.10  christos 	case 0:
   7435   1.9  christos 	  func (stream, dis_style_immediate, "0");
   7436   1.9  christos 	  break;
   7437  1.10  christos 	case 1:
   7438   1.9  christos 	  func (stream, dis_style_immediate, "90");
   7439   1.9  christos 	  break;
   7440  1.10  christos 	case 2:
   7441   1.9  christos 	  func (stream, dis_style_immediate, "180");
   7442   1.9  christos 	  break;
   7443  1.10  christos 	case 3:
   7444   1.9  christos 	  func (stream, dis_style_immediate, "270");
   7445   1.9  christos 	  break;
   7446   1.9  christos 	default:
   7447   1.9  christos 	  break;
   7448   1.9  christos 	}
   7449   1.9  christos     }
   7450   1.9  christos }
   7451   1.9  christos 
   7452   1.9  christos static void
   7453   1.9  christos print_instruction_predicate (struct disassemble_info *info)
   7454   1.9  christos {
   7455  1.10  christos   void *stream = info->stream;
   7456   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7457   1.9  christos 
   7458  1.10  christos   if (vpt_block_state.next_pred_state == PRED_THEN)
   7459   1.9  christos     func (stream, dis_style_mnemonic, "t");
   7460  1.10  christos   else if (vpt_block_state.next_pred_state == PRED_ELSE)
   7461   1.9  christos     func (stream, dis_style_mnemonic, "e");
   7462   1.9  christos }
   7463   1.9  christos 
   7464   1.9  christos static void
   7465   1.9  christos print_mve_size (struct disassemble_info *info,
   7466   1.9  christos 		unsigned long size,
   7467   1.9  christos 		enum mve_instructions matched_insn)
   7468   1.9  christos {
   7469  1.10  christos   void *stream = info->stream;
   7470   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7471   1.9  christos 
   7472   1.9  christos   switch (matched_insn)
   7473   1.9  christos     {
   7474   1.9  christos     case MVE_VABAV:
   7475   1.9  christos     case MVE_VABD_VEC:
   7476   1.9  christos     case MVE_VABS_FP:
   7477   1.9  christos     case MVE_VABS_VEC:
   7478   1.9  christos     case MVE_VADD_VEC_T1:
   7479   1.9  christos     case MVE_VADD_VEC_T2:
   7480   1.9  christos     case MVE_VADDV:
   7481   1.9  christos     case MVE_VBRSR:
   7482   1.9  christos     case MVE_VCADD_VEC:
   7483   1.9  christos     case MVE_VCLS:
   7484   1.9  christos     case MVE_VCLZ:
   7485   1.9  christos     case MVE_VCMP_VEC_T1:
   7486   1.9  christos     case MVE_VCMP_VEC_T2:
   7487   1.9  christos     case MVE_VCMP_VEC_T3:
   7488   1.9  christos     case MVE_VCMP_VEC_T4:
   7489   1.9  christos     case MVE_VCMP_VEC_T5:
   7490   1.9  christos     case MVE_VCMP_VEC_T6:
   7491   1.9  christos     case MVE_VCTP:
   7492   1.9  christos     case MVE_VDDUP:
   7493   1.9  christos     case MVE_VDWDUP:
   7494   1.9  christos     case MVE_VHADD_T1:
   7495   1.9  christos     case MVE_VHADD_T2:
   7496   1.9  christos     case MVE_VHCADD:
   7497   1.9  christos     case MVE_VHSUB_T1:
   7498   1.9  christos     case MVE_VHSUB_T2:
   7499   1.9  christos     case MVE_VIDUP:
   7500   1.9  christos     case MVE_VIWDUP:
   7501   1.9  christos     case MVE_VLD2:
   7502   1.9  christos     case MVE_VLD4:
   7503   1.9  christos     case MVE_VLDRB_GATHER_T1:
   7504   1.9  christos     case MVE_VLDRH_GATHER_T2:
   7505   1.9  christos     case MVE_VLDRW_GATHER_T3:
   7506   1.9  christos     case MVE_VLDRD_GATHER_T4:
   7507   1.9  christos     case MVE_VLDRB_T1:
   7508   1.9  christos     case MVE_VLDRH_T2:
   7509   1.9  christos     case MVE_VMAX:
   7510   1.9  christos     case MVE_VMAXA:
   7511   1.9  christos     case MVE_VMAXV:
   7512   1.9  christos     case MVE_VMAXAV:
   7513   1.9  christos     case MVE_VMIN:
   7514   1.9  christos     case MVE_VMINA:
   7515   1.9  christos     case MVE_VMINV:
   7516   1.9  christos     case MVE_VMINAV:
   7517   1.9  christos     case MVE_VMLA:
   7518   1.9  christos     case MVE_VMLAS:
   7519   1.9  christos     case MVE_VMUL_VEC_T1:
   7520   1.9  christos     case MVE_VMUL_VEC_T2:
   7521   1.9  christos     case MVE_VMULH:
   7522   1.9  christos     case MVE_VRMULH:
   7523   1.9  christos     case MVE_VMULL_INT:
   7524   1.9  christos     case MVE_VNEG_FP:
   7525   1.9  christos     case MVE_VNEG_VEC:
   7526   1.9  christos     case MVE_VPT_VEC_T1:
   7527   1.9  christos     case MVE_VPT_VEC_T2:
   7528   1.9  christos     case MVE_VPT_VEC_T3:
   7529   1.9  christos     case MVE_VPT_VEC_T4:
   7530   1.9  christos     case MVE_VPT_VEC_T5:
   7531   1.9  christos     case MVE_VPT_VEC_T6:
   7532   1.9  christos     case MVE_VQABS:
   7533   1.9  christos     case MVE_VQADD_T1:
   7534   1.9  christos     case MVE_VQADD_T2:
   7535   1.9  christos     case MVE_VQDMLADH:
   7536   1.9  christos     case MVE_VQRDMLADH:
   7537   1.9  christos     case MVE_VQDMLAH:
   7538   1.9  christos     case MVE_VQRDMLAH:
   7539   1.9  christos     case MVE_VQDMLASH:
   7540   1.9  christos     case MVE_VQRDMLASH:
   7541   1.9  christos     case MVE_VQDMLSDH:
   7542   1.9  christos     case MVE_VQRDMLSDH:
   7543   1.9  christos     case MVE_VQDMULH_T1:
   7544   1.9  christos     case MVE_VQRDMULH_T2:
   7545   1.9  christos     case MVE_VQDMULH_T3:
   7546   1.9  christos     case MVE_VQRDMULH_T4:
   7547   1.9  christos     case MVE_VQNEG:
   7548   1.9  christos     case MVE_VQRSHL_T1:
   7549   1.9  christos     case MVE_VQRSHL_T2:
   7550   1.9  christos     case MVE_VQSHL_T1:
   7551   1.9  christos     case MVE_VQSHL_T4:
   7552   1.9  christos     case MVE_VQSUB_T1:
   7553   1.9  christos     case MVE_VQSUB_T2:
   7554   1.9  christos     case MVE_VREV32:
   7555   1.9  christos     case MVE_VREV64:
   7556   1.9  christos     case MVE_VRHADD:
   7557   1.9  christos     case MVE_VRINT_FP:
   7558   1.9  christos     case MVE_VRSHL_T1:
   7559   1.9  christos     case MVE_VRSHL_T2:
   7560   1.9  christos     case MVE_VSHL_T2:
   7561   1.9  christos     case MVE_VSHL_T3:
   7562   1.9  christos     case MVE_VSHLL_T2:
   7563   1.9  christos     case MVE_VST2:
   7564   1.9  christos     case MVE_VST4:
   7565   1.9  christos     case MVE_VSTRB_SCATTER_T1:
   7566   1.9  christos     case MVE_VSTRH_SCATTER_T2:
   7567   1.9  christos     case MVE_VSTRW_SCATTER_T3:
   7568   1.9  christos     case MVE_VSTRB_T1:
   7569   1.9  christos     case MVE_VSTRH_T2:
   7570   1.9  christos     case MVE_VSUB_VEC_T1:
   7571   1.9  christos     case MVE_VSUB_VEC_T2:
   7572  1.10  christos       if (size <= 3)
   7573   1.1  christos 	func (stream, dis_style_mnemonic, "%s", mve_vec_sizename[size]);
   7574  1.10  christos       else
   7575   1.9  christos 	func (stream, dis_style_text, "<undef size>");
   7576   1.9  christos       break;
   7577   1.9  christos 
   7578   1.9  christos     case MVE_VABD_FP:
   7579   1.9  christos     case MVE_VADD_FP_T1:
   7580   1.9  christos     case MVE_VADD_FP_T2:
   7581   1.9  christos     case MVE_VSUB_FP_T1:
   7582   1.9  christos     case MVE_VSUB_FP_T2:
   7583   1.9  christos     case MVE_VCMP_FP_T1:
   7584   1.9  christos     case MVE_VCMP_FP_T2:
   7585   1.9  christos     case MVE_VFMA_FP_SCALAR:
   7586   1.9  christos     case MVE_VFMA_FP:
   7587   1.9  christos     case MVE_VFMS_FP:
   7588   1.9  christos     case MVE_VFMAS_FP_SCALAR:
   7589   1.9  christos     case MVE_VMAXNM_FP:
   7590   1.9  christos     case MVE_VMAXNMA_FP:
   7591   1.9  christos     case MVE_VMAXNMV_FP:
   7592   1.9  christos     case MVE_VMAXNMAV_FP:
   7593   1.9  christos     case MVE_VMINNM_FP:
   7594   1.9  christos     case MVE_VMINNMA_FP:
   7595   1.9  christos     case MVE_VMINNMV_FP:
   7596   1.9  christos     case MVE_VMINNMAV_FP:
   7597   1.9  christos     case MVE_VMUL_FP_T1:
   7598   1.9  christos     case MVE_VMUL_FP_T2:
   7599   1.9  christos     case MVE_VPT_FP_T1:
   7600   1.9  christos     case MVE_VPT_FP_T2:
   7601  1.10  christos       if (size == 0)
   7602   1.9  christos 	func (stream, dis_style_mnemonic, "32");
   7603  1.10  christos       else if (size == 1)
   7604   1.9  christos 	func (stream, dis_style_mnemonic, "16");
   7605   1.9  christos       break;
   7606   1.9  christos 
   7607   1.9  christos     case MVE_VCADD_FP:
   7608   1.9  christos     case MVE_VCMLA_FP:
   7609   1.9  christos     case MVE_VCMUL_FP:
   7610   1.9  christos     case MVE_VMLADAV_T1:
   7611   1.9  christos     case MVE_VMLALDAV:
   7612   1.9  christos     case MVE_VMLSDAV_T1:
   7613   1.9  christos     case MVE_VMLSLDAV:
   7614   1.9  christos     case MVE_VMOVN:
   7615   1.9  christos     case MVE_VQDMULL_T1:
   7616   1.9  christos     case MVE_VQDMULL_T2:
   7617   1.9  christos     case MVE_VQMOVN:
   7618   1.9  christos     case MVE_VQMOVUN:
   7619  1.10  christos       if (size == 0)
   7620   1.9  christos 	func (stream, dis_style_mnemonic, "16");
   7621  1.10  christos       else if (size == 1)
   7622   1.9  christos 	func (stream, dis_style_mnemonic, "32");
   7623   1.9  christos       break;
   7624   1.9  christos 
   7625   1.9  christos     case MVE_VMOVL:
   7626  1.10  christos       if (size == 1)
   7627   1.9  christos 	func (stream, dis_style_mnemonic, "8");
   7628  1.10  christos       else if (size == 2)
   7629   1.9  christos 	func (stream, dis_style_mnemonic, "16");
   7630   1.9  christos       break;
   7631   1.9  christos 
   7632   1.9  christos     case MVE_VDUP:
   7633   1.9  christos       switch (size)
   7634   1.9  christos 	{
   7635  1.10  christos 	case 0:
   7636   1.9  christos 	  func (stream, dis_style_mnemonic, "32");
   7637   1.9  christos 	  break;
   7638  1.10  christos 	case 1:
   7639   1.9  christos 	  func (stream, dis_style_mnemonic, "16");
   7640   1.9  christos 	  break;
   7641  1.10  christos 	case 2:
   7642   1.9  christos 	  func (stream, dis_style_mnemonic, "8");
   7643   1.9  christos 	  break;
   7644   1.9  christos 	default:
   7645   1.9  christos 	  break;
   7646   1.9  christos 	}
   7647   1.9  christos       break;
   7648   1.9  christos 
   7649   1.9  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   7650   1.9  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   7651   1.9  christos       switch (size)
   7652   1.9  christos 	{
   7653  1.10  christos 	case 0: case 4:
   7654   1.9  christos 	  func (stream, dis_style_mnemonic, "32");
   7655   1.9  christos 	  break;
   7656   1.9  christos 
   7657   1.9  christos 	case 1: case 3:
   7658  1.10  christos 	case 5: case 7:
   7659   1.9  christos 	  func (stream, dis_style_mnemonic, "16");
   7660   1.9  christos 	  break;
   7661   1.9  christos 
   7662   1.9  christos 	case 8: case 9: case 10: case 11:
   7663  1.10  christos 	case 12: case 13: case 14: case 15:
   7664   1.9  christos 	  func (stream, dis_style_mnemonic, "8");
   7665   1.9  christos 	  break;
   7666   1.9  christos 
   7667   1.9  christos 	default:
   7668   1.9  christos 	  break;
   7669   1.9  christos 	}
   7670   1.9  christos       break;
   7671   1.9  christos 
   7672   1.9  christos     case MVE_VMOV_IMM_TO_VEC:
   7673   1.9  christos       switch (size)
   7674   1.9  christos 	{
   7675   1.9  christos 	case 0: case 4: case 8:
   7676  1.10  christos 	case 12: case 24: case 26:
   7677   1.9  christos 	  func (stream, dis_style_mnemonic, "i32");
   7678   1.9  christos 	  break;
   7679  1.10  christos 	case 16: case 20:
   7680   1.9  christos 	  func (stream, dis_style_mnemonic, "i16");
   7681   1.9  christos 	  break;
   7682  1.10  christos 	case 28:
   7683   1.9  christos 	  func (stream, dis_style_mnemonic, "i8");
   7684   1.9  christos 	  break;
   7685  1.10  christos 	case 29:
   7686   1.9  christos 	  func (stream, dis_style_mnemonic, "i64");
   7687   1.9  christos 	  break;
   7688  1.10  christos 	case 30:
   7689   1.9  christos 	  func (stream, dis_style_mnemonic, "f32");
   7690   1.9  christos 	  break;
   7691   1.9  christos 	default:
   7692   1.9  christos 	  break;
   7693   1.9  christos 	}
   7694   1.9  christos       break;
   7695   1.9  christos 
   7696   1.9  christos     case MVE_VMULL_POLY:
   7697  1.10  christos       if (size == 0)
   7698   1.9  christos 	func (stream, dis_style_mnemonic, "p8");
   7699  1.10  christos       else if (size == 1)
   7700   1.9  christos 	func (stream, dis_style_mnemonic, "p16");
   7701   1.9  christos       break;
   7702   1.9  christos 
   7703   1.9  christos     case MVE_VMVN_IMM:
   7704   1.9  christos       switch (size)
   7705   1.9  christos 	{
   7706   1.9  christos 	case 0: case 2: case 4:
   7707  1.10  christos 	case 6: case 12: case 13:
   7708   1.9  christos 	  func (stream, dis_style_mnemonic, "32");
   7709   1.9  christos 	  break;
   7710   1.9  christos 
   7711  1.10  christos 	case 8: case 10:
   7712   1.9  christos 	  func (stream, dis_style_mnemonic, "16");
   7713   1.9  christos 	  break;
   7714   1.9  christos 
   7715   1.9  christos 	default:
   7716   1.9  christos 	  break;
   7717   1.9  christos 	}
   7718   1.9  christos       break;
   7719   1.9  christos 
   7720   1.9  christos     case MVE_VBIC_IMM:
   7721   1.9  christos     case MVE_VORR_IMM:
   7722   1.9  christos       switch (size)
   7723   1.9  christos 	{
   7724   1.9  christos 	case 1: case 3:
   7725  1.10  christos 	case 5: case 7:
   7726   1.9  christos 	  func (stream, dis_style_mnemonic, "32");
   7727   1.9  christos 	  break;
   7728   1.9  christos 
   7729  1.10  christos 	case 9: case 11:
   7730   1.9  christos 	  func (stream, dis_style_mnemonic, "16");
   7731   1.9  christos 	  break;
   7732   1.9  christos 
   7733   1.9  christos 	default:
   7734   1.9  christos 	  break;
   7735   1.9  christos 	}
   7736   1.9  christos       break;
   7737   1.9  christos 
   7738   1.9  christos     case MVE_VQSHRN:
   7739   1.9  christos     case MVE_VQSHRUN:
   7740   1.9  christos     case MVE_VQRSHRN:
   7741   1.9  christos     case MVE_VQRSHRUN:
   7742   1.9  christos     case MVE_VRSHRN:
   7743   1.9  christos     case MVE_VSHRN:
   7744   1.9  christos       {
   7745   1.9  christos 	switch (size)
   7746   1.9  christos 	{
   7747  1.10  christos 	case 1:
   7748   1.9  christos 	  func (stream, dis_style_mnemonic, "16");
   7749   1.9  christos 	  break;
   7750   1.9  christos 
   7751  1.10  christos 	case 2: case 3:
   7752   1.9  christos 	  func (stream, dis_style_mnemonic, "32");
   7753   1.9  christos 	  break;
   7754   1.9  christos 
   7755   1.9  christos 	default:
   7756   1.9  christos 	  break;
   7757   1.9  christos 	}
   7758   1.9  christos       }
   7759   1.9  christos       break;
   7760   1.9  christos 
   7761   1.9  christos     case MVE_VQSHL_T2:
   7762   1.9  christos     case MVE_VQSHLU_T3:
   7763   1.9  christos     case MVE_VRSHR:
   7764   1.9  christos     case MVE_VSHL_T1:
   7765   1.9  christos     case MVE_VSHLL_T1:
   7766   1.9  christos     case MVE_VSHR:
   7767   1.9  christos     case MVE_VSLI:
   7768   1.9  christos     case MVE_VSRI:
   7769   1.9  christos       {
   7770   1.9  christos 	switch (size)
   7771   1.9  christos 	{
   7772  1.10  christos 	case 1:
   7773   1.9  christos 	  func (stream, dis_style_mnemonic, "8");
   7774   1.9  christos 	  break;
   7775   1.9  christos 
   7776  1.10  christos 	case 2: case 3:
   7777   1.9  christos 	  func (stream, dis_style_mnemonic, "16");
   7778   1.9  christos 	  break;
   7779   1.9  christos 
   7780  1.10  christos 	case 4: case 5: case 6: case 7:
   7781   1.9  christos 	  func (stream, dis_style_mnemonic, "32");
   7782   1.9  christos 	  break;
   7783   1.9  christos 
   7784   1.9  christos 	default:
   7785   1.9  christos 	  break;
   7786   1.9  christos 	}
   7787   1.9  christos       }
   7788   1.9  christos       break;
   7789   1.9  christos 
   7790   1.9  christos     default:
   7791   1.1  christos       break;
   7792   1.1  christos     }
   7793   1.1  christos }
   7794  1.11  christos 
   7795  1.11  christos /* Return true if INSN is a shift insn with an immediate shift amount
   7796  1.11  christos    which needs decoding as per print_mve_shift_n.  */
   7797  1.11  christos 
   7798  1.11  christos static bool
   7799  1.11  christos mve_shift_insn_p (enum mve_instructions insn)
   7800  1.11  christos {
   7801  1.11  christos   switch (insn)
   7802  1.11  christos     {
   7803  1.11  christos     case MVE_VQSHL_T2:
   7804  1.11  christos     case MVE_VQSHLU_T3:
   7805  1.11  christos     case MVE_VQSHRN:
   7806  1.11  christos     case MVE_VQSHRUN:
   7807  1.11  christos     case MVE_VQRSHRN:
   7808  1.11  christos     case MVE_VQRSHRUN:
   7809  1.11  christos     case MVE_VRSHR:
   7810  1.11  christos     case MVE_VRSHRN:
   7811  1.11  christos     case MVE_VSHL_T1:
   7812  1.11  christos     case MVE_VSHLL_T1:
   7813  1.11  christos     case MVE_VSHR:
   7814  1.11  christos     case MVE_VSHRN:
   7815  1.11  christos     case MVE_VSLI:
   7816  1.11  christos     case MVE_VSRI:
   7817  1.11  christos       return true;
   7818  1.11  christos     default:
   7819  1.11  christos       return false;
   7820  1.11  christos     }
   7821  1.11  christos }
   7822   1.1  christos 
   7823   1.9  christos static void
   7824   1.9  christos print_mve_shift_n (struct disassemble_info *info, long given,
   7825   1.9  christos 		   enum mve_instructions matched_insn)
   7826   1.9  christos {
   7827  1.10  christos   void *stream = info->stream;
   7828   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7829   1.9  christos 
   7830   1.9  christos   int startAt0
   7831   1.9  christos     = matched_insn == MVE_VQSHL_T2
   7832   1.9  christos       || matched_insn == MVE_VQSHLU_T3
   7833   1.9  christos       || matched_insn == MVE_VSHL_T1
   7834   1.9  christos       || matched_insn == MVE_VSHLL_T1
   7835   1.9  christos       || matched_insn == MVE_VSLI;
   7836   1.9  christos 
   7837   1.9  christos   unsigned imm6 = (given & 0x3f0000) >> 16;
   7838   1.9  christos 
   7839   1.9  christos   if (matched_insn == MVE_VSHLL_T1)
   7840   1.9  christos     imm6 &= 0x1f;
   7841   1.9  christos 
   7842   1.9  christos   unsigned shiftAmount = 0;
   7843   1.9  christos   if ((imm6 & 0x20) != 0)
   7844   1.9  christos     shiftAmount = startAt0 ? imm6 - 32 : 64 - imm6;
   7845   1.9  christos   else if ((imm6 & 0x10) != 0)
   7846   1.9  christos     shiftAmount = startAt0 ? imm6 - 16 : 32 - imm6;
   7847   1.9  christos   else if ((imm6 & 0x08) != 0)
   7848   1.9  christos     shiftAmount = startAt0 ? imm6 - 8 : 16 - imm6;
   7849   1.9  christos   else
   7850   1.9  christos     print_mve_undefined (info, UNDEF_SIZE_0);
   7851  1.10  christos 
   7852   1.9  christos   func (stream, dis_style_immediate, "%u", shiftAmount);
   7853   1.9  christos }
   7854   1.9  christos 
   7855   1.9  christos static void
   7856   1.9  christos print_vec_condition (struct disassemble_info *info, long given,
   7857   1.1  christos 		     enum mve_instructions matched_insn)
   7858   1.9  christos {
   7859  1.10  christos   void *stream = info->stream;
   7860   1.9  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7861   1.1  christos   long vec_cond = 0;
   7862   1.9  christos 
   7863   1.1  christos   switch (matched_insn)
   7864   1.9  christos     {
   7865   1.9  christos     case MVE_VPT_FP_T1:
   7866   1.9  christos     case MVE_VCMP_FP_T1:
   7867   1.9  christos       vec_cond = (((given & 0x1000) >> 10)
   7868   1.9  christos 		  | ((given & 1) << 1)
   7869  1.10  christos 		  | ((given & 0x0080) >> 7));
   7870   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7871   1.9  christos       break;
   7872   1.9  christos 
   7873   1.9  christos     case MVE_VPT_FP_T2:
   7874   1.9  christos     case MVE_VCMP_FP_T2:
   7875   1.9  christos       vec_cond = (((given & 0x1000) >> 10)
   7876   1.9  christos 		  | ((given & 0x0020) >> 4)
   7877  1.10  christos 		  | ((given & 0x0080) >> 7));
   7878   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7879   1.9  christos       break;
   7880   1.9  christos 
   7881   1.9  christos     case MVE_VPT_VEC_T1:
   7882   1.9  christos     case MVE_VCMP_VEC_T1:
   7883  1.10  christos       vec_cond = (given & 0x0080) >> 7;
   7884   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7885   1.9  christos       break;
   7886   1.9  christos 
   7887   1.9  christos     case MVE_VPT_VEC_T2:
   7888   1.9  christos     case MVE_VCMP_VEC_T2:
   7889  1.10  christos       vec_cond = 2 | ((given & 0x0080) >> 7);
   7890   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7891   1.9  christos       break;
   7892   1.9  christos 
   7893   1.9  christos     case MVE_VPT_VEC_T3:
   7894   1.9  christos     case MVE_VCMP_VEC_T3:
   7895  1.10  christos       vec_cond = 4 | ((given & 1) << 1) | ((given & 0x0080) >> 7);
   7896   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7897   1.9  christos       break;
   7898   1.9  christos 
   7899   1.9  christos     case MVE_VPT_VEC_T4:
   7900   1.9  christos     case MVE_VCMP_VEC_T4:
   7901  1.10  christos       vec_cond = (given & 0x0080) >> 7;
   7902   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7903   1.1  christos       break;
   7904   1.9  christos 
   7905   1.9  christos     case MVE_VPT_VEC_T5:
   7906   1.9  christos     case MVE_VCMP_VEC_T5:
   7907  1.10  christos       vec_cond = 2 | ((given & 0x0080) >> 7);
   7908   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7909   1.1  christos       break;
   7910   1.9  christos 
   7911   1.9  christos     case MVE_VPT_VEC_T6:
   7912   1.9  christos     case MVE_VCMP_VEC_T6:
   7913  1.10  christos       vec_cond = 4 | ((given & 0x0020) >> 4) | ((given & 0x0080) >> 7);
   7914   1.9  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7915   1.1  christos       break;
   7916   1.9  christos 
   7917   1.9  christos     case MVE_NONE:
   7918   1.9  christos     case MVE_VPST:
   7919   1.9  christos     default:
   7920   1.1  christos       break;
   7921   1.1  christos     }
   7922   1.1  christos }
   7923   1.1  christos 
   7924   1.1  christos #define W_BIT 21
   7925   1.1  christos #define I_BIT 22
   7926   1.1  christos #define U_BIT 23
   7927   1.1  christos #define P_BIT 24
   7928   1.9  christos 
   7929   1.9  christos #define WRITEBACK_BIT_SET (given & (1 << W_BIT))
   7930   1.9  christos #define IMMEDIATE_BIT_SET (given & (1 << I_BIT))
   7931   1.9  christos #define NEGATIVE_BIT_SET  ((given & (1 << U_BIT)) == 0)
   7932   1.9  christos #define PRE_BIT_SET	  (given & (1 << P_BIT))
   7933  1.10  christos 
   7934  1.10  christos /* The assembler string for an instruction can include %{X:...%} patterns,
   7935  1.10  christos    where the 'X' is one of the characters understood by this function.
   7936  1.10  christos 
   7937  1.10  christos    This function takes the X character, and returns a new style.  This new
   7938  1.10  christos    style will be used by the caller to temporarily change the current base
   7939  1.10  christos    style.  */
   7940  1.10  christos 
   7941  1.10  christos static enum disassembler_style
   7942  1.10  christos decode_base_style (const char x)
   7943  1.10  christos {
   7944  1.10  christos   switch (x)
   7945  1.10  christos     {
   7946  1.10  christos     case 'A': return dis_style_address;
   7947  1.10  christos     case 'B': return dis_style_sub_mnemonic;
   7948  1.10  christos     case 'C': return dis_style_comment_start;
   7949  1.10  christos     case 'D': return dis_style_assembler_directive;
   7950  1.10  christos     case 'I': return dis_style_immediate;
   7951  1.10  christos     case 'M': return dis_style_mnemonic;
   7952  1.10  christos     case 'O': return dis_style_address_offset;
   7953  1.10  christos     case 'R': return dis_style_register;
   7954  1.10  christos     case 'S': return dis_style_symbol;
   7955  1.10  christos     case 'T': return dis_style_text;
   7956  1.10  christos     default:
   7957  1.10  christos       abort ();
   7958  1.10  christos     }
   7959   1.1  christos }
   7960   1.1  christos 
   7961   1.1  christos /* Print one coprocessor instruction on INFO->STREAM.
   7962   1.1  christos    Return TRUE if the instuction matched, FALSE if this is not a
   7963   1.1  christos    recognised coprocessor instruction.  */
   7964  1.10  christos 
   7965   1.9  christos static bool
   7966   1.9  christos print_insn_coprocessor_1 (const struct sopcode32 *opcodes,
   7967   1.9  christos 			  bfd_vma pc,
   7968   1.9  christos 			  struct disassemble_info *info,
   7969  1.10  christos 			  long given,
   7970   1.1  christos 			  bool thumb)
   7971   1.9  christos {
   7972   1.1  christos   const struct sopcode32 *insn;
   7973  1.10  christos   void *stream = info->stream;
   7974   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7975   1.1  christos   unsigned long mask;
   7976   1.5  christos   unsigned long value = 0;
   7977   1.6  christos   int cond;
   7978   1.1  christos   int cp_num;
   7979   1.5  christos   struct arm_private_data *private_data = info->private_data;
   7980   1.9  christos   arm_feature_set allowed_arches = ARM_ARCH_NONE;
   7981   1.9  christos   arm_feature_set arm_ext_v8_1m_main =
   7982  1.10  christos     ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
   7983  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   7984   1.5  christos   enum disassembler_style old_base_style = base_style;
   7985   1.8  christos 
   7986   1.1  christos   allowed_arches = private_data->features;
   7987   1.9  christos 
   7988   1.1  christos   for (insn = opcodes; insn->assembler; insn++)
   7989   1.1  christos     {
   7990  1.10  christos       unsigned long u_reg = 16;
   7991   1.1  christos       bool is_unpredictable = false;
   7992   1.1  christos       signed long value_in_comment = 0;
   7993   1.1  christos       const char *c;
   7994   1.5  christos 
   7995   1.1  christos       if (ARM_FEATURE_ZERO (insn->arch))
   7996   1.1  christos 	switch (insn->value)
   7997   1.1  christos 	  {
   7998   1.1  christos 	  case SENTINEL_IWMMXT_START:
   7999   1.1  christos 	    if (info->mach != bfd_mach_arm_XScale
   8000   1.1  christos 		&& info->mach != bfd_mach_arm_iWMMXt
   8001   1.1  christos 		&& info->mach != bfd_mach_arm_iWMMXt2)
   8002   1.1  christos 	      do
   8003   1.5  christos 		insn++;
   8004   1.5  christos 	      while ((! ARM_FEATURE_ZERO (insn->arch))
   8005   1.1  christos 		     && insn->value != SENTINEL_IWMMXT_END);
   8006   1.1  christos 	    continue;
   8007   1.1  christos 
   8008   1.1  christos 	  case SENTINEL_IWMMXT_END:
   8009   1.1  christos 	    continue;
   8010   1.1  christos 
   8011   1.8  christos 	  case SENTINEL_GENERIC_START:
   8012   1.1  christos 	    allowed_arches = private_data->features;
   8013   1.1  christos 	    continue;
   8014   1.1  christos 
   8015   1.1  christos 	  default:
   8016   1.1  christos 	    abort ();
   8017   1.1  christos 	  }
   8018   1.1  christos 
   8019   1.1  christos       mask = insn->mask;
   8020   1.6  christos       value = insn->value;
   8021   1.6  christos       cp_num = (given >> 8) & 0xf;
   8022   1.1  christos 
   8023   1.1  christos       if (thumb)
   8024   1.1  christos 	{
   8025   1.1  christos 	  /* The high 4 bits are 0xe for Arm conditional instructions, and
   8026   1.1  christos 	     0xe for arm unconditional instructions.  The rest of the
   8027   1.1  christos 	     encoding is the same.  */
   8028   1.1  christos 	  mask |= 0xf0000000;
   8029   1.1  christos 	  value |= 0xe0000000;
   8030   1.1  christos 	  if (ifthen_state)
   8031   1.1  christos 	    cond = IFTHEN_COND;
   8032   1.1  christos 	  else
   8033   1.1  christos 	    cond = COND_UNCOND;
   8034   1.1  christos 	}
   8035   1.1  christos       else
   8036   1.1  christos 	{
   8037   1.1  christos 	  /* Only match unconditional instuctions against unconditional
   8038   1.1  christos 	     patterns.  */
   8039   1.1  christos 	  if ((given & 0xf0000000) == 0xf0000000)
   8040   1.1  christos 	    {
   8041   1.1  christos 	      mask |= 0xf0000000;
   8042   1.1  christos 	      cond = COND_UNCOND;
   8043   1.1  christos 	    }
   8044   1.1  christos 	  else
   8045   1.1  christos 	    {
   8046   1.1  christos 	      cond = (given >> 28) & 0xf;
   8047   1.1  christos 	      if (cond == 0xe)
   8048   1.1  christos 		cond = COND_UNCOND;
   8049   1.1  christos 	    }
   8050   1.5  christos 	}
   8051   1.9  christos 
   8052   1.9  christos       if ((insn->isa == T32 && !thumb)
   8053   1.9  christos 	  || (insn->isa == ARM && thumb))
   8054   1.9  christos 	continue;
   8055   1.1  christos 
   8056   1.1  christos       if ((given & mask) != value)
   8057   1.1  christos 	continue;
   8058   1.5  christos 
   8059   1.1  christos       if (! ARM_CPU_HAS_FEATURE (insn->arch, allowed_arches))
   8060   1.1  christos 	continue;
   8061   1.6  christos 
   8062   1.6  christos       if (insn->value == 0xfe000010     /* mcr2  */
   8063   1.6  christos 	  || insn->value == 0xfe100010  /* mrc2  */
   8064   1.6  christos 	  || insn->value == 0xfc100000  /* ldc2  */
   8065   1.6  christos 	  || insn->value == 0xfc000000) /* stc2  */
   8066   1.6  christos 	{
   8067  1.10  christos 	  if (cp_num == 9 || cp_num == 10 || cp_num == 11)
   8068   1.9  christos 	    is_unpredictable = true;
   8069   1.9  christos 
   8070   1.9  christos 	  /* Armv8.1-M Mainline FP & MVE instructions.  */
   8071   1.9  christos 	  if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
   8072   1.9  christos 	      && !ARM_CPU_IS_ANY (allowed_arches)
   8073   1.9  christos 	      && (cp_num == 8 || cp_num == 14 || cp_num == 15))
   8074   1.9  christos 	    continue;
   8075   1.6  christos 
   8076   1.6  christos 	}
   8077   1.6  christos       else if (insn->value == 0x0e000000     /* cdp  */
   8078   1.6  christos 	       || insn->value == 0xfe000000  /* cdp2  */
   8079   1.6  christos 	       || insn->value == 0x0e000010  /* mcr  */
   8080   1.6  christos 	       || insn->value == 0x0e100010  /* mrc  */
   8081   1.6  christos 	       || insn->value == 0x0c100000  /* ldc  */
   8082   1.6  christos 	       || insn->value == 0x0c000000) /* stc  */
   8083   1.6  christos 	{
   8084   1.6  christos 	  /* Floating-point instructions.  */
   8085   1.6  christos 	  if (cp_num == 9 || cp_num == 10 || cp_num == 11)
   8086   1.9  christos 	    continue;
   8087   1.9  christos 
   8088   1.9  christos 	  /* Armv8.1-M Mainline FP & MVE instructions.  */
   8089   1.9  christos 	  if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
   8090   1.9  christos 	      && !ARM_CPU_IS_ANY (allowed_arches)
   8091   1.9  christos 	      && (cp_num == 8 || cp_num == 14 || cp_num == 15))
   8092   1.6  christos 	    continue;
   8093   1.9  christos 	}
   8094   1.9  christos       else if ((insn->value == 0xec100f80      /* vldr (system register) */
   8095   1.9  christos 		|| insn->value == 0xec000f80)  /* vstr (system register) */
   8096   1.9  christos 	       && arm_decode_field (given, 24, 24) == 0
   8097   1.9  christos 	       && arm_decode_field (given, 21, 21) == 0)
   8098   1.9  christos 	/* If the P and W bits are both 0 then these encodings match the MVE
   8099   1.9  christos 	   VLDR and VSTR instructions, these are in a different table, so we
   8100   1.9  christos 	   don't let it match here.  */
   8101   1.6  christos 	continue;
   8102   1.1  christos 
   8103   1.1  christos       for (c = insn->assembler; *c; c++)
   8104   1.1  christos 	{
   8105   1.1  christos 	  if (*c == '%')
   8106   1.9  christos 	    {
   8107  1.10  christos 	      const char mod = *++c;
   8108   1.9  christos 
   8109   1.1  christos 	      switch (mod)
   8110  1.10  christos 		{
   8111  1.10  christos 		case '{':
   8112  1.10  christos 		  ++c;
   8113  1.10  christos 		  if (*c == '\0')
   8114  1.10  christos 		    abort ();
   8115  1.10  christos 		  old_base_style = base_style;
   8116  1.10  christos 		  base_style = decode_base_style (*c);
   8117  1.10  christos 		  ++c;
   8118  1.10  christos 		  if (*c != ':')
   8119  1.10  christos 		    abort ();
   8120  1.10  christos 		  break;
   8121  1.10  christos 
   8122  1.10  christos 		case '}':
   8123  1.10  christos 		  base_style = old_base_style;
   8124  1.10  christos 		  break;
   8125   1.1  christos 
   8126  1.10  christos 		case '%':
   8127   1.1  christos 		  func (stream, base_style, "%%");
   8128   1.1  christos 		  break;
   8129   1.1  christos 
   8130   1.9  christos 		case 'A':
   8131   1.1  christos 		case 'K':
   8132   1.1  christos 		  {
   8133   1.6  christos 		    int rn = (given >> 16) & 0xf;
   8134   1.1  christos 		    bfd_vma offset = given & 0xff;
   8135   1.9  christos 
   8136   1.9  christos 		    if (mod == 'K')
   8137   1.9  christos 		      offset = given & 0x7f;
   8138  1.10  christos 
   8139  1.10  christos 		    func (stream, dis_style_text, "[");
   8140  1.10  christos 		    func (stream, dis_style_register, "%s",
   8141   1.1  christos 			  arm_regnames [(given >> 16) & 0xf]);
   8142   1.1  christos 
   8143   1.1  christos 		    if (PRE_BIT_SET || WRITEBACK_BIT_SET)
   8144   1.1  christos 		      {
   8145   1.6  christos 			/* Not unindexed.  The offset is scaled.  */
   8146   1.6  christos 			if (cp_num == 9)
   8147   1.6  christos 			  /* vldr.16/vstr.16 will shift the address
   8148   1.6  christos 			     left by 1 bit only.  */
   8149   1.6  christos 			  offset = offset * 2;
   8150   1.6  christos 			else
   8151   1.6  christos 			  offset = offset * 4;
   8152   1.1  christos 
   8153   1.1  christos 			if (NEGATIVE_BIT_SET)
   8154   1.1  christos 			  offset = - offset;
   8155   1.1  christos 			if (rn != 15)
   8156   1.1  christos 			  value_in_comment = offset;
   8157   1.1  christos 		      }
   8158   1.1  christos 
   8159   1.1  christos 		    if (PRE_BIT_SET)
   8160   1.1  christos 		      {
   8161  1.10  christos 			if (offset)
   8162  1.10  christos 			  {
   8163  1.10  christos 			    func (stream, dis_style_text, ", ");
   8164  1.10  christos 			    func (stream, dis_style_immediate, "#%d",
   8165  1.10  christos 				  (int) offset);
   8166  1.10  christos 			    func (stream, dis_style_text, "]%s",
   8167  1.10  christos 				  WRITEBACK_BIT_SET ? "!" : "");
   8168   1.1  christos 			  }
   8169  1.10  christos 			else if (NEGATIVE_BIT_SET)
   8170  1.10  christos 			  {
   8171  1.10  christos 			    func (stream, dis_style_text, ", ");
   8172  1.10  christos 			    func (stream, dis_style_immediate, "#-0");
   8173  1.10  christos 			    func (stream, dis_style_text, "]");
   8174   1.1  christos 			  }
   8175  1.10  christos 			else
   8176   1.1  christos 			  func (stream, dis_style_text, "]");
   8177   1.1  christos 		      }
   8178   1.1  christos 		    else
   8179  1.10  christos 		      {
   8180   1.1  christos 			func (stream, dis_style_text, "]");
   8181   1.1  christos 
   8182   1.1  christos 			if (WRITEBACK_BIT_SET)
   8183   1.1  christos 			  {
   8184  1.10  christos 			    if (offset)
   8185  1.10  christos 			      {
   8186  1.10  christos 				func (stream, dis_style_text, ", ");
   8187  1.10  christos 				func (stream, dis_style_immediate,
   8188  1.10  christos 				      "#%d", (int) offset);
   8189   1.1  christos 			      }
   8190  1.10  christos 			    else if (NEGATIVE_BIT_SET)
   8191  1.10  christos 			      {
   8192  1.10  christos 				func (stream, dis_style_text, ", ");
   8193  1.10  christos 				func (stream, dis_style_immediate, "#-0");
   8194   1.1  christos 			      }
   8195   1.1  christos 			  }
   8196   1.1  christos 			else
   8197  1.10  christos 			  {
   8198  1.10  christos 			    func (stream, dis_style_text, ", {");
   8199   1.1  christos 			    func (stream, dis_style_immediate, "%s%d",
   8200   1.1  christos 				  (NEGATIVE_BIT_SET && !offset) ? "-" : "",
   8201  1.10  christos 				  (int) offset);
   8202   1.1  christos 			    func (stream, dis_style_text, "}");
   8203   1.1  christos 			    value_in_comment = offset;
   8204   1.1  christos 			  }
   8205   1.1  christos 		      }
   8206   1.1  christos 		    if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
   8207  1.10  christos 		      {
   8208   1.1  christos 			func (stream, dis_style_comment_start, "\t@ ");
   8209   1.1  christos 			/* For unaligned PCs, apply off-by-alignment
   8210   1.6  christos 			   correction.  */
   8211   1.1  christos 			info->print_address_func (offset + pc
   8212   1.1  christos 						  + info->bytes_per_chunk * 2
   8213   1.9  christos 						  - (pc & 3),
   8214   1.1  christos 						  info);
   8215   1.1  christos 		      }
   8216   1.1  christos 		  }
   8217   1.1  christos 		  break;
   8218   1.1  christos 
   8219   1.1  christos 		case 'B':
   8220   1.1  christos 		  {
   8221   1.1  christos 		    int regno = ((given >> 12) & 0xf) | ((given >> (22 - 4)) & 0x10);
   8222   1.1  christos 		    int offset = (given >> 1) & 0x3f;
   8223  1.10  christos 
   8224   1.1  christos 		    func (stream, dis_style_text, "{");
   8225  1.10  christos 		    if (offset == 1)
   8226   1.1  christos 		      func (stream, dis_style_register, "d%d", regno);
   8227  1.10  christos 		    else if (regno + offset > 32)
   8228  1.10  christos 		      {
   8229  1.10  christos 			func (stream, dis_style_register, "d%d", regno);
   8230  1.10  christos 			func (stream, dis_style_text, "-<overflow reg d%d>",
   8231  1.10  christos 			      regno + offset - 1);
   8232   1.1  christos 		      }
   8233  1.10  christos 		    else
   8234  1.10  christos 		      {
   8235  1.10  christos 			func (stream, dis_style_register, "d%d", regno);
   8236  1.10  christos 			func (stream, dis_style_text, "-");
   8237  1.10  christos 			func (stream, dis_style_register, "d%d",
   8238  1.10  christos 			      regno + offset - 1);
   8239  1.10  christos 		      }
   8240   1.1  christos 		    func (stream, dis_style_text, "}");
   8241   1.1  christos 		  }
   8242   1.1  christos 		  break;
   8243   1.9  christos 
   8244   1.9  christos 		case 'C':
   8245  1.10  christos 		  {
   8246   1.9  christos 		    bool single = ((given >> 8) & 1) == 0;
   8247   1.9  christos 		    char reg_prefix = single ? 's' : 'd';
   8248   1.9  christos 		    int Dreg = (given >> 22) & 0x1;
   8249   1.9  christos 		    int Vdreg = (given >> 12) & 0xf;
   8250   1.9  christos 		    int reg = single ? ((Vdreg << 1) | Dreg)
   8251   1.9  christos 				     : ((Dreg << 4) | Vdreg);
   8252   1.9  christos 		    int num = (given >> (single ? 0 : 1)) & 0x7f;
   8253   1.9  christos 		    int maxreg = single ? 31 : 15;
   8254   1.9  christos 		    int topreg = reg + num - 1;
   8255  1.10  christos 
   8256   1.9  christos 		    func (stream, dis_style_text, "{");
   8257  1.10  christos 		    if (!num)
   8258  1.10  christos 		      {
   8259  1.10  christos 			/* Nothing.  */
   8260   1.9  christos 		      }
   8261  1.10  christos 		    else if (num == 1)
   8262  1.10  christos 		      {
   8263  1.10  christos 			func (stream, dis_style_register,
   8264  1.10  christos 			      "%c%d", reg_prefix, reg);
   8265  1.10  christos 			func (stream, dis_style_text, ", ");
   8266   1.9  christos 		      }
   8267  1.10  christos 		    else if (topreg > maxreg)
   8268  1.10  christos 		      {
   8269  1.10  christos 			func (stream, dis_style_register, "%c%d",
   8270  1.10  christos 			      reg_prefix, reg);
   8271  1.10  christos 			func (stream, dis_style_text, "-<overflow reg d%d, ",
   8272  1.10  christos 			      single ? topreg >> 1 : topreg);
   8273   1.9  christos 		      }
   8274  1.10  christos 		    else
   8275  1.10  christos 		      {
   8276  1.10  christos 			func (stream, dis_style_register,
   8277  1.10  christos 			      "%c%d", reg_prefix, reg);
   8278  1.10  christos 			func (stream, dis_style_text, "-");
   8279  1.10  christos 			func (stream, dis_style_register, "%c%d",
   8280  1.10  christos 			      reg_prefix, topreg);
   8281  1.10  christos 			func (stream, dis_style_text, ", ");
   8282  1.10  christos 		      }
   8283  1.10  christos 		    func (stream, dis_style_register, "VPR");
   8284   1.9  christos 		    func (stream, dis_style_text, "}");
   8285   1.9  christos 		  }
   8286   1.9  christos 		  break;
   8287   1.1  christos 
   8288   1.1  christos 		case 'u':
   8289  1.10  christos 		  if (cond != COND_UNCOND)
   8290   1.1  christos 		    is_unpredictable = true;
   8291   1.1  christos 
   8292   1.1  christos 		  /* Fall through.  */
   8293   1.6  christos 		case 'c':
   8294  1.10  christos 		  if (cond != COND_UNCOND && cp_num == 9)
   8295   1.6  christos 		    is_unpredictable = true;
   8296   1.9  christos 
   8297   1.9  christos 		  /* Fall through.  */
   8298  1.10  christos 		case 'b':
   8299  1.10  christos 		  func (stream, dis_style_mnemonic, "%s",
   8300   1.1  christos 			arm_conditional[cond]);
   8301   1.1  christos 		  break;
   8302   1.1  christos 
   8303   1.1  christos 		case 'I':
   8304   1.1  christos 		  /* Print a Cirrus/DSP shift immediate.  */
   8305   1.1  christos 		  /* Immediates are 7bit signed ints with bits 0..3 in
   8306   1.1  christos 		     bits 0..3 of opcode and bits 4..6 in bits 5..7
   8307   1.1  christos 		     of opcode.  */
   8308   1.1  christos 		  {
   8309   1.1  christos 		    int imm;
   8310   1.1  christos 
   8311   1.1  christos 		    imm = (given & 0xf) | ((given & 0xe0) >> 1);
   8312   1.1  christos 
   8313   1.1  christos 		    /* Is ``imm'' a negative number?  */
   8314   1.5  christos 		    if (imm & 0x40)
   8315   1.1  christos 		      imm -= 0x80;
   8316  1.10  christos 
   8317   1.1  christos 		    func (stream, dis_style_immediate, "%d", imm);
   8318   1.1  christos 		  }
   8319   1.1  christos 
   8320   1.1  christos 		  break;
   8321   1.9  christos 
   8322   1.9  christos 		case 'J':
   8323   1.9  christos 		  {
   8324   1.9  christos 		    unsigned long regno
   8325   1.9  christos 		      = arm_decode_field_multiple (given, 13, 15, 22, 22);
   8326   1.9  christos 
   8327   1.9  christos 		    switch (regno)
   8328   1.9  christos 		      {
   8329  1.10  christos 		      case 0x1:
   8330   1.9  christos 			func (stream, dis_style_register, "FPSCR");
   8331   1.9  christos 			break;
   8332  1.10  christos 		      case 0x2:
   8333   1.9  christos 			func (stream, dis_style_register, "FPSCR_nzcvqc");
   8334   1.9  christos 			break;
   8335  1.10  christos 		      case 0xc:
   8336   1.9  christos 			func (stream, dis_style_register, "VPR");
   8337   1.9  christos 			break;
   8338  1.10  christos 		      case 0xd:
   8339   1.9  christos 			func (stream, dis_style_register, "P0");
   8340   1.9  christos 			break;
   8341  1.10  christos 		      case 0xe:
   8342   1.9  christos 			func (stream, dis_style_register, "FPCXTNS");
   8343   1.9  christos 			break;
   8344  1.10  christos 		      case 0xf:
   8345   1.9  christos 			func (stream, dis_style_register, "FPCXTS");
   8346   1.9  christos 			break;
   8347  1.10  christos 		      default:
   8348  1.10  christos 			func (stream, dis_style_text, "<invalid reg %lu>",
   8349   1.9  christos 			      regno);
   8350   1.9  christos 			break;
   8351   1.9  christos 		      }
   8352   1.9  christos 		  }
   8353   1.9  christos 		  break;
   8354   1.1  christos 
   8355   1.1  christos 		case 'F':
   8356   1.1  christos 		  switch (given & 0x00408000)
   8357   1.1  christos 		    {
   8358  1.10  christos 		    case 0:
   8359   1.1  christos 		      func (stream, dis_style_immediate, "4");
   8360   1.1  christos 		      break;
   8361  1.10  christos 		    case 0x8000:
   8362   1.1  christos 		      func (stream, dis_style_immediate, "1");
   8363   1.1  christos 		      break;
   8364  1.10  christos 		    case 0x00400000:
   8365   1.1  christos 		      func (stream, dis_style_immediate, "2");
   8366   1.1  christos 		      break;
   8367  1.10  christos 		    default:
   8368   1.1  christos 		      func (stream, dis_style_immediate, "3");
   8369   1.1  christos 		    }
   8370   1.1  christos 		  break;
   8371   1.1  christos 
   8372   1.1  christos 		case 'P':
   8373   1.1  christos 		  switch (given & 0x00080080)
   8374   1.1  christos 		    {
   8375  1.10  christos 		    case 0:
   8376   1.1  christos 		      func (stream, dis_style_mnemonic, "s");
   8377   1.1  christos 		      break;
   8378  1.10  christos 		    case 0x80:
   8379   1.1  christos 		      func (stream, dis_style_mnemonic, "d");
   8380   1.1  christos 		      break;
   8381  1.10  christos 		    case 0x00080000:
   8382   1.1  christos 		      func (stream, dis_style_mnemonic, "e");
   8383   1.1  christos 		      break;
   8384  1.10  christos 		    default:
   8385   1.1  christos 		      func (stream, dis_style_text, _("<illegal precision>"));
   8386   1.1  christos 		      break;
   8387   1.1  christos 		    }
   8388   1.1  christos 		  break;
   8389   1.1  christos 
   8390   1.1  christos 		case 'Q':
   8391   1.1  christos 		  switch (given & 0x00408000)
   8392   1.1  christos 		    {
   8393  1.10  christos 		    case 0:
   8394   1.1  christos 		      func (stream, dis_style_mnemonic, "s");
   8395   1.1  christos 		      break;
   8396  1.10  christos 		    case 0x8000:
   8397   1.1  christos 		      func (stream, dis_style_mnemonic, "d");
   8398   1.1  christos 		      break;
   8399  1.10  christos 		    case 0x00400000:
   8400   1.1  christos 		      func (stream, dis_style_mnemonic, "e");
   8401   1.1  christos 		      break;
   8402  1.10  christos 		    default:
   8403   1.1  christos 		      func (stream, dis_style_mnemonic, "p");
   8404   1.1  christos 		      break;
   8405   1.1  christos 		    }
   8406   1.1  christos 		  break;
   8407   1.1  christos 
   8408   1.1  christos 		case 'R':
   8409   1.1  christos 		  switch (given & 0x60)
   8410   1.1  christos 		    {
   8411   1.1  christos 		    case 0:
   8412   1.1  christos 		      break;
   8413  1.10  christos 		    case 0x20:
   8414   1.1  christos 		      func (stream, dis_style_mnemonic, "p");
   8415   1.1  christos 		      break;
   8416  1.10  christos 		    case 0x40:
   8417   1.1  christos 		      func (stream, dis_style_mnemonic, "m");
   8418   1.1  christos 		      break;
   8419  1.10  christos 		    default:
   8420   1.1  christos 		      func (stream, dis_style_mnemonic, "z");
   8421   1.1  christos 		      break;
   8422   1.1  christos 		    }
   8423   1.1  christos 		  break;
   8424   1.1  christos 
   8425   1.1  christos 		case '0': case '1': case '2': case '3': case '4':
   8426   1.1  christos 		case '5': case '6': case '7': case '8': case '9':
   8427   1.1  christos 		  {
   8428   1.1  christos 		    int width;
   8429   1.1  christos 
   8430   1.1  christos 		    c = arm_decode_bitfield (c, given, &value, &width);
   8431   1.1  christos 
   8432   1.1  christos 		    switch (*c)
   8433   1.1  christos 		      {
   8434   1.1  christos 		      case 'R':
   8435  1.10  christos 			if (value == 15)
   8436   1.1  christos 			  is_unpredictable = true;
   8437   1.1  christos 			/* Fall through.  */
   8438   1.1  christos 		      case 'r':
   8439   1.1  christos 			if (c[1] == 'u')
   8440   1.1  christos 			  {
   8441   1.1  christos 			    /* Eat the 'u' character.  */
   8442   1.1  christos 			    ++ c;
   8443   1.1  christos 
   8444  1.10  christos 			    if (u_reg == value)
   8445   1.1  christos 			      is_unpredictable = true;
   8446   1.1  christos 			    u_reg = value;
   8447  1.10  christos 			  }
   8448  1.10  christos 			func (stream, dis_style_register, "%s",
   8449   1.1  christos 			      arm_regnames[value]);
   8450   1.7  christos 			break;
   8451   1.7  christos 		      case 'V':
   8452   1.7  christos 			if (given & (1 << 6))
   8453   1.7  christos 			  goto Q;
   8454   1.1  christos 			/* FALLTHROUGH */
   8455  1.10  christos 		      case 'D':
   8456   1.1  christos 			func (stream, dis_style_register, "d%ld", value);
   8457   1.1  christos 			break;
   8458   1.7  christos 		      case 'Q':
   8459   1.1  christos 		      Q:
   8460  1.10  christos 			if (value & 1)
   8461  1.10  christos 			  func (stream, dis_style_text,
   8462   1.1  christos 				"<illegal reg q%ld.5>", value >> 1);
   8463  1.10  christos 			else
   8464  1.10  christos 			  func (stream, dis_style_register,
   8465   1.1  christos 				"q%ld", value >> 1);
   8466   1.1  christos 			break;
   8467  1.10  christos 		      case 'd':
   8468   1.1  christos 			func (stream, base_style, "%ld", value);
   8469   1.1  christos 			value_in_comment = value;
   8470   1.6  christos 			break;
   8471   1.6  christos 		      case 'E':
   8472   1.6  christos                         {
   8473   1.6  christos 			  /* Converts immediate 8 bit back to float value.  */
   8474   1.6  christos 			  unsigned floatVal = (value & 0x80) << 24
   8475   1.6  christos 			    | (value & 0x3F) << 19
   8476   1.6  christos 			    | ((value & 0x40) ? (0xF8 << 22) : (1 << 30));
   8477   1.6  christos 
   8478   1.6  christos 			  /* Quarter float have a maximum value of 31.0.
   8479   1.6  christos 			     Get floating point value multiplied by 1e7.
   8480   1.6  christos 			     The maximum value stays in limit of a 32-bit int.  */
   8481   1.6  christos 			  unsigned decVal =
   8482   1.6  christos 			    (78125 << (((floatVal >> 23) & 0xFF) - 124)) *
   8483   1.6  christos 			    (16 + (value & 0xF));
   8484   1.6  christos 
   8485  1.10  christos 			  if (!(decVal % 1000000))
   8486  1.10  christos 			    {
   8487  1.10  christos 			      func (stream, dis_style_immediate, "%ld", value);
   8488  1.10  christos 			      func (stream, dis_style_comment_start,
   8489  1.10  christos 				    "\t@ 0x%08x %c%u.%01u",
   8490  1.10  christos 				    floatVal, value & 0x80 ? '-' : ' ',
   8491  1.10  christos 				    decVal / 10000000,
   8492  1.10  christos 				    decVal % 10000000 / 1000000);
   8493   1.6  christos 			    }
   8494  1.10  christos 			  else if (!(decVal % 10000))
   8495  1.10  christos 			    {
   8496  1.10  christos 			      func (stream, dis_style_immediate, "%ld", value);
   8497  1.10  christos 			      func (stream, dis_style_comment_start,
   8498  1.10  christos 				    "\t@ 0x%08x %c%u.%03u",
   8499  1.10  christos 				    floatVal, value & 0x80 ? '-' : ' ',
   8500  1.10  christos 				    decVal / 10000000,
   8501  1.10  christos 				    decVal % 10000000 / 10000);
   8502   1.6  christos 			    }
   8503  1.10  christos 			  else
   8504  1.10  christos 			    {
   8505  1.10  christos 			      func (stream, dis_style_immediate, "%ld", value);
   8506  1.10  christos 			      func (stream, dis_style_comment_start,
   8507  1.10  christos 				    "\t@ 0x%08x %c%u.%07u",
   8508  1.10  christos 				    floatVal, value & 0x80 ? '-' : ' ',
   8509  1.10  christos 				    decVal / 10000000, decVal % 10000000);
   8510   1.6  christos 			    }
   8511   1.6  christos 			  break;
   8512   1.1  christos 			}
   8513   1.1  christos 		      case 'k':
   8514   1.1  christos 			{
   8515  1.10  christos 			  int from = (given & (1 << 7)) ? 32 : 16;
   8516  1.10  christos 			  func (stream, dis_style_immediate, "%ld",
   8517   1.1  christos 				from - value);
   8518   1.1  christos 			}
   8519   1.1  christos 			break;
   8520   1.1  christos 
   8521   1.1  christos 		      case 'f':
   8522  1.10  christos 			if (value > 7)
   8523  1.10  christos 			  func (stream, dis_style_immediate, "#%s",
   8524   1.1  christos 				arm_fp_const[value & 7]);
   8525  1.10  christos 			else
   8526   1.1  christos 			  func (stream, dis_style_register, "f%ld", value);
   8527   1.1  christos 			break;
   8528   1.1  christos 
   8529   1.1  christos 		      case 'w':
   8530  1.10  christos 			if (width == 2)
   8531  1.10  christos 			  func (stream, dis_style_mnemonic, "%s",
   8532   1.1  christos 				iwmmxt_wwnames[value]);
   8533  1.10  christos 			else
   8534  1.10  christos 			  func (stream, dis_style_mnemonic, "%s",
   8535   1.1  christos 				iwmmxt_wwssnames[value]);
   8536   1.1  christos 			break;
   8537   1.1  christos 
   8538  1.10  christos 		      case 'g':
   8539  1.10  christos 			func (stream, dis_style_register, "%s",
   8540   1.1  christos 			      iwmmxt_regnames[value]);
   8541   1.1  christos 			break;
   8542  1.10  christos 		      case 'G':
   8543  1.10  christos 			func (stream, dis_style_register, "%s",
   8544   1.1  christos 			      iwmmxt_cregnames[value]);
   8545   1.1  christos 			break;
   8546   1.1  christos 
   8547  1.10  christos 		      case 'x':
   8548  1.10  christos 			func (stream, dis_style_immediate, "0x%lx",
   8549   1.1  christos 			      (value & 0xffffffffUL));
   8550   1.1  christos 			break;
   8551   1.1  christos 
   8552   1.1  christos 		      case 'c':
   8553   1.1  christos 			switch (value)
   8554   1.1  christos 			  {
   8555  1.10  christos 			  case 0:
   8556   1.1  christos 			    func (stream, dis_style_mnemonic, "eq");
   8557   1.1  christos 			    break;
   8558   1.1  christos 
   8559  1.10  christos 			  case 1:
   8560   1.1  christos 			    func (stream, dis_style_mnemonic, "vs");
   8561   1.1  christos 			    break;
   8562   1.1  christos 
   8563  1.10  christos 			  case 2:
   8564   1.1  christos 			    func (stream, dis_style_mnemonic, "ge");
   8565   1.1  christos 			    break;
   8566   1.1  christos 
   8567  1.10  christos 			  case 3:
   8568   1.1  christos 			    func (stream, dis_style_mnemonic, "gt");
   8569   1.1  christos 			    break;
   8570   1.1  christos 
   8571  1.10  christos 			  default:
   8572   1.1  christos 			    func (stream, dis_style_text, "??");
   8573   1.1  christos 			    break;
   8574   1.1  christos 			  }
   8575   1.1  christos 			break;
   8576   1.1  christos 
   8577   1.1  christos 		      case '`':
   8578   1.1  christos 			c++;
   8579  1.10  christos 			if (value == 0)
   8580   1.1  christos 			  func (stream, dis_style_mnemonic, "%c", *c);
   8581   1.1  christos 			break;
   8582   1.1  christos 		      case '\'':
   8583   1.1  christos 			c++;
   8584  1.10  christos 			if (value == ((1ul << width) - 1))
   8585   1.1  christos 			  func (stream, base_style, "%c", *c);
   8586   1.1  christos 			break;
   8587  1.10  christos 		      case '?':
   8588  1.10  christos 			func (stream, base_style, "%c",
   8589   1.1  christos 			      c[(1 << width) - (int) value]);
   8590   1.1  christos 			c += 1 << width;
   8591   1.1  christos 			break;
   8592   1.1  christos 		      default:
   8593   1.1  christos 			abort ();
   8594   1.9  christos 		      }
   8595   1.9  christos 		  }
   8596   1.1  christos 		  break;
   8597   1.9  christos 
   8598   1.9  christos 		case 'y':
   8599   1.9  christos 		case 'z':
   8600   1.9  christos 		  {
   8601   1.9  christos 		    int single = *c++ == 'y';
   8602   1.1  christos 		    int regno;
   8603   1.9  christos 
   8604   1.9  christos 		    switch (*c)
   8605   1.9  christos 		      {
   8606   1.9  christos 		      case '4': /* Sm pair */
   8607   1.9  christos 		      case '0': /* Sm, Dm */
   8608   1.9  christos 			regno = given & 0x0000000f;
   8609   1.9  christos 			if (single)
   8610   1.9  christos 			  {
   8611   1.9  christos 			    regno <<= 1;
   8612   1.9  christos 			    regno += (given >> 5) & 1;
   8613   1.9  christos 			  }
   8614   1.9  christos 			else
   8615   1.9  christos 			  regno += ((given >> 5) & 1) << 4;
   8616   1.1  christos 			break;
   8617   1.9  christos 
   8618   1.9  christos 		      case '1': /* Sd, Dd */
   8619   1.9  christos 			regno = (given >> 12) & 0x0000000f;
   8620   1.9  christos 			if (single)
   8621   1.9  christos 			  {
   8622   1.9  christos 			    regno <<= 1;
   8623   1.9  christos 			    regno += (given >> 22) & 1;
   8624   1.9  christos 			  }
   8625   1.9  christos 			else
   8626   1.9  christos 			  regno += ((given >> 22) & 1) << 4;
   8627   1.1  christos 			break;
   8628   1.9  christos 
   8629   1.9  christos 		      case '2': /* Sn, Dn */
   8630   1.9  christos 			regno = (given >> 16) & 0x0000000f;
   8631   1.9  christos 			if (single)
   8632   1.9  christos 			  {
   8633   1.9  christos 			    regno <<= 1;
   8634   1.9  christos 			    regno += (given >> 7) & 1;
   8635   1.9  christos 			  }
   8636   1.9  christos 			else
   8637   1.9  christos 			  regno += ((given >> 7) & 1) << 4;
   8638   1.1  christos 			break;
   8639   1.9  christos 
   8640  1.10  christos 		      case '3': /* List */
   8641   1.9  christos 			func (stream, dis_style_text, "{");
   8642   1.9  christos 			regno = (given >> 12) & 0x0000000f;
   8643   1.9  christos 			if (single)
   8644   1.9  christos 			  {
   8645   1.9  christos 			    regno <<= 1;
   8646   1.9  christos 			    regno += (given >> 22) & 1;
   8647   1.9  christos 			  }
   8648   1.9  christos 			else
   8649   1.9  christos 			  regno += ((given >> 22) & 1) << 4;
   8650   1.1  christos 			break;
   8651   1.9  christos 
   8652   1.9  christos 		      default:
   8653   1.9  christos 			abort ();
   8654   1.1  christos 		      }
   8655  1.10  christos 
   8656  1.10  christos 		    func (stream, dis_style_register, "%c%d",
   8657   1.1  christos 			  single ? 's' : 'd', regno);
   8658   1.9  christos 
   8659   1.9  christos 		    if (*c == '3')
   8660   1.9  christos 		      {
   8661   1.1  christos 			int count = given & 0xff;
   8662   1.9  christos 
   8663   1.9  christos 			if (single == 0)
   8664   1.1  christos 			  count >>= 1;
   8665   1.9  christos 
   8666   1.9  christos 			if (--count)
   8667  1.10  christos 			  {
   8668  1.10  christos 			    func (stream, dis_style_text, "-");
   8669   1.9  christos 			    func (stream, dis_style_register, "%c%d",
   8670   1.9  christos 				  single ? 's' : 'd',
   8671   1.9  christos 				  regno + count);
   8672   1.1  christos 			  }
   8673  1.10  christos 
   8674   1.1  christos 			func (stream, dis_style_text, "}");
   8675   1.9  christos 		      }
   8676  1.10  christos 		    else if (*c == '4')
   8677  1.10  christos 		      {
   8678  1.10  christos 			func (stream, dis_style_text, ", ");
   8679  1.10  christos 			func (stream, dis_style_register, "%c%d",
   8680  1.10  christos 			      single ? 's' : 'd', regno + 1);
   8681   1.9  christos 		      }
   8682   1.9  christos 		  }
   8683   1.1  christos 		  break;
   8684   1.9  christos 
   8685   1.9  christos 		case 'L':
   8686   1.1  christos 		  switch (given & 0x00400100)
   8687  1.10  christos 		    {
   8688  1.10  christos 		    case 0x00000000:
   8689  1.10  christos 		      func (stream, dis_style_mnemonic, "b");
   8690  1.10  christos 		      break;
   8691  1.10  christos 		    case 0x00400000:
   8692  1.10  christos 		      func (stream, dis_style_mnemonic, "h");
   8693  1.10  christos 		      break;
   8694  1.10  christos 		    case 0x00000100:
   8695  1.10  christos 		      func (stream, dis_style_mnemonic, "w");
   8696  1.10  christos 		      break;
   8697  1.10  christos 		    case 0x00400100:
   8698  1.10  christos 		      func (stream, dis_style_mnemonic, "d");
   8699   1.9  christos 		      break;
   8700   1.9  christos 		    default:
   8701   1.1  christos 		      break;
   8702   1.9  christos 		    }
   8703   1.1  christos 		  break;
   8704   1.9  christos 
   8705   1.9  christos 		case 'Z':
   8706   1.9  christos 		  {
   8707   1.9  christos 		    /* given (20, 23) | given (0, 3) */
   8708  1.10  christos 		    value = ((given >> 16) & 0xf0) | (given & 0xf);
   8709   1.9  christos 		    func (stream, dis_style_immediate, "%d", (int) value);
   8710   1.9  christos 		  }
   8711   1.1  christos 		  break;
   8712   1.9  christos 
   8713   1.9  christos 		case 'l':
   8714   1.9  christos 		  /* This is like the 'A' operator, except that if
   8715   1.9  christos 		     the width field "M" is zero, then the offset is
   8716   1.9  christos 		     *not* multiplied by four.  */
   8717   1.9  christos 		  {
   8718   1.9  christos 		    int offset = given & 0xff;
   8719   1.1  christos 		    int multiplier = (given & 0x00000100) ? 4 : 1;
   8720  1.10  christos 
   8721  1.10  christos 		    func (stream, dis_style_text, "[");
   8722  1.10  christos 		    func (stream, dis_style_register, "%s",
   8723   1.1  christos 			  arm_regnames [(given >> 16) & 0xf]);
   8724   1.9  christos 
   8725   1.9  christos 		    if (multiplier > 1)
   8726   1.9  christos 		      {
   8727   1.9  christos 			value_in_comment = offset * multiplier;
   8728   1.9  christos 			if (NEGATIVE_BIT_SET)
   8729   1.9  christos 			  value_in_comment = - value_in_comment;
   8730   1.1  christos 		      }
   8731   1.9  christos 
   8732   1.9  christos 		    if (offset)
   8733   1.9  christos 		      {
   8734  1.10  christos 			if (PRE_BIT_SET)
   8735  1.10  christos 			  {
   8736  1.10  christos 			    func (stream, dis_style_text, ", ");
   8737  1.10  christos 			    func (stream, dis_style_immediate, "#%s%d",
   8738  1.10  christos 				  NEGATIVE_BIT_SET ? "-" : "",
   8739  1.10  christos 				  offset * multiplier);
   8740  1.10  christos 			    func (stream, dis_style_text, "]%s",
   8741  1.10  christos 				  WRITEBACK_BIT_SET ? "!" : "");
   8742   1.9  christos 			  }
   8743  1.10  christos 			else
   8744  1.10  christos 			  {
   8745  1.10  christos 			    func (stream, dis_style_text, "], ");
   8746  1.10  christos 			    func (stream, dis_style_immediate, "#%s%d",
   8747  1.10  christos 				  NEGATIVE_BIT_SET ? "-" : "",
   8748  1.10  christos 				  offset * multiplier);
   8749   1.9  christos 			  }
   8750   1.9  christos 		      }
   8751  1.10  christos 		    else
   8752   1.9  christos 		      func (stream, dis_style_text, "]");
   8753   1.9  christos 		  }
   8754   1.1  christos 		  break;
   8755   1.9  christos 
   8756   1.9  christos 		case 'r':
   8757   1.9  christos 		  {
   8758   1.9  christos 		    int imm4 = (given >> 4) & 0xf;
   8759   1.9  christos 		    int puw_bits = ((given >> 22) & 6) | ((given >> W_BIT) & 1);
   8760   1.9  christos 		    int ubit = ! NEGATIVE_BIT_SET;
   8761   1.9  christos 		    const char *rm = arm_regnames [given & 0xf];
   8762   1.1  christos 		    const char *rn = arm_regnames [(given >> 16) & 0xf];
   8763   1.9  christos 
   8764   1.9  christos 		    switch (puw_bits)
   8765   1.9  christos 		      {
   8766   1.9  christos 		      case 1:
   8767  1.10  christos 		      case 3:
   8768  1.10  christos 			func (stream, dis_style_text, "[");
   8769  1.10  christos 			func (stream, dis_style_register, "%s", rn);
   8770  1.10  christos 			func (stream, dis_style_text, "], ");
   8771  1.10  christos 			func (stream, dis_style_text, "%c", ubit ? '+' : '-');
   8772   1.9  christos 			func (stream, dis_style_register, "%s", rm);
   8773  1.10  christos 			if (imm4)
   8774  1.10  christos 			  {
   8775  1.10  christos 			    func (stream, dis_style_text, ", ");
   8776  1.10  christos 			    func (stream, dis_style_sub_mnemonic, "lsl ");
   8777  1.10  christos 			    func (stream, dis_style_immediate, "#%d", imm4);
   8778   1.9  christos 			  }
   8779   1.1  christos 			break;
   8780   1.9  christos 
   8781   1.9  christos 		      case 4:
   8782   1.9  christos 		      case 5:
   8783   1.9  christos 		      case 6:
   8784  1.10  christos 		      case 7:
   8785  1.10  christos 			func (stream, dis_style_text, "[");
   8786  1.10  christos 			func (stream, dis_style_register, "%s", rn);
   8787  1.10  christos 			func (stream, dis_style_text, ", ");
   8788  1.10  christos 			func (stream, dis_style_text, "%c", ubit ? '+' : '-');
   8789   1.9  christos 			func (stream, dis_style_register, "%s", rm);
   8790  1.10  christos 			if (imm4 > 0)
   8791  1.10  christos 			  {
   8792  1.10  christos 			    func (stream, dis_style_text, ", ");
   8793  1.10  christos 			    func (stream, dis_style_sub_mnemonic, "lsl ");
   8794  1.10  christos 			    func (stream, dis_style_immediate, "#%d", imm4);
   8795  1.10  christos 			  }
   8796   1.9  christos 			func (stream, dis_style_text, "]");
   8797  1.10  christos 			if (puw_bits == 5 || puw_bits == 7)
   8798   1.9  christos 			  func (stream, dis_style_text, "!");
   8799   1.1  christos 			break;
   8800   1.9  christos 
   8801  1.10  christos 		      default:
   8802   1.9  christos 			func (stream, dis_style_text, "INVALID");
   8803   1.9  christos 		      }
   8804   1.9  christos 		  }
   8805   1.1  christos 		  break;
   8806   1.9  christos 
   8807   1.9  christos 		case 'i':
   8808   1.9  christos 		  {
   8809   1.9  christos 		    long imm5;
   8810  1.10  christos 		    imm5 = ((given & 0x100) >> 4) | (given & 0xf);
   8811  1.10  christos 		    func (stream, dis_style_immediate, "%ld",
   8812   1.1  christos 			  (imm5 == 0) ? 32 : imm5);
   8813   1.9  christos 		  }
   8814   1.9  christos 		  break;
   8815   1.9  christos 
   8816   1.9  christos 		default:
   8817   1.1  christos 		  abort ();
   8818   1.1  christos 		}
   8819   1.1  christos 	    }
   8820  1.10  christos 	  else
   8821  1.10  christos 	    {
   8822  1.10  christos 	      if (*c == '@')
   8823  1.10  christos 		base_style = dis_style_comment_start;
   8824  1.10  christos 
   8825  1.10  christos 	      if (*c == '\t')
   8826  1.10  christos 		base_style = dis_style_text;
   8827  1.10  christos 
   8828  1.10  christos 	      func (stream, base_style, "%c", *c);
   8829   1.1  christos 	    }
   8830   1.1  christos 	}
   8831   1.1  christos 
   8832  1.10  christos       if (value_in_comment > 32 || value_in_comment < -16)
   8833  1.10  christos 	func (stream, dis_style_comment_start, "\t@ 0x%lx",
   8834   1.1  christos 	      (value_in_comment & 0xffffffffUL));
   8835   1.1  christos 
   8836  1.10  christos       if (is_unpredictable)
   8837   1.1  christos 	func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   8838  1.10  christos 
   8839   1.1  christos       return true;
   8840  1.10  christos     }
   8841   1.1  christos   return false;
   8842   1.1  christos }
   8843  1.10  christos 
   8844   1.9  christos static bool
   8845   1.9  christos print_insn_coprocessor (bfd_vma pc,
   8846   1.9  christos 			struct disassemble_info *info,
   8847  1.10  christos 			long given,
   8848   1.9  christos 			bool thumb)
   8849   1.9  christos {
   8850   1.9  christos   return print_insn_coprocessor_1 (coprocessor_opcodes,
   8851   1.9  christos 				   pc, info, given, thumb);
   8852   1.9  christos }
   8853  1.10  christos 
   8854   1.9  christos static bool
   8855   1.9  christos print_insn_generic_coprocessor (bfd_vma pc,
   8856   1.9  christos 				struct disassemble_info *info,
   8857  1.10  christos 				long given,
   8858   1.9  christos 				bool thumb)
   8859   1.9  christos {
   8860   1.9  christos   return print_insn_coprocessor_1 (generic_coprocessor_opcodes,
   8861   1.9  christos 				   pc, info, given, thumb);
   8862   1.9  christos }
   8863   1.1  christos 
   8864   1.1  christos /* Decodes and prints ARM addressing modes.  Returns the offset
   8865   1.1  christos    used in the address, if any, if it is worthwhile printing the
   8866   1.1  christos    offset as a hexadecimal value in a comment at the end of the
   8867   1.1  christos    line of disassembly.  */
   8868   1.1  christos 
   8869   1.1  christos static signed long
   8870   1.1  christos print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
   8871   1.1  christos {
   8872  1.10  christos   void *stream = info->stream;
   8873   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   8874   1.1  christos   bfd_vma offset = 0;
   8875   1.1  christos 
   8876   1.1  christos   if (((given & 0x000f0000) == 0x000f0000)
   8877   1.1  christos       && ((given & 0x02000000) == 0))
   8878   1.1  christos     {
   8879   1.1  christos       offset = given & 0xfff;
   8880  1.10  christos 
   8881  1.10  christos       func (stream, dis_style_text, "[");
   8882   1.1  christos       func (stream, dis_style_register, "pc");
   8883   1.1  christos 
   8884   1.1  christos       if (PRE_BIT_SET)
   8885   1.1  christos 	{
   8886   1.1  christos 	  /* Pre-indexed.  Elide offset of positive zero when
   8887   1.1  christos 	     non-writeback.  */
   8888  1.10  christos 	  if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
   8889  1.10  christos 	    {
   8890  1.10  christos 	      func (stream, dis_style_text, ", ");
   8891  1.10  christos 	      func (stream, dis_style_immediate, "#%s%d",
   8892  1.10  christos 		    NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8893   1.1  christos 	    }
   8894   1.1  christos 
   8895   1.1  christos 	  if (NEGATIVE_BIT_SET)
   8896   1.1  christos 	    offset = -offset;
   8897   1.1  christos 
   8898   1.1  christos 	  offset += pc + 8;
   8899   1.1  christos 
   8900   1.1  christos 	  /* Cope with the possibility of write-back
   8901   1.1  christos 	     being used.  Probably a very dangerous thing
   8902   1.1  christos 	     for the programmer to do, but who are we to
   8903  1.10  christos 	     argue ?  */
   8904   1.1  christos 	  func (stream, dis_style_text, "]%s", WRITEBACK_BIT_SET ? "!" : "");
   8905   1.1  christos 	}
   8906   1.1  christos       else  /* Post indexed.  */
   8907  1.10  christos 	{
   8908  1.10  christos 	  func (stream, dis_style_text, "], ");
   8909  1.10  christos 	  func (stream, dis_style_immediate, "#%s%d",
   8910   1.1  christos 		NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8911   1.1  christos 
   8912   1.1  christos 	  /* Ie ignore the offset.  */
   8913   1.1  christos 	  offset = pc + 8;
   8914   1.1  christos 	}
   8915  1.10  christos 
   8916   1.1  christos       func (stream, dis_style_comment_start, "\t@ ");
   8917   1.1  christos       info->print_address_func (offset, info);
   8918   1.1  christos       offset = 0;
   8919   1.1  christos     }
   8920   1.1  christos   else
   8921  1.10  christos     {
   8922  1.10  christos       func (stream, dis_style_text, "[");
   8923   1.9  christos       func (stream, dis_style_register, "%s",
   8924   1.9  christos 	    arm_regnames[(given >> 16) & 0xf]);
   8925   1.9  christos 
   8926   1.9  christos       if (PRE_BIT_SET)
   8927   1.9  christos 	{
   8928   1.9  christos 	  if ((given & 0x02000000) == 0)
   8929   1.9  christos 	    {
   8930   1.9  christos 	      /* Elide offset of positive zero when non-writeback.  */
   8931   1.9  christos 	      offset = given & 0xfff;
   8932  1.10  christos 	      if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
   8933  1.10  christos 		{
   8934  1.10  christos 		  func (stream, dis_style_text, ", ");
   8935  1.10  christos 		  func (stream, dis_style_immediate, "#%s%d",
   8936  1.10  christos 			NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8937   1.9  christos 		}
   8938   1.9  christos 	    }
   8939   1.9  christos 	  else
   8940  1.10  christos 	    {
   8941  1.10  christos 	      func (stream, dis_style_text, ", %s",
   8942  1.10  christos 		    NEGATIVE_BIT_SET ? "-" : "");
   8943   1.9  christos 	      arm_decode_shift (given, func, stream, true);
   8944   1.9  christos 	    }
   8945  1.10  christos 
   8946   1.9  christos 	  func (stream, dis_style_text, "]%s",
   8947   1.9  christos 		WRITEBACK_BIT_SET ? "!" : "");
   8948   1.9  christos 	}
   8949   1.9  christos       else
   8950   1.9  christos 	{
   8951   1.9  christos 	  if ((given & 0x02000000) == 0)
   8952   1.9  christos 	    {
   8953   1.9  christos 	      /* Always show offset.  */
   8954  1.10  christos 	      offset = given & 0xfff;
   8955  1.10  christos 	      func (stream, dis_style_text, "], ");
   8956   1.9  christos 	      func (stream, dis_style_immediate, "#%s%d",
   8957   1.9  christos 		    NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8958   1.9  christos 	    }
   8959   1.9  christos 	  else
   8960  1.10  christos 	    {
   8961   1.9  christos 	      func (stream, dis_style_text, "], %s",
   8962  1.10  christos 		    NEGATIVE_BIT_SET ? "-" : "");
   8963   1.9  christos 	      arm_decode_shift (given, func, stream, true);
   8964   1.9  christos 	    }
   8965   1.9  christos 	}
   8966   1.9  christos       if (NEGATIVE_BIT_SET)
   8967   1.9  christos 	offset = -offset;
   8968   1.9  christos     }
   8969   1.9  christos 
   8970   1.9  christos   return (signed long) offset;
   8971   1.9  christos }
   8972   1.9  christos 
   8973   1.9  christos 
   8974   1.9  christos /* Print one cde instruction on INFO->STREAM.
   8975   1.9  christos    Return TRUE if the instuction matched, FALSE if this is not a
   8976  1.10  christos    recognised cde instruction.  */
   8977  1.10  christos static bool
   8978   1.9  christos print_insn_cde (struct disassemble_info *info, long given, bool thumb)
   8979   1.9  christos {
   8980   1.9  christos   const struct cdeopcode32 *insn;
   8981  1.10  christos   void *stream = info->stream;
   8982  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   8983  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   8984   1.9  christos   enum disassembler_style old_base_style = base_style;
   8985   1.9  christos 
   8986   1.9  christos   if (thumb)
   8987   1.9  christos   {
   8988   1.9  christos     /* Manually extract the coprocessor code from a known point.
   8989   1.9  christos        This position is the same across all CDE instructions.  */
   8990   1.9  christos     for (insn = cde_opcodes; insn->assembler; insn++)
   8991   1.9  christos     {
   8992   1.9  christos       uint16_t coproc = (given >> insn->coproc_shift) & insn->coproc_mask;
   8993   1.9  christos       uint16_t coproc_mask = 1 << coproc;
   8994   1.9  christos       if (! (coproc_mask & cde_coprocs))
   8995   1.9  christos 	continue;
   8996   1.9  christos 
   8997   1.9  christos       if ((given & insn->mask) == insn->value)
   8998  1.10  christos       {
   8999   1.9  christos 	bool is_unpredictable = false;
   9000   1.9  christos 	const char *c;
   9001   1.9  christos 
   9002   1.9  christos 	for (c = insn->assembler; *c; c++)
   9003   1.9  christos 	{
   9004   1.9  christos 	  if (*c == '%')
   9005   1.9  christos 	  {
   9006   1.9  christos 	    switch (*++c)
   9007  1.10  christos 	    {
   9008  1.10  christos 	      case '{':
   9009  1.10  christos 		++c;
   9010  1.10  christos 		if (*c == '\0')
   9011  1.10  christos 		  abort ();
   9012  1.10  christos 		old_base_style = base_style;
   9013  1.10  christos 		base_style = decode_base_style (*c);
   9014  1.10  christos 		++c;
   9015  1.10  christos 		if (*c != ':')
   9016  1.10  christos 		  abort ();
   9017  1.10  christos 		break;
   9018  1.10  christos 
   9019  1.10  christos 	      case '}':
   9020  1.10  christos 		base_style = old_base_style;
   9021  1.10  christos 		break;
   9022   1.9  christos 
   9023  1.10  christos 	      case '%':
   9024   1.9  christos 		func (stream, base_style, "%%");
   9025   1.9  christos 		break;
   9026   1.9  christos 
   9027   1.9  christos 	      case '0': case '1': case '2': case '3': case '4':
   9028   1.9  christos 	      case '5': case '6': case '7': case '8': case '9':
   9029   1.9  christos 	      {
   9030   1.9  christos 		int width;
   9031   1.9  christos 		unsigned long value;
   9032   1.9  christos 
   9033   1.9  christos 		c = arm_decode_bitfield (c, given, &value, &width);
   9034   1.9  christos 
   9035   1.9  christos 		switch (*c)
   9036   1.9  christos 		{
   9037   1.9  christos 		  case 'S':
   9038  1.10  christos 		    if (value > 10)
   9039   1.9  christos 		      is_unpredictable = true;
   9040   1.9  christos 		    /* Fall through.  */
   9041   1.9  christos 		  case 'R':
   9042  1.10  christos 		    if (value == 13)
   9043   1.9  christos 		      is_unpredictable = true;
   9044   1.9  christos 		    /* Fall through.  */
   9045  1.10  christos 		  case 'r':
   9046  1.10  christos 		    func (stream, dis_style_register, "%s",
   9047   1.9  christos 			  arm_regnames[value]);
   9048   1.9  christos 		    break;
   9049   1.9  christos 
   9050   1.9  christos 		  case 'n':
   9051  1.10  christos 		    if (value == 15)
   9052   1.9  christos 		      func (stream, dis_style_register, "%s", "APSR_nzcv");
   9053  1.10  christos 		    else
   9054  1.10  christos 		      func (stream, dis_style_register, "%s",
   9055   1.9  christos 			    arm_regnames[value]);
   9056   1.9  christos 		    break;
   9057   1.9  christos 
   9058  1.10  christos 		  case 'T':
   9059  1.10  christos 		    func (stream, dis_style_register, "%s",
   9060   1.9  christos 			  arm_regnames[(value + 1) & 15]);
   9061   1.9  christos 		    break;
   9062   1.9  christos 
   9063  1.10  christos 		  case 'd':
   9064   1.9  christos 		    func (stream, dis_style_immediate, "%ld", value);
   9065   1.9  christos 		    break;
   9066   1.9  christos 
   9067   1.9  christos 		  case 'V':
   9068  1.10  christos 		    if (given & (1 << 6))
   9069   1.9  christos 		      func (stream, dis_style_register, "q%ld", value >> 1);
   9070  1.10  christos 		    else if (given & (1 << 24))
   9071   1.9  christos 		      func (stream, dis_style_register, "d%ld", value);
   9072   1.9  christos 		    else
   9073   1.9  christos 		      {
   9074   1.9  christos 			/* Encoding for S register is different than for D and
   9075   1.9  christos 			   Q registers.  S registers are encoded using the top
   9076   1.9  christos 			   single bit in position 22 as the lowest bit of the
   9077   1.9  christos 			   register number, while for Q and D it represents the
   9078   1.9  christos 			   highest bit of the register number.  */
   9079   1.9  christos 			uint8_t top_bit = (value >> 4) & 1;
   9080   1.9  christos 			uint8_t tmp = (value << 1) & 0x1e;
   9081  1.10  christos 			uint8_t res = tmp | top_bit;
   9082   1.9  christos 			func (stream, dis_style_register, "s%u", res);
   9083   1.9  christos 		      }
   9084   1.9  christos 		    break;
   9085   1.9  christos 
   9086   1.9  christos 		default:
   9087   1.9  christos 		  abort ();
   9088   1.9  christos 		}
   9089   1.9  christos 	      }
   9090   1.9  christos 	    break;
   9091   1.9  christos 
   9092   1.9  christos 	    case 'p':
   9093   1.9  christos 	      {
   9094  1.10  christos 		uint8_t proc_number = (given >> 8) & 0x7;
   9095   1.9  christos 		func (stream, dis_style_register, "p%u", proc_number);
   9096   1.9  christos 		break;
   9097   1.9  christos 	      }
   9098   1.9  christos 
   9099   1.9  christos 	    case 'a':
   9100   1.9  christos 	      {
   9101   1.9  christos 		uint8_t a_offset = 28;
   9102  1.10  christos 		if (given & (1 << a_offset))
   9103   1.9  christos 		  func (stream, dis_style_mnemonic, "a");
   9104   1.9  christos 		break;
   9105   1.9  christos 	      }
   9106   1.9  christos 	  default:
   9107   1.9  christos 	    abort ();
   9108   1.9  christos 	  }
   9109   1.9  christos 	}
   9110  1.10  christos 	else
   9111  1.10  christos 	  {
   9112  1.10  christos 	    if (*c == '@')
   9113  1.10  christos 	      base_style = dis_style_comment_start;
   9114  1.10  christos 	    if (*c == '\t')
   9115  1.10  christos 	      base_style = dis_style_text;
   9116  1.10  christos 
   9117  1.10  christos 	    func (stream, base_style, "%c", *c);
   9118   1.9  christos 	  }
   9119   1.1  christos       }
   9120   1.9  christos 
   9121  1.10  christos       if (is_unpredictable)
   9122   1.1  christos 	func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   9123  1.10  christos 
   9124   1.9  christos       return true;
   9125   1.1  christos       }
   9126  1.10  christos     }
   9127   1.9  christos     return false;
   9128   1.9  christos   }
   9129  1.10  christos   else
   9130   1.9  christos     return false;
   9131   1.1  christos }
   9132   1.1  christos 
   9133   1.1  christos 
   9134   1.1  christos /* Print one neon instruction on INFO->STREAM.
   9135   1.1  christos    Return TRUE if the instuction matched, FALSE if this is not a
   9136   1.1  christos    recognised neon instruction.  */
   9137  1.10  christos 
   9138  1.10  christos static bool
   9139   1.1  christos print_insn_neon (struct disassemble_info *info, long given, bool thumb)
   9140   1.1  christos {
   9141   1.1  christos   const struct opcode32 *insn;
   9142  1.10  christos   void *stream = info->stream;
   9143  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   9144  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   9145   1.1  christos   enum disassembler_style old_base_style = base_style;
   9146   1.1  christos 
   9147   1.1  christos   if (thumb)
   9148   1.1  christos     {
   9149   1.1  christos       if ((given & 0xef000000) == 0xef000000)
   9150   1.1  christos 	{
   9151   1.1  christos 	  /* Move bit 28 to bit 24 to translate Thumb2 to ARM encoding.  */
   9152   1.1  christos 	  unsigned long bit28 = given & (1 << 28);
   9153   1.1  christos 
   9154   1.1  christos 	  given &= 0x00ffffff;
   9155   1.1  christos 	  if (bit28)
   9156   1.1  christos             given |= 0xf3000000;
   9157   1.1  christos           else
   9158   1.1  christos 	    given |= 0xf2000000;
   9159   1.1  christos 	}
   9160   1.1  christos       else if ((given & 0xff000000) == 0xf9000000)
   9161   1.9  christos 	given ^= 0xf9000000 ^ 0xf4000000;
   9162   1.9  christos       /* BFloat16 neon instructions without special top byte handling.  */
   9163   1.9  christos       else if ((given & 0xff000000) == 0xfe000000
   9164   1.9  christos 	       || (given & 0xff000000) == 0xfc000000)
   9165   1.9  christos 	;
   9166   1.9  christos       /* vdup is also a valid neon instruction.  */
   9167  1.10  christos       else if ((given & 0xff900f5f) != 0xee800b10)
   9168   1.1  christos 	return false;
   9169   1.6  christos     }
   9170   1.1  christos 
   9171   1.1  christos   for (insn = neon_opcodes; insn->assembler; insn++)
   9172   1.9  christos     {
   9173   1.9  christos       unsigned long cond_mask = insn->mask;
   9174   1.9  christos       unsigned long cond_value = insn->value;
   9175   1.9  christos       int cond;
   9176   1.9  christos 
   9177   1.9  christos       if (thumb)
   9178   1.9  christos         {
   9179   1.9  christos           if ((cond_mask & 0xf0000000) == 0) {
   9180   1.9  christos               /* For the entries in neon_opcodes, an opcode mask/value with
   9181   1.9  christos                  the high 4 bits equal to 0 indicates a conditional
   9182   1.9  christos                  instruction. For thumb however, we need to include those
   9183   1.9  christos                  bits in the instruction matching.  */
   9184   1.9  christos               cond_mask |= 0xf0000000;
   9185   1.9  christos               /* Furthermore, the thumb encoding of a conditional instruction
   9186   1.9  christos                  will have the high 4 bits equal to 0xe.  */
   9187   1.9  christos               cond_value |= 0xe0000000;
   9188   1.9  christos           }
   9189   1.9  christos           if (ifthen_state)
   9190   1.9  christos             cond = IFTHEN_COND;
   9191   1.9  christos           else
   9192   1.9  christos             cond = COND_UNCOND;
   9193   1.9  christos         }
   9194   1.9  christos       else
   9195   1.9  christos         {
   9196   1.9  christos           if ((given & 0xf0000000) == 0xf0000000)
   9197   1.9  christos             {
   9198   1.9  christos               /* If the instruction is unconditional, update the mask to only
   9199   1.9  christos                  match against unconditional opcode values.  */
   9200   1.9  christos               cond_mask |= 0xf0000000;
   9201   1.9  christos               cond = COND_UNCOND;
   9202   1.9  christos             }
   9203   1.9  christos           else
   9204   1.9  christos             {
   9205   1.9  christos               cond = (given >> 28) & 0xf;
   9206   1.9  christos               if (cond == 0xe)
   9207   1.9  christos                 cond = COND_UNCOND;
   9208   1.9  christos             }
   9209   1.9  christos         }
   9210   1.9  christos 
   9211   1.1  christos       if ((given & cond_mask) == cond_value)
   9212   1.1  christos 	{
   9213  1.10  christos 	  signed long value_in_comment = 0;
   9214   1.1  christos 	  bool is_unpredictable = false;
   9215   1.1  christos 	  const char *c;
   9216   1.1  christos 
   9217   1.1  christos 	  for (c = insn->assembler; *c; c++)
   9218   1.1  christos 	    {
   9219   1.1  christos 	      if (*c == '%')
   9220   1.1  christos 		{
   9221   1.1  christos 		  switch (*++c)
   9222  1.10  christos 		    {
   9223  1.10  christos 		    case '{':
   9224  1.10  christos 		      ++c;
   9225  1.10  christos 		      if (*c == '\0')
   9226  1.10  christos 			abort ();
   9227  1.10  christos 		      old_base_style = base_style;
   9228  1.10  christos 		      base_style = decode_base_style (*c);
   9229  1.10  christos 		      ++c;
   9230  1.10  christos 		      if (*c != ':')
   9231  1.10  christos 			abort ();
   9232  1.10  christos 		      break;
   9233  1.10  christos 
   9234  1.10  christos 		    case '}':
   9235  1.10  christos 		      base_style = old_base_style;
   9236  1.10  christos 		      break;
   9237   1.1  christos 
   9238  1.10  christos 		    case '%':
   9239   1.1  christos 		      func (stream, base_style, "%%");
   9240   1.1  christos 		      break;
   9241   1.1  christos 
   9242   1.1  christos 		    case 'u':
   9243  1.10  christos 		      if (thumb && ifthen_state)
   9244   1.1  christos 			is_unpredictable = true;
   9245   1.1  christos 
   9246   1.1  christos 		      /* Fall through.  */
   9247  1.10  christos 		    case 'c':
   9248  1.10  christos 		      func (stream, dis_style_mnemonic, "%s",
   9249   1.1  christos 			    arm_conditional[cond]);
   9250   1.1  christos 		      break;
   9251   1.1  christos 
   9252   1.1  christos 		    case 'A':
   9253   1.6  christos 		      {
   9254   1.1  christos 			static const unsigned char enc[16] =
   9255   1.1  christos 			{
   9256   1.1  christos 			  0x4, 0x14, /* st4 0,1 */
   9257   1.1  christos 			  0x4, /* st1 2 */
   9258   1.1  christos 			  0x4, /* st2 3 */
   9259   1.1  christos 			  0x3, /* st3 4 */
   9260   1.1  christos 			  0x13, /* st3 5 */
   9261   1.1  christos 			  0x3, /* st1 6 */
   9262   1.1  christos 			  0x1, /* st1 7 */
   9263   1.1  christos 			  0x2, /* st2 8 */
   9264   1.1  christos 			  0x12, /* st2 9 */
   9265   1.1  christos 			  0x2, /* st1 10 */
   9266   1.1  christos 			  0, 0, 0, 0, 0
   9267   1.1  christos 			};
   9268   1.1  christos 			int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
   9269   1.1  christos 			int rn = ((given >> 16) & 0xf);
   9270   1.1  christos 			int rm = ((given >> 0) & 0xf);
   9271   1.1  christos 			int align = ((given >> 4) & 0x3);
   9272   1.1  christos 			int type = ((given >> 8) & 0xf);
   9273   1.1  christos 			int n = enc[type] & 0xf;
   9274   1.1  christos 			int stride = (enc[type] >> 4) + 1;
   9275   1.6  christos 			int ix;
   9276  1.10  christos 
   9277   1.1  christos 			func (stream, dis_style_text, "{");
   9278   1.1  christos 			if (stride > 1)
   9279  1.10  christos 			  for (ix = 0; ix != n; ix++)
   9280  1.10  christos 			    {
   9281  1.10  christos 			      if (ix > 0)
   9282  1.10  christos 				func (stream, dis_style_text, ",");
   9283  1.10  christos 			      func (stream, dis_style_register, "d%d",
   9284  1.10  christos 				    rd + ix * stride);
   9285   1.1  christos 			    }
   9286  1.10  christos 			else if (n == 1)
   9287   1.1  christos 			  func (stream, dis_style_register, "d%d", rd);
   9288  1.10  christos 			else
   9289  1.10  christos 			  {
   9290  1.10  christos 			    func (stream, dis_style_register, "d%d", rd);
   9291  1.10  christos 			    func (stream, dis_style_text, "-");
   9292  1.10  christos 			    func (stream, dis_style_register, "d%d",
   9293  1.10  christos 				  rd + n - 1);
   9294  1.10  christos 			  }
   9295  1.10  christos 			func (stream, dis_style_text, "}, [");
   9296  1.10  christos 			func (stream, dis_style_register, "%s",
   9297   1.1  christos 			      arm_regnames[rn]);
   9298  1.10  christos 			if (align)
   9299  1.10  christos 			  {
   9300  1.10  christos 			    func (stream, dis_style_text, " :");
   9301  1.10  christos 			    func (stream, dis_style_immediate, "%d",
   9302  1.10  christos 				  32 << align);
   9303  1.10  christos 			  }
   9304   1.1  christos 			func (stream, dis_style_text, "]");
   9305  1.10  christos 			if (rm == 0xd)
   9306   1.1  christos 			  func (stream, dis_style_text, "!");
   9307  1.10  christos 			else if (rm != 0xf)
   9308  1.10  christos 			  {
   9309  1.10  christos 			    func (stream, dis_style_text, ", ");
   9310  1.10  christos 			    func (stream, dis_style_register, "%s",
   9311  1.10  christos 				  arm_regnames[rm]);
   9312   1.1  christos 			  }
   9313   1.1  christos 		      }
   9314   1.6  christos 		      break;
   9315   1.1  christos 
   9316   1.1  christos 		    case 'B':
   9317   1.1  christos 		      {
   9318   1.1  christos 			int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
   9319   1.1  christos 			int rn = ((given >> 16) & 0xf);
   9320   1.1  christos 			int rm = ((given >> 0) & 0xf);
   9321   1.1  christos 			int idx_align = ((given >> 4) & 0xf);
   9322   1.1  christos                         int align = 0;
   9323   1.1  christos 			int size = ((given >> 10) & 0x3);
   9324   1.1  christos 			int idx = idx_align >> (size + 1);
   9325   1.1  christos                         int length = ((given >> 8) & 3) + 1;
   9326   1.1  christos                         int stride = 1;
   9327   1.1  christos                         int i;
   9328   1.1  christos 
   9329   1.1  christos                         if (length > 1 && size > 0)
   9330   1.6  christos                           stride = (idx_align & (1 << size)) ? 2 : 1;
   9331   1.1  christos 
   9332   1.1  christos                         switch (length)
   9333   1.1  christos                           {
   9334   1.1  christos                           case 1:
   9335   1.1  christos                             {
   9336   1.1  christos                               int amask = (1 << size) - 1;
   9337  1.10  christos                               if ((idx_align & (1 << size)) != 0)
   9338   1.1  christos                                 return false;
   9339   1.1  christos                               if (size > 0)
   9340   1.1  christos                                 {
   9341   1.1  christos                                   if ((idx_align & amask) == amask)
   9342   1.1  christos                                     align = 8 << size;
   9343  1.10  christos                                   else if ((idx_align & amask) != 0)
   9344   1.1  christos                                     return false;
   9345   1.1  christos                                 }
   9346   1.1  christos                               }
   9347   1.6  christos                             break;
   9348   1.1  christos 
   9349   1.1  christos                           case 2:
   9350  1.10  christos                             if (size == 2 && (idx_align & 2) != 0)
   9351   1.1  christos                               return false;
   9352   1.1  christos                             align = (idx_align & 1) ? 16 << size : 0;
   9353   1.6  christos                             break;
   9354   1.1  christos 
   9355   1.1  christos                           case 3:
   9356   1.1  christos                             if ((size == 2 && (idx_align & 3) != 0)
   9357  1.10  christos                                 || (idx_align & 1) != 0)
   9358   1.1  christos                               return false;
   9359   1.6  christos                             break;
   9360   1.1  christos 
   9361   1.1  christos                           case 4:
   9362   1.1  christos                             if (size == 2)
   9363   1.1  christos                               {
   9364  1.10  christos                                 if ((idx_align & 3) == 3)
   9365   1.1  christos                                   return false;
   9366   1.1  christos                                 align = (idx_align & 3) * 64;
   9367   1.1  christos                               }
   9368   1.1  christos                             else
   9369   1.1  christos                               align = (idx_align & 1) ? 32 << size : 0;
   9370   1.6  christos                             break;
   9371   1.1  christos 
   9372   1.1  christos                           default:
   9373   1.1  christos                             abort ();
   9374   1.6  christos                           }
   9375  1.10  christos 
   9376   1.1  christos 			func (stream, dis_style_text, "{");
   9377  1.10  christos                         for (i = 0; i < length; i++)
   9378  1.10  christos 			  {
   9379  1.10  christos 			    if (i > 0)
   9380  1.10  christos 			      func (stream, dis_style_text, ",");
   9381  1.10  christos 			    func (stream, dis_style_register, "d%d[%d]",
   9382  1.10  christos 				  rd + i * stride, idx);
   9383  1.10  christos 			  }
   9384  1.10  christos 			func (stream, dis_style_text, "}, [");
   9385  1.10  christos 			func (stream, dis_style_register, "%s",
   9386   1.1  christos 			      arm_regnames[rn]);
   9387  1.10  christos 			if (align)
   9388  1.10  christos 			  {
   9389  1.10  christos 			    func (stream, dis_style_text, " :");
   9390  1.10  christos 			    func (stream, dis_style_immediate, "%d", align);
   9391  1.10  christos 			  }
   9392   1.1  christos 			func (stream, dis_style_text, "]");
   9393  1.10  christos 			if (rm == 0xd)
   9394   1.1  christos 			  func (stream, dis_style_text, "!");
   9395  1.10  christos 			else if (rm != 0xf)
   9396  1.10  christos 			  {
   9397  1.10  christos 			    func (stream, dis_style_text, ", ");
   9398  1.10  christos 			    func (stream, dis_style_register, "%s",
   9399  1.10  christos 				  arm_regnames[rm]);
   9400   1.1  christos 			  }
   9401   1.1  christos 		      }
   9402   1.6  christos 		      break;
   9403   1.1  christos 
   9404   1.1  christos 		    case 'C':
   9405   1.1  christos 		      {
   9406   1.1  christos 			int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
   9407   1.1  christos 			int rn = ((given >> 16) & 0xf);
   9408   1.1  christos 			int rm = ((given >> 0) & 0xf);
   9409   1.1  christos 			int align = ((given >> 4) & 0x1);
   9410   1.1  christos 			int size = ((given >> 6) & 0x3);
   9411   1.1  christos 			int type = ((given >> 8) & 0x3);
   9412   1.1  christos 			int n = type + 1;
   9413   1.1  christos 			int stride = ((given >> 5) & 0x1);
   9414   1.6  christos 			int ix;
   9415   1.1  christos 
   9416   1.1  christos 			if (stride && (n == 1))
   9417   1.1  christos 			  n++;
   9418   1.1  christos 			else
   9419   1.6  christos 			  stride++;
   9420  1.10  christos 
   9421   1.1  christos 			func (stream, dis_style_text, "{");
   9422   1.1  christos 			if (stride > 1)
   9423  1.10  christos 			  for (ix = 0; ix != n; ix++)
   9424  1.10  christos 			    {
   9425  1.10  christos 			      if (ix > 0)
   9426  1.10  christos 				func (stream, dis_style_text, ",");
   9427  1.10  christos 			      func (stream, dis_style_register, "d%d[]",
   9428  1.10  christos 				    rd + ix * stride);
   9429   1.1  christos 			    }
   9430  1.10  christos 			else if (n == 1)
   9431   1.1  christos 			  func (stream, dis_style_register, "d%d[]", rd);
   9432  1.10  christos 			else
   9433  1.10  christos 			  {
   9434  1.10  christos 			    func (stream, dis_style_register, "d%d[]", rd);
   9435  1.10  christos 			    func (stream, dis_style_text, "-");
   9436  1.10  christos 			    func (stream, dis_style_register, "d%d[]",
   9437  1.10  christos 				  rd + n - 1);
   9438  1.10  christos 			  }
   9439  1.10  christos 			func (stream, dis_style_text, "}, [");
   9440  1.10  christos 			func (stream, dis_style_register, "%s",
   9441   1.1  christos 			      arm_regnames[rn]);
   9442   1.1  christos 			if (align)
   9443   1.1  christos 			  {
   9444   1.1  christos                             align = (8 * (type + 1)) << size;
   9445   1.1  christos                             if (type == 3)
   9446   1.1  christos                               align = (size > 1) ? align >> 1 : align;
   9447  1.10  christos 			    if (type == 2 || (type == 0 && !size))
   9448  1.10  christos 			      func (stream, dis_style_text,
   9449   1.1  christos 				    " :<bad align %d>", align);
   9450  1.10  christos 			    else
   9451  1.10  christos 			      {
   9452  1.10  christos 				func (stream, dis_style_text, " :");
   9453  1.10  christos 				func (stream, dis_style_immediate,
   9454  1.10  christos 				      "%d", align);
   9455   1.1  christos 			      }
   9456  1.10  christos 			  }
   9457   1.1  christos 			func (stream, dis_style_text, "]");
   9458  1.10  christos 			if (rm == 0xd)
   9459   1.1  christos 			  func (stream, dis_style_text, "!");
   9460  1.10  christos 			else if (rm != 0xf)
   9461  1.10  christos 			  {
   9462  1.10  christos 			    func (stream, dis_style_text, ", ");
   9463  1.10  christos 			    func (stream, dis_style_register, "%s",
   9464  1.10  christos 				  arm_regnames[rm]);
   9465   1.1  christos 			  }
   9466   1.1  christos 		      }
   9467   1.6  christos 		      break;
   9468   1.1  christos 
   9469   1.1  christos 		    case 'D':
   9470   1.1  christos 		      {
   9471   1.1  christos 			int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
   9472   1.1  christos 			int size = (given >> 20) & 3;
   9473   1.1  christos 			int reg = raw_reg & ((4 << size) - 1);
   9474   1.6  christos 			int ix = raw_reg >> size >> 2;
   9475  1.10  christos 
   9476   1.1  christos 			func (stream, dis_style_register, "d%d[%d]", reg, ix);
   9477   1.1  christos 		      }
   9478   1.6  christos 		      break;
   9479   1.1  christos 
   9480   1.1  christos 		    case 'E':
   9481   1.1  christos 		      /* Neon encoded constant for mov, mvn, vorr, vbic.  */
   9482   1.1  christos 		      {
   9483   1.1  christos 			int bits = 0;
   9484   1.1  christos 			int cmode = (given >> 8) & 0xf;
   9485   1.1  christos 			int op = (given >> 5) & 0x1;
   9486   1.1  christos 			unsigned long value = 0, hival = 0;
   9487   1.1  christos 			unsigned shift;
   9488   1.1  christos                         int size = 0;
   9489   1.6  christos                         int isfloat = 0;
   9490   1.1  christos 
   9491   1.1  christos 			bits |= ((given >> 24) & 1) << 7;
   9492   1.1  christos 			bits |= ((given >> 16) & 7) << 4;
   9493   1.6  christos 			bits |= ((given >> 0) & 15) << 0;
   9494   1.1  christos 
   9495   1.1  christos 			if (cmode < 8)
   9496   1.1  christos 			  {
   9497   1.1  christos 			    shift = (cmode >> 1) & 3;
   9498   1.1  christos 			    value = (unsigned long) bits << (8 * shift);
   9499   1.1  christos                             size = 32;
   9500   1.1  christos 			  }
   9501   1.1  christos 			else if (cmode < 12)
   9502   1.1  christos 			  {
   9503   1.1  christos 			    shift = (cmode >> 1) & 1;
   9504   1.1  christos 			    value = (unsigned long) bits << (8 * shift);
   9505   1.1  christos                             size = 16;
   9506   1.1  christos 			  }
   9507   1.1  christos 			else if (cmode < 14)
   9508   1.1  christos 			  {
   9509   1.1  christos 			    shift = (cmode & 1) + 1;
   9510   1.1  christos 			    value = (unsigned long) bits << (8 * shift);
   9511   1.1  christos 			    value |= (1ul << (8 * shift)) - 1;
   9512   1.1  christos                             size = 32;
   9513   1.1  christos 			  }
   9514   1.1  christos 			else if (cmode == 14)
   9515   1.1  christos 			  {
   9516   1.1  christos 			    if (op)
   9517   1.1  christos 			      {
   9518   1.1  christos 				/* Bit replication into bytes.  */
   9519   1.1  christos 				int ix;
   9520   1.6  christos 				unsigned long mask;
   9521   1.1  christos 
   9522   1.1  christos 				value = 0;
   9523   1.1  christos                                 hival = 0;
   9524   1.1  christos 				for (ix = 7; ix >= 0; ix--)
   9525   1.1  christos 				  {
   9526   1.1  christos 				    mask = ((bits >> ix) & 1) ? 0xff : 0;
   9527   1.1  christos                                     if (ix <= 3)
   9528   1.1  christos 				      value = (value << 8) | mask;
   9529   1.1  christos                                     else
   9530   1.1  christos                                       hival = (hival << 8) | mask;
   9531   1.1  christos 				  }
   9532   1.1  christos                                 size = 64;
   9533   1.1  christos 			      }
   9534   1.1  christos                             else
   9535   1.1  christos                               {
   9536   1.1  christos                                 /* Byte replication.  */
   9537   1.1  christos                                 value = (unsigned long) bits;
   9538   1.1  christos                                 size = 8;
   9539   1.1  christos                               }
   9540   1.1  christos 			  }
   9541   1.1  christos 			else if (!op)
   9542   1.1  christos 			  {
   9543   1.1  christos 			    /* Floating point encoding.  */
   9544   1.6  christos 			    int tmp;
   9545   1.1  christos 
   9546   1.1  christos 			    value = (unsigned long)  (bits & 0x7f) << 19;
   9547   1.1  christos 			    value |= (unsigned long) (bits & 0x80) << 24;
   9548   1.1  christos 			    tmp = bits & 0x40 ? 0x3c : 0x40;
   9549   1.1  christos 			    value |= (unsigned long) tmp << 24;
   9550   1.1  christos                             size = 32;
   9551   1.1  christos                             isfloat = 1;
   9552   1.1  christos 			  }
   9553   1.1  christos 			else
   9554  1.10  christos 			  {
   9555  1.10  christos 			    func (stream, dis_style_text,
   9556   1.1  christos 				  "<illegal constant %.8x:%x:%x>",
   9557   1.1  christos                                   bits, cmode, op);
   9558   1.1  christos                             size = 32;
   9559   1.1  christos 			    break;
   9560   1.1  christos 			  }
   9561   1.1  christos                         switch (size)
   9562   1.1  christos                           {
   9563  1.10  christos                           case 8:
   9564  1.10  christos 			    func (stream, dis_style_immediate, "#%ld", value);
   9565  1.10  christos 			    func (stream, dis_style_comment_start,
   9566   1.1  christos 				  "\t@ 0x%.2lx", value);
   9567   1.6  christos                             break;
   9568   1.1  christos 
   9569  1.10  christos                           case 16:
   9570  1.10  christos 			    func (stream, dis_style_immediate, "#%ld", value);
   9571  1.10  christos 			    func (stream, dis_style_comment_start,
   9572   1.1  christos 				  "\t@ 0x%.4lx", value);
   9573   1.1  christos                             break;
   9574   1.1  christos 
   9575   1.1  christos                           case 32:
   9576   1.1  christos                             if (isfloat)
   9577   1.1  christos                               {
   9578   1.1  christos                                 unsigned char valbytes[4];
   9579   1.6  christos                                 double fvalue;
   9580   1.1  christos 
   9581   1.1  christos                                 /* Do this a byte at a time so we don't have to
   9582   1.1  christos                                    worry about the host's endianness.  */
   9583   1.1  christos                                 valbytes[0] = value & 0xff;
   9584   1.1  christos                                 valbytes[1] = (value >> 8) & 0xff;
   9585   1.1  christos                                 valbytes[2] = (value >> 16) & 0xff;
   9586   1.6  christos                                 valbytes[3] = (value >> 24) & 0xff;
   9587   1.6  christos 
   9588   1.1  christos                                 floatformat_to_double
   9589   1.1  christos                                   (& floatformat_ieee_single_little, valbytes,
   9590   1.6  christos                                   & fvalue);
   9591  1.10  christos 
   9592  1.10  christos 				func (stream, dis_style_immediate,
   9593  1.10  christos 				      "#%.7g", fvalue);
   9594  1.10  christos 				func (stream, dis_style_comment_start,
   9595   1.1  christos 				      "\t@ 0x%.8lx", value);
   9596   1.1  christos                               }
   9597  1.10  christos                             else
   9598  1.10  christos 			      {
   9599  1.10  christos 				func (stream, dis_style_immediate, "#%ld",
   9600  1.10  christos 				      (long) (((value & 0x80000000L) != 0)
   9601  1.10  christos 					      ? value | ~0xffffffffL : value));
   9602  1.10  christos 				func (stream, dis_style_comment_start,
   9603  1.10  christos 				      "\t@ 0x%.8lx", value);
   9604   1.1  christos 			      }
   9605   1.1  christos                             break;
   9606   1.1  christos 
   9607  1.10  christos                           case 64:
   9608  1.10  christos 			    func (stream, dis_style_immediate,
   9609   1.1  christos 				  "#0x%.8lx%.8lx", hival, value);
   9610   1.6  christos                             break;
   9611   1.1  christos 
   9612   1.1  christos                           default:
   9613   1.1  christos                             abort ();
   9614   1.1  christos                           }
   9615   1.1  christos 		      }
   9616   1.6  christos 		      break;
   9617   1.1  christos 
   9618   1.1  christos 		    case 'F':
   9619   1.1  christos 		      {
   9620   1.1  christos 			int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
   9621   1.6  christos 			int num = (given >> 8) & 0x3;
   9622  1.10  christos 
   9623   1.1  christos 			func (stream, dis_style_text, "{");
   9624  1.10  christos 			if (!num)
   9625   1.1  christos 			  func (stream, dis_style_register, "d%d", regno);
   9626  1.10  christos 			else if (num + regno >= 32)
   9627  1.10  christos 			  {
   9628  1.10  christos 			    func (stream, dis_style_register, "d%d", regno);
   9629  1.10  christos 			    func (stream, dis_style_text, "-<overflow reg d%d",
   9630  1.10  christos 				  regno + num);
   9631   1.1  christos 			  }
   9632  1.10  christos 			else
   9633  1.10  christos 			  {
   9634  1.10  christos 			    func (stream, dis_style_register, "d%d", regno);
   9635  1.10  christos 			    func (stream, dis_style_text, "-");
   9636  1.10  christos 			    func (stream, dis_style_register, "d%d",
   9637  1.10  christos 				  regno + num);
   9638  1.10  christos 			  }
   9639   1.1  christos 			func (stream, dis_style_text, "}");
   9640   1.1  christos 		      }
   9641   1.1  christos 		      break;
   9642   1.1  christos 
   9643   1.1  christos 
   9644   1.1  christos 		    case '0': case '1': case '2': case '3': case '4':
   9645   1.1  christos 		    case '5': case '6': case '7': case '8': case '9':
   9646   1.1  christos 		      {
   9647   1.1  christos 			int width;
   9648   1.1  christos 			unsigned long value;
   9649   1.1  christos 
   9650   1.6  christos 			c = arm_decode_bitfield (c, given, &value, &width);
   9651   1.1  christos 
   9652   1.1  christos 			switch (*c)
   9653   1.1  christos 			  {
   9654  1.10  christos 			  case 'r':
   9655  1.10  christos 			    func (stream, dis_style_register, "%s",
   9656   1.1  christos 				  arm_regnames[value]);
   9657   1.1  christos 			    break;
   9658  1.10  christos 			  case 'd':
   9659   1.1  christos 			    func (stream, base_style, "%ld", value);
   9660   1.1  christos 			    value_in_comment = value;
   9661   1.1  christos 			    break;
   9662  1.10  christos 			  case 'e':
   9663  1.10  christos 			    func (stream, dis_style_immediate, "%ld",
   9664   1.1  christos 				  (1ul << width) - value);
   9665   1.6  christos 			    break;
   9666   1.1  christos 
   9667   1.1  christos 			  case 'S':
   9668   1.1  christos 			  case 'T':
   9669   1.1  christos 			  case 'U':
   9670   1.1  christos 			    /* Various width encodings.  */
   9671   1.1  christos 			    {
   9672   1.1  christos 			      int base = 8 << (*c - 'S'); /* 8,16 or 32 */
   9673   1.1  christos 			      int limit;
   9674   1.1  christos 			      unsigned low, high;
   9675   1.1  christos 
   9676   1.1  christos 			      c++;
   9677   1.1  christos 			      if (*c >= '0' && *c <= '9')
   9678   1.1  christos 				limit = *c - '0';
   9679   1.1  christos 			      else if (*c >= 'a' && *c <= 'f')
   9680   1.1  christos 				limit = *c - 'a' + 10;
   9681   1.1  christos 			      else
   9682   1.9  christos 				abort ();
   9683   1.9  christos 			      low = limit >> 2;
   9684   1.9  christos 			      high = limit & 3;
   9685   1.9  christos 
   9686  1.10  christos 			      if (value < low || value > high)
   9687  1.10  christos 				func (stream, dis_style_text,
   9688   1.9  christos 				      "<illegal width %d>", base << value);
   9689  1.10  christos 			      else
   9690  1.10  christos 				func (stream, base_style, "%d",
   9691   1.9  christos 				      base << value);
   9692   1.9  christos 			    }
   9693   1.9  christos 			    break;
   9694   1.9  christos 			  case 'R':
   9695   1.9  christos 			    if (given & (1 << 6))
   9696   1.9  christos 			      goto Q;
   9697   1.9  christos 			    /* FALLTHROUGH */
   9698  1.10  christos 			  case 'D':
   9699   1.9  christos 			    func (stream, dis_style_register, "d%ld", value);
   9700   1.9  christos 			    break;
   9701   1.9  christos 			  case 'Q':
   9702   1.9  christos 			  Q:
   9703  1.10  christos 			    if (value & 1)
   9704  1.10  christos 			      func (stream, dis_style_text,
   9705   1.9  christos 				    "<illegal reg q%ld.5>", value >> 1);
   9706  1.10  christos 			    else
   9707  1.10  christos 			      func (stream, dis_style_register,
   9708   1.9  christos 				    "q%ld", value >> 1);
   9709   1.9  christos 			    break;
   9710   1.9  christos 
   9711   1.9  christos 			  case '`':
   9712   1.9  christos 			    c++;
   9713  1.10  christos 			    if (value == 0)
   9714   1.9  christos 			      func (stream, dis_style_text, "%c", *c);
   9715   1.9  christos 			    break;
   9716   1.9  christos 			  case '\'':
   9717   1.9  christos 			    c++;
   9718  1.10  christos 			    if (value == ((1ul << width) - 1))
   9719   1.9  christos 			      func (stream, dis_style_text, "%c", *c);
   9720   1.9  christos 			    break;
   9721  1.10  christos 			  case '?':
   9722  1.10  christos 			    func (stream, dis_style_mnemonic, "%c",
   9723   1.9  christos 				  c[(1 << width) - (int) value]);
   9724   1.9  christos 			    c += 1 << width;
   9725   1.9  christos 			    break;
   9726   1.9  christos 			  default:
   9727   1.9  christos 			    abort ();
   9728   1.9  christos 			  }
   9729   1.9  christos 		      }
   9730   1.9  christos 		      break;
   9731   1.9  christos 
   9732   1.9  christos 		    default:
   9733   1.9  christos 		      abort ();
   9734   1.9  christos 		    }
   9735   1.9  christos 		}
   9736  1.10  christos 	      else
   9737  1.10  christos 		{
   9738  1.10  christos 		  if (*c == '@')
   9739  1.10  christos 		    base_style = dis_style_comment_start;
   9740  1.10  christos 
   9741  1.10  christos 		  if (*c == '\t')
   9742  1.10  christos 		    base_style = dis_style_text;
   9743  1.10  christos 
   9744  1.10  christos 		  func (stream, base_style, "%c", *c);
   9745  1.10  christos 
   9746   1.9  christos 		}
   9747   1.9  christos 	    }
   9748   1.9  christos 
   9749  1.10  christos 	  if (value_in_comment > 32 || value_in_comment < -16)
   9750  1.10  christos 	    func (stream, dis_style_comment_start, "\t@ 0x%lx",
   9751   1.9  christos 		  value_in_comment);
   9752   1.9  christos 
   9753  1.10  christos 	  if (is_unpredictable)
   9754   1.9  christos 	    func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   9755  1.10  christos 
   9756   1.9  christos 	  return true;
   9757   1.9  christos 	}
   9758  1.10  christos     }
   9759   1.9  christos   return false;
   9760   1.9  christos }
   9761   1.9  christos 
   9762   1.9  christos /* Print one mve instruction on INFO->STREAM.
   9763   1.9  christos    Return TRUE if the instuction matched, FALSE if this is not a
   9764   1.9  christos    recognised mve instruction.  */
   9765  1.10  christos 
   9766   1.9  christos static bool
   9767   1.9  christos print_insn_mve (struct disassemble_info *info, long given)
   9768   1.9  christos {
   9769   1.9  christos   const struct mopcode32 *insn;
   9770  1.10  christos   void *stream = info->stream;
   9771  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   9772  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   9773   1.9  christos   enum disassembler_style old_base_style = base_style;
   9774   1.9  christos 
   9775   1.9  christos   for (insn = mve_opcodes; insn->assembler; insn++)
   9776   1.9  christos     {
   9777   1.9  christos       if (((given & insn->mask) == insn->value)
   9778   1.9  christos 	  && !is_mve_encoding_conflict (given, insn->mve_op))
   9779   1.9  christos 	{
   9780  1.10  christos 	  signed long value_in_comment = 0;
   9781  1.10  christos 	  bool is_unpredictable = false;
   9782   1.9  christos 	  bool is_undefined = false;
   9783   1.9  christos 	  const char *c;
   9784   1.9  christos 	  enum mve_unpredictable unpredictable_cond = UNPRED_NONE;
   9785   1.9  christos 	  enum mve_undefined undefined_cond = UNDEF_NONE;
   9786   1.9  christos 
   9787   1.9  christos 	  /* Most vector mve instruction are illegal in a it block.
   9788   1.9  christos 	     There are a few exceptions; check for them.  */
   9789   1.9  christos 	  if (ifthen_state && !is_mve_okay_in_it (insn->mve_op))
   9790  1.10  christos 	    {
   9791   1.9  christos 	      is_unpredictable = true;
   9792   1.9  christos 	      unpredictable_cond = UNPRED_IT_BLOCK;
   9793   1.9  christos 	    }
   9794   1.9  christos 	  else if (is_mve_unpredictable (given, insn->mve_op,
   9795  1.10  christos 					 &unpredictable_cond))
   9796   1.9  christos 	    is_unpredictable = true;
   9797   1.9  christos 
   9798  1.10  christos 	  if (is_mve_undefined (given, insn->mve_op, &undefined_cond))
   9799   1.9  christos 	    is_undefined = true;
   9800   1.9  christos 
   9801   1.9  christos 	  /* In "VORR Qd, Qm, Qn", if Qm==Qn, VORR is nothing but VMOV,
   9802   1.9  christos 	     i.e "VMOV Qd, Qm".  */
   9803   1.9  christos 	  if ((insn->mve_op == MVE_VORR_REG)
   9804   1.9  christos 	      && (arm_decode_field (given, 1, 3)
   9805   1.9  christos 		  == arm_decode_field (given, 17, 19)))
   9806   1.9  christos 	    continue;
   9807   1.9  christos 
   9808   1.9  christos 	  for (c = insn->assembler; *c; c++)
   9809   1.9  christos 	    {
   9810   1.9  christos 	      if (*c == '%')
   9811   1.9  christos 		{
   9812   1.9  christos 		  switch (*++c)
   9813  1.10  christos 		    {
   9814  1.10  christos 		    case '{':
   9815  1.10  christos 		      ++c;
   9816  1.10  christos 		      if (*c == '\0')
   9817  1.10  christos 			abort ();
   9818  1.10  christos 		      old_base_style = base_style;
   9819  1.10  christos 		      base_style = decode_base_style (*c);
   9820  1.10  christos 		      ++c;
   9821  1.10  christos 		      if (*c != ':')
   9822  1.10  christos 			abort ();
   9823  1.10  christos 		      break;
   9824  1.10  christos 
   9825  1.10  christos 		    case '}':
   9826  1.10  christos 		      base_style = old_base_style;
   9827  1.10  christos 		      break;
   9828   1.9  christos 
   9829  1.10  christos 		    case '%':
   9830   1.9  christos 		      func (stream, base_style, "%%");
   9831   1.9  christos 		      break;
   9832   1.9  christos 
   9833   1.9  christos 		    case 'a':
   9834   1.9  christos 		      /* Don't print anything for '+' as it is implied.  */
   9835  1.10  christos 		      if (arm_decode_field (given, 23, 23) == 0)
   9836   1.9  christos 			func (stream, dis_style_immediate, "-");
   9837   1.9  christos 		      break;
   9838   1.9  christos 
   9839   1.9  christos 		    case 'c':
   9840  1.10  christos 		      if (ifthen_state)
   9841  1.10  christos 			func (stream, dis_style_mnemonic, "%s",
   9842   1.9  christos 			      arm_conditional[IFTHEN_COND]);
   9843   1.9  christos 		      break;
   9844   1.9  christos 
   9845   1.9  christos 		    case 'd':
   9846   1.9  christos 		      print_mve_vld_str_addr (info, given, insn->mve_op);
   9847   1.9  christos 		      break;
   9848   1.9  christos 
   9849   1.9  christos 		    case 'i':
   9850   1.9  christos 		      {
   9851  1.10  christos 			long mve_mask = mve_extract_pred_mask (given);
   9852  1.10  christos 			func (stream, dis_style_mnemonic, "%s",
   9853   1.9  christos 			      mve_predicatenames[mve_mask]);
   9854   1.9  christos 		      }
   9855   1.9  christos 		      break;
   9856   1.9  christos 
   9857   1.9  christos 		    case 'j':
   9858   1.9  christos 		      {
   9859   1.9  christos 			unsigned int imm5 = 0;
   9860   1.9  christos 			imm5 |= arm_decode_field (given, 6, 7);
   9861  1.10  christos 			imm5 |= (arm_decode_field (given, 12, 14) << 2);
   9862  1.10  christos 			func (stream, dis_style_immediate, "#%u",
   9863   1.9  christos 			      (imm5 == 0) ? 32 : imm5);
   9864   1.9  christos 		      }
   9865   1.9  christos 		      break;
   9866   1.9  christos 
   9867  1.10  christos 		    case 'k':
   9868   1.9  christos 		      func (stream, dis_style_immediate, "#%u",
   9869   1.9  christos 			    (arm_decode_field (given, 7, 7) == 0) ? 64 : 48);
   9870   1.9  christos 		      break;
   9871   1.9  christos 
   9872   1.9  christos 		    case 'n':
   9873   1.9  christos 		      print_vec_condition (info, given, insn->mve_op);
   9874   1.9  christos 		      break;
   9875   1.9  christos 
   9876   1.9  christos 		    case 'o':
   9877   1.9  christos 		      if (arm_decode_field (given, 0, 0) == 1)
   9878   1.9  christos 			{
   9879   1.9  christos 			  unsigned long size
   9880   1.9  christos 			    = arm_decode_field (given, 4, 4)
   9881   1.9  christos 			      | (arm_decode_field (given, 6, 6) << 1);
   9882  1.10  christos 
   9883  1.10  christos 			  func (stream, dis_style_text, ", ");
   9884  1.10  christos 			  func (stream, dis_style_sub_mnemonic, "uxtw ");
   9885   1.9  christos 			  func (stream, dis_style_immediate, "#%lu", size);
   9886   1.9  christos 			}
   9887   1.9  christos 		      break;
   9888   1.9  christos 
   9889   1.9  christos 		    case 'm':
   9890   1.9  christos 		      print_mve_rounding_mode (info, given, insn->mve_op);
   9891   1.9  christos 		      break;
   9892   1.9  christos 
   9893   1.9  christos 		    case 's':
   9894   1.9  christos 		      print_mve_vcvt_size (info, given, insn->mve_op);
   9895   1.9  christos 		      break;
   9896   1.9  christos 
   9897   1.9  christos 		    case 'u':
   9898   1.9  christos 		      {
   9899   1.9  christos 			unsigned long op1 = arm_decode_field (given, 21, 22);
   9900   1.9  christos 
   9901   1.9  christos 			if ((insn->mve_op == MVE_VMOV_VEC_LANE_TO_GP))
   9902   1.9  christos 			  {
   9903   1.9  christos 			    /* Check for signed.  */
   9904   1.9  christos 			    if (arm_decode_field (given, 23, 23) == 0)
   9905   1.9  christos 			      {
   9906   1.9  christos 				/* We don't print 's' for S32.  */
   9907   1.9  christos 				if ((arm_decode_field (given, 5, 6) == 0)
   9908   1.9  christos 				    && ((op1 == 0) || (op1 == 1)))
   9909   1.9  christos 				  ;
   9910  1.10  christos 				else
   9911   1.9  christos 				  func (stream, dis_style_mnemonic, "s");
   9912   1.9  christos 			      }
   9913  1.10  christos 			    else
   9914   1.9  christos 			      func (stream, dis_style_mnemonic, "u");
   9915   1.9  christos 			  }
   9916   1.9  christos 			else
   9917   1.9  christos 			  {
   9918  1.10  christos 			    if (arm_decode_field (given, 28, 28) == 0)
   9919   1.9  christos 			      func (stream, dis_style_mnemonic, "s");
   9920  1.10  christos 			    else
   9921   1.9  christos 			      func (stream, dis_style_mnemonic, "u");
   9922   1.9  christos 			  }
   9923   1.9  christos 		      }
   9924   1.9  christos 		      break;
   9925   1.9  christos 
   9926   1.9  christos 		    case 'v':
   9927   1.9  christos 		      print_instruction_predicate (info);
   9928   1.9  christos 		      break;
   9929   1.9  christos 
   9930   1.9  christos 		    case 'w':
   9931  1.10  christos 		      if (arm_decode_field (given, 21, 21) == 1)
   9932   1.9  christos 			func (stream, dis_style_text, "!");
   9933   1.9  christos 		      break;
   9934   1.9  christos 
   9935   1.9  christos 		    case 'B':
   9936   1.9  christos 		      print_mve_register_blocks (info, given, insn->mve_op);
   9937   1.9  christos 		      break;
   9938   1.9  christos 
   9939   1.9  christos 		    case 'E':
   9940   1.9  christos 		      /* SIMD encoded constant for mov, mvn, vorr, vbic.  */
   9941   1.9  christos 
   9942   1.9  christos 		      print_simd_imm8 (info, given, 28, insn);
   9943   1.9  christos 		      break;
   9944   1.9  christos 
   9945   1.9  christos 		    case 'N':
   9946   1.9  christos 		      print_mve_vmov_index (info, given);
   9947   1.9  christos 		      break;
   9948   1.9  christos 
   9949   1.9  christos 		    case 'T':
   9950  1.10  christos 		      if (arm_decode_field (given, 12, 12) == 0)
   9951   1.9  christos 			func (stream, dis_style_mnemonic, "b");
   9952  1.10  christos 		      else
   9953   1.9  christos 			func (stream, dis_style_mnemonic, "t");
   9954   1.9  christos 		      break;
   9955   1.9  christos 
   9956   1.9  christos 		    case 'X':
   9957  1.10  christos 		      if (arm_decode_field (given, 12, 12) == 1)
   9958   1.9  christos 			func (stream, dis_style_mnemonic, "x");
   9959   1.9  christos 		      break;
   9960   1.9  christos 
   9961   1.9  christos 		    case '0': case '1': case '2': case '3': case '4':
   9962   1.9  christos 		    case '5': case '6': case '7': case '8': case '9':
   9963   1.9  christos 		      {
   9964   1.9  christos 			int width;
   9965   1.9  christos 			unsigned long value;
   9966   1.9  christos 
   9967   1.9  christos 			c = arm_decode_bitfield (c, given, &value, &width);
   9968   1.9  christos 
   9969   1.9  christos 			switch (*c)
   9970   1.9  christos 			  {
   9971   1.9  christos 			  case 'Z':
   9972  1.10  christos 			    if (value == 13)
   9973   1.9  christos 			      is_unpredictable = true;
   9974  1.10  christos 			    else if (value == 15)
   9975   1.9  christos 			      func (stream, dis_style_register, "zr");
   9976  1.10  christos 			    else
   9977  1.10  christos 			      func (stream, dis_style_register, "%s",
   9978   1.9  christos 				    arm_regnames[value]);
   9979   1.9  christos 			    break;
   9980   1.9  christos 
   9981  1.10  christos 			  case 'c':
   9982  1.10  christos 			    func (stream, dis_style_sub_mnemonic, "%s",
   9983   1.9  christos 				  arm_conditional[value]);
   9984   1.9  christos 			    break;
   9985   1.9  christos 
   9986   1.9  christos 			  case 'C':
   9987  1.10  christos 			    value ^= 1;
   9988  1.10  christos 			    func (stream, dis_style_sub_mnemonic, "%s",
   9989   1.9  christos 				  arm_conditional[value]);
   9990   1.9  christos 			    break;
   9991   1.9  christos 
   9992   1.9  christos 			  case 'S':
   9993  1.10  christos 			    if (value == 13 || value == 15)
   9994   1.9  christos 			      is_unpredictable = true;
   9995  1.10  christos 			    else
   9996  1.10  christos 			      func (stream, dis_style_register, "%s",
   9997   1.9  christos 				    arm_regnames[value]);
   9998   1.9  christos 			    break;
   9999   1.9  christos 
   10000   1.9  christos 			  case 's':
   10001   1.9  christos 			    print_mve_size (info,
   10002   1.9  christos 					    value,
   10003   1.9  christos 					    insn->mve_op);
   10004   1.9  christos 			    break;
   10005   1.9  christos 			  case 'I':
   10006  1.10  christos 			    if (value == 1)
   10007   1.9  christos 			      func (stream, dis_style_mnemonic, "i");
   10008   1.9  christos 			    break;
   10009   1.9  christos 			  case 'A':
   10010  1.10  christos 			    if (value == 1)
   10011   1.9  christos 			      func (stream, dis_style_mnemonic, "a");
   10012   1.9  christos 			    break;
   10013   1.9  christos 			  case 'h':
   10014   1.9  christos 			    {
   10015  1.10  christos 			      unsigned int odd_reg = (value << 1) | 1;
   10016  1.10  christos 			      func (stream, dis_style_register, "%s",
   10017   1.9  christos 				    arm_regnames[odd_reg]);
   10018   1.9  christos 			    }
   10019   1.9  christos 			    break;
   10020   1.9  christos 			  case 'i':
   10021   1.9  christos 			    {
   10022   1.9  christos 			      unsigned long imm
   10023   1.9  christos 				= arm_decode_field (given, 0, 6);
   10024   1.9  christos 			      unsigned long mod_imm = imm;
   10025   1.9  christos 
   10026   1.9  christos 			      switch (insn->mve_op)
   10027   1.9  christos 				{
   10028   1.9  christos 				case MVE_VLDRW_GATHER_T5:
   10029   1.9  christos 				case MVE_VSTRW_SCATTER_T5:
   10030   1.9  christos 				  mod_imm = mod_imm << 2;
   10031   1.9  christos 				  break;
   10032   1.9  christos 				case MVE_VSTRD_SCATTER_T6:
   10033   1.9  christos 				case MVE_VLDRD_GATHER_T6:
   10034   1.9  christos 				  mod_imm = mod_imm << 3;
   10035   1.9  christos 				  break;
   10036   1.9  christos 
   10037   1.9  christos 				default:
   10038   1.9  christos 				  break;
   10039   1.1  christos 				}
   10040  1.10  christos 
   10041  1.10  christos 			      func (stream, dis_style_immediate, "%lu",
   10042   1.9  christos 				    mod_imm);
   10043   1.9  christos 			    }
   10044   1.9  christos 			    break;
   10045  1.10  christos 			  case 'k':
   10046  1.10  christos 			    func (stream, dis_style_immediate, "%lu",
   10047   1.9  christos 				  64 - value);
   10048   1.9  christos 			    break;
   10049   1.9  christos 			  case 'l':
   10050   1.9  christos 			    {
   10051  1.10  christos 			      unsigned int even_reg = value << 1;
   10052  1.10  christos 			      func (stream, dis_style_register, "%s",
   10053   1.1  christos 				    arm_regnames[even_reg]);
   10054   1.1  christos 			    }
   10055   1.9  christos 			    break;
   10056   1.9  christos 			  case 'u':
   10057   1.9  christos 			    switch (value)
   10058   1.9  christos 			      {
   10059  1.10  christos 			      case 0:
   10060   1.9  christos 				func (stream, dis_style_immediate, "1");
   10061   1.9  christos 				break;
   10062  1.10  christos 			      case 1:
   10063   1.9  christos 				func (stream, dis_style_immediate, "2");
   10064   1.9  christos 				break;
   10065  1.10  christos 			      case 2:
   10066   1.9  christos 				func (stream, dis_style_immediate, "4");
   10067   1.9  christos 				break;
   10068  1.10  christos 			      case 3:
   10069   1.9  christos 				func (stream, dis_style_immediate, "8");
   10070   1.9  christos 				break;
   10071   1.9  christos 			      default:
   10072   1.9  christos 				break;
   10073   1.9  christos 			      }
   10074   1.9  christos 			    break;
   10075   1.9  christos 			  case 'o':
   10076   1.9  christos 			    print_mve_rotate (info, value, width);
   10077   1.9  christos 			    break;
   10078  1.10  christos 			  case 'r':
   10079  1.10  christos 			    func (stream, dis_style_register, "%s",
   10080   1.1  christos 				  arm_regnames[value]);
   10081   1.9  christos 			    break;
   10082  1.11  christos 			  case 'd':
   10083   1.9  christos 			    if (mve_shift_insn_p (insn->mve_op))
   10084   1.9  christos 			      print_mve_shift_n (info, given, insn->mve_op);
   10085   1.9  christos 			    else if (insn->mve_op == MVE_VSHLL_T2)
   10086   1.9  christos 			      {
   10087   1.9  christos 				switch (value)
   10088   1.9  christos 				  {
   10089  1.10  christos 				  case 0x00:
   10090   1.9  christos 				    func (stream, dis_style_immediate, "8");
   10091   1.9  christos 				    break;
   10092  1.10  christos 				  case 0x01:
   10093   1.9  christos 				    func (stream, dis_style_immediate, "16");
   10094   1.9  christos 				    break;
   10095   1.9  christos 				  case 0x10:
   10096   1.9  christos 				    print_mve_undefined (info, UNDEF_SIZE_0);
   10097   1.9  christos 				    break;
   10098   1.9  christos 				  default:
   10099   1.9  christos 				    assert (0);
   10100   1.9  christos 				    break;
   10101   1.9  christos 				  }
   10102   1.1  christos 			      }
   10103   1.9  christos 			    else
   10104   1.9  christos 			      {
   10105   1.9  christos 				if (insn->mve_op == MVE_VSHLC && value == 0)
   10106  1.10  christos 				  value = 32;
   10107   1.9  christos 				func (stream, base_style, "%ld", value);
   10108   1.9  christos 				value_in_comment = value;
   10109   1.1  christos 			      }
   10110   1.9  christos 			    break;
   10111  1.10  christos 			  case 'F':
   10112   1.1  christos 			    func (stream, dis_style_register, "s%ld", value);
   10113   1.9  christos 			    break;
   10114   1.9  christos 			  case 'Q':
   10115  1.10  christos 			    if (value & 0x8)
   10116  1.10  christos 			      func (stream, dis_style_text,
   10117   1.9  christos 				    "<illegal reg q%ld.5>", value);
   10118  1.10  christos 			    else
   10119   1.1  christos 			      func (stream, dis_style_register, "q%ld", value);
   10120   1.9  christos 			    break;
   10121  1.10  christos 			  case 'x':
   10122  1.10  christos 			    func (stream, dis_style_immediate,
   10123   1.1  christos 				  "0x%08lx", value);
   10124   1.1  christos 			    break;
   10125   1.1  christos 			  default:
   10126   1.1  christos 			    abort ();
   10127   1.1  christos 			  }
   10128   1.1  christos 			break;
   10129   1.1  christos 		      default:
   10130   1.1  christos 			abort ();
   10131   1.1  christos 		      }
   10132   1.1  christos 		    }
   10133   1.1  christos 		}
   10134  1.10  christos 	      else
   10135  1.10  christos 		{
   10136  1.10  christos 		  if (*c == '@')
   10137  1.10  christos 		    base_style = dis_style_comment_start;
   10138  1.10  christos 
   10139  1.10  christos 		  if (*c == '\t')
   10140  1.10  christos 		    base_style = dis_style_text;
   10141  1.10  christos 
   10142  1.10  christos 		  func (stream, base_style, "%c", *c);
   10143   1.1  christos 		}
   10144   1.1  christos 	    }
   10145   1.1  christos 
   10146  1.10  christos 	  if (value_in_comment > 32 || value_in_comment < -16)
   10147  1.10  christos 	    func (stream, dis_style_comment_start, "\t@ 0x%lx",
   10148   1.1  christos 		  value_in_comment);
   10149   1.1  christos 
   10150   1.9  christos 	  if (is_unpredictable)
   10151   1.9  christos 	    print_mve_unpredictable (info, unpredictable_cond);
   10152   1.9  christos 
   10153   1.9  christos 	  if (is_undefined)
   10154   1.9  christos 	    print_mve_undefined (info, undefined_cond);
   10155  1.10  christos 
   10156   1.9  christos 	  if (!vpt_block_state.in_vpt_block
   10157  1.10  christos 	      && !ifthen_state
   10158   1.9  christos 	      && is_vpt_instruction (given))
   10159  1.10  christos 	    mark_inside_vpt_block (given);
   10160   1.9  christos 	  else if (vpt_block_state.in_vpt_block)
   10161   1.1  christos 	    update_vpt_block_state ();
   10162  1.10  christos 
   10163   1.1  christos 	  return true;
   10164   1.1  christos 	}
   10165  1.10  christos     }
   10166   1.1  christos   return false;
   10167   1.1  christos }
   10168   1.9  christos 
   10169   1.1  christos 
   10170   1.1  christos /* Return the name of a v7A special register.  */
   10171   1.6  christos 
   10172   1.1  christos static const char *
   10173   1.1  christos banked_regname (unsigned reg)
   10174   1.1  christos {
   10175   1.1  christos   switch (reg)
   10176   1.1  christos     {
   10177   1.6  christos       case 15: return "CPSR";
   10178   1.1  christos       case 32: return "R8_usr";
   10179   1.1  christos       case 33: return "R9_usr";
   10180   1.1  christos       case 34: return "R10_usr";
   10181   1.1  christos       case 35: return "R11_usr";
   10182   1.1  christos       case 36: return "R12_usr";
   10183   1.1  christos       case 37: return "SP_usr";
   10184   1.6  christos       case 38: return "LR_usr";
   10185   1.1  christos       case 40: return "R8_fiq";
   10186   1.1  christos       case 41: return "R9_fiq";
   10187   1.1  christos       case 42: return "R10_fiq";
   10188   1.1  christos       case 43: return "R11_fiq";
   10189   1.1  christos       case 44: return "R12_fiq";
   10190   1.1  christos       case 45: return "SP_fiq";
   10191   1.1  christos       case 46: return "LR_fiq";
   10192   1.1  christos       case 48: return "LR_irq";
   10193   1.1  christos       case 49: return "SP_irq";
   10194   1.1  christos       case 50: return "LR_svc";
   10195   1.1  christos       case 51: return "SP_svc";
   10196   1.1  christos       case 52: return "LR_abt";
   10197   1.1  christos       case 53: return "SP_abt";
   10198   1.1  christos       case 54: return "LR_und";
   10199   1.1  christos       case 55: return "SP_und";
   10200   1.1  christos       case 60: return "LR_mon";
   10201   1.1  christos       case 61: return "SP_mon";
   10202   1.1  christos       case 62: return "ELR_hyp";
   10203   1.1  christos       case 63: return "SP_hyp";
   10204   1.1  christos       case 79: return "SPSR";
   10205   1.1  christos       case 110: return "SPSR_fiq";
   10206   1.1  christos       case 112: return "SPSR_irq";
   10207   1.1  christos       case 114: return "SPSR_svc";
   10208   1.1  christos       case 116: return "SPSR_abt";
   10209   1.1  christos       case 118: return "SPSR_und";
   10210   1.1  christos       case 124: return "SPSR_mon";
   10211   1.1  christos       case 126: return "SPSR_hyp";
   10212   1.1  christos       default: return NULL;
   10213   1.1  christos     }
   10214   1.1  christos }
   10215   1.1  christos 
   10216   1.1  christos /* Return the name of the DMB/DSB option.  */
   10217   1.1  christos static const char *
   10218   1.1  christos data_barrier_option (unsigned option)
   10219   1.1  christos {
   10220   1.1  christos   switch (option & 0xf)
   10221   1.1  christos     {
   10222   1.1  christos     case 0xf: return "sy";
   10223   1.1  christos     case 0xe: return "st";
   10224   1.1  christos     case 0xd: return "ld";
   10225   1.1  christos     case 0xb: return "ish";
   10226   1.1  christos     case 0xa: return "ishst";
   10227   1.1  christos     case 0x9: return "ishld";
   10228   1.1  christos     case 0x7: return "un";
   10229   1.1  christos     case 0x6: return "unst";
   10230   1.1  christos     case 0x5: return "nshld";
   10231   1.1  christos     case 0x3: return "osh";
   10232   1.1  christos     case 0x2: return "oshst";
   10233   1.1  christos     case 0x1: return "oshld";
   10234   1.1  christos     default:  return NULL;
   10235   1.1  christos     }
   10236   1.1  christos }
   10237   1.1  christos 
   10238   1.1  christos /* Print one ARM instruction from PC on INFO->STREAM.  */
   10239   1.1  christos 
   10240   1.1  christos static void
   10241   1.1  christos print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
   10242   1.1  christos {
   10243   1.1  christos   const struct opcode32 *insn;
   10244  1.10  christos   void *stream = info->stream;
   10245   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   10246  1.10  christos   struct arm_private_data *private_data = info->private_data;
   10247  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   10248   1.1  christos   enum disassembler_style old_base_style = base_style;
   10249  1.10  christos 
   10250   1.1  christos   if (print_insn_coprocessor (pc, info, given, false))
   10251   1.1  christos     return;
   10252  1.10  christos 
   10253   1.1  christos   if (print_insn_neon (info, given, false))
   10254   1.1  christos     return;
   10255  1.10  christos 
   10256   1.9  christos   if (print_insn_generic_coprocessor (pc, info, given, false))
   10257   1.9  christos     return;
   10258   1.1  christos 
   10259   1.1  christos   for (insn = arm_opcodes; insn->assembler; insn++)
   10260   1.1  christos     {
   10261   1.1  christos       if ((given & insn->mask) != insn->value)
   10262   1.5  christos 	continue;
   10263   1.5  christos 
   10264   1.1  christos       if (! ARM_CPU_HAS_FEATURE (insn->arch, private_data->features))
   10265   1.1  christos 	continue;
   10266   1.1  christos 
   10267   1.1  christos       /* Special case: an instruction with all bits set in the condition field
   10268   1.1  christos 	 (0xFnnn_nnnn) is only matched if all those bits are set in insn->mask,
   10269   1.1  christos 	 or by the catchall at the end of the table.  */
   10270   1.1  christos       if ((given & 0xF0000000) != 0xF0000000
   10271   1.1  christos 	  || (insn->mask & 0xF0000000) == 0xF0000000
   10272   1.1  christos 	  || (insn->mask == 0 && insn->value == 0))
   10273   1.1  christos 	{
   10274   1.1  christos 	  unsigned long u_reg = 16;
   10275  1.10  christos 	  unsigned long U_reg = 16;
   10276   1.1  christos 	  bool is_unpredictable = false;
   10277   1.1  christos 	  signed long value_in_comment = 0;
   10278   1.1  christos 	  const char *c;
   10279   1.1  christos 
   10280   1.1  christos 	  for (c = insn->assembler; *c; c++)
   10281   1.1  christos 	    {
   10282   1.1  christos 	      if (*c == '%')
   10283  1.10  christos 		{
   10284   1.1  christos 		  bool allow_unpredictable = false;
   10285   1.1  christos 
   10286   1.1  christos 		  switch (*++c)
   10287  1.10  christos 		    {
   10288  1.10  christos 		    case '{':
   10289  1.10  christos 		      ++c;
   10290  1.10  christos 		      if (*c == '\0')
   10291  1.10  christos 			abort ();
   10292  1.10  christos 		      old_base_style = base_style;
   10293  1.10  christos 		      base_style = decode_base_style (*c);
   10294  1.10  christos 		      ++c;
   10295  1.10  christos 		      if (*c != ':')
   10296  1.10  christos 			abort ();
   10297  1.10  christos 		      break;
   10298  1.10  christos 
   10299  1.10  christos 		    case '}':
   10300  1.10  christos 		      base_style = old_base_style;
   10301  1.10  christos 		      break;
   10302   1.1  christos 
   10303  1.10  christos 		    case '%':
   10304   1.1  christos 		      func (stream, base_style, "%%");
   10305   1.1  christos 		      break;
   10306   1.1  christos 
   10307   1.1  christos 		    case 'a':
   10308   1.1  christos 		      value_in_comment = print_arm_address (pc, info, given);
   10309   1.1  christos 		      break;
   10310   1.1  christos 
   10311   1.1  christos 		    case 'P':
   10312   1.1  christos 		      /* Set P address bit and use normal address
   10313   1.1  christos 			 printing routine.  */
   10314   1.1  christos 		      value_in_comment = print_arm_address (pc, info, given | (1 << P_BIT));
   10315   1.1  christos 		      break;
   10316   1.1  christos 
   10317  1.10  christos 		    case 'S':
   10318   1.7  christos 		      allow_unpredictable = true;
   10319   1.1  christos 		      /* Fall through.  */
   10320   1.1  christos 		    case 's':
   10321   1.1  christos                       if ((given & 0x004f0000) == 0x004f0000)
   10322   1.1  christos 			{
   10323   1.1  christos                           /* PC relative with immediate offset.  */
   10324   1.1  christos 			  bfd_vma offset = ((given & 0xf00) >> 4) | (given & 0xf);
   10325   1.1  christos 
   10326   1.1  christos 			  if (PRE_BIT_SET)
   10327   1.1  christos 			    {
   10328   1.1  christos 			      /* Elide positive zero offset.  */
   10329  1.10  christos 			      if (offset || NEGATIVE_BIT_SET)
   10330  1.10  christos 				{
   10331  1.10  christos 				  func (stream, dis_style_text, "[");
   10332  1.10  christos 				  func (stream, dis_style_register, "pc");
   10333  1.10  christos 				  func (stream, dis_style_text, ", ");
   10334  1.10  christos 				  func (stream, dis_style_immediate, "#%s%d",
   10335  1.10  christos 					(NEGATIVE_BIT_SET ? "-" : ""),
   10336  1.10  christos 					(int) offset);
   10337  1.10  christos 				  func (stream, dis_style_text, "]");
   10338   1.1  christos 				}
   10339  1.10  christos 			      else
   10340  1.10  christos 				{
   10341  1.10  christos 				  func (stream, dis_style_text, "[");
   10342  1.10  christos 				  func (stream, dis_style_register, "pc");
   10343  1.10  christos 				  func (stream, dis_style_text, "]");
   10344   1.1  christos 				}
   10345   1.1  christos 			      if (NEGATIVE_BIT_SET)
   10346  1.10  christos 				offset = -offset;
   10347   1.1  christos 			      func (stream, dis_style_comment_start, "\t@ ");
   10348   1.1  christos 			      info->print_address_func (offset + pc + 8, info);
   10349   1.1  christos 			    }
   10350   1.1  christos 			  else
   10351   1.1  christos 			    {
   10352  1.10  christos 			      /* Always show the offset.  */
   10353  1.10  christos 			      func (stream, dis_style_text, "[");
   10354  1.10  christos 			      func (stream, dis_style_register, "pc");
   10355  1.10  christos 			      func (stream, dis_style_text, "], ");
   10356   1.1  christos 			      func (stream, dis_style_immediate, "#%s%d",
   10357   1.1  christos 				    NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   10358  1.10  christos 			      if (! allow_unpredictable)
   10359   1.1  christos 				is_unpredictable = true;
   10360   1.1  christos 			    }
   10361   1.1  christos 			}
   10362   1.1  christos 		      else
   10363   1.1  christos 			{
   10364   1.1  christos 			  int offset = ((given & 0xf00) >> 4) | (given & 0xf);
   10365  1.10  christos 
   10366  1.10  christos 			  func (stream, dis_style_text, "[");
   10367   1.1  christos 			  func (stream, dis_style_register, "%s",
   10368   1.1  christos 				arm_regnames[(given >> 16) & 0xf]);
   10369   1.1  christos 
   10370   1.1  christos 			  if (PRE_BIT_SET)
   10371   1.1  christos 			    {
   10372   1.1  christos 			      if (IMMEDIATE_BIT_SET)
   10373   1.1  christos 				{
   10374   1.1  christos 				  /* Elide offset for non-writeback
   10375   1.1  christos 				     positive zero.  */
   10376   1.1  christos 				  if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET
   10377  1.10  christos 				      || offset)
   10378  1.10  christos 				    {
   10379  1.10  christos 				      func (stream, dis_style_text, ", ");
   10380  1.10  christos 				      func (stream, dis_style_immediate,
   10381  1.10  christos 					    "#%s%d",
   10382  1.10  christos 					    (NEGATIVE_BIT_SET ? "-" : ""),
   10383  1.10  christos 					    offset);
   10384   1.1  christos 				    }
   10385   1.1  christos 
   10386   1.1  christos 				  if (NEGATIVE_BIT_SET)
   10387   1.1  christos 				    offset = -offset;
   10388   1.1  christos 
   10389   1.1  christos 				  value_in_comment = offset;
   10390   1.1  christos 				}
   10391   1.1  christos 			      else
   10392   1.1  christos 				{
   10393  1.10  christos 				  /* Register Offset or Register Pre-Indexed.  */
   10394  1.10  christos 				  func (stream, dis_style_text, ", %s",
   10395  1.10  christos 					NEGATIVE_BIT_SET ? "-" : "");
   10396   1.1  christos 				  func (stream, dis_style_register, "%s",
   10397   1.1  christos 					arm_regnames[given & 0xf]);
   10398   1.1  christos 
   10399   1.1  christos 				  /* Writing back to the register that is the source/
   10400   1.1  christos 				     destination of the load/store is unpredictable.  */
   10401   1.1  christos 				  if (! allow_unpredictable
   10402   1.1  christos 				      && WRITEBACK_BIT_SET
   10403  1.10  christos 				      && ((given & 0xf) == ((given >> 12) & 0xf)))
   10404   1.1  christos 				    is_unpredictable = true;
   10405   1.1  christos 				}
   10406  1.10  christos 
   10407   1.1  christos 			      func (stream, dis_style_text, "]%s",
   10408   1.1  christos 				    WRITEBACK_BIT_SET ? "!" : "");
   10409   1.1  christos 			    }
   10410   1.1  christos 			  else
   10411   1.1  christos 			    {
   10412   1.1  christos 			      if (IMMEDIATE_BIT_SET)
   10413   1.1  christos 				{
   10414   1.1  christos 				  /* Immediate Post-indexed.  */
   10415  1.10  christos 				  /* PR 10924: Offset must be printed, even if it is zero.  */
   10416  1.10  christos 				  func (stream, dis_style_text, "], ");
   10417   1.1  christos 				  func (stream, dis_style_immediate, "#%s%d",
   10418   1.1  christos 					NEGATIVE_BIT_SET ? "-" : "", offset);
   10419   1.1  christos 				  if (NEGATIVE_BIT_SET)
   10420   1.1  christos 				    offset = -offset;
   10421   1.1  christos 				  value_in_comment = offset;
   10422   1.1  christos 				}
   10423   1.1  christos 			      else
   10424   1.1  christos 				{
   10425  1.10  christos 				  /* Register Post-indexed.  */
   10426  1.10  christos 				  func (stream, dis_style_text, "], %s",
   10427  1.10  christos 					NEGATIVE_BIT_SET ? "-" : "");
   10428   1.1  christos 				  func (stream, dis_style_register, "%s",
   10429   1.1  christos 					arm_regnames[given & 0xf]);
   10430   1.1  christos 
   10431   1.1  christos 				  /* Writing back to the register that is the source/
   10432   1.1  christos 				     destination of the load/store is unpredictable.  */
   10433   1.1  christos 				  if (! allow_unpredictable
   10434  1.10  christos 				      && (given & 0xf) == ((given >> 12) & 0xf))
   10435   1.1  christos 				    is_unpredictable = true;
   10436   1.1  christos 				}
   10437   1.1  christos 
   10438   1.1  christos 			      if (! allow_unpredictable)
   10439   1.1  christos 				{
   10440   1.1  christos 				  /* Writeback is automatically implied by post- addressing.
   10441   1.1  christos 				     Setting the W bit is unnecessary and ARM specify it as
   10442   1.1  christos 				     being unpredictable.  */
   10443   1.1  christos 				  if (WRITEBACK_BIT_SET
   10444   1.1  christos 				      /* Specifying the PC register as the post-indexed
   10445   1.1  christos 					 registers is also unpredictable.  */
   10446  1.10  christos 				      || (! IMMEDIATE_BIT_SET && ((given & 0xf) == 0xf)))
   10447   1.1  christos 				    is_unpredictable = true;
   10448   1.1  christos 				}
   10449   1.1  christos 			    }
   10450   1.1  christos 			}
   10451   1.1  christos 		      break;
   10452   1.1  christos 
   10453   1.1  christos 		    case 'b':
   10454   1.1  christos 		      {
   10455   1.9  christos 			bfd_vma disp = (((given & 0xffffff) ^ 0x800000) - 0x800000);
   10456   1.9  christos 			bfd_vma target = disp * 4 + pc + 8;
   10457   1.9  christos 			info->print_address_func (target, info);
   10458   1.9  christos 
   10459   1.9  christos 			/* Fill in instruction information.  */
   10460   1.9  christos 			info->insn_info_valid = 1;
   10461   1.9  christos 			info->insn_type = dis_branch;
   10462   1.1  christos 			info->target = target;
   10463   1.1  christos 		      }
   10464   1.1  christos 		      break;
   10465   1.1  christos 
   10466   1.1  christos 		    case 'c':
   10467  1.10  christos 		      if (((given >> 28) & 0xf) != 0xe)
   10468   1.1  christos 			func (stream, dis_style_mnemonic, "%s",
   10469   1.1  christos 			      arm_conditional [(given >> 28) & 0xf]);
   10470   1.1  christos 		      break;
   10471   1.1  christos 
   10472   1.1  christos 		    case 'm':
   10473   1.1  christos 		      {
   10474   1.1  christos 			int started = 0;
   10475   1.1  christos 			int reg;
   10476  1.10  christos 
   10477   1.1  christos 			func (stream, dis_style_text, "{");
   10478   1.1  christos 			for (reg = 0; reg < 16; reg++)
   10479   1.1  christos 			  if ((given & (1 << reg)) != 0)
   10480   1.1  christos 			    {
   10481  1.10  christos 			      if (started)
   10482   1.1  christos 				func (stream, dis_style_text, ", ");
   10483  1.10  christos 			      started = 1;
   10484  1.10  christos 			      func (stream, dis_style_register, "%s",
   10485   1.1  christos 				    arm_regnames[reg]);
   10486  1.10  christos 			    }
   10487   1.1  christos 			func (stream, dis_style_text, "}");
   10488  1.10  christos 			if (! started)
   10489   1.1  christos 			  is_unpredictable = true;
   10490   1.1  christos 		      }
   10491   1.1  christos 		      break;
   10492   1.1  christos 
   10493  1.10  christos 		    case 'q':
   10494   1.1  christos 		      arm_decode_shift (given, func, stream, false);
   10495   1.1  christos 		      break;
   10496   1.1  christos 
   10497   1.1  christos 		    case 'o':
   10498   1.1  christos 		      if ((given & 0x02000000) != 0)
   10499   1.1  christos 			{
   10500   1.1  christos 			  unsigned int rotate = (given & 0xf00) >> 7;
   10501   1.1  christos 			  unsigned int immed = (given & 0xff);
   10502   1.1  christos 			  unsigned int a, i;
   10503   1.9  christos 
   10504   1.9  christos 			  a = (immed << ((32 - rotate) & 31)
   10505   1.1  christos 			       | immed >> rotate) & 0xffffffff;
   10506   1.1  christos 			  /* If there is another encoding with smaller rotate,
   10507   1.1  christos 			     the rotate should be specified directly.  */
   10508   1.9  christos 			  for (i = 0; i < 32; i += 2)
   10509   1.1  christos 			    if ((a << i | a >> ((32 - i) & 31)) <= 0xff)
   10510   1.1  christos 			      break;
   10511   1.1  christos 
   10512  1.10  christos 			  if (i != rotate)
   10513  1.10  christos 			    {
   10514  1.10  christos 			      func (stream, dis_style_immediate, "#%d", immed);
   10515  1.10  christos 			      func (stream, dis_style_text, ", ");
   10516  1.10  christos 			      func (stream, dis_style_immediate, "%d", rotate);
   10517   1.1  christos 			    }
   10518  1.10  christos 			  else
   10519   1.1  christos 			    func (stream, dis_style_immediate, "#%d", a);
   10520   1.1  christos 			  value_in_comment = a;
   10521   1.1  christos 			}
   10522  1.10  christos 		      else
   10523   1.1  christos 			arm_decode_shift (given, func, stream, true);
   10524   1.1  christos 		      break;
   10525   1.1  christos 
   10526   1.1  christos 		    case 'p':
   10527   1.1  christos 		      if ((given & 0x0000f000) == 0x0000f000)
   10528   1.5  christos 			{
   10529   1.5  christos 			  arm_feature_set arm_ext_v6 =
   10530   1.5  christos 			    ARM_FEATURE_CORE_LOW (ARM_EXT_V6);
   10531   1.1  christos 
   10532   1.1  christos 			  /* The p-variants of tst/cmp/cmn/teq are the pre-V6
   10533   1.1  christos 			     mechanism for setting PSR flag bits.  They are
   10534   1.5  christos 			     obsolete in V6 onwards.  */
   10535   1.5  christos 			  if (! ARM_CPU_HAS_FEATURE (private_data->features, \
   10536  1.10  christos 						     arm_ext_v6))
   10537   1.6  christos 			    func (stream, dis_style_mnemonic, "p");
   10538  1.10  christos 			  else
   10539   1.1  christos 			    is_unpredictable = true;
   10540   1.1  christos 			}
   10541   1.1  christos 		      break;
   10542   1.1  christos 
   10543   1.1  christos 		    case 't':
   10544  1.10  christos 		      if ((given & 0x01200000) == 0x00200000)
   10545   1.1  christos 			func (stream, dis_style_mnemonic, "t");
   10546   1.1  christos 		      break;
   10547   1.1  christos 
   10548   1.1  christos 		    case 'A':
   10549   1.1  christos 		      {
   10550   1.1  christos 			int offset = given & 0xff;
   10551   1.1  christos 
   10552   1.1  christos 			value_in_comment = offset * 4;
   10553   1.1  christos 			if (NEGATIVE_BIT_SET)
   10554   1.1  christos 			  value_in_comment = - value_in_comment;
   10555  1.10  christos 
   10556  1.10  christos 			func (stream, dis_style_text, "[%s",
   10557   1.1  christos 			      arm_regnames [(given >> 16) & 0xf]);
   10558   1.1  christos 
   10559   1.1  christos 			if (PRE_BIT_SET)
   10560   1.1  christos 			  {
   10561  1.10  christos 			    if (offset)
   10562   1.1  christos 			      func (stream, dis_style_text, ", #%d]%s",
   10563   1.1  christos 				    (int) value_in_comment,
   10564   1.1  christos 				    WRITEBACK_BIT_SET ? "!" : "");
   10565  1.10  christos 			    else
   10566   1.1  christos 			      func (stream, dis_style_text, "]");
   10567   1.1  christos 			  }
   10568   1.1  christos 			else
   10569  1.10  christos 			  {
   10570   1.1  christos 			    func (stream, dis_style_text, "]");
   10571   1.1  christos 
   10572   1.1  christos 			    if (WRITEBACK_BIT_SET)
   10573   1.1  christos 			      {
   10574  1.10  christos 				if (offset)
   10575  1.10  christos 				  func (stream, dis_style_text,
   10576   1.1  christos 					", #%d", (int) value_in_comment);
   10577   1.1  christos 			      }
   10578   1.1  christos 			    else
   10579  1.10  christos 			      {
   10580  1.10  christos 				func (stream, dis_style_text,
   10581   1.1  christos 				      ", {%d}", (int) offset);
   10582   1.1  christos 				value_in_comment = offset;
   10583   1.1  christos 			      }
   10584   1.1  christos 			  }
   10585   1.1  christos 		      }
   10586   1.1  christos 		      break;
   10587   1.1  christos 
   10588   1.1  christos 		    case 'B':
   10589   1.1  christos 		      /* Print ARM V5 BLX(1) address: pc+25 bits.  */
   10590   1.1  christos 		      {
   10591   1.1  christos 			bfd_vma address;
   10592   1.1  christos 			bfd_vma offset = 0;
   10593   1.1  christos 
   10594   1.1  christos 			if (! NEGATIVE_BIT_SET)
   10595   1.1  christos 			  /* Is signed, hi bits should be ones.  */
   10596   1.1  christos 			  offset = (-1) ^ 0x00ffffff;
   10597   1.1  christos 
   10598   1.1  christos 			/* Offset is (SignExtend(offset field)<<2).  */
   10599   1.1  christos 			offset += given & 0x00ffffff;
   10600   1.1  christos 			offset <<= 2;
   10601   1.1  christos 			address = offset + pc + 8;
   10602   1.1  christos 
   10603   1.1  christos 			if (given & 0x01000000)
   10604   1.1  christos 			  /* H bit allows addressing to 2-byte boundaries.  */
   10605   1.1  christos 			  address += 2;
   10606   1.1  christos 
   10607   1.9  christos 		        info->print_address_func (address, info);
   10608   1.9  christos 
   10609   1.9  christos 			/* Fill in instruction information.  */
   10610   1.9  christos 			info->insn_info_valid = 1;
   10611   1.9  christos 			info->insn_type = dis_branch;
   10612   1.1  christos 			info->target = address;
   10613   1.1  christos 		      }
   10614   1.1  christos 		      break;
   10615   1.1  christos 
   10616   1.1  christos 		    case 'C':
   10617   1.1  christos 		      if ((given & 0x02000200) == 0x200)
   10618   1.1  christos 			{
   10619   1.1  christos 			  const char * name;
   10620   1.1  christos 			  unsigned sysm = (given & 0x004f0000) >> 16;
   10621   1.1  christos 
   10622   1.1  christos 			  sysm |= (given & 0x300) >> 4;
   10623   1.1  christos 			  name = banked_regname (sysm);
   10624   1.1  christos 
   10625  1.10  christos 			  if (name != NULL)
   10626   1.1  christos 			    func (stream, dis_style_register, "%s", name);
   10627  1.10  christos 			  else
   10628  1.10  christos 			    func (stream, dis_style_text,
   10629   1.1  christos 				  "(UNDEF: %lu)", (unsigned long) sysm);
   10630   1.1  christos 			}
   10631   1.1  christos 		      else
   10632  1.10  christos 			{
   10633   1.1  christos 			  func (stream, dis_style_register, "%cPSR_",
   10634  1.10  christos 				(given & 0x00400000) ? 'S' : 'C');
   10635   1.1  christos 
   10636  1.10  christos 			  if (given & 0x80000)
   10637   1.1  christos 			    func (stream, dis_style_register, "f");
   10638  1.10  christos 			  if (given & 0x40000)
   10639   1.1  christos 			    func (stream, dis_style_register, "s");
   10640  1.10  christos 			  if (given & 0x20000)
   10641   1.1  christos 			    func (stream, dis_style_register, "x");
   10642  1.10  christos 			  if (given & 0x10000)
   10643   1.1  christos 			    func (stream, dis_style_register, "c");
   10644   1.1  christos 			}
   10645   1.1  christos 		      break;
   10646   1.1  christos 
   10647   1.6  christos 		    case 'U':
   10648   1.1  christos 		      if ((given & 0xf0) == 0x60)
   10649   1.1  christos 			{
   10650   1.1  christos 			  switch (given & 0xf)
   10651  1.10  christos 			    {
   10652  1.10  christos 			    case 0xf:
   10653  1.10  christos 			      func (stream, dis_style_sub_mnemonic, "sy");
   10654   1.1  christos 			      break;
   10655  1.10  christos 			    default:
   10656  1.10  christos 			      func (stream, dis_style_immediate, "#%d",
   10657   1.1  christos 				    (int) given & 0xf);
   10658   1.1  christos 			      break;
   10659   1.6  christos 			    }
   10660   1.6  christos 			}
   10661   1.1  christos 		      else
   10662   1.1  christos 			{
   10663   1.1  christos 			  const char * opt = data_barrier_option (given & 0xf);
   10664  1.10  christos 			  if (opt != NULL)
   10665   1.1  christos 			    func (stream, dis_style_sub_mnemonic, "%s", opt);
   10666  1.10  christos 			  else
   10667  1.10  christos 			    func (stream, dis_style_immediate,
   10668   1.1  christos 				  "#%d", (int) given & 0xf);
   10669   1.1  christos 			}
   10670   1.1  christos 		      break;
   10671   1.1  christos 
   10672   1.1  christos 		    case '0': case '1': case '2': case '3': case '4':
   10673   1.1  christos 		    case '5': case '6': case '7': case '8': case '9':
   10674   1.1  christos 		      {
   10675   1.1  christos 			int width;
   10676   1.1  christos 			unsigned long value;
   10677   1.1  christos 
   10678   1.6  christos 			c = arm_decode_bitfield (c, given, &value, &width);
   10679   1.1  christos 
   10680   1.1  christos 			switch (*c)
   10681   1.1  christos 			  {
   10682   1.1  christos 			  case 'R':
   10683  1.10  christos 			    if (value == 15)
   10684   1.1  christos 			      is_unpredictable = true;
   10685   1.1  christos 			    /* Fall through.  */
   10686   1.1  christos 			  case 'r':
   10687   1.1  christos 			  case 'T':
   10688   1.1  christos 			    /* We want register + 1 when decoding T.  */
   10689   1.9  christos 			    if (*c == 'T')
   10690   1.1  christos 			      value = (value + 1) & 0xf;
   10691   1.1  christos 
   10692   1.1  christos 			    if (c[1] == 'u')
   10693   1.1  christos 			      {
   10694   1.1  christos 				/* Eat the 'u' character.  */
   10695   1.1  christos 				++ c;
   10696   1.1  christos 
   10697  1.10  christos 				if (u_reg == value)
   10698   1.1  christos 				  is_unpredictable = true;
   10699   1.1  christos 				u_reg = value;
   10700   1.1  christos 			      }
   10701   1.1  christos 			    if (c[1] == 'U')
   10702   1.1  christos 			      {
   10703   1.1  christos 				/* Eat the 'U' character.  */
   10704   1.1  christos 				++ c;
   10705   1.1  christos 
   10706  1.10  christos 				if (U_reg == value)
   10707   1.1  christos 				  is_unpredictable = true;
   10708   1.1  christos 				U_reg = value;
   10709  1.10  christos 			      }
   10710  1.10  christos 			    func (stream, dis_style_register, "%s",
   10711   1.1  christos 				  arm_regnames[value]);
   10712   1.1  christos 			    break;
   10713  1.10  christos 			  case 'd':
   10714   1.1  christos 			    func (stream, base_style, "%ld", value);
   10715   1.1  christos 			    value_in_comment = value;
   10716   1.1  christos 			    break;
   10717  1.10  christos 			  case 'b':
   10718  1.10  christos 			    func (stream, dis_style_immediate,
   10719   1.1  christos 				  "%ld", value * 8);
   10720   1.1  christos 			    value_in_comment = value * 8;
   10721   1.1  christos 			    break;
   10722  1.10  christos 			  case 'W':
   10723  1.10  christos 			    func (stream, dis_style_immediate,
   10724   1.1  christos 				  "%ld", value + 1);
   10725   1.1  christos 			    value_in_comment = value + 1;
   10726   1.1  christos 			    break;
   10727  1.10  christos 			  case 'x':
   10728  1.10  christos 			    func (stream, dis_style_immediate,
   10729   1.1  christos 				  "0x%08lx", value);
   10730   1.1  christos 
   10731   1.1  christos 			    /* Some SWI instructions have special
   10732   1.1  christos 			       meanings.  */
   10733  1.10  christos 			    if ((given & 0x0fffffff) == 0x0FF00000)
   10734  1.10  christos 			      func (stream, dis_style_comment_start,
   10735   1.1  christos 				    "\t@ IMB");
   10736  1.10  christos 			    else if ((given & 0x0fffffff) == 0x0FF00001)
   10737  1.10  christos 			      func (stream, dis_style_comment_start,
   10738   1.1  christos 				    "\t@ IMBRange");
   10739   1.1  christos 			    break;
   10740  1.10  christos 			  case 'X':
   10741  1.10  christos 			    func (stream, dis_style_immediate,
   10742   1.1  christos 				  "%01lx", value & 0xf);
   10743   1.1  christos 			    value_in_comment = value;
   10744   1.1  christos 			    break;
   10745   1.1  christos 			  case '`':
   10746   1.1  christos 			    c++;
   10747  1.10  christos 			    if (value == 0)
   10748   1.1  christos 			      func (stream, dis_style_text, "%c", *c);
   10749   1.1  christos 			    break;
   10750   1.1  christos 			  case '\'':
   10751   1.1  christos 			    c++;
   10752  1.10  christos 			    if (value == ((1ul << width) - 1))
   10753   1.1  christos 			      func (stream, base_style, "%c", *c);
   10754   1.1  christos 			    break;
   10755  1.10  christos 			  case '?':
   10756  1.10  christos 			    func (stream, base_style, "%c",
   10757   1.1  christos 				  c[(1 << width) - (int) value]);
   10758   1.1  christos 			    c += 1 << width;
   10759   1.1  christos 			    break;
   10760   1.1  christos 			  default:
   10761   1.1  christos 			    abort ();
   10762   1.9  christos 			  }
   10763   1.9  christos 		      }
   10764   1.1  christos 		      break;
   10765   1.9  christos 
   10766   1.9  christos 		    case 'e':
   10767   1.9  christos 		      {
   10768   1.1  christos 			int imm;
   10769   1.9  christos 
   10770  1.10  christos 			imm = (given & 0xf) | ((given & 0xfff00) >> 4);
   10771   1.9  christos 			func (stream, dis_style_immediate, "%d", imm);
   10772   1.9  christos 			value_in_comment = imm;
   10773   1.9  christos 		      }
   10774   1.1  christos 		      break;
   10775   1.9  christos 
   10776   1.9  christos 		    case 'E':
   10777   1.9  christos 		      /* LSB and WIDTH fields of BFI or BFC.  The machine-
   10778   1.9  christos 			 language instruction encodes LSB and MSB.  */
   10779   1.9  christos 		      {
   10780   1.9  christos 			long msb = (given & 0x001f0000) >> 16;
   10781   1.9  christos 			long lsb = (given & 0x00000f80) >> 7;
   10782   1.1  christos 			long w = msb - lsb + 1;
   10783   1.9  christos 
   10784  1.10  christos 			if (w > 0)
   10785  1.10  christos 			  {
   10786  1.10  christos 			    func (stream, dis_style_immediate, "#%lu", lsb);
   10787  1.10  christos 			    func (stream, dis_style_text, ", ");
   10788  1.10  christos 			    func (stream, dis_style_immediate, "#%lu", w);
   10789   1.9  christos 			  }
   10790  1.10  christos 			else
   10791  1.10  christos 			  func (stream, dis_style_text,
   10792   1.9  christos 				"(invalid: %lu:%lu)", lsb, msb);
   10793   1.9  christos 		      }
   10794   1.1  christos 		      break;
   10795   1.9  christos 
   10796   1.9  christos 		    case 'R':
   10797   1.9  christos 		      /* Get the PSR/banked register name.  */
   10798   1.9  christos 		      {
   10799   1.9  christos 			const char * name;
   10800   1.1  christos 			unsigned sysm = (given & 0x004f0000) >> 16;
   10801   1.9  christos 
   10802   1.9  christos 			sysm |= (given & 0x300) >> 4;
   10803   1.1  christos 			name = banked_regname (sysm);
   10804   1.9  christos 
   10805  1.10  christos 			if (name != NULL)
   10806   1.9  christos 			  func (stream, dis_style_register, "%s", name);
   10807  1.10  christos 			else
   10808  1.10  christos 			  func (stream, dis_style_text,
   10809   1.9  christos 				"(UNDEF: %lu)", (unsigned long) sysm);
   10810   1.9  christos 		      }
   10811   1.1  christos 		      break;
   10812   1.9  christos 
   10813   1.9  christos 		    case 'V':
   10814   1.9  christos 		      /* 16-bit unsigned immediate from a MOVT or MOVW
   10815   1.9  christos 			 instruction, encoded in bits 0:11 and 15:19.  */
   10816   1.9  christos 		      {
   10817   1.9  christos 			long hi = (given & 0x000f0000) >> 4;
   10818   1.9  christos 			long lo = (given & 0x00000fff);
   10819   1.1  christos 			long imm16 = hi | lo;
   10820  1.10  christos 
   10821   1.9  christos 			func (stream, dis_style_immediate, "#%lu", imm16);
   10822   1.9  christos 			value_in_comment = imm16;
   10823   1.9  christos 		      }
   10824   1.1  christos 		      break;
   10825   1.9  christos 
   10826   1.9  christos 		    default:
   10827   1.1  christos 		      abort ();
   10828   1.1  christos 		    }
   10829   1.1  christos 		}
   10830  1.10  christos 	      else
   10831  1.10  christos 		{
   10832  1.10  christos 
   10833  1.10  christos 		  if (*c == '@')
   10834  1.10  christos 		    base_style = dis_style_comment_start;
   10835  1.10  christos 
   10836  1.10  christos 		  if (*c == '\t')
   10837  1.10  christos 		    base_style = dis_style_text;
   10838  1.10  christos 
   10839  1.10  christos 		  func (stream, base_style, "%c", *c);
   10840   1.1  christos 		}
   10841   1.1  christos 	    }
   10842   1.1  christos 
   10843  1.10  christos 	  if (value_in_comment > 32 || value_in_comment < -16)
   10844  1.10  christos 	    func (stream, dis_style_comment_start, "\t@ 0x%lx",
   10845   1.1  christos 		  (value_in_comment & 0xffffffffUL));
   10846   1.1  christos 
   10847  1.10  christos 	  if (is_unpredictable)
   10848   1.1  christos 	    func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   10849   1.1  christos 
   10850   1.1  christos 	  return;
   10851   1.1  christos 	}
   10852  1.10  christos     }
   10853  1.10  christos   func (stream, dis_style_comment_start, UNKNOWN_INSTRUCTION_32BIT,
   10854   1.8  christos 	(unsigned) given);
   10855   1.1  christos   return;
   10856   1.1  christos }
   10857   1.1  christos 
   10858   1.1  christos /* Print one 16-bit Thumb instruction from PC on INFO->STREAM.  */
   10859   1.1  christos 
   10860   1.1  christos static void
   10861   1.1  christos print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
   10862   1.1  christos {
   10863   1.1  christos   const struct opcode16 *insn;
   10864  1.10  christos   void *stream = info->stream;
   10865  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   10866  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   10867   1.1  christos   enum disassembler_style old_base_style = base_style;
   10868   1.1  christos 
   10869   1.1  christos   for (insn = thumb_opcodes; insn->assembler; insn++)
   10870   1.1  christos     if ((given & insn->mask) == insn->value)
   10871   1.1  christos       {
   10872   1.1  christos 	signed long value_in_comment = 0;
   10873   1.1  christos 	const char *c = insn->assembler;
   10874   1.1  christos 
   10875   1.1  christos 	for (; *c; c++)
   10876   1.1  christos 	  {
   10877   1.1  christos 	    int domaskpc = 0;
   10878   1.1  christos 	    int domasklr = 0;
   10879   1.1  christos 
   10880   1.1  christos 	    if (*c != '%')
   10881  1.10  christos 	      {
   10882  1.10  christos 		if (*c == '@')
   10883  1.10  christos 		  base_style = dis_style_comment_start;
   10884  1.10  christos 
   10885  1.10  christos 		if (*c == '\t')
   10886  1.10  christos 		  base_style = dis_style_text;
   10887  1.10  christos 
   10888  1.10  christos 		func (stream, base_style, "%c", *c);
   10889   1.1  christos 
   10890   1.1  christos 		continue;
   10891   1.1  christos 	      }
   10892   1.1  christos 
   10893   1.1  christos 	    switch (*++c)
   10894  1.10  christos 	      {
   10895  1.10  christos 		case '{':
   10896  1.10  christos 		  ++c;
   10897  1.10  christos 		  if (*c == '\0')
   10898  1.10  christos 		    abort ();
   10899  1.10  christos 		  old_base_style = base_style;
   10900  1.10  christos 		  base_style = decode_base_style (*c);
   10901  1.10  christos 		  ++c;
   10902  1.10  christos 		  if (*c != ':')
   10903  1.10  christos 		    abort ();
   10904  1.10  christos 		  break;
   10905  1.10  christos 
   10906  1.10  christos 		case '}':
   10907  1.10  christos 		  base_style = old_base_style;
   10908  1.10  christos 		  break;
   10909   1.1  christos 
   10910  1.10  christos 	      case '%':
   10911   1.1  christos 		func (stream, base_style, "%%");
   10912   1.1  christos 		break;
   10913   1.1  christos 
   10914   1.1  christos 	      case 'c':
   10915  1.10  christos 		if (ifthen_state)
   10916  1.10  christos 		  func (stream, dis_style_mnemonic, "%s",
   10917   1.1  christos 			arm_conditional[IFTHEN_COND]);
   10918   1.1  christos 		break;
   10919   1.1  christos 
   10920   1.1  christos 	      case 'C':
   10921  1.10  christos 		if (ifthen_state)
   10922  1.10  christos 		  func (stream, dis_style_mnemonic, "%s",
   10923   1.1  christos 			arm_conditional[IFTHEN_COND]);
   10924  1.10  christos 		else
   10925   1.1  christos 		  func (stream, dis_style_mnemonic, "s");
   10926   1.1  christos 		break;
   10927   1.1  christos 
   10928   1.1  christos 	      case 'I':
   10929   1.1  christos 		{
   10930   1.1  christos 		  unsigned int tmp;
   10931   1.1  christos 
   10932   1.1  christos 		  ifthen_next_state = given & 0xff;
   10933  1.10  christos 		  for (tmp = given << 1; tmp & 0xf; tmp <<= 1)
   10934  1.10  christos 		    func (stream, dis_style_mnemonic,
   10935  1.10  christos 			  ((given ^ tmp) & 0x10) ? "e" : "t");
   10936  1.10  christos 		  func (stream, dis_style_text, "\t");
   10937  1.10  christos 		  func (stream, dis_style_sub_mnemonic, "%s",
   10938   1.1  christos 			arm_conditional[(given >> 4) & 0xf]);
   10939   1.1  christos 		}
   10940   1.1  christos 		break;
   10941   1.1  christos 
   10942   1.1  christos 	      case 'x':
   10943  1.10  christos 		if (ifthen_next_state)
   10944  1.10  christos 		  func (stream, dis_style_comment_start,
   10945   1.1  christos 			"\t@ unpredictable branch in IT block\n");
   10946   1.1  christos 		break;
   10947   1.1  christos 
   10948   1.1  christos 	      case 'X':
   10949  1.10  christos 		if (ifthen_state)
   10950  1.10  christos 		  func (stream, dis_style_comment_start,
   10951   1.1  christos 			"\t@ unpredictable <IT:%s>",
   10952   1.1  christos 			arm_conditional[IFTHEN_COND]);
   10953   1.1  christos 		break;
   10954   1.1  christos 
   10955   1.1  christos 	      case 'S':
   10956   1.1  christos 		{
   10957   1.1  christos 		  long reg;
   10958   1.1  christos 
   10959   1.1  christos 		  reg = (given >> 3) & 0x7;
   10960   1.1  christos 		  if (given & (1 << 6))
   10961   1.1  christos 		    reg += 8;
   10962  1.10  christos 
   10963   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[reg]);
   10964   1.1  christos 		}
   10965   1.1  christos 		break;
   10966   1.1  christos 
   10967   1.1  christos 	      case 'D':
   10968   1.1  christos 		{
   10969   1.1  christos 		  long reg;
   10970   1.1  christos 
   10971   1.1  christos 		  reg = given & 0x7;
   10972   1.1  christos 		  if (given & (1 << 7))
   10973   1.1  christos 		    reg += 8;
   10974  1.10  christos 
   10975   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[reg]);
   10976   1.1  christos 		}
   10977   1.1  christos 		break;
   10978   1.1  christos 
   10979   1.1  christos 	      case 'N':
   10980   1.1  christos 		if (given & (1 << 8))
   10981   1.1  christos 		  domasklr = 1;
   10982   1.1  christos 		/* Fall through.  */
   10983   1.1  christos 	      case 'O':
   10984   1.1  christos 		if (*c == 'O' && (given & (1 << 8)))
   10985   1.1  christos 		  domaskpc = 1;
   10986   1.1  christos 		/* Fall through.  */
   10987   1.1  christos 	      case 'M':
   10988   1.1  christos 		{
   10989   1.1  christos 		  int started = 0;
   10990   1.1  christos 		  int reg;
   10991  1.10  christos 
   10992   1.1  christos 		  func (stream, dis_style_text, "{");
   10993   1.1  christos 
   10994   1.1  christos 		  /* It would be nice if we could spot
   10995   1.1  christos 		     ranges, and generate the rS-rE format: */
   10996   1.1  christos 		  for (reg = 0; (reg < 8); reg++)
   10997   1.1  christos 		    if ((given & (1 << reg)) != 0)
   10998   1.1  christos 		      {
   10999  1.10  christos 			if (started)
   11000   1.1  christos 			  func (stream, dis_style_text, ", ");
   11001  1.10  christos 			started = 1;
   11002  1.10  christos 			func (stream, dis_style_register, "%s",
   11003   1.1  christos 			      arm_regnames[reg]);
   11004   1.1  christos 		      }
   11005   1.1  christos 
   11006   1.1  christos 		  if (domasklr)
   11007   1.1  christos 		    {
   11008  1.10  christos 		      if (started)
   11009   1.1  christos 			func (stream, dis_style_text, ", ");
   11010  1.10  christos 		      started = 1;
   11011  1.10  christos 		      func (stream, dis_style_register, "%s",
   11012   1.1  christos 			    arm_regnames[14] /* "lr" */);
   11013   1.1  christos 		    }
   11014   1.1  christos 
   11015   1.1  christos 		  if (domaskpc)
   11016   1.1  christos 		    {
   11017  1.10  christos 		      if (started)
   11018  1.10  christos 			func (stream, dis_style_text, ", ");
   11019  1.10  christos 		      func (stream, dis_style_register, "%s",
   11020   1.1  christos 			    arm_regnames[15] /* "pc" */);
   11021   1.1  christos 		    }
   11022  1.10  christos 
   11023   1.1  christos 		  func (stream, dis_style_text, "}");
   11024   1.1  christos 		}
   11025   1.1  christos 		break;
   11026   1.1  christos 
   11027   1.1  christos 	      case 'W':
   11028   1.1  christos 		/* Print writeback indicator for a LDMIA.  We are doing a
   11029   1.1  christos 		   writeback if the base register is not in the register
   11030   1.1  christos 		   mask.  */
   11031  1.10  christos 		if ((given & (1 << ((given & 0x0700) >> 8))) == 0)
   11032   1.9  christos 		  func (stream, dis_style_text, "!");
   11033   1.1  christos 		break;
   11034   1.1  christos 
   11035   1.1  christos 	      case 'b':
   11036   1.1  christos 		/* Print ARM V6T2 CZB address: pc+4+6 bits.  */
   11037   1.1  christos 		{
   11038   1.1  christos 		  bfd_vma address = (pc + 4
   11039   1.1  christos 				     + ((given & 0x00f8) >> 2)
   11040   1.1  christos 				     + ((given & 0x0200) >> 3));
   11041   1.9  christos 		  info->print_address_func (address, info);
   11042   1.9  christos 
   11043   1.9  christos 		  /* Fill in instruction information.  */
   11044   1.9  christos 		  info->insn_info_valid = 1;
   11045   1.9  christos 		  info->insn_type = dis_branch;
   11046   1.1  christos 		  info->target = address;
   11047   1.1  christos 		}
   11048   1.1  christos 		break;
   11049   1.1  christos 
   11050   1.1  christos 	      case 's':
   11051   1.1  christos 		/* Right shift immediate -- bits 6..10; 1-31 print
   11052   1.1  christos 		   as themselves, 0 prints as 32.  */
   11053   1.1  christos 		{
   11054   1.1  christos 		  long imm = (given & 0x07c0) >> 6;
   11055   1.1  christos 		  if (imm == 0)
   11056  1.10  christos 		    imm = 32;
   11057   1.1  christos 		  func (stream, dis_style_immediate, "#%ld", imm);
   11058   1.1  christos 		}
   11059   1.1  christos 		break;
   11060   1.1  christos 
   11061   1.1  christos 	      case '0': case '1': case '2': case '3': case '4':
   11062   1.1  christos 	      case '5': case '6': case '7': case '8': case '9':
   11063   1.1  christos 		{
   11064   1.1  christos 		  int bitstart = *c++ - '0';
   11065   1.1  christos 		  int bitend = 0;
   11066   1.1  christos 
   11067   1.1  christos 		  while (*c >= '0' && *c <= '9')
   11068   1.1  christos 		    bitstart = (bitstart * 10) + *c++ - '0';
   11069   1.1  christos 
   11070   1.1  christos 		  switch (*c)
   11071   1.1  christos 		    {
   11072   1.1  christos 		    case '-':
   11073   1.1  christos 		      {
   11074   1.1  christos 			bfd_vma reg;
   11075   1.1  christos 
   11076   1.1  christos 			c++;
   11077   1.1  christos 			while (*c >= '0' && *c <= '9')
   11078   1.1  christos 			  bitend = (bitend * 10) + *c++ - '0';
   11079   1.1  christos 			if (!bitend)
   11080   1.1  christos 			  abort ();
   11081  1.10  christos 			reg = given >> bitstart;
   11082   1.1  christos 			reg &= ((bfd_vma) 2 << (bitend - bitstart)) - 1;
   11083   1.1  christos 
   11084   1.1  christos 			switch (*c)
   11085   1.1  christos 			  {
   11086  1.10  christos 			  case 'r':
   11087  1.10  christos 			    func (stream, dis_style_register, "%s",
   11088   1.1  christos 				  arm_regnames[reg]);
   11089   1.1  christos 			    break;
   11090   1.1  christos 
   11091  1.10  christos 			  case 'd':
   11092  1.10  christos 			    func (stream, dis_style_immediate, "%ld",
   11093   1.1  christos 				  (long) reg);
   11094   1.1  christos 			    value_in_comment = reg;
   11095   1.1  christos 			    break;
   11096   1.1  christos 
   11097  1.10  christos 			  case 'H':
   11098  1.10  christos 			    func (stream, dis_style_immediate, "%ld",
   11099   1.1  christos 				  (long) (reg << 1));
   11100   1.1  christos 			    value_in_comment = reg << 1;
   11101   1.1  christos 			    break;
   11102   1.1  christos 
   11103  1.10  christos 			  case 'W':
   11104  1.10  christos 			    func (stream, dis_style_immediate, "%ld",
   11105   1.1  christos 				  (long) (reg << 2));
   11106   1.1  christos 			    value_in_comment = reg << 2;
   11107   1.1  christos 			    break;
   11108   1.1  christos 
   11109   1.1  christos 			  case 'a':
   11110   1.1  christos 			    /* PC-relative address -- the bottom two
   11111   1.1  christos 			       bits of the address are dropped
   11112   1.1  christos 			       before the calculation.  */
   11113   1.1  christos 			    info->print_address_func
   11114   1.1  christos 			      (((pc + 4) & ~3) + (reg << 2), info);
   11115   1.1  christos 			    value_in_comment = 0;
   11116   1.1  christos 			    break;
   11117   1.1  christos 
   11118  1.10  christos 			  case 'x':
   11119  1.10  christos 			    func (stream, dis_style_immediate, "0x%04lx",
   11120   1.1  christos 				  (long) reg);
   11121   1.1  christos 			    break;
   11122   1.1  christos 
   11123   1.1  christos 			  case 'B':
   11124   1.9  christos 			    reg = ((reg ^ (1 << bitend)) - (1 << bitend));
   11125   1.9  christos 			    bfd_vma target = reg * 2 + pc + 4;
   11126   1.1  christos 			    info->print_address_func (target, info);
   11127   1.9  christos 			    value_in_comment = 0;
   11128   1.9  christos 
   11129   1.9  christos 			    /* Fill in instruction information.  */
   11130   1.9  christos 			    info->insn_info_valid = 1;
   11131   1.9  christos 			    info->insn_type = dis_branch;
   11132   1.1  christos 			    info->target = target;
   11133   1.1  christos 			    break;
   11134   1.1  christos 
   11135  1.10  christos 			  case 'c':
   11136  1.10  christos 			    func (stream, dis_style_mnemonic, "%s",
   11137   1.1  christos 				  arm_conditional [reg]);
   11138   1.1  christos 			    break;
   11139   1.1  christos 
   11140   1.1  christos 			  default:
   11141   1.1  christos 			    abort ();
   11142   1.1  christos 			  }
   11143   1.1  christos 		      }
   11144   1.1  christos 		      break;
   11145   1.1  christos 
   11146   1.1  christos 		    case '\'':
   11147   1.1  christos 		      c++;
   11148  1.10  christos 		      if ((given & (1 << bitstart)) != 0)
   11149   1.1  christos 			func (stream, base_style, "%c", *c);
   11150   1.1  christos 		      break;
   11151   1.1  christos 
   11152   1.1  christos 		    case '?':
   11153   1.1  christos 		      ++c;
   11154  1.10  christos 		      if ((given & (1 << bitstart)) != 0)
   11155   1.1  christos 			func (stream, base_style, "%c", *c++);
   11156  1.10  christos 		      else
   11157   1.1  christos 			func (stream, base_style, "%c", *++c);
   11158   1.1  christos 		      break;
   11159   1.1  christos 
   11160   1.1  christos 		    default:
   11161   1.1  christos 		      abort ();
   11162   1.1  christos 		    }
   11163   1.1  christos 		}
   11164   1.1  christos 		break;
   11165   1.1  christos 
   11166   1.1  christos 	      default:
   11167   1.1  christos 		abort ();
   11168   1.1  christos 	      }
   11169   1.1  christos 	  }
   11170   1.1  christos 
   11171  1.10  christos 	if (value_in_comment > 32 || value_in_comment < -16)
   11172  1.10  christos 	  func (stream, dis_style_comment_start,
   11173   1.1  christos 		"\t@ 0x%lx", value_in_comment);
   11174   1.1  christos 	return;
   11175   1.1  christos       }
   11176   1.1  christos 
   11177  1.10  christos   /* No match.  */
   11178  1.10  christos   func (stream, dis_style_comment_start, UNKNOWN_INSTRUCTION_16BIT,
   11179   1.8  christos 	(unsigned) given);
   11180   1.1  christos   return;
   11181   1.1  christos }
   11182   1.1  christos 
   11183   1.1  christos /* Return the name of an V7M special register.  */
   11184   1.1  christos 
   11185   1.1  christos static const char *
   11186   1.1  christos psr_name (int regno)
   11187   1.1  christos {
   11188   1.1  christos   switch (regno)
   11189   1.7  christos     {
   11190   1.7  christos     case 0x0: return "APSR";
   11191   1.7  christos     case 0x1: return "IAPSR";
   11192   1.7  christos     case 0x2: return "EAPSR";
   11193   1.7  christos     case 0x3: return "PSR";
   11194   1.7  christos     case 0x5: return "IPSR";
   11195   1.7  christos     case 0x6: return "EPSR";
   11196   1.7  christos     case 0x7: return "IEPSR";
   11197   1.7  christos     case 0x8: return "MSP";
   11198   1.7  christos     case 0x9: return "PSP";
   11199   1.7  christos     case 0xa: return "MSPLIM";
   11200   1.7  christos     case 0xb: return "PSPLIM";
   11201   1.7  christos     case 0x10: return "PRIMASK";
   11202   1.7  christos     case 0x11: return "BASEPRI";
   11203   1.7  christos     case 0x12: return "BASEPRI_MAX";
   11204   1.7  christos     case 0x13: return "FAULTMASK";
   11205   1.6  christos     case 0x14: return "CONTROL";
   11206   1.6  christos     case 0x88: return "MSP_NS";
   11207   1.7  christos     case 0x89: return "PSP_NS";
   11208   1.7  christos     case 0x8a: return "MSPLIM_NS";
   11209   1.7  christos     case 0x8b: return "PSPLIM_NS";
   11210   1.7  christos     case 0x90: return "PRIMASK_NS";
   11211   1.7  christos     case 0x91: return "BASEPRI_NS";
   11212   1.7  christos     case 0x93: return "FAULTMASK_NS";
   11213   1.7  christos     case 0x94: return "CONTROL_NS";
   11214   1.1  christos     case 0x98: return "SP_NS";
   11215   1.1  christos     default: return "<unknown>";
   11216   1.1  christos     }
   11217   1.1  christos }
   11218   1.1  christos 
   11219   1.1  christos /* Print one 32-bit Thumb instruction from PC on INFO->STREAM.  */
   11220   1.1  christos 
   11221   1.1  christos static void
   11222   1.1  christos print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
   11223   1.1  christos {
   11224   1.1  christos   const struct opcode32 *insn;
   11225  1.10  christos   void *stream = info->stream;
   11226  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   11227  1.10  christos   bool is_mve = is_mve_architecture (info);
   11228  1.10  christos   enum disassembler_style base_style = dis_style_mnemonic;
   11229   1.1  christos   enum disassembler_style old_base_style = base_style;
   11230  1.10  christos 
   11231   1.1  christos   if (print_insn_coprocessor (pc, info, given, true))
   11232   1.1  christos     return;
   11233  1.10  christos 
   11234   1.9  christos   if (!is_mve && print_insn_neon (info, given, true))
   11235   1.9  christos     return;
   11236   1.9  christos 
   11237   1.9  christos   if (is_mve && print_insn_mve (info, given))
   11238   1.9  christos     return;
   11239  1.10  christos 
   11240   1.9  christos   if (print_insn_cde (info, given, true))
   11241   1.9  christos     return;
   11242  1.10  christos 
   11243   1.1  christos   if (print_insn_generic_coprocessor (pc, info, given, true))
   11244   1.1  christos     return;
   11245   1.1  christos 
   11246   1.1  christos   for (insn = thumb32_opcodes; insn->assembler; insn++)
   11247   1.1  christos     if ((given & insn->mask) == insn->value)
   11248  1.10  christos       {
   11249  1.10  christos 	bool is_clrm = false;
   11250   1.1  christos 	bool is_unpredictable = false;
   11251   1.1  christos 	signed long value_in_comment = 0;
   11252   1.1  christos 	const char *c = insn->assembler;
   11253   1.1  christos 
   11254   1.1  christos 	for (; *c; c++)
   11255   1.1  christos 	  {
   11256   1.1  christos 	    if (*c != '%')
   11257  1.10  christos 	      {
   11258  1.10  christos 		if (*c == '@')
   11259  1.10  christos 		  base_style = dis_style_comment_start;
   11260  1.10  christos 		if (*c == '\t')
   11261  1.10  christos 		  base_style = dis_style_text;
   11262   1.1  christos 		func (stream, base_style, "%c", *c);
   11263   1.1  christos 		continue;
   11264   1.1  christos 	      }
   11265   1.1  christos 
   11266   1.1  christos 	    switch (*++c)
   11267  1.10  christos 	      {
   11268  1.10  christos 	      case '{':
   11269  1.10  christos 		++c;
   11270  1.10  christos 		if (*c == '\0')
   11271  1.10  christos 		  abort ();
   11272  1.10  christos 		old_base_style = base_style;
   11273  1.10  christos 		base_style = decode_base_style (*c);
   11274  1.10  christos 		++c;
   11275  1.10  christos 		if (*c != ':')
   11276  1.10  christos 		  abort ();
   11277  1.10  christos 		break;
   11278  1.10  christos 
   11279  1.10  christos 	      case '}':
   11280  1.10  christos 		base_style = old_base_style;
   11281  1.10  christos 		break;
   11282   1.1  christos 
   11283  1.10  christos 	      case '%':
   11284   1.1  christos 		func (stream, base_style, "%%");
   11285   1.1  christos 		break;
   11286   1.1  christos 
   11287   1.1  christos 	      case 'c':
   11288  1.10  christos 		if (ifthen_state)
   11289  1.10  christos 		  func (stream, dis_style_mnemonic, "%s",
   11290   1.1  christos 			arm_conditional[IFTHEN_COND]);
   11291   1.1  christos 		break;
   11292   1.1  christos 
   11293   1.1  christos 	      case 'x':
   11294  1.10  christos 		if (ifthen_next_state)
   11295  1.10  christos 		  func (stream, dis_style_comment_start,
   11296   1.1  christos 			"\t@ unpredictable branch in IT block\n");
   11297   1.1  christos 		break;
   11298   1.1  christos 
   11299   1.1  christos 	      case 'X':
   11300  1.10  christos 		if (ifthen_state)
   11301  1.10  christos 		  func (stream, dis_style_comment_start,
   11302   1.1  christos 			"\t@ unpredictable <IT:%s>",
   11303   1.1  christos 			arm_conditional[IFTHEN_COND]);
   11304   1.1  christos 		break;
   11305   1.1  christos 
   11306   1.1  christos 	      case 'I':
   11307   1.1  christos 		{
   11308   1.1  christos 		  unsigned int imm12 = 0;
   11309   1.1  christos 
   11310   1.1  christos 		  imm12 |= (given & 0x000000ffu);
   11311   1.1  christos 		  imm12 |= (given & 0x00007000u) >> 4;
   11312  1.10  christos 		  imm12 |= (given & 0x04000000u) >> 15;
   11313   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm12);
   11314   1.1  christos 		  value_in_comment = imm12;
   11315   1.1  christos 		}
   11316   1.1  christos 		break;
   11317   1.1  christos 
   11318   1.1  christos 	      case 'M':
   11319   1.1  christos 		{
   11320   1.1  christos 		  unsigned int bits = 0, imm, imm8, mod;
   11321   1.1  christos 
   11322   1.1  christos 		  bits |= (given & 0x000000ffu);
   11323   1.1  christos 		  bits |= (given & 0x00007000u) >> 4;
   11324   1.1  christos 		  bits |= (given & 0x04000000u) >> 15;
   11325   1.1  christos 		  imm8 = (bits & 0x0ff);
   11326   1.1  christos 		  mod = (bits & 0xf00) >> 8;
   11327   1.1  christos 		  switch (mod)
   11328   1.1  christos 		    {
   11329   1.1  christos 		    case 0: imm = imm8; break;
   11330   1.1  christos 		    case 1: imm = ((imm8 << 16) | imm8); break;
   11331   1.1  christos 		    case 2: imm = ((imm8 << 24) | (imm8 << 8)); break;
   11332   1.1  christos 		    case 3: imm = ((imm8 << 24) | (imm8 << 16) | (imm8 << 8) | imm8); break;
   11333   1.1  christos 		    default:
   11334   1.1  christos 		      mod  = (bits & 0xf80) >> 7;
   11335   1.1  christos 		      imm8 = (bits & 0x07f) | 0x80;
   11336   1.1  christos 		      imm  = (((imm8 << (32 - mod)) | (imm8 >> mod)) & 0xffffffff);
   11337  1.10  christos 		    }
   11338   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11339   1.1  christos 		  value_in_comment = imm;
   11340   1.1  christos 		}
   11341   1.6  christos 		break;
   11342   1.1  christos 
   11343   1.1  christos 	      case 'J':
   11344   1.1  christos 		{
   11345   1.1  christos 		  unsigned int imm = 0;
   11346   1.1  christos 
   11347   1.1  christos 		  imm |= (given & 0x000000ffu);
   11348   1.1  christos 		  imm |= (given & 0x00007000u) >> 4;
   11349   1.1  christos 		  imm |= (given & 0x04000000u) >> 15;
   11350  1.10  christos 		  imm |= (given & 0x000f0000u) >> 4;
   11351   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11352   1.1  christos 		  value_in_comment = imm;
   11353   1.1  christos 		}
   11354   1.1  christos 		break;
   11355   1.1  christos 
   11356   1.1  christos 	      case 'K':
   11357   1.1  christos 		{
   11358   1.1  christos 		  unsigned int imm = 0;
   11359   1.1  christos 
   11360   1.1  christos 		  imm |= (given & 0x000f0000u) >> 16;
   11361   1.1  christos 		  imm |= (given & 0x00000ff0u) >> 0;
   11362  1.10  christos 		  imm |= (given & 0x0000000fu) << 12;
   11363   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11364   1.1  christos 		  value_in_comment = imm;
   11365   1.1  christos 		}
   11366   1.1  christos 		break;
   11367   1.1  christos 
   11368   1.1  christos 	      case 'H':
   11369   1.1  christos 		{
   11370   1.1  christos 		  unsigned int imm = 0;
   11371   1.1  christos 
   11372   1.1  christos 		  imm |= (given & 0x000f0000u) >> 4;
   11373  1.10  christos 		  imm |= (given & 0x00000fffu) >> 0;
   11374   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11375   1.1  christos 		  value_in_comment = imm;
   11376   1.1  christos 		}
   11377   1.1  christos 		break;
   11378   1.1  christos 
   11379   1.1  christos 	      case 'V':
   11380   1.1  christos 		{
   11381   1.1  christos 		  unsigned int imm = 0;
   11382   1.1  christos 
   11383   1.1  christos 		  imm |= (given & 0x00000fffu);
   11384  1.10  christos 		  imm |= (given & 0x000f0000u) >> 4;
   11385   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11386   1.1  christos 		  value_in_comment = imm;
   11387   1.1  christos 		}
   11388   1.1  christos 		break;
   11389   1.1  christos 
   11390   1.1  christos 	      case 'S':
   11391   1.1  christos 		{
   11392   1.1  christos 		  unsigned int reg = (given & 0x0000000fu);
   11393   1.1  christos 		  unsigned int stp = (given & 0x00000030u) >> 4;
   11394   1.1  christos 		  unsigned int imm = 0;
   11395   1.1  christos 		  imm |= (given & 0x000000c0u) >> 6;
   11396   1.1  christos 		  imm |= (given & 0x00007000u) >> 10;
   11397  1.10  christos 
   11398   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[reg]);
   11399   1.1  christos 		  switch (stp)
   11400   1.1  christos 		    {
   11401   1.1  christos 		    case 0:
   11402  1.10  christos 		      if (imm > 0)
   11403  1.10  christos 			{
   11404  1.10  christos 			  func (stream, dis_style_text, ", ");
   11405  1.10  christos 			  func (stream, dis_style_sub_mnemonic, "lsl ");
   11406  1.10  christos 			  func (stream, dis_style_immediate, "#%u", imm);
   11407   1.1  christos 			}
   11408   1.1  christos 		      break;
   11409   1.1  christos 
   11410   1.1  christos 		    case 1:
   11411   1.1  christos 		      if (imm == 0)
   11412  1.10  christos 			imm = 32;
   11413  1.10  christos 		      func (stream, dis_style_text, ", ");
   11414  1.10  christos 		      func (stream, dis_style_sub_mnemonic, "lsr ");
   11415   1.1  christos 		      func (stream, dis_style_immediate, "#%u", imm);
   11416   1.1  christos 		      break;
   11417   1.1  christos 
   11418   1.1  christos 		    case 2:
   11419   1.1  christos 		      if (imm == 0)
   11420  1.10  christos 			imm = 32;
   11421  1.10  christos 		      func (stream, dis_style_text, ", ");
   11422  1.10  christos 		      func (stream, dis_style_sub_mnemonic, "asr ");
   11423   1.1  christos 		      func (stream, dis_style_immediate, "#%u", imm);
   11424   1.1  christos 		      break;
   11425   1.1  christos 
   11426   1.1  christos 		    case 3:
   11427  1.10  christos 		      if (imm == 0)
   11428  1.10  christos 			{
   11429  1.10  christos 			  func (stream, dis_style_text, ", ");
   11430  1.10  christos 			  func (stream, dis_style_sub_mnemonic, "rrx");
   11431   1.1  christos 			}
   11432  1.10  christos 		      else
   11433  1.10  christos 			{
   11434  1.10  christos 			  func (stream, dis_style_text, ", ");
   11435  1.10  christos 			  func (stream, dis_style_sub_mnemonic, "ror ");
   11436  1.10  christos 			  func (stream, dis_style_immediate, "#%u", imm);
   11437   1.1  christos 			}
   11438   1.1  christos 		    }
   11439   1.1  christos 		}
   11440   1.1  christos 		break;
   11441   1.1  christos 
   11442   1.1  christos 	      case 'a':
   11443   1.1  christos 		{
   11444   1.1  christos 		  unsigned int Rn  = (given & 0x000f0000) >> 16;
   11445   1.1  christos 		  unsigned int U   = ! NEGATIVE_BIT_SET;
   11446   1.1  christos 		  unsigned int op  = (given & 0x00000f00) >> 8;
   11447   1.1  christos 		  unsigned int i12 = (given & 0x00000fff);
   11448  1.10  christos 		  unsigned int i8  = (given & 0x000000ff);
   11449   1.1  christos 		  bool writeback = false, postind = false;
   11450   1.1  christos 		  bfd_vma offset = 0;
   11451  1.10  christos 
   11452  1.10  christos 		  func (stream, dis_style_text, "[");
   11453   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[Rn]);
   11454   1.1  christos 		  if (U) /* 12-bit positive immediate offset.  */
   11455   1.1  christos 		    {
   11456   1.1  christos 		      offset = i12;
   11457   1.1  christos 		      if (Rn != 15)
   11458   1.1  christos 			value_in_comment = offset;
   11459   1.1  christos 		    }
   11460   1.1  christos 		  else if (Rn == 15) /* 12-bit negative immediate offset.  */
   11461   1.1  christos 		    offset = - (int) i12;
   11462   1.1  christos 		  else if (op == 0x0) /* Shifted register offset.  */
   11463   1.1  christos 		    {
   11464   1.1  christos 		      unsigned int Rm = (i8 & 0x0f);
   11465   1.1  christos 		      unsigned int sh = (i8 & 0x30) >> 4;
   11466  1.10  christos 
   11467  1.10  christos 		      func (stream, dis_style_text, ", ");
   11468  1.10  christos 		      func (stream, dis_style_register, "%s",
   11469   1.1  christos 			    arm_regnames[Rm]);
   11470  1.10  christos 		      if (sh)
   11471  1.10  christos 			{
   11472  1.10  christos 			  func (stream, dis_style_text, ", ");
   11473  1.10  christos 			  func (stream, dis_style_sub_mnemonic, "lsl ");
   11474  1.10  christos 			  func (stream, dis_style_immediate, "#%u", sh);
   11475  1.10  christos 			}
   11476   1.1  christos 		      func (stream, dis_style_text, "]");
   11477   1.1  christos 		      break;
   11478   1.1  christos 		    }
   11479   1.1  christos 		  else switch (op)
   11480   1.1  christos 		    {
   11481   1.1  christos 		    case 0xE:  /* 8-bit positive immediate offset.  */
   11482   1.1  christos 		      offset = i8;
   11483   1.1  christos 		      break;
   11484   1.1  christos 
   11485   1.1  christos 		    case 0xC:  /* 8-bit negative immediate offset.  */
   11486   1.1  christos 		      offset = -i8;
   11487   1.1  christos 		      break;
   11488   1.1  christos 
   11489   1.1  christos 		    case 0xF:  /* 8-bit + preindex with wb.  */
   11490  1.10  christos 		      offset = i8;
   11491   1.1  christos 		      writeback = true;
   11492   1.1  christos 		      break;
   11493   1.1  christos 
   11494   1.1  christos 		    case 0xD:  /* 8-bit - preindex with wb.  */
   11495  1.10  christos 		      offset = -i8;
   11496   1.1  christos 		      writeback = true;
   11497   1.1  christos 		      break;
   11498   1.1  christos 
   11499   1.1  christos 		    case 0xB:  /* 8-bit + postindex.  */
   11500  1.10  christos 		      offset = i8;
   11501   1.1  christos 		      postind = true;
   11502   1.1  christos 		      break;
   11503   1.1  christos 
   11504   1.1  christos 		    case 0x9:  /* 8-bit - postindex.  */
   11505  1.10  christos 		      offset = -i8;
   11506   1.1  christos 		      postind = true;
   11507   1.1  christos 		      break;
   11508   1.1  christos 
   11509  1.10  christos 		    default:
   11510   1.1  christos 		      func (stream, dis_style_text, ", <undefined>]");
   11511   1.1  christos 		      goto skip;
   11512   1.1  christos 		    }
   11513   1.1  christos 
   11514  1.10  christos 		  if (postind)
   11515  1.10  christos 		    {
   11516  1.10  christos 		      func (stream, dis_style_text, "], ");
   11517  1.10  christos 		      func (stream, dis_style_immediate, "#%d", (int) offset);
   11518   1.1  christos 		    }
   11519   1.1  christos 		  else
   11520   1.1  christos 		    {
   11521  1.10  christos 		      if (offset)
   11522  1.10  christos 			{
   11523  1.10  christos 			  func (stream, dis_style_text, ", ");
   11524  1.10  christos 			  func (stream, dis_style_immediate, "#%d",
   11525  1.10  christos 				(int) offset);
   11526  1.10  christos 			}
   11527   1.1  christos 		      func (stream, dis_style_text, writeback ? "]!" : "]");
   11528   1.1  christos 		    }
   11529   1.1  christos 
   11530   1.1  christos 		  if (Rn == 15)
   11531  1.10  christos 		    {
   11532   1.1  christos 		      func (stream, dis_style_comment_start, "\t@ ");
   11533   1.1  christos 		      info->print_address_func (((pc + 4) & ~3) + offset, info);
   11534   1.1  christos 		    }
   11535   1.1  christos 		}
   11536   1.1  christos 	      skip:
   11537   1.1  christos 		break;
   11538   1.1  christos 
   11539   1.1  christos 	      case 'A':
   11540   1.1  christos 		{
   11541   1.1  christos 		  unsigned int U   = ! NEGATIVE_BIT_SET;
   11542   1.1  christos 		  unsigned int W   = WRITEBACK_BIT_SET;
   11543   1.1  christos 		  unsigned int Rn  = (given & 0x000f0000) >> 16;
   11544   1.1  christos 		  unsigned int off = (given & 0x000000ff);
   11545  1.10  christos 
   11546  1.10  christos 		  func (stream, dis_style_text, "[");
   11547   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[Rn]);
   11548   1.1  christos 
   11549   1.1  christos 		  if (PRE_BIT_SET)
   11550   1.1  christos 		    {
   11551   1.1  christos 		      if (off || !U)
   11552  1.10  christos 			{
   11553  1.10  christos 			  func (stream, dis_style_text, ", ");
   11554  1.10  christos 			  func (stream, dis_style_immediate, "#%c%u",
   11555   1.8  christos 				U ? '+' : '-', off * 4);
   11556   1.1  christos 			  value_in_comment = off * 4 * (U ? 1 : -1);
   11557  1.10  christos 			}
   11558   1.1  christos 		      func (stream, dis_style_text, "]");
   11559  1.10  christos 		      if (W)
   11560   1.1  christos 			func (stream, dis_style_text, "!");
   11561   1.1  christos 		    }
   11562   1.1  christos 		  else
   11563  1.10  christos 		    {
   11564   1.1  christos 		      func (stream, dis_style_text, "], ");
   11565   1.1  christos 		      if (W)
   11566  1.10  christos 			{
   11567  1.10  christos 			  func (stream, dis_style_immediate, "#%c%u",
   11568   1.8  christos 				U ? '+' : '-', off * 4);
   11569   1.1  christos 			  value_in_comment = off * 4 * (U ? 1 : -1);
   11570   1.1  christos 			}
   11571   1.1  christos 		      else
   11572  1.10  christos 			{
   11573  1.10  christos 			  func (stream, dis_style_text, "{");
   11574  1.10  christos 			  func (stream, dis_style_immediate, "%u", off);
   11575   1.1  christos 			  func (stream, dis_style_text, "}");
   11576   1.1  christos 			  value_in_comment = off;
   11577   1.1  christos 			}
   11578   1.1  christos 		    }
   11579   1.1  christos 		}
   11580   1.1  christos 		break;
   11581   1.1  christos 
   11582   1.1  christos 	      case 'w':
   11583   1.1  christos 		{
   11584   1.1  christos 		  unsigned int Sbit = (given & 0x01000000) >> 24;
   11585   1.1  christos 		  unsigned int type = (given & 0x00600000) >> 21;
   11586   1.1  christos 
   11587   1.1  christos 		  switch (type)
   11588  1.10  christos 		    {
   11589  1.10  christos 		    case 0:
   11590  1.10  christos 		      func (stream, dis_style_mnemonic, Sbit ? "sb" : "b");
   11591  1.10  christos 		      break;
   11592  1.10  christos 		    case 1:
   11593  1.10  christos 		      func (stream, dis_style_mnemonic, Sbit ? "sh" : "h");
   11594   1.1  christos 		      break;
   11595   1.1  christos 		    case 2:
   11596  1.10  christos 		      if (Sbit)
   11597   1.1  christos 			func (stream, dis_style_text, "??");
   11598   1.1  christos 		      break;
   11599  1.10  christos 		    case 3:
   11600   1.1  christos 		      func (stream, dis_style_text, "??");
   11601   1.1  christos 		      break;
   11602   1.1  christos 		    }
   11603   1.1  christos 		}
   11604   1.1  christos 		break;
   11605   1.9  christos 
   11606  1.10  christos 	      case 'n':
   11607   1.9  christos 		is_clrm = true;
   11608   1.1  christos 		/* Fall through.  */
   11609   1.1  christos 	      case 'm':
   11610   1.1  christos 		{
   11611   1.1  christos 		  int started = 0;
   11612   1.1  christos 		  int reg;
   11613  1.10  christos 
   11614   1.1  christos 		  func (stream, dis_style_text, "{");
   11615   1.1  christos 		  for (reg = 0; reg < 16; reg++)
   11616   1.1  christos 		    if ((given & (1 << reg)) != 0)
   11617   1.1  christos 		      {
   11618  1.10  christos 			if (started)
   11619   1.1  christos 			  func (stream, dis_style_text, ", ");
   11620   1.9  christos 			started = 1;
   11621  1.10  christos 			if (is_clrm && reg == 13)
   11622  1.10  christos 			  func (stream, dis_style_text, "(invalid: %s)",
   11623   1.9  christos 				arm_regnames[reg]);
   11624  1.10  christos 			else if (is_clrm && reg == 15)
   11625   1.9  christos 			  func (stream, dis_style_register, "%s", "APSR");
   11626  1.10  christos 			else
   11627  1.10  christos 			  func (stream, dis_style_register, "%s",
   11628   1.1  christos 				arm_regnames[reg]);
   11629  1.10  christos 		      }
   11630   1.1  christos 		  func (stream, dis_style_text, "}");
   11631   1.1  christos 		}
   11632   1.1  christos 		break;
   11633   1.1  christos 
   11634   1.1  christos 	      case 'E':
   11635   1.1  christos 		{
   11636   1.1  christos 		  unsigned int msb = (given & 0x0000001f);
   11637   1.1  christos 		  unsigned int lsb = 0;
   11638   1.1  christos 
   11639   1.1  christos 		  lsb |= (given & 0x000000c0u) >> 6;
   11640  1.10  christos 		  lsb |= (given & 0x00007000u) >> 10;
   11641  1.10  christos 		  func (stream, dis_style_immediate, "#%u", lsb);
   11642  1.10  christos 		  func (stream, dis_style_text, ", ");
   11643   1.1  christos 		  func (stream, dis_style_immediate, "#%u", msb - lsb + 1);
   11644   1.1  christos 		}
   11645   1.1  christos 		break;
   11646   1.1  christos 
   11647   1.1  christos 	      case 'F':
   11648   1.1  christos 		{
   11649   1.1  christos 		  unsigned int width = (given & 0x0000001f) + 1;
   11650   1.1  christos 		  unsigned int lsb = 0;
   11651   1.1  christos 
   11652   1.1  christos 		  lsb |= (given & 0x000000c0u) >> 6;
   11653  1.10  christos 		  lsb |= (given & 0x00007000u) >> 10;
   11654  1.10  christos 		  func (stream, dis_style_immediate, "#%u", lsb);
   11655  1.10  christos 		  func (stream, dis_style_text, ", ");
   11656   1.1  christos 		  func (stream, dis_style_immediate, "#%u", width);
   11657   1.1  christos 		}
   11658   1.1  christos 		break;
   11659   1.9  christos 
   11660   1.9  christos 	      case 'G':
   11661   1.9  christos 		{
   11662  1.10  christos 		  unsigned int boff = (((given & 0x07800000) >> 23) << 1);
   11663   1.9  christos 		  func (stream, dis_style_immediate, "%x", boff);
   11664   1.9  christos 		}
   11665   1.9  christos 		break;
   11666   1.9  christos 
   11667   1.9  christos 	      case 'W':
   11668   1.9  christos 		{
   11669   1.9  christos 		  unsigned int immA = (given & 0x001f0000u) >> 16;
   11670   1.9  christos 		  unsigned int immB = (given & 0x000007feu) >> 1;
   11671   1.9  christos 		  unsigned int immC = (given & 0x00000800u) >> 11;
   11672   1.9  christos 		  bfd_vma offset = 0;
   11673   1.9  christos 
   11674   1.9  christos 		  offset |= immA << 12;
   11675   1.9  christos 		  offset |= immB << 2;
   11676   1.9  christos 		  offset |= immC << 1;
   11677   1.9  christos 		  /* Sign extend.  */
   11678   1.9  christos 		  offset = (offset & 0x10000) ? offset - (1 << 17) : offset;
   11679   1.9  christos 
   11680   1.9  christos 		  info->print_address_func (pc + 4 + offset, info);
   11681   1.9  christos 		}
   11682   1.9  christos 		break;
   11683   1.9  christos 
   11684   1.9  christos 	      case 'Y':
   11685   1.9  christos 		{
   11686   1.9  christos 		  unsigned int immA = (given & 0x007f0000u) >> 16;
   11687   1.9  christos 		  unsigned int immB = (given & 0x000007feu) >> 1;
   11688   1.9  christos 		  unsigned int immC = (given & 0x00000800u) >> 11;
   11689   1.9  christos 		  bfd_vma offset = 0;
   11690   1.9  christos 
   11691   1.9  christos 		  offset |= immA << 12;
   11692   1.9  christos 		  offset |= immB << 2;
   11693   1.9  christos 		  offset |= immC << 1;
   11694   1.9  christos 		  /* Sign extend.  */
   11695   1.9  christos 		  offset = (offset & 0x40000) ? offset - (1 << 19) : offset;
   11696   1.9  christos 
   11697   1.9  christos 		  info->print_address_func (pc + 4 + offset, info);
   11698   1.9  christos 		}
   11699   1.9  christos 		break;
   11700   1.9  christos 
   11701   1.9  christos 	      case 'Z':
   11702   1.9  christos 		{
   11703   1.9  christos 		  unsigned int immA = (given & 0x00010000u) >> 16;
   11704   1.9  christos 		  unsigned int immB = (given & 0x000007feu) >> 1;
   11705   1.9  christos 		  unsigned int immC = (given & 0x00000800u) >> 11;
   11706   1.9  christos 		  bfd_vma offset = 0;
   11707   1.9  christos 
   11708   1.9  christos 		  offset |= immA << 12;
   11709   1.9  christos 		  offset |= immB << 2;
   11710   1.9  christos 		  offset |= immC << 1;
   11711   1.9  christos 		  /* Sign extend.  */
   11712   1.9  christos 		  offset = (offset & 0x1000) ? offset - (1 << 13) : offset;
   11713   1.9  christos 
   11714   1.9  christos 		  info->print_address_func (pc + 4 + offset, info);
   11715   1.9  christos 
   11716   1.9  christos 		  unsigned int T    = (given & 0x00020000u) >> 17;
   11717   1.9  christos 		  unsigned int endoffset = (((given & 0x07800000) >> 23) << 1);
   11718  1.10  christos 		  unsigned int boffset   = (T == 1) ? 4 : 2;
   11719  1.10  christos 		  func (stream, dis_style_text, ", ");
   11720  1.10  christos 		  func (stream, dis_style_immediate, "%x",
   11721   1.9  christos 			endoffset + boffset);
   11722   1.9  christos 		}
   11723   1.9  christos 		break;
   11724   1.9  christos 
   11725   1.9  christos 	      case 'Q':
   11726   1.9  christos 		{
   11727   1.9  christos 		  unsigned int immh = (given & 0x000007feu) >> 1;
   11728   1.9  christos 		  unsigned int imml = (given & 0x00000800u) >> 11;
   11729   1.9  christos 		  bfd_vma imm32 = 0;
   11730   1.9  christos 
   11731   1.9  christos 		  imm32 |= immh << 2;
   11732   1.9  christos 		  imm32 |= imml << 1;
   11733   1.9  christos 
   11734   1.9  christos 		  info->print_address_func (pc + 4 + imm32, info);
   11735   1.9  christos 		}
   11736   1.9  christos 		break;
   11737   1.9  christos 
   11738   1.9  christos 	      case 'P':
   11739   1.9  christos 		{
   11740   1.9  christos 		  unsigned int immh = (given & 0x000007feu) >> 1;
   11741   1.9  christos 		  unsigned int imml = (given & 0x00000800u) >> 11;
   11742   1.9  christos 		  bfd_vma imm32 = 0;
   11743   1.9  christos 
   11744   1.9  christos 		  imm32 |= immh << 2;
   11745   1.9  christos 		  imm32 |= imml << 1;
   11746   1.9  christos 
   11747   1.9  christos 		  info->print_address_func (pc + 4 - imm32, info);
   11748   1.9  christos 		}
   11749   1.9  christos 		break;
   11750   1.1  christos 
   11751   1.1  christos 	      case 'b':
   11752   1.1  christos 		{
   11753   1.1  christos 		  unsigned int S = (given & 0x04000000u) >> 26;
   11754   1.1  christos 		  unsigned int J1 = (given & 0x00002000u) >> 13;
   11755   1.1  christos 		  unsigned int J2 = (given & 0x00000800u) >> 11;
   11756   1.1  christos 		  bfd_vma offset = 0;
   11757   1.1  christos 
   11758   1.1  christos 		  offset |= !S << 20;
   11759   1.1  christos 		  offset |= J2 << 19;
   11760   1.1  christos 		  offset |= J1 << 18;
   11761   1.1  christos 		  offset |= (given & 0x003f0000) >> 4;
   11762   1.1  christos 		  offset |= (given & 0x000007ff) << 1;
   11763   1.1  christos 		  offset -= (1 << 20);
   11764   1.9  christos 
   11765   1.9  christos 		  bfd_vma target = pc + 4 + offset;
   11766   1.9  christos 		  info->print_address_func (target, info);
   11767   1.9  christos 
   11768   1.9  christos 		  /* Fill in instruction information.  */
   11769   1.9  christos 		  info->insn_info_valid = 1;
   11770   1.9  christos 		  info->insn_type = dis_branch;
   11771   1.1  christos 		  info->target = target;
   11772   1.1  christos 		}
   11773   1.1  christos 		break;
   11774   1.1  christos 
   11775   1.1  christos 	      case 'B':
   11776   1.1  christos 		{
   11777   1.1  christos 		  unsigned int S = (given & 0x04000000u) >> 26;
   11778   1.1  christos 		  unsigned int I1 = (given & 0x00002000u) >> 13;
   11779   1.1  christos 		  unsigned int I2 = (given & 0x00000800u) >> 11;
   11780   1.1  christos 		  bfd_vma offset = 0;
   11781   1.1  christos 
   11782   1.1  christos 		  offset |= !S << 24;
   11783   1.1  christos 		  offset |= !(I1 ^ S) << 23;
   11784   1.1  christos 		  offset |= !(I2 ^ S) << 22;
   11785   1.1  christos 		  offset |= (given & 0x03ff0000u) >> 4;
   11786   1.1  christos 		  offset |= (given & 0x000007ffu) << 1;
   11787   1.1  christos 		  offset -= (1 << 24);
   11788   1.1  christos 		  offset += pc + 4;
   11789   1.1  christos 
   11790   1.1  christos 		  /* BLX target addresses are always word aligned.  */
   11791   1.1  christos 		  if ((given & 0x00001000u) == 0)
   11792   1.1  christos 		      offset &= ~2u;
   11793   1.1  christos 
   11794   1.9  christos 		  info->print_address_func (offset, info);
   11795   1.9  christos 
   11796   1.9  christos 		  /* Fill in instruction information.  */
   11797   1.9  christos 		  info->insn_info_valid = 1;
   11798   1.9  christos 		  info->insn_type = dis_branch;
   11799   1.1  christos 		  info->target = offset;
   11800   1.1  christos 		}
   11801   1.1  christos 		break;
   11802   1.1  christos 
   11803   1.1  christos 	      case 's':
   11804   1.1  christos 		{
   11805   1.1  christos 		  unsigned int shift = 0;
   11806   1.1  christos 
   11807   1.1  christos 		  shift |= (given & 0x000000c0u) >> 6;
   11808   1.1  christos 		  shift |= (given & 0x00007000u) >> 10;
   11809  1.10  christos 		  if (WRITEBACK_BIT_SET)
   11810  1.10  christos 		    {
   11811  1.10  christos 		      func (stream, dis_style_text, ", ");
   11812  1.10  christos 		      func (stream, dis_style_sub_mnemonic, "asr ");
   11813  1.10  christos 		      func (stream, dis_style_immediate, "#%u", shift);
   11814   1.1  christos 		    }
   11815  1.10  christos 		  else if (shift)
   11816  1.10  christos 		    {
   11817  1.10  christos 		      func (stream, dis_style_text, ", ");
   11818  1.10  christos 		      func (stream, dis_style_sub_mnemonic, "lsl ");
   11819  1.10  christos 		      func (stream, dis_style_immediate, "#%u", shift);
   11820   1.1  christos 		    }
   11821   1.1  christos 		  /* else print nothing - lsl #0 */
   11822   1.1  christos 		}
   11823   1.1  christos 		break;
   11824   1.1  christos 
   11825   1.1  christos 	      case 'R':
   11826   1.1  christos 		{
   11827   1.1  christos 		  unsigned int rot = (given & 0x00000030) >> 4;
   11828   1.1  christos 
   11829  1.10  christos 		  if (rot)
   11830  1.10  christos 		    {
   11831  1.10  christos 		      func (stream, dis_style_text, ", ");
   11832  1.10  christos 		      func (stream, dis_style_sub_mnemonic, "ror ");
   11833  1.10  christos 		      func (stream, dis_style_immediate, "#%u", rot * 8);
   11834   1.1  christos 		    }
   11835   1.1  christos 		}
   11836   1.1  christos 		break;
   11837   1.1  christos 
   11838   1.6  christos 	      case 'U':
   11839   1.1  christos 		if ((given & 0xf0) == 0x60)
   11840   1.1  christos 		  {
   11841   1.1  christos 		    switch (given & 0xf)
   11842  1.10  christos 		      {
   11843  1.10  christos 		      case 0xf:
   11844  1.10  christos 			func (stream, dis_style_sub_mnemonic, "sy");
   11845  1.10  christos 			break;
   11846  1.10  christos 		      default:
   11847  1.10  christos 			func (stream, dis_style_immediate, "#%d",
   11848  1.10  christos 			      (int) given & 0xf);
   11849   1.1  christos 			break;
   11850   1.1  christos 		      }
   11851   1.6  christos 		  }
   11852   1.1  christos 		else
   11853   1.1  christos 		  {
   11854   1.1  christos 		    const char * opt = data_barrier_option (given & 0xf);
   11855  1.10  christos 		    if (opt != NULL)
   11856   1.1  christos 		      func (stream, dis_style_sub_mnemonic, "%s", opt);
   11857  1.10  christos 		    else
   11858  1.10  christos 		      func (stream, dis_style_immediate, "#%d",
   11859   1.1  christos 			    (int) given & 0xf);
   11860   1.1  christos 		   }
   11861   1.1  christos 		break;
   11862   1.1  christos 
   11863   1.1  christos 	      case 'C':
   11864   1.1  christos 		if ((given & 0xff) == 0)
   11865  1.10  christos 		  {
   11866  1.10  christos 		    func (stream, dis_style_register, "%cPSR_",
   11867  1.10  christos 			  (given & 0x100000) ? 'S' : 'C');
   11868   1.1  christos 
   11869  1.10  christos 		    if (given & 0x800)
   11870   1.1  christos 		      func (stream, dis_style_register, "f");
   11871  1.10  christos 		    if (given & 0x400)
   11872   1.1  christos 		      func (stream, dis_style_register, "s");
   11873  1.10  christos 		    if (given & 0x200)
   11874   1.1  christos 		      func (stream, dis_style_register, "x");
   11875  1.10  christos 		    if (given & 0x100)
   11876   1.1  christos 		      func (stream, dis_style_register, "c");
   11877   1.1  christos 		  }
   11878   1.1  christos 		else if ((given & 0x20) == 0x20)
   11879   1.1  christos 		  {
   11880   1.1  christos 		    char const* name;
   11881   1.1  christos 		    unsigned sysm = (given & 0xf00) >> 8;
   11882   1.1  christos 
   11883   1.1  christos 		    sysm |= (given & 0x30);
   11884   1.1  christos 		    sysm |= (given & 0x00100000) >> 14;
   11885   1.6  christos 		    name = banked_regname (sysm);
   11886   1.1  christos 
   11887  1.10  christos 		    if (name != NULL)
   11888   1.1  christos 		      func (stream, dis_style_register, "%s", name);
   11889  1.10  christos 		    else
   11890  1.10  christos 		      func (stream, dis_style_text,
   11891   1.1  christos 			    "(UNDEF: %lu)", (unsigned long) sysm);
   11892   1.1  christos 		  }
   11893   1.1  christos 		else
   11894  1.10  christos 		  {
   11895  1.10  christos 		    func (stream, dis_style_register, "%s",
   11896   1.1  christos 			  psr_name (given & 0xff));
   11897   1.1  christos 		  }
   11898   1.1  christos 		break;
   11899   1.1  christos 
   11900   1.1  christos 	      case 'D':
   11901   1.1  christos 		if (((given & 0xff) == 0)
   11902   1.1  christos 		    || ((given & 0x20) == 0x20))
   11903   1.1  christos 		  {
   11904   1.1  christos 		    char const* name;
   11905   1.1  christos 		    unsigned sm = (given & 0xf0000) >> 16;
   11906   1.1  christos 
   11907   1.1  christos 		    sm |= (given & 0x30);
   11908   1.1  christos 		    sm |= (given & 0x00100000) >> 14;
   11909   1.1  christos 		    name = banked_regname (sm);
   11910   1.1  christos 
   11911  1.10  christos 		    if (name != NULL)
   11912   1.1  christos 		      func (stream, dis_style_register, "%s", name);
   11913  1.10  christos 		    else
   11914  1.10  christos 		      func (stream, dis_style_text,
   11915   1.1  christos 			    "(UNDEF: %lu)", (unsigned long) sm);
   11916   1.1  christos 		  }
   11917  1.10  christos 		else
   11918  1.10  christos 		  func (stream, dis_style_register, "%s",
   11919   1.1  christos 			psr_name (given & 0xff));
   11920   1.1  christos 		break;
   11921   1.1  christos 
   11922   1.1  christos 	      case '0': case '1': case '2': case '3': case '4':
   11923   1.1  christos 	      case '5': case '6': case '7': case '8': case '9':
   11924   1.1  christos 		{
   11925   1.1  christos 		  int width;
   11926   1.1  christos 		  unsigned long val;
   11927   1.1  christos 
   11928   1.6  christos 		  c = arm_decode_bitfield (c, given, &val, &width);
   11929   1.1  christos 
   11930   1.1  christos 		  switch (*c)
   11931   1.9  christos 		    {
   11932   1.9  christos 		    case 's':
   11933  1.10  christos 		      if (val <= 3)
   11934  1.10  christos 			func (stream, dis_style_mnemonic, "%s",
   11935   1.9  christos 			      mve_vec_sizename[val]);
   11936  1.10  christos 		      else
   11937   1.9  christos 			func (stream, dis_style_text, "<undef size>");
   11938   1.9  christos 		      break;
   11939   1.1  christos 
   11940  1.10  christos 		    case 'd':
   11941   1.1  christos 		      func (stream, base_style, "%lu", val);
   11942   1.1  christos 		      value_in_comment = val;
   11943   1.1  christos 		      break;
   11944   1.5  christos 
   11945  1.10  christos 		    case 'D':
   11946   1.5  christos 		      func (stream, dis_style_immediate, "%lu", val + 1);
   11947   1.5  christos 		      value_in_comment = val + 1;
   11948   1.5  christos 		      break;
   11949   1.1  christos 
   11950  1.10  christos 		    case 'W':
   11951   1.1  christos 		      func (stream, dis_style_immediate, "%lu", val * 4);
   11952   1.1  christos 		      value_in_comment = val * 4;
   11953   1.1  christos 		      break;
   11954   1.9  christos 
   11955   1.9  christos 		    case 'S':
   11956  1.10  christos 		      if (val == 13)
   11957   1.9  christos 			is_unpredictable = true;
   11958   1.1  christos 		      /* Fall through.  */
   11959   1.1  christos 		    case 'R':
   11960  1.10  christos 		      if (val == 15)
   11961   1.1  christos 			is_unpredictable = true;
   11962   1.1  christos 		      /* Fall through.  */
   11963  1.10  christos 		    case 'r':
   11964  1.10  christos 		      func (stream, dis_style_register, "%s",
   11965   1.1  christos 			    arm_regnames[val]);
   11966   1.1  christos 		      break;
   11967   1.1  christos 
   11968  1.10  christos 		    case 'c':
   11969   1.1  christos 		      func (stream, base_style, "%s", arm_conditional[val]);
   11970   1.1  christos 		      break;
   11971   1.1  christos 
   11972   1.1  christos 		    case '\'':
   11973   1.1  christos 		      c++;
   11974  1.10  christos 		      if (val == ((1ul << width) - 1))
   11975   1.1  christos 			func (stream, base_style, "%c", *c);
   11976   1.6  christos 		      break;
   11977   1.1  christos 
   11978   1.1  christos 		    case '`':
   11979   1.1  christos 		      c++;
   11980  1.10  christos 		      if (val == 0)
   11981   1.1  christos 			func (stream, dis_style_immediate, "%c", *c);
   11982   1.1  christos 		      break;
   11983   1.1  christos 
   11984  1.10  christos 		    case '?':
   11985  1.10  christos 		      func (stream, dis_style_mnemonic, "%c",
   11986   1.1  christos 			    c[(1 << width) - (int) val]);
   11987   1.1  christos 		      c += 1 << width;
   11988   1.6  christos 		      break;
   11989   1.1  christos 
   11990  1.10  christos 		    case 'x':
   11991  1.10  christos 		      func (stream, dis_style_immediate, "0x%lx",
   11992   1.1  christos 			    val & 0xffffffffUL);
   11993   1.1  christos 		      break;
   11994   1.1  christos 
   11995   1.1  christos 		    default:
   11996   1.1  christos 		      abort ();
   11997   1.1  christos 		    }
   11998   1.1  christos 		}
   11999   1.1  christos 		break;
   12000   1.1  christos 
   12001   1.1  christos 	      case 'L':
   12002   1.1  christos 		/* PR binutils/12534
   12003   1.1  christos 		   If we have a PC relative offset in an LDRD or STRD
   12004   1.1  christos 		   instructions then display the decoded address.  */
   12005   1.1  christos 		if (((given >> 16) & 0xf) == 0xf)
   12006   1.1  christos 		  {
   12007   1.1  christos 		    bfd_vma offset = (given & 0xff) * 4;
   12008   1.1  christos 
   12009   1.1  christos 		    if ((given & (1 << 23)) == 0)
   12010  1.10  christos 		      offset = - offset;
   12011   1.1  christos 		    func (stream, dis_style_comment_start, "\t@ ");
   12012   1.1  christos 		    info->print_address_func ((pc & ~3) + 4 + offset, info);
   12013   1.1  christos 		  }
   12014   1.1  christos 		break;
   12015   1.1  christos 
   12016   1.1  christos 	      default:
   12017   1.1  christos 		abort ();
   12018   1.1  christos 	      }
   12019   1.1  christos 	  }
   12020   1.1  christos 
   12021  1.10  christos 	if (value_in_comment > 32 || value_in_comment < -16)
   12022  1.10  christos 	  func (stream, dis_style_comment_start, "\t@ 0x%lx",
   12023   1.1  christos 		value_in_comment);
   12024   1.1  christos 
   12025  1.10  christos 	if (is_unpredictable)
   12026   1.1  christos 	  func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   12027   1.1  christos 
   12028   1.1  christos 	return;
   12029   1.1  christos       }
   12030   1.1  christos 
   12031  1.10  christos   /* No match.  */
   12032  1.10  christos   func (stream, dis_style_comment_start, UNKNOWN_INSTRUCTION_32BIT,
   12033   1.8  christos 	(unsigned) given);
   12034   1.1  christos   return;
   12035   1.1  christos }
   12036   1.1  christos 
   12037   1.1  christos /* Print data bytes on INFO->STREAM.  */
   12038   1.1  christos 
   12039   1.1  christos static void
   12040   1.1  christos print_insn_data (bfd_vma pc ATTRIBUTE_UNUSED,
   12041   1.1  christos 		 struct disassemble_info *info,
   12042   1.1  christos 		 long given)
   12043  1.10  christos {
   12044  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   12045   1.1  christos 
   12046   1.1  christos   switch (info->bytes_per_chunk)
   12047   1.1  christos     {
   12048  1.10  christos     case 1:
   12049  1.10  christos       func (info->stream, dis_style_assembler_directive, ".byte");
   12050  1.10  christos       func (info->stream, dis_style_text, "\t");
   12051   1.1  christos       func (info->stream, dis_style_immediate, "0x%02lx", given);
   12052   1.1  christos       break;
   12053  1.10  christos     case 2:
   12054  1.10  christos       func (info->stream, dis_style_assembler_directive, ".short");
   12055  1.10  christos       func (info->stream, dis_style_text, "\t");
   12056   1.1  christos       func (info->stream, dis_style_immediate, "0x%04lx", given);
   12057   1.1  christos       break;
   12058  1.10  christos     case 4:
   12059  1.10  christos       func (info->stream, dis_style_assembler_directive, ".word");
   12060  1.10  christos       func (info->stream, dis_style_text, "\t");
   12061   1.1  christos       func (info->stream, dis_style_immediate, "0x%08lx", given);
   12062   1.1  christos       break;
   12063   1.1  christos     default:
   12064   1.1  christos       abort ();
   12065   1.1  christos     }
   12066   1.1  christos }
   12067   1.1  christos 
   12068   1.5  christos /* Disallow mapping symbols ($a, $b, $d, $t etc) from
   12069   1.5  christos    being displayed in symbol relative addresses.
   12070   1.5  christos 
   12071   1.5  christos    Also disallow private symbol, with __tagsym$$ prefix,
   12072   1.1  christos    from ARM RVCT toolchain being displayed.  */
   12073  1.10  christos 
   12074   1.1  christos bool
   12075   1.1  christos arm_symbol_is_valid (asymbol * sym,
   12076   1.1  christos 		     struct disassemble_info * info ATTRIBUTE_UNUSED)
   12077   1.1  christos {
   12078   1.6  christos   const char * name;
   12079   1.1  christos 
   12080  1.10  christos   if (sym == NULL)
   12081   1.1  christos     return false;
   12082   1.1  christos 
   12083   1.1  christos   name = bfd_asymbol_name (sym);
   12084   1.5  christos 
   12085   1.1  christos   return (name && *name != '$' && strncmp (name, "__tagsym$$", 10));
   12086   1.1  christos }
   12087   1.7  christos 
   12088   1.1  christos /* Parse the string of disassembler options.  */
   12089   1.7  christos 
   12090   1.7  christos static void
   12091   1.1  christos parse_arm_disassembler_options (const char *options)
   12092   1.7  christos {
   12093   1.1  christos   const char *opt;
   12094  1.10  christos 
   12095   1.7  christos   force_thumb = false;
   12096   1.1  christos   FOR_EACH_DISASSEMBLER_OPTION (opt, options)
   12097  1.10  christos     {
   12098   1.7  christos       if (startswith (opt, "reg-names-"))
   12099   1.7  christos 	{
   12100   1.7  christos 	  unsigned int i;
   12101   1.7  christos 	  for (i = 0; i < NUM_ARM_OPTIONS; i++)
   12102   1.7  christos 	    if (disassembler_options_cmp (opt, regnames[i].name) == 0)
   12103   1.7  christos 	      {
   12104   1.7  christos 		regname_selected = i;
   12105   1.7  christos 		break;
   12106   1.1  christos 	      }
   12107   1.7  christos 
   12108   1.8  christos 	  if (i >= NUM_ARM_OPTIONS)
   12109   1.8  christos 	    /* xgettext: c-format */
   12110   1.8  christos 	    opcodes_error_handler (_("unrecognised register name set: %s"),
   12111   1.7  christos 				   opt);
   12112  1.10  christos 	}
   12113   1.7  christos       else if (startswith (opt, "force-thumb"))
   12114  1.10  christos 	force_thumb = 1;
   12115   1.7  christos       else if (startswith (opt, "no-force-thumb"))
   12116  1.10  christos 	force_thumb = 0;
   12117   1.9  christos       else if (startswith (opt, "coproc"))
   12118   1.9  christos 	{
   12119   1.9  christos 	  const char *procptr = opt + sizeof ("coproc") - 1;
   12120   1.9  christos 	  char *endptr;
   12121   1.9  christos 	  uint8_t coproc_number = strtol (procptr, &endptr, 10);
   12122   1.9  christos 	  if (endptr != procptr + 1 || coproc_number > 7)
   12123   1.9  christos 	    {
   12124   1.9  christos 	      opcodes_error_handler (_("cde coprocessor not between 0-7: %s"),
   12125   1.9  christos 				     opt);
   12126   1.9  christos 	      continue;
   12127   1.9  christos 	    }
   12128   1.9  christos 	  if (*endptr != '=')
   12129   1.9  christos 	    {
   12130   1.9  christos 	      opcodes_error_handler (_("coproc must have an argument: %s"),
   12131   1.9  christos 				     opt);
   12132   1.9  christos 	      continue;
   12133   1.9  christos 	    }
   12134  1.10  christos 	  endptr += 1;
   12135   1.9  christos 	  if (startswith (endptr, "generic"))
   12136  1.10  christos 	    cde_coprocs &= ~(1 << coproc_number);
   12137  1.10  christos 	  else if (startswith (endptr, "cde")
   12138   1.9  christos 		   || startswith (endptr, "CDE"))
   12139   1.9  christos 	    cde_coprocs |= (1 << coproc_number);
   12140   1.9  christos 	  else
   12141   1.9  christos 	    {
   12142   1.9  christos 	      opcodes_error_handler (
   12143   1.9  christos 		  _("coprocN argument takes options \"generic\","
   12144   1.9  christos 		    " \"cde\", or \"CDE\": %s"), opt);
   12145   1.9  christos 	    }
   12146   1.7  christos 	}
   12147   1.8  christos       else
   12148   1.8  christos 	/* xgettext: c-format */
   12149   1.1  christos 	opcodes_error_handler (_("unrecognised disassembler option: %s"), opt);
   12150   1.1  christos     }
   12151   1.1  christos 
   12152   1.1  christos   return;
   12153   1.1  christos }
   12154  1.10  christos 
   12155   1.6  christos static bool
   12156   1.6  christos mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
   12157   1.6  christos 			 enum map_type *map_symbol);
   12158   1.1  christos 
   12159   1.1  christos /* Search back through the insn stream to determine if this instruction is
   12160   1.1  christos    conditionally executed.  */
   12161   1.1  christos 
   12162   1.1  christos static void
   12163   1.1  christos find_ifthen_state (bfd_vma pc,
   12164  1.10  christos 		   struct disassemble_info *info,
   12165   1.1  christos 		   bool little)
   12166   1.1  christos {
   12167   1.1  christos   unsigned char b[2];
   12168   1.1  christos   unsigned int insn;
   12169   1.1  christos   int status;
   12170   1.1  christos   /* COUNT is twice the number of instructions seen.  It will be odd if we
   12171   1.1  christos      just crossed an instruction boundary.  */
   12172   1.1  christos   int count;
   12173   1.1  christos   int it_count;
   12174   1.1  christos   unsigned int seen_it;
   12175   1.1  christos   bfd_vma addr;
   12176   1.1  christos 
   12177   1.1  christos   ifthen_address = pc;
   12178   1.1  christos   ifthen_state = 0;
   12179   1.1  christos 
   12180   1.1  christos   addr = pc;
   12181   1.1  christos   count = 1;
   12182   1.1  christos   it_count = 0;
   12183   1.1  christos   seen_it = 0;
   12184   1.1  christos   /* Scan backwards looking for IT instructions, keeping track of where
   12185   1.1  christos      instruction boundaries are.  We don't know if something is actually an
   12186   1.1  christos      IT instruction until we find a definite instruction boundary.  */
   12187   1.1  christos   for (;;)
   12188   1.1  christos     {
   12189   1.1  christos       if (addr == 0 || info->symbol_at_address_func (addr, info))
   12190   1.1  christos 	{
   12191   1.1  christos 	  /* A symbol must be on an instruction boundary, and will not
   12192   1.1  christos 	     be within an IT block.  */
   12193   1.1  christos 	  if (seen_it && (count & 1))
   12194   1.1  christos 	    break;
   12195   1.1  christos 
   12196   1.1  christos 	  return;
   12197   1.1  christos 	}
   12198   1.1  christos       addr -= 2;
   12199   1.1  christos       status = info->read_memory_func (addr, (bfd_byte *) b, 2, info);
   12200   1.1  christos       if (status)
   12201   1.1  christos 	return;
   12202   1.1  christos 
   12203   1.1  christos       if (little)
   12204   1.1  christos 	insn = (b[0]) | (b[1] << 8);
   12205   1.1  christos       else
   12206   1.1  christos 	insn = (b[1]) | (b[0] << 8);
   12207   1.1  christos       if (seen_it)
   12208   1.1  christos 	{
   12209   1.1  christos 	  if ((insn & 0xf800) < 0xe800)
   12210   1.1  christos 	    {
   12211   1.1  christos 	      /* Addr + 2 is an instruction boundary.  See if this matches
   12212   1.1  christos 	         the expected boundary based on the position of the last
   12213   1.1  christos 		 IT candidate.  */
   12214   1.1  christos 	      if (count & 1)
   12215   1.1  christos 		break;
   12216   1.1  christos 	      seen_it = 0;
   12217   1.1  christos 	    }
   12218   1.1  christos 	}
   12219   1.1  christos       if ((insn & 0xff00) == 0xbf00 && (insn & 0xf) != 0)
   12220   1.6  christos 	{
   12221  1.10  christos 	  enum map_type type = MAP_ARM;
   12222   1.6  christos 	  bool found = mapping_symbol_for_insn (addr, info, &type);
   12223   1.6  christos 
   12224   1.6  christos 	  if (!found || (found && type == MAP_THUMB))
   12225   1.6  christos 	    {
   12226   1.6  christos 	      /* This could be an IT instruction.  */
   12227   1.6  christos 	      seen_it = insn;
   12228   1.6  christos 	      it_count = count >> 1;
   12229   1.1  christos 	    }
   12230   1.1  christos 	}
   12231   1.1  christos       if ((insn & 0xf800) >= 0xe800)
   12232   1.1  christos 	count++;
   12233   1.1  christos       else
   12234   1.1  christos 	count = (count + 2) | 1;
   12235   1.1  christos       /* IT blocks contain at most 4 instructions.  */
   12236   1.1  christos       if (count >= 8 && !seen_it)
   12237   1.1  christos 	return;
   12238   1.1  christos     }
   12239   1.1  christos   /* We found an IT instruction.  */
   12240   1.1  christos   ifthen_state = (seen_it & 0xe0) | ((seen_it << it_count) & 0x1f);
   12241   1.1  christos   if ((ifthen_state & 0xf) == 0)
   12242   1.1  christos     ifthen_state = 0;
   12243   1.1  christos }
   12244   1.1  christos 
   12245   1.1  christos /* Returns nonzero and sets *MAP_TYPE if the N'th symbol is a
   12246   1.1  christos    mapping symbol.  */
   12247   1.1  christos 
   12248  1.11  christos static int
   12249  1.11  christos is_mapping_symbol (struct disassemble_info *info,
   12250   1.1  christos 		   int n,
   12251   1.1  christos 		   enum map_type *map_type)
   12252  1.11  christos {
   12253   1.1  christos   const char *name = bfd_asymbol_name (info->symtab[n]);
   12254  1.11  christos 
   12255  1.11  christos   if (name[0] == '$'
   12256   1.1  christos       && (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
   12257   1.1  christos       && (name[2] == 0 || name[2] == '.'))
   12258   1.1  christos     {
   12259   1.1  christos       *map_type = ((name[1] == 'a') ? MAP_ARM
   12260   1.1  christos 		   : (name[1] == 't') ? MAP_THUMB
   12261  1.10  christos 		   : MAP_DATA);
   12262   1.1  christos       return true;
   12263   1.1  christos     }
   12264  1.10  christos 
   12265   1.1  christos   return false;
   12266   1.1  christos }
   12267   1.1  christos 
   12268   1.1  christos /* Try to infer the code type (ARM or Thumb) from a mapping symbol.
   12269   1.1  christos    Returns nonzero if *MAP_TYPE was set.  */
   12270   1.1  christos 
   12271   1.1  christos static int
   12272   1.1  christos get_map_sym_type (struct disassemble_info *info,
   12273   1.1  christos 		  int n,
   12274   1.1  christos 		  enum map_type *map_type)
   12275   1.1  christos {
   12276   1.1  christos   /* If the symbol is in a different section, ignore it.  */
   12277  1.10  christos   if (info->section != NULL && info->section != info->symtab[n]->section)
   12278   1.1  christos     return false;
   12279   1.1  christos 
   12280   1.1  christos   return is_mapping_symbol (info, n, map_type);
   12281   1.1  christos }
   12282   1.1  christos 
   12283   1.1  christos /* Try to infer the code type (ARM or Thumb) from a non-mapping symbol.
   12284   1.1  christos    Returns nonzero if *MAP_TYPE was set.  */
   12285   1.1  christos 
   12286   1.1  christos static int
   12287   1.1  christos get_sym_code_type (struct disassemble_info *info,
   12288   1.1  christos 		   int n,
   12289   1.1  christos 		   enum map_type *map_type)
   12290   1.1  christos {
   12291   1.1  christos   elf_symbol_type *es;
   12292  1.11  christos   unsigned int type;
   12293   1.1  christos   asymbol * sym;
   12294   1.1  christos 
   12295   1.1  christos   /* If the symbol is in a different section, ignore it.  */
   12296  1.10  christos   if (info->section != NULL && info->section != info->symtab[n]->section)
   12297   1.1  christos     return false;
   12298  1.11  christos 
   12299  1.11  christos   /* PR 30230: Reject non-ELF symbols, eg synthetic ones.  */
   12300  1.11  christos   sym = info->symtab[n];
   12301  1.11  christos   if (bfd_asymbol_flavour (sym) != bfd_target_elf_flavour)
   12302  1.11  christos     return false;
   12303  1.11  christos 
   12304   1.1  christos   es = (elf_symbol_type *) sym;
   12305   1.1  christos   type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
   12306   1.1  christos 
   12307   1.1  christos   /* If the symbol has function type then use that.  */
   12308   1.1  christos   if (type == STT_FUNC || type == STT_GNU_IFUNC)
   12309   1.6  christos     {
   12310   1.6  christos       if (ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
   12311   1.1  christos 	  == ST_BRANCH_TO_THUMB)
   12312   1.1  christos 	*map_type = MAP_THUMB;
   12313   1.1  christos       else
   12314  1.10  christos 	*map_type = MAP_ARM;
   12315   1.1  christos       return true;
   12316   1.1  christos     }
   12317  1.10  christos 
   12318   1.1  christos   return false;
   12319   1.1  christos }
   12320   1.6  christos 
   12321   1.6  christos /* Search the mapping symbol state for instruction at pc.  This is only
   12322   1.6  christos    applicable for elf target.
   12323   1.6  christos 
   12324   1.6  christos    There is an assumption Here, info->private_data contains the correct AND
   12325   1.6  christos    up-to-date information about current scan process.  The information will be
   12326   1.6  christos    used to speed this search process.
   12327   1.6  christos 
   12328   1.6  christos    Return TRUE if the mapping state can be determined, and map_symbol
   12329   1.6  christos    will be updated accordingly.  Otherwise, return FALSE.  */
   12330  1.10  christos 
   12331   1.6  christos static bool
   12332   1.6  christos mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
   12333   1.6  christos 			 enum map_type *map_symbol)
   12334   1.9  christos {
   12335   1.9  christos   bfd_vma addr, section_vma = 0;
   12336  1.10  christos   int n, last_sym = -1;
   12337  1.10  christos   bool found = false;
   12338  1.10  christos   bool can_use_search_opt_p = false;
   12339  1.10  christos 
   12340  1.10  christos   /* Sanity check.  */
   12341  1.10  christos   if (info == NULL)
   12342   1.9  christos     return false;
   12343   1.9  christos 
   12344   1.9  christos   /* Default to DATA.  A text section is required by the ABI to contain an
   12345   1.9  christos      INSN mapping symbol at the start.  A data section has no such
   12346   1.9  christos      requirement, hence if no mapping symbol is found the section must
   12347   1.9  christos      contain only data.  This however isn't very useful if the user has
   12348   1.9  christos      fully stripped the binaries.  If this is the case use the section
   12349   1.9  christos      attributes to determine the default.  If we have no section default to
   12350   1.9  christos      INSN as well, as we may be disassembling some raw bytes on a baremetal
   12351   1.9  christos      HEX file or similar.  */
   12352   1.9  christos   enum map_type type = MAP_DATA;
   12353   1.9  christos   if ((info->section && info->section->flags & SEC_CODE) || !info->section)
   12354   1.6  christos     type = MAP_ARM;
   12355   1.6  christos   struct arm_private_data *private_data;
   12356  1.10  christos 
   12357  1.10  christos   if (info->private_data == NULL || info->symtab == NULL
   12358   1.6  christos       || info->symtab_size == 0
   12359  1.10  christos       || bfd_asymbol_flavour (*info->symtab) != bfd_target_elf_flavour)
   12360   1.6  christos     return false;
   12361   1.6  christos 
   12362   1.6  christos   private_data = info->private_data;
   12363   1.9  christos 
   12364  1.10  christos   /* First, look for mapping symbols.  */
   12365  1.10  christos   if (pc <= private_data->last_mapping_addr)
   12366  1.10  christos     private_data->last_mapping_sym = -1;
   12367  1.10  christos 
   12368  1.10  christos   /* Start scanning at the start of the function, or wherever
   12369  1.10  christos      we finished last time.  */
   12370  1.10  christos   n = info->symtab_pos + 1;
   12371  1.10  christos 
   12372  1.10  christos   /* If the last stop offset is different from the current one it means we
   12373  1.10  christos      are disassembling a different glob of bytes.  As such the optimization
   12374  1.10  christos      would not be safe and we should start over.  */
   12375  1.10  christos   can_use_search_opt_p
   12376  1.10  christos     = (private_data->last_mapping_sym >= 0
   12377  1.10  christos        && info->stop_offset == private_data->last_stop_offset);
   12378  1.10  christos 
   12379  1.10  christos   if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
   12380  1.10  christos     n = private_data->last_mapping_sym;
   12381  1.10  christos 
   12382  1.10  christos   /* Look down while we haven't passed the location being disassembled.
   12383  1.10  christos      The reason for this is that there's no defined order between a symbol
   12384  1.10  christos      and an mapping symbol that may be at the same address.  We may have to
   12385  1.10  christos      look at least one position ahead.  */
   12386  1.10  christos   for (; n < info->symtab_size; n++)
   12387  1.10  christos     {
   12388  1.10  christos       addr = bfd_asymbol_value (info->symtab[n]);
   12389  1.10  christos       if (addr > pc)
   12390  1.10  christos 	break;
   12391  1.10  christos       if (get_map_sym_type (info, n, &type))
   12392  1.10  christos 	{
   12393  1.10  christos 	  last_sym = n;
   12394  1.10  christos 	  found = true;
   12395  1.10  christos 	}
   12396  1.10  christos     }
   12397  1.10  christos 
   12398  1.10  christos   if (!found)
   12399  1.10  christos     {
   12400  1.10  christos       n = info->symtab_pos;
   12401  1.10  christos       if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
   12402   1.9  christos 	n = private_data->last_mapping_sym;
   12403  1.10  christos 
   12404  1.10  christos       /* No mapping symbol found at this address.  Look backwards
   12405  1.10  christos 	 for a preceeding one, but don't go pass the section start
   12406  1.10  christos 	 otherwise a data section with no mapping symbol can pick up
   12407  1.10  christos 	 a text mapping symbol of a preceeding section.  The documentation
   12408  1.10  christos 	 says section can be NULL, in which case we will seek up all the
   12409  1.10  christos 	 way to the top.  */
   12410  1.10  christos       if (info->section)
   12411   1.9  christos 	section_vma = info->section->vma;
   12412  1.10  christos 
   12413  1.10  christos       for (; n >= 0; n--)
   12414  1.10  christos 	{
   12415  1.10  christos 	  addr = bfd_asymbol_value (info->symtab[n]);
   12416  1.10  christos 	  if (addr < section_vma)
   12417   1.9  christos 	    break;
   12418  1.10  christos 
   12419  1.10  christos 	  if (get_map_sym_type (info, n, &type))
   12420  1.10  christos 	    {
   12421  1.10  christos 	      last_sym = n;
   12422   1.9  christos 	      found = true;
   12423  1.10  christos 	      break;
   12424  1.10  christos 	    }
   12425  1.10  christos 	}
   12426   1.6  christos     }
   12427   1.9  christos 
   12428   1.9  christos   /* If no mapping symbol was found, try looking up without a mapping
   12429   1.9  christos      symbol.  This is done by walking up from the current PC to the nearest
   12430   1.9  christos      symbol.  We don't actually have to loop here since symtab_pos will
   12431   1.9  christos      contain the nearest symbol already.  */
   12432   1.6  christos   if (!found)
   12433   1.9  christos     {
   12434   1.9  christos       n = info->symtab_pos;
   12435   1.6  christos       if (n >= 0 && get_sym_code_type (info, n, &type))
   12436   1.9  christos 	{
   12437  1.10  christos 	  last_sym = n;
   12438   1.6  christos 	  found = true;
   12439   1.6  christos 	}
   12440   1.6  christos     }
   12441   1.9  christos 
   12442   1.9  christos   private_data->last_mapping_sym = last_sym;
   12443   1.9  christos   private_data->last_type = type;
   12444   1.6  christos   private_data->last_stop_offset = info->stop_offset;
   12445   1.6  christos 
   12446   1.6  christos   *map_symbol = type;
   12447   1.6  christos   return found;
   12448   1.6  christos }
   12449   1.1  christos 
   12450   1.1  christos /* Given a bfd_mach_arm_XXX value, this function fills in the fields
   12451   1.8  christos    of the supplied arm_feature_set structure with bitmasks indicating
   12452   1.1  christos    the supported base architectures and coprocessor extensions.
   12453   1.1  christos 
   12454   1.1  christos    FIXME: This could more efficiently implemented as a constant array,
   12455   1.1  christos    although it would also be less robust.  */
   12456   1.1  christos 
   12457   1.1  christos static void
   12458   1.1  christos select_arm_features (unsigned long mach,
   12459   1.1  christos 		     arm_feature_set * features)
   12460   1.8  christos {
   12461   1.8  christos   arm_feature_set arch_fset;
   12462   1.8  christos   const arm_feature_set fpu_any = FPU_ANY;
   12463   1.5  christos 
   12464   1.5  christos #undef ARM_SET_FEATURES
   12465   1.5  christos #define ARM_SET_FEATURES(FSET) \
   12466   1.5  christos   {							\
   12467   1.8  christos     const arm_feature_set fset = FSET;			\
   12468   1.5  christos     arch_fset = fset;					\
   12469   1.1  christos   }
   12470   1.8  christos 
   12471   1.8  christos   /* When several architecture versions share the same bfd_mach_arm_XXX value
   12472   1.1  christos      the most featureful is chosen.  */
   12473   1.1  christos   switch (mach)
   12474   1.8  christos     {
   12475   1.8  christos     case bfd_mach_arm_2:	 ARM_SET_FEATURES (ARM_ARCH_V2); break;
   12476   1.8  christos     case bfd_mach_arm_2a:	 ARM_SET_FEATURES (ARM_ARCH_V2S); break;
   12477   1.8  christos     case bfd_mach_arm_3:	 ARM_SET_FEATURES (ARM_ARCH_V3); break;
   12478   1.8  christos     case bfd_mach_arm_3M:	 ARM_SET_FEATURES (ARM_ARCH_V3M); break;
   12479  1.11  christos     case bfd_mach_arm_4:	 ARM_SET_FEATURES (ARM_ARCH_V4); break;
   12480   1.8  christos     case bfd_mach_arm_ep9312:
   12481   1.8  christos     case bfd_mach_arm_4T:	 ARM_SET_FEATURES (ARM_ARCH_V4T); break;
   12482   1.8  christos     case bfd_mach_arm_5:	 ARM_SET_FEATURES (ARM_ARCH_V5); break;
   12483   1.8  christos     case bfd_mach_arm_5T:	 ARM_SET_FEATURES (ARM_ARCH_V5T); break;
   12484   1.8  christos     case bfd_mach_arm_5TE:	 ARM_SET_FEATURES (ARM_ARCH_V5TE); break;
   12485   1.8  christos     case bfd_mach_arm_XScale:	 ARM_SET_FEATURES (ARM_ARCH_XSCALE); break;
   12486   1.8  christos     case bfd_mach_arm_iWMMXt:	 ARM_SET_FEATURES (ARM_ARCH_IWMMXT); break;
   12487   1.8  christos     case bfd_mach_arm_iWMMXt2:	 ARM_SET_FEATURES (ARM_ARCH_IWMMXT2); break;
   12488   1.8  christos     case bfd_mach_arm_5TEJ:	 ARM_SET_FEATURES (ARM_ARCH_V5TEJ); break;
   12489   1.8  christos     case bfd_mach_arm_6:	 ARM_SET_FEATURES (ARM_ARCH_V6); break;
   12490   1.8  christos     case bfd_mach_arm_6KZ:	 ARM_SET_FEATURES (ARM_ARCH_V6KZ); break;
   12491   1.8  christos     case bfd_mach_arm_6T2:	 ARM_SET_FEATURES (ARM_ARCH_V6KZT2); break;
   12492   1.8  christos     case bfd_mach_arm_6K:	 ARM_SET_FEATURES (ARM_ARCH_V6K); break;
   12493   1.8  christos     case bfd_mach_arm_7:	 ARM_SET_FEATURES (ARM_ARCH_V7VE); break;
   12494   1.8  christos     case bfd_mach_arm_6M:	 ARM_SET_FEATURES (ARM_ARCH_V6M); break;
   12495   1.8  christos     case bfd_mach_arm_6SM:	 ARM_SET_FEATURES (ARM_ARCH_V6SM); break;
   12496   1.8  christos     case bfd_mach_arm_7EM:	 ARM_SET_FEATURES (ARM_ARCH_V7EM); break;
   12497   1.8  christos     case bfd_mach_arm_8:
   12498   1.9  christos 	{
   12499   1.9  christos 	  /* Add bits for extensions that Armv8.6-A recognizes.  */
   12500   1.8  christos 	  arm_feature_set armv8_6_ext_fset
   12501   1.9  christos 	    = ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST);
   12502   1.9  christos 	  ARM_SET_FEATURES (ARM_ARCH_V8_6A);
   12503   1.8  christos 	  ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, armv8_6_ext_fset);
   12504   1.8  christos 	  break;
   12505   1.8  christos 	}
   12506   1.8  christos     case bfd_mach_arm_8R:	 ARM_SET_FEATURES (ARM_ARCH_V8R); break;
   12507   1.8  christos     case bfd_mach_arm_8M_BASE:	 ARM_SET_FEATURES (ARM_ARCH_V8M_BASE); break;
   12508   1.9  christos     case bfd_mach_arm_8M_MAIN:	 ARM_SET_FEATURES (ARM_ARCH_V8M_MAIN); break;
   12509   1.9  christos     case bfd_mach_arm_8_1M_MAIN:
   12510   1.9  christos       ARM_SET_FEATURES (ARM_ARCH_V8_1M_MAIN);
   12511   1.9  christos       arm_feature_set mve_all
   12512   1.9  christos 	= ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE | ARM_EXT2_MVE_FP);
   12513   1.9  christos       ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, mve_all);
   12514   1.9  christos       force_thumb = 1;
   12515  1.10  christos       break;
   12516   1.8  christos     case bfd_mach_arm_9:         ARM_SET_FEATURES (ARM_ARCH_V9A); break;
   12517   1.9  christos       /* If the machine type is unknown allow all architecture types and all
   12518   1.9  christos 	 extensions, with the exception of MVE as that clashes with NEON.  */
   12519  1.10  christos     case bfd_mach_arm_unknown:
   12520   1.9  christos       ARM_SET_FEATURES (ARM_ARCH_UNKNOWN);
   12521   1.1  christos       break;
   12522   1.1  christos     default:
   12523   1.1  christos       abort ();
   12524   1.8  christos     }
   12525   1.5  christos #undef ARM_SET_FEATURES
   12526   1.8  christos 
   12527   1.8  christos   /* None of the feature bits related to -mfpu have an impact on Tag_CPU_arch
   12528   1.8  christos      and thus on bfd_mach_arm_XXX value.  Therefore for a given
   12529   1.8  christos      bfd_mach_arm_XXX value all coprocessor feature bits should be allowed.  */
   12530   1.1  christos   ARM_MERGE_FEATURE_SETS (*features, arch_fset, fpu_any);
   12531   1.1  christos }
   12532   1.1  christos 
   12533   1.1  christos 
   12534   1.1  christos /* NOTE: There are no checks in these routines that
   12535   1.1  christos    the relevant number of data bytes exist.  */
   12536   1.1  christos 
   12537  1.10  christos static int
   12538   1.1  christos print_insn (bfd_vma pc, struct disassemble_info *info, bool little)
   12539   1.1  christos {
   12540   1.9  christos   unsigned char b[4];
   12541  1.10  christos   unsigned long given;
   12542  1.10  christos   int status;
   12543  1.10  christos   int is_thumb = false;
   12544  1.10  christos   int is_data = false;
   12545   1.1  christos   int little_code;
   12546  1.10  christos   unsigned int	size = 4;
   12547  1.10  christos   void (*printer) (bfd_vma, struct disassemble_info *, long);
   12548   1.1  christos   bool found = false;
   12549   1.1  christos   struct arm_private_data *private_data;
   12550   1.9  christos 
   12551   1.9  christos   /* Clear instruction information field.  */
   12552   1.9  christos   info->insn_info_valid = 0;
   12553   1.9  christos   info->branch_delay_insns = 0;
   12554   1.9  christos   info->data_size = 0;
   12555   1.9  christos   info->insn_type = dis_noninsn;
   12556   1.9  christos   info->target = 0;
   12557   1.9  christos   info->target2 = 0;
   12558   1.1  christos 
   12559   1.1  christos   if (info->disassembler_options)
   12560   1.7  christos     {
   12561   1.1  christos       parse_arm_disassembler_options (info->disassembler_options);
   12562   1.1  christos 
   12563   1.1  christos       /* To avoid repeated parsing of these options, we remove them here.  */
   12564   1.1  christos       info->disassembler_options = NULL;
   12565   1.1  christos     }
   12566   1.1  christos 
   12567   1.1  christos   /* PR 10288: Control which instructions will be disassembled.  */
   12568   1.1  christos   if (info->private_data == NULL)
   12569   1.1  christos     {
   12570   1.1  christos       static struct arm_private_data private;
   12571   1.1  christos 
   12572   1.1  christos       if ((info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
   12573   1.1  christos 	/* If the user did not use the -m command line switch then default to
   12574   1.6  christos 	   disassembling all types of ARM instruction.
   12575   1.1  christos 
   12576   1.1  christos 	   The info->mach value has to be ignored as this will be based on
   12577   1.1  christos 	   the default archictecture for the target and/or hints in the notes
   12578   1.1  christos 	   section, but it will never be greater than the current largest arm
   12579   1.1  christos 	   machine value (iWMMXt2), which is only equivalent to the V5TE
   12580   1.1  christos 	   architecture.  ARM architectures have advanced beyond the machine
   12581   1.1  christos 	   value encoding, and these newer architectures would be ignored if
   12582   1.1  christos 	   the machine value was used.
   12583   1.1  christos 
   12584   1.1  christos 	   Ie the -m switch is used to restrict which instructions will be
   12585   1.1  christos 	   disassembled.  If it is necessary to use the -m switch to tell
   12586   1.1  christos 	   objdump that an ARM binary is being disassembled, eg because the
   12587   1.1  christos 	   input is a raw binary file, but it is also desired to disassemble
   12588   1.1  christos 	   all ARM instructions then use "-marm".  This will select the
   12589   1.1  christos 	   "unknown" arm architecture which is compatible with any ARM
   12590   1.1  christos 	   instruction.  */
   12591   1.1  christos 	  info->mach = bfd_mach_arm_unknown;
   12592   1.1  christos 
   12593   1.1  christos       /* Compute the architecture bitmask from the machine number.
   12594   1.1  christos 	 Note: This assumes that the machine number will not change
   12595   1.1  christos 	 during disassembly....  */
   12596   1.1  christos       select_arm_features (info->mach, & private.features);
   12597   1.1  christos 
   12598   1.1  christos       private.last_mapping_sym = -1;
   12599   1.9  christos       private.last_mapping_addr = 0;
   12600   1.1  christos       private.last_stop_offset = 0;
   12601   1.1  christos 
   12602   1.1  christos       info->private_data = & private;
   12603   1.1  christos     }
   12604   1.1  christos 
   12605   1.1  christos   private_data = info->private_data;
   12606   1.1  christos 
   12607   1.1  christos   /* Decide if our code is going to be little-endian, despite what the
   12608   1.1  christos      function argument might say.  */
   12609   1.1  christos   little_code = ((info->endian_code == BFD_ENDIAN_LITTLE) || little);
   12610   1.1  christos 
   12611   1.1  christos   /* For ELF, consult the symbol table to determine what kind of code
   12612   1.1  christos      or data we have.  */
   12613   1.1  christos   if (info->symtab_size != 0
   12614   1.1  christos       && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
   12615   1.1  christos     {
   12616   1.9  christos       bfd_vma addr;
   12617   1.1  christos       int n;
   12618   1.1  christos       int last_sym = -1;
   12619   1.1  christos       enum map_type type = MAP_ARM;
   12620   1.9  christos 
   12621   1.9  christos       found = mapping_symbol_for_insn (pc, info, &type);
   12622   1.1  christos       last_sym = private_data->last_mapping_sym;
   12623   1.1  christos 
   12624   1.1  christos       is_thumb = (private_data->last_type == MAP_THUMB);
   12625   1.1  christos       is_data = (private_data->last_type == MAP_DATA);
   12626   1.1  christos 
   12627   1.1  christos       /* Look a little bit ahead to see if we should print out
   12628   1.1  christos 	 two or four bytes of data.  If there's a symbol,
   12629   1.1  christos 	 mapping or otherwise, after two bytes then don't
   12630   1.1  christos 	 print more.  */
   12631   1.1  christos       if (is_data)
   12632   1.1  christos 	{
   12633   1.1  christos 	  size = 4 - (pc & 3);
   12634   1.1  christos 	  for (n = last_sym + 1; n < info->symtab_size; n++)
   12635   1.1  christos 	    {
   12636   1.1  christos 	      addr = bfd_asymbol_value (info->symtab[n]);
   12637   1.1  christos 	      if (addr > pc
   12638   1.1  christos 		  && (info->section == NULL
   12639   1.1  christos 		      || info->section == info->symtab[n]->section))
   12640   1.1  christos 		{
   12641   1.1  christos 		  if (addr - pc < size)
   12642   1.1  christos 		    size = addr - pc;
   12643   1.1  christos 		  break;
   12644   1.1  christos 		}
   12645   1.1  christos 	    }
   12646   1.1  christos 	  /* If the next symbol is after three bytes, we need to
   12647   1.1  christos 	     print only part of the data, so that we can use either
   12648   1.1  christos 	     .byte or .short.  */
   12649   1.1  christos 	  if (size == 3)
   12650   1.1  christos 	    size = (pc & 1) ? 1 : 2;
   12651   1.1  christos 	}
   12652   1.1  christos     }
   12653   1.1  christos 
   12654   1.1  christos   if (info->symbols != NULL)
   12655   1.1  christos     {
   12656   1.1  christos       if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
   12657   1.1  christos 	{
   12658   1.1  christos 	  coff_symbol_type * cs;
   12659   1.1  christos 
   12660   1.1  christos 	  cs = coffsymbol (*info->symbols);
   12661   1.1  christos 	  is_thumb = (   cs->native->u.syment.n_sclass == C_THUMBEXT
   12662   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBSTAT
   12663   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBLABEL
   12664   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
   12665   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
   12666   1.1  christos 	}
   12667   1.1  christos       else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
   12668   1.1  christos 	       && !found)
   12669   1.1  christos 	{
   12670   1.1  christos 	  /* If no mapping symbol has been found then fall back to the type
   12671   1.1  christos 	     of the function symbol.  */
   12672   1.1  christos 	  elf_symbol_type *  es;
   12673   1.1  christos 	  unsigned int       type;
   12674   1.1  christos 
   12675   1.1  christos 	  es = *(elf_symbol_type **)(info->symbols);
   12676   1.1  christos 	  type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
   12677   1.6  christos 
   12678   1.6  christos 	  is_thumb =
   12679   1.6  christos 	    ((ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
   12680   1.6  christos 	      == ST_BRANCH_TO_THUMB) || type == STT_ARM_16BIT);
   12681   1.6  christos 	}
   12682   1.6  christos       else if (bfd_asymbol_flavour (*info->symbols)
   12683   1.6  christos 	       == bfd_target_mach_o_flavour)
   12684   1.6  christos 	{
   12685   1.6  christos 	  bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols;
   12686   1.6  christos 
   12687   1.1  christos 	  is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF);
   12688   1.1  christos 	}
   12689   1.1  christos     }
   12690   1.1  christos 
   12691  1.10  christos   if (force_thumb)
   12692   1.1  christos     is_thumb = true;
   12693   1.1  christos 
   12694   1.1  christos   if (is_data)
   12695   1.1  christos     info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
   12696   1.1  christos   else
   12697   1.1  christos     info->display_endian = little_code ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
   12698   1.1  christos 
   12699   1.1  christos   info->bytes_per_line = 4;
   12700   1.1  christos 
   12701   1.1  christos   /* PR 10263: Disassemble data if requested to do so by the user.  */
   12702   1.1  christos   if (is_data && ((info->flags & DISASSEMBLE_DATA) == 0))
   12703   1.1  christos     {
   12704   1.1  christos       int i;
   12705   1.1  christos 
   12706   1.1  christos       /* Size was already set above.  */
   12707   1.1  christos       info->bytes_per_chunk = size;
   12708   1.1  christos       printer = print_insn_data;
   12709   1.1  christos 
   12710   1.1  christos       status = info->read_memory_func (pc, (bfd_byte *) b, size, info);
   12711   1.1  christos       given = 0;
   12712   1.1  christos       if (little)
   12713   1.1  christos 	for (i = size - 1; i >= 0; i--)
   12714   1.1  christos 	  given = b[i] | (given << 8);
   12715   1.1  christos       else
   12716   1.1  christos 	for (i = 0; i < (int) size; i++)
   12717   1.1  christos 	  given = b[i] | (given << 8);
   12718   1.1  christos     }
   12719   1.1  christos   else if (!is_thumb)
   12720   1.1  christos     {
   12721   1.1  christos       /* In ARM mode endianness is a straightforward issue: the instruction
   12722   1.1  christos 	 is four bytes long and is either ordered 0123 or 3210.  */
   12723   1.1  christos       printer = print_insn_arm;
   12724   1.1  christos       info->bytes_per_chunk = 4;
   12725   1.1  christos       size = 4;
   12726   1.1  christos 
   12727   1.1  christos       status = info->read_memory_func (pc, (bfd_byte *) b, 4, info);
   12728   1.9  christos       if (little_code)
   12729   1.1  christos 	given = (b[0]) | (b[1] << 8) | (b[2] << 16) | ((unsigned) b[3] << 24);
   12730   1.9  christos       else
   12731   1.1  christos 	given = (b[3]) | (b[2] << 8) | (b[1] << 16) | ((unsigned) b[0] << 24);
   12732   1.1  christos     }
   12733   1.1  christos   else
   12734   1.1  christos     {
   12735   1.1  christos       /* In Thumb mode we have the additional wrinkle of two
   12736   1.1  christos 	 instruction lengths.  Fortunately, the bits that determine
   12737   1.1  christos 	 the length of the current instruction are always to be found
   12738   1.1  christos 	 in the first two bytes.  */
   12739   1.1  christos       printer = print_insn_thumb16;
   12740   1.1  christos       info->bytes_per_chunk = 2;
   12741   1.1  christos       size = 2;
   12742   1.1  christos 
   12743   1.1  christos       status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
   12744   1.1  christos       if (little_code)
   12745   1.1  christos 	given = (b[0]) | (b[1] << 8);
   12746   1.1  christos       else
   12747   1.1  christos 	given = (b[1]) | (b[0] << 8);
   12748   1.1  christos 
   12749   1.1  christos       if (!status)
   12750   1.1  christos 	{
   12751   1.1  christos 	  /* These bit patterns signal a four-byte Thumb
   12752   1.1  christos 	     instruction.  */
   12753   1.1  christos 	  if ((given & 0xF800) == 0xF800
   12754   1.1  christos 	      || (given & 0xF800) == 0xF000
   12755   1.1  christos 	      || (given & 0xF800) == 0xE800)
   12756   1.1  christos 	    {
   12757   1.1  christos 	      status = info->read_memory_func (pc + 2, (bfd_byte *) b, 2, info);
   12758   1.1  christos 	      if (little_code)
   12759   1.1  christos 		given = (b[0]) | (b[1] << 8) | (given << 16);
   12760   1.1  christos 	      else
   12761   1.1  christos 		given = (b[1]) | (b[0] << 8) | (given << 16);
   12762   1.1  christos 
   12763   1.1  christos 	      printer = print_insn_thumb32;
   12764   1.1  christos 	      size = 4;
   12765   1.1  christos 	    }
   12766   1.1  christos 	}
   12767   1.1  christos 
   12768   1.1  christos       if (ifthen_address != pc)
   12769   1.1  christos 	find_ifthen_state (pc, info, little_code);
   12770   1.1  christos 
   12771   1.1  christos       if (ifthen_state)
   12772   1.1  christos 	{
   12773   1.1  christos 	  if ((ifthen_state & 0xf) == 0x8)
   12774   1.1  christos 	    ifthen_next_state = 0;
   12775   1.1  christos 	  else
   12776   1.1  christos 	    ifthen_next_state = (ifthen_state & 0xe0)
   12777   1.1  christos 				| ((ifthen_state & 0xf) << 1);
   12778   1.1  christos 	}
   12779   1.1  christos     }
   12780   1.1  christos 
   12781   1.1  christos   if (status)
   12782   1.1  christos     {
   12783   1.1  christos       info->memory_error_func (status, pc, info);
   12784   1.1  christos       return -1;
   12785   1.1  christos     }
   12786   1.1  christos   if (info->flags & INSN_HAS_RELOC)
   12787   1.1  christos     /* If the instruction has a reloc associated with it, then
   12788   1.1  christos        the offset field in the instruction will actually be the
   12789   1.1  christos        addend for the reloc.  (We are using REL type relocs).
   12790   1.1  christos        In such cases, we can ignore the pc when computing
   12791   1.1  christos        addresses, since the addend is not currently pc-relative.  */
   12792   1.1  christos     pc = 0;
   12793   1.1  christos 
   12794   1.1  christos   printer (pc, info, given);
   12795   1.1  christos 
   12796   1.1  christos   if (is_thumb)
   12797   1.1  christos     {
   12798   1.1  christos       ifthen_state = ifthen_next_state;
   12799   1.1  christos       ifthen_address += size;
   12800   1.1  christos     }
   12801   1.1  christos   return size;
   12802   1.1  christos }
   12803   1.1  christos 
   12804   1.1  christos int
   12805   1.1  christos print_insn_big_arm (bfd_vma pc, struct disassemble_info *info)
   12806   1.1  christos {
   12807   1.1  christos   /* Detect BE8-ness and record it in the disassembler info.  */
   12808   1.1  christos   if (info->flavour == bfd_target_elf_flavour
   12809   1.1  christos       && info->section != NULL
   12810   1.1  christos       && (elf_elfheader (info->section->owner)->e_flags & EF_ARM_BE8))
   12811   1.1  christos     info->endian_code = BFD_ENDIAN_LITTLE;
   12812  1.10  christos 
   12813   1.1  christos   return print_insn (pc, info, false);
   12814   1.1  christos }
   12815   1.1  christos 
   12816   1.1  christos int
   12817   1.1  christos print_insn_little_arm (bfd_vma pc, struct disassemble_info *info)
   12818  1.10  christos {
   12819   1.1  christos   return print_insn (pc, info, true);
   12820   1.1  christos }
   12821   1.8  christos 
   12822   1.7  christos const disasm_options_and_args_t *
   12823   1.7  christos disassembler_options_arm (void)
   12824   1.8  christos {
   12825   1.7  christos   static disasm_options_and_args_t *opts_and_args;
   12826   1.8  christos 
   12827   1.7  christos   if (opts_and_args == NULL)
   12828   1.8  christos     {
   12829   1.7  christos       disasm_options_t *opts;
   12830   1.8  christos       unsigned int i;
   12831   1.8  christos 
   12832   1.8  christos       opts_and_args = XNEW (disasm_options_and_args_t);
   12833   1.8  christos       opts_and_args->args = NULL;
   12834   1.8  christos 
   12835   1.7  christos       opts = &opts_and_args->options;
   12836   1.7  christos       opts->name = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
   12837   1.8  christos       opts->description = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
   12838   1.7  christos       opts->arg = NULL;
   12839   1.7  christos       for (i = 0; i < NUM_ARM_OPTIONS; i++)
   12840   1.7  christos 	{
   12841   1.7  christos 	  opts->name[i] = regnames[i].name;
   12842   1.7  christos 	  if (regnames[i].description != NULL)
   12843   1.7  christos 	    opts->description[i] = _(regnames[i].description);
   12844   1.7  christos 	  else
   12845   1.7  christos 	    opts->description[i] = NULL;
   12846   1.7  christos 	}
   12847   1.7  christos       /* The array we return must be NULL terminated.  */
   12848   1.7  christos       opts->name[i] = NULL;
   12849   1.7  christos       opts->description[i] = NULL;
   12850   1.7  christos     }
   12851   1.8  christos 
   12852   1.7  christos   return opts_and_args;
   12853   1.7  christos }
   12854   1.1  christos 
   12855   1.1  christos void
   12856   1.1  christos print_arm_disassembler_options (FILE *stream)
   12857   1.7  christos {
   12858   1.1  christos   unsigned int i, max_len = 0;
   12859   1.1  christos   fprintf (stream, _("\n\
   12860   1.1  christos The following ARM specific disassembler options are supported for use with\n\
   12861   1.1  christos the -M switch:\n"));
   12862   1.7  christos 
   12863   1.7  christos   for (i = 0; i < NUM_ARM_OPTIONS; i++)
   12864   1.7  christos     {
   12865   1.7  christos       unsigned int len = strlen (regnames[i].name);
   12866   1.7  christos       if (max_len < len)
   12867   1.7  christos 	max_len = len;
   12868   1.7  christos     }
   12869   1.7  christos 
   12870   1.7  christos   for (i = 0, max_len++; i < NUM_ARM_OPTIONS; i++)
   12871   1.1  christos     fprintf (stream, "  %s%*c %s\n",
   12872   1.7  christos 	     regnames[i].name,
   12873   1.7  christos 	     (int)(max_len - strlen (regnames[i].name)), ' ',
   12874   1.1  christos 	     _(regnames[i].description));
   12875                 }
   12876