Home | History | Annotate | Line # | Download | only in opcodes
arm-dis.c revision 1.10
      1   1.1  christos /* Instruction printing code for the ARM
      2   1.9  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.7  christos #include <assert.h>
     25   1.1  christos 
     26   1.6  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.5  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.6  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.4  christos #include "mach-o.h"
     41   1.1  christos 
     42   1.2     joerg /* Cached mapping symbol state.  */
     43   1.2     joerg enum map_type
     44   1.2     joerg {
     45   1.2     joerg   MAP_ARM,
     46   1.2     joerg   MAP_THUMB,
     47   1.2     joerg   MAP_DATA
     48   1.2     joerg };
     49   1.2     joerg 
     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.2     joerg   /* Track the last type (although this doesn't seem to be useful) */
     56   1.2     joerg   enum map_type last_type;
     57   1.2     joerg 
     58   1.2     joerg   /* Tracking symbol table information */
     59   1.2     joerg   int last_mapping_sym;
     60   1.7  christos 
     61   1.7  christos   /* The end range of the current range being disassembled.  */
     62   1.7  christos   bfd_vma last_stop_offset;
     63   1.2     joerg   bfd_vma last_mapping_addr;
     64   1.1  christos };
     65   1.1  christos 
     66   1.7  christos enum mve_instructions
     67   1.7  christos {
     68   1.7  christos   MVE_VPST,
     69   1.7  christos   MVE_VPT_FP_T1,
     70   1.7  christos   MVE_VPT_FP_T2,
     71   1.7  christos   MVE_VPT_VEC_T1,
     72   1.7  christos   MVE_VPT_VEC_T2,
     73   1.7  christos   MVE_VPT_VEC_T3,
     74   1.7  christos   MVE_VPT_VEC_T4,
     75   1.7  christos   MVE_VPT_VEC_T5,
     76   1.7  christos   MVE_VPT_VEC_T6,
     77   1.7  christos   MVE_VCMP_FP_T1,
     78   1.7  christos   MVE_VCMP_FP_T2,
     79   1.7  christos   MVE_VCMP_VEC_T1,
     80   1.7  christos   MVE_VCMP_VEC_T2,
     81   1.7  christos   MVE_VCMP_VEC_T3,
     82   1.7  christos   MVE_VCMP_VEC_T4,
     83   1.7  christos   MVE_VCMP_VEC_T5,
     84   1.7  christos   MVE_VCMP_VEC_T6,
     85   1.7  christos   MVE_VDUP,
     86   1.7  christos   MVE_VEOR,
     87   1.7  christos   MVE_VFMAS_FP_SCALAR,
     88   1.7  christos   MVE_VFMA_FP_SCALAR,
     89   1.7  christos   MVE_VFMA_FP,
     90   1.7  christos   MVE_VFMS_FP,
     91   1.7  christos   MVE_VHADD_T1,
     92   1.7  christos   MVE_VHADD_T2,
     93   1.7  christos   MVE_VHSUB_T1,
     94   1.7  christos   MVE_VHSUB_T2,
     95   1.7  christos   MVE_VRHADD,
     96   1.7  christos   MVE_VLD2,
     97   1.7  christos   MVE_VLD4,
     98   1.7  christos   MVE_VST2,
     99   1.7  christos   MVE_VST4,
    100   1.7  christos   MVE_VLDRB_T1,
    101   1.7  christos   MVE_VLDRH_T2,
    102   1.7  christos   MVE_VLDRB_T5,
    103   1.7  christos   MVE_VLDRH_T6,
    104   1.7  christos   MVE_VLDRW_T7,
    105   1.7  christos   MVE_VSTRB_T1,
    106   1.7  christos   MVE_VSTRH_T2,
    107   1.7  christos   MVE_VSTRB_T5,
    108   1.7  christos   MVE_VSTRH_T6,
    109   1.7  christos   MVE_VSTRW_T7,
    110   1.7  christos   MVE_VLDRB_GATHER_T1,
    111   1.7  christos   MVE_VLDRH_GATHER_T2,
    112   1.7  christos   MVE_VLDRW_GATHER_T3,
    113   1.7  christos   MVE_VLDRD_GATHER_T4,
    114   1.7  christos   MVE_VLDRW_GATHER_T5,
    115   1.7  christos   MVE_VLDRD_GATHER_T6,
    116   1.7  christos   MVE_VSTRB_SCATTER_T1,
    117   1.7  christos   MVE_VSTRH_SCATTER_T2,
    118   1.7  christos   MVE_VSTRW_SCATTER_T3,
    119   1.7  christos   MVE_VSTRD_SCATTER_T4,
    120   1.7  christos   MVE_VSTRW_SCATTER_T5,
    121   1.7  christos   MVE_VSTRD_SCATTER_T6,
    122   1.7  christos   MVE_VCVT_FP_FIX_VEC,
    123   1.7  christos   MVE_VCVT_BETWEEN_FP_INT,
    124   1.7  christos   MVE_VCVT_FP_HALF_FP,
    125   1.7  christos   MVE_VCVT_FROM_FP_TO_INT,
    126   1.7  christos   MVE_VRINT_FP,
    127   1.7  christos   MVE_VMOV_HFP_TO_GP,
    128   1.7  christos   MVE_VMOV_GP_TO_VEC_LANE,
    129   1.7  christos   MVE_VMOV_IMM_TO_VEC,
    130   1.7  christos   MVE_VMOV_VEC_TO_VEC,
    131   1.7  christos   MVE_VMOV2_VEC_LANE_TO_GP,
    132   1.7  christos   MVE_VMOV2_GP_TO_VEC_LANE,
    133   1.7  christos   MVE_VMOV_VEC_LANE_TO_GP,
    134   1.7  christos   MVE_VMVN_IMM,
    135   1.7  christos   MVE_VMVN_REG,
    136   1.7  christos   MVE_VORR_IMM,
    137   1.7  christos   MVE_VORR_REG,
    138   1.7  christos   MVE_VORN,
    139   1.7  christos   MVE_VBIC_IMM,
    140   1.7  christos   MVE_VBIC_REG,
    141   1.7  christos   MVE_VMOVX,
    142   1.7  christos   MVE_VMOVL,
    143   1.7  christos   MVE_VMOVN,
    144   1.7  christos   MVE_VMULL_INT,
    145   1.7  christos   MVE_VMULL_POLY,
    146   1.7  christos   MVE_VQDMULL_T1,
    147   1.7  christos   MVE_VQDMULL_T2,
    148   1.7  christos   MVE_VQMOVN,
    149   1.7  christos   MVE_VQMOVUN,
    150   1.7  christos   MVE_VADDV,
    151   1.7  christos   MVE_VMLADAV_T1,
    152   1.7  christos   MVE_VMLADAV_T2,
    153   1.7  christos   MVE_VMLALDAV,
    154   1.7  christos   MVE_VMLAS,
    155   1.7  christos   MVE_VADDLV,
    156   1.7  christos   MVE_VMLSDAV_T1,
    157   1.7  christos   MVE_VMLSDAV_T2,
    158   1.7  christos   MVE_VMLSLDAV,
    159   1.7  christos   MVE_VRMLALDAVH,
    160   1.7  christos   MVE_VRMLSLDAVH,
    161   1.7  christos   MVE_VQDMLADH,
    162   1.7  christos   MVE_VQRDMLADH,
    163   1.7  christos   MVE_VQDMLAH,
    164   1.7  christos   MVE_VQRDMLAH,
    165   1.7  christos   MVE_VQDMLASH,
    166   1.7  christos   MVE_VQRDMLASH,
    167   1.7  christos   MVE_VQDMLSDH,
    168   1.7  christos   MVE_VQRDMLSDH,
    169   1.7  christos   MVE_VQDMULH_T1,
    170   1.7  christos   MVE_VQRDMULH_T2,
    171   1.7  christos   MVE_VQDMULH_T3,
    172   1.7  christos   MVE_VQRDMULH_T4,
    173   1.7  christos   MVE_VDDUP,
    174   1.7  christos   MVE_VDWDUP,
    175   1.7  christos   MVE_VIWDUP,
    176   1.7  christos   MVE_VIDUP,
    177   1.7  christos   MVE_VCADD_FP,
    178   1.7  christos   MVE_VCADD_VEC,
    179   1.7  christos   MVE_VHCADD,
    180   1.7  christos   MVE_VCMLA_FP,
    181   1.7  christos   MVE_VCMUL_FP,
    182   1.7  christos   MVE_VQRSHL_T1,
    183   1.7  christos   MVE_VQRSHL_T2,
    184   1.7  christos   MVE_VQRSHRN,
    185   1.7  christos   MVE_VQRSHRUN,
    186   1.7  christos   MVE_VQSHL_T1,
    187   1.7  christos   MVE_VQSHL_T2,
    188   1.7  christos   MVE_VQSHLU_T3,
    189   1.7  christos   MVE_VQSHL_T4,
    190   1.7  christos   MVE_VQSHRN,
    191   1.7  christos   MVE_VQSHRUN,
    192   1.7  christos   MVE_VRSHL_T1,
    193   1.7  christos   MVE_VRSHL_T2,
    194   1.7  christos   MVE_VRSHR,
    195   1.7  christos   MVE_VRSHRN,
    196   1.7  christos   MVE_VSHL_T1,
    197   1.7  christos   MVE_VSHL_T2,
    198   1.7  christos   MVE_VSHL_T3,
    199   1.7  christos   MVE_VSHLC,
    200   1.7  christos   MVE_VSHLL_T1,
    201   1.7  christos   MVE_VSHLL_T2,
    202   1.7  christos   MVE_VSHR,
    203   1.7  christos   MVE_VSHRN,
    204   1.7  christos   MVE_VSLI,
    205   1.7  christos   MVE_VSRI,
    206   1.7  christos   MVE_VADC,
    207   1.7  christos   MVE_VABAV,
    208   1.7  christos   MVE_VABD_FP,
    209   1.7  christos   MVE_VABD_VEC,
    210   1.7  christos   MVE_VABS_FP,
    211   1.7  christos   MVE_VABS_VEC,
    212   1.7  christos   MVE_VADD_FP_T1,
    213   1.7  christos   MVE_VADD_FP_T2,
    214   1.7  christos   MVE_VADD_VEC_T1,
    215   1.7  christos   MVE_VADD_VEC_T2,
    216   1.7  christos   MVE_VSBC,
    217   1.7  christos   MVE_VSUB_FP_T1,
    218   1.7  christos   MVE_VSUB_FP_T2,
    219   1.7  christos   MVE_VSUB_VEC_T1,
    220   1.7  christos   MVE_VSUB_VEC_T2,
    221   1.7  christos   MVE_VAND,
    222   1.7  christos   MVE_VBRSR,
    223   1.7  christos   MVE_VCLS,
    224   1.7  christos   MVE_VCLZ,
    225   1.7  christos   MVE_VCTP,
    226   1.7  christos   MVE_VMAX,
    227   1.7  christos   MVE_VMAXA,
    228   1.7  christos   MVE_VMAXNM_FP,
    229   1.7  christos   MVE_VMAXNMA_FP,
    230   1.7  christos   MVE_VMAXNMV_FP,
    231   1.7  christos   MVE_VMAXNMAV_FP,
    232   1.7  christos   MVE_VMAXV,
    233   1.7  christos   MVE_VMAXAV,
    234   1.7  christos   MVE_VMIN,
    235   1.7  christos   MVE_VMINA,
    236   1.7  christos   MVE_VMINNM_FP,
    237   1.7  christos   MVE_VMINNMA_FP,
    238   1.7  christos   MVE_VMINNMV_FP,
    239   1.7  christos   MVE_VMINNMAV_FP,
    240   1.7  christos   MVE_VMINV,
    241   1.7  christos   MVE_VMINAV,
    242   1.7  christos   MVE_VMLA,
    243   1.7  christos   MVE_VMUL_FP_T1,
    244   1.7  christos   MVE_VMUL_FP_T2,
    245   1.7  christos   MVE_VMUL_VEC_T1,
    246   1.7  christos   MVE_VMUL_VEC_T2,
    247   1.7  christos   MVE_VMULH,
    248   1.7  christos   MVE_VRMULH,
    249   1.7  christos   MVE_VNEG_FP,
    250   1.7  christos   MVE_VNEG_VEC,
    251   1.7  christos   MVE_VPNOT,
    252   1.7  christos   MVE_VPSEL,
    253   1.7  christos   MVE_VQABS,
    254   1.7  christos   MVE_VQADD_T1,
    255   1.7  christos   MVE_VQADD_T2,
    256   1.7  christos   MVE_VQSUB_T1,
    257   1.7  christos   MVE_VQSUB_T2,
    258   1.7  christos   MVE_VQNEG,
    259   1.7  christos   MVE_VREV16,
    260   1.7  christos   MVE_VREV32,
    261   1.7  christos   MVE_VREV64,
    262   1.7  christos   MVE_LSLL,
    263   1.7  christos   MVE_LSLLI,
    264   1.7  christos   MVE_LSRL,
    265   1.7  christos   MVE_ASRL,
    266   1.7  christos   MVE_ASRLI,
    267   1.7  christos   MVE_SQRSHRL,
    268   1.7  christos   MVE_SQRSHR,
    269   1.7  christos   MVE_UQRSHL,
    270   1.7  christos   MVE_UQRSHLL,
    271   1.7  christos   MVE_UQSHL,
    272   1.7  christos   MVE_UQSHLL,
    273   1.7  christos   MVE_URSHRL,
    274   1.7  christos   MVE_URSHR,
    275   1.7  christos   MVE_SRSHRL,
    276   1.7  christos   MVE_SRSHR,
    277   1.7  christos   MVE_SQSHLL,
    278   1.7  christos   MVE_SQSHL,
    279   1.7  christos   MVE_CINC,
    280   1.7  christos   MVE_CINV,
    281   1.7  christos   MVE_CNEG,
    282   1.7  christos   MVE_CSINC,
    283   1.7  christos   MVE_CSINV,
    284   1.7  christos   MVE_CSET,
    285   1.7  christos   MVE_CSETM,
    286   1.7  christos   MVE_CSNEG,
    287   1.7  christos   MVE_CSEL,
    288   1.7  christos   MVE_NONE
    289   1.7  christos };
    290   1.7  christos 
    291   1.7  christos enum mve_unpredictable
    292   1.7  christos {
    293   1.7  christos   UNPRED_IT_BLOCK,		/* Unpredictable because mve insn in it block.
    294   1.7  christos 				 */
    295   1.7  christos   UNPRED_FCA_0_FCB_1,		/* Unpredictable because fcA = 0 and
    296   1.7  christos 				   fcB = 1 (vpt).  */
    297   1.7  christos   UNPRED_R13,			/* Unpredictable because r13 (sp) or
    298   1.7  christos 				   r15 (sp) used.  */
    299   1.7  christos   UNPRED_R15,			/* Unpredictable because r15 (pc) is used.  */
    300   1.7  christos   UNPRED_Q_GT_4,		/* Unpredictable because
    301   1.7  christos 				   vec reg start > 4 (vld4/st4).  */
    302   1.7  christos   UNPRED_Q_GT_6,		/* Unpredictable because
    303   1.7  christos 				   vec reg start > 6 (vld2/st2).  */
    304   1.7  christos   UNPRED_R13_AND_WB,		/* Unpredictable becase gp reg = r13
    305   1.7  christos 				   and WB bit = 1.  */
    306   1.7  christos   UNPRED_Q_REGS_EQUAL,		/* Unpredictable because vector registers are
    307   1.7  christos 				   equal.  */
    308   1.7  christos   UNPRED_OS,			/* Unpredictable because offset scaled == 1.  */
    309   1.7  christos   UNPRED_GP_REGS_EQUAL,		/* Unpredictable because gp registers are the
    310   1.7  christos 				   same.  */
    311   1.7  christos   UNPRED_Q_REGS_EQ_AND_SIZE_1,	/* Unpredictable because q regs equal and
    312   1.7  christos 				   size = 1.  */
    313   1.7  christos   UNPRED_Q_REGS_EQ_AND_SIZE_2,	/* Unpredictable because q regs equal and
    314   1.7  christos 				   size = 2.  */
    315   1.7  christos   UNPRED_NONE			/* No unpredictable behavior.  */
    316   1.7  christos };
    317   1.7  christos 
    318   1.7  christos enum mve_undefined
    319   1.7  christos {
    320   1.7  christos   UNDEF_SIZE,			/* undefined size.  */
    321   1.7  christos   UNDEF_SIZE_0,			/* undefined because size == 0.  */
    322   1.7  christos   UNDEF_SIZE_2,			/* undefined because size == 2.  */
    323   1.7  christos   UNDEF_SIZE_3,			/* undefined because size == 3.  */
    324   1.7  christos   UNDEF_SIZE_LE_1,		/* undefined because size <= 1.  */
    325   1.7  christos   UNDEF_SIZE_NOT_0,		/* undefined because size != 0.  */
    326   1.7  christos   UNDEF_SIZE_NOT_2,		/* undefined because size != 2.  */
    327   1.7  christos   UNDEF_SIZE_NOT_3,		/* undefined because size != 3.  */
    328   1.7  christos   UNDEF_NOT_UNS_SIZE_0,		/* undefined because U == 0 and
    329   1.7  christos 				   size == 0.  */
    330   1.7  christos   UNDEF_NOT_UNS_SIZE_1,		/* undefined because U == 0 and
    331   1.7  christos 				   size == 1.  */
    332   1.7  christos   UNDEF_NOT_UNSIGNED,		/* undefined because U == 0.  */
    333   1.7  christos   UNDEF_VCVT_IMM6,		/* imm6 < 32.  */
    334   1.7  christos   UNDEF_VCVT_FSI_IMM6,		/* fsi = 0 and 32 >= imm6 <= 47.  */
    335   1.7  christos   UNDEF_BAD_OP1_OP2,		/* undefined with op2 = 2 and
    336   1.7  christos 				   op1 == (0 or 1).  */
    337   1.7  christos   UNDEF_BAD_U_OP1_OP2,		/* undefined with U = 1 and
    338   1.7  christos 				   op2 == 0 and op1 == (0 or 1).  */
    339   1.7  christos   UNDEF_OP_0_BAD_CMODE,		/* undefined because op == 0 and cmode
    340   1.7  christos 				   in {0xx1, x0x1}.  */
    341   1.7  christos   UNDEF_XCHG_UNS,		/* undefined because X == 1 and U == 1.  */
    342   1.7  christos   UNDEF_NONE			/* no undefined behavior.  */
    343   1.7  christos };
    344   1.7  christos 
    345   1.1  christos struct opcode32
    346   1.1  christos {
    347   1.3  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    348   1.3  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.7  christos struct cdeopcode32
    354   1.7  christos {
    355   1.7  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    356   1.7  christos   uint8_t coproc_shift;		/* coproc is this far into op.  */
    357   1.7  christos   uint16_t coproc_mask;		/* Length of coproc field in op.  */
    358   1.7  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    359   1.7  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    360   1.7  christos   const char *  assembler;	/* How to disassemble this insn.  */
    361   1.7  christos };
    362   1.7  christos 
    363   1.7  christos /* MVE opcodes.  */
    364   1.7  christos 
    365   1.7  christos struct mopcode32
    366   1.7  christos {
    367   1.7  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    368   1.7  christos   enum mve_instructions mve_op;  /* Specific mve instruction for faster
    369   1.7  christos 				    decoding.  */
    370   1.7  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    371   1.7  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    372   1.7  christos   const char *  assembler;	/* How to disassemble this insn.  */
    373   1.7  christos };
    374   1.7  christos 
    375   1.7  christos enum isa {
    376   1.7  christos   ANY,
    377   1.7  christos   T32,
    378   1.7  christos   ARM
    379   1.7  christos };
    380   1.7  christos 
    381   1.7  christos 
    382   1.7  christos /* Shared (between Arm and Thumb mode) opcode.  */
    383   1.7  christos struct sopcode32
    384   1.7  christos {
    385   1.7  christos   enum isa isa;			/* Execution mode instruction availability.  */
    386   1.7  christos   arm_feature_set arch;		/* Architecture defining this insn.  */
    387   1.7  christos   unsigned long value;		/* If arch is 0 then value is a sentinel.  */
    388   1.7  christos   unsigned long mask;		/* Recognise insn if (op & mask) == value.  */
    389   1.7  christos   const char *  assembler;	/* How to disassemble this insn.  */
    390   1.7  christos };
    391   1.7  christos 
    392   1.1  christos struct opcode16
    393   1.1  christos {
    394   1.3  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.7  christos    %b			print condition code allowing cp_num == 9
    405   1.1  christos    %q			print shifter argument
    406   1.2     joerg    %u			print condition code (unconditional in ARM mode,
    407   1.2     joerg                           UNPREDICTABLE if not AL in Thumb)
    408  1.10  christos    %A			print address for ldc/stc instruction
    409   1.1  christos    %B			print vstm/vldm register list
    410   1.7  christos    %C			print vscclrm register list
    411   1.7  christos    %J			print register for VLDR instruction
    412   1.7  christos    %K			print address for VLDR instruction
    413   1.1  christos 
    414   1.2     joerg    %<bitfield>c		print as a condition code (for vsel)
    415   1.1  christos    %<bitfield>r		print as an ARM register
    416   1.1  christos    %<bitfield>R		as %<>r but r15 is UNPREDICTABLE
    417   1.1  christos    %<bitfield>ru        as %<>r but each u register must be unique.
    418   1.1  christos    %<bitfield>d		print the bitfield in decimal
    419   1.1  christos    %<bitfield>k		print immediate for VFPv3 conversion instruction
    420   1.1  christos    %<bitfield>x		print the bitfield in hex
    421   1.1  christos    %<bitfield>X		print the bitfield as 1 hex digit without leading "0x"
    422   1.1  christos    %<bitfield>w         print as an iWMMXt width field - [bhwd]ss/us
    423   1.1  christos    %<bitfield>g         print as an iWMMXt 64-bit register
    424   1.1  christos    %<bitfield>G         print as an iWMMXt general purpose or control register
    425   1.1  christos    %<bitfield>D		print as a NEON D register
    426   1.1  christos    %<bitfield>Q		print as a NEON Q register
    427   1.5  christos    %<bitfield>V		print as a NEON D or Q register
    428   1.4  christos    %<bitfield>E		print a quarter-float immediate value
    429   1.1  christos 
    430   1.1  christos    %y<code>		print a single precision VFP reg.
    431   1.1  christos 			  Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
    432   1.1  christos    %z<code>		print a double precision VFP reg
    433   1.1  christos 			  Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
    434   1.1  christos 
    435   1.1  christos    %<bitfield>'c	print specified char iff bitfield is all ones
    436   1.1  christos    %<bitfield>`c	print specified char iff bitfield is all zeroes
    437   1.1  christos    %<bitfield>?ab...    select from array of values in big endian order
    438   1.4  christos 
    439   1.1  christos    %L			print as an iWMMXt N/M width field.
    440   1.1  christos    %Z			print the Immediate of a WSHUFH instruction.
    441   1.1  christos    %l			like 'A' except use byte offsets for 'B' & 'H'
    442   1.1  christos 			versions.
    443   1.1  christos    %i			print 5-bit immediate in bits 8,3..0
    444   1.1  christos 			(print "32" when 0)
    445   1.1  christos    %r			print register offset address for wldt/wstr instruction.  */
    446   1.1  christos 
    447   1.1  christos enum opcode_sentinel_enum
    448   1.1  christos {
    449   1.1  christos   SENTINEL_IWMMXT_START = 1,
    450   1.1  christos   SENTINEL_IWMMXT_END,
    451   1.1  christos   SENTINEL_GENERIC_START
    452   1.1  christos } opcode_sentinels;
    453   1.1  christos 
    454   1.8  christos #define UNDEFINED_INSTRUCTION      "\t\t@ <UNDEFINED> instruction: %0-31x"
    455   1.8  christos #define UNKNOWN_INSTRUCTION_32BIT  "\t\t@ <UNDEFINED> instruction: %08x"
    456   1.8  christos #define UNKNOWN_INSTRUCTION_16BIT  "\t\t@ <UNDEFINED> instruction: %04x"
    457   1.8  christos #define UNPREDICTABLE_INSTRUCTION  "\t@ <UNPREDICTABLE>"
    458   1.1  christos 
    459   1.1  christos /* Common coprocessor opcodes shared between Arm and Thumb-2.  */
    460   1.1  christos 
    461   1.7  christos /* print_insn_cde recognizes the following format control codes:
    462   1.7  christos 
    463   1.7  christos    %%			%
    464   1.7  christos 
    465   1.7  christos    %a			print 'a' iff bit 28 is 1
    466   1.7  christos    %p			print bits 8-10 as coprocessor
    467   1.7  christos    %<bitfield>d		print as decimal
    468   1.7  christos    %<bitfield>r		print as an ARM register
    469   1.7  christos    %<bitfield>n		print as an ARM register but r15 is APSR_nzcv
    470   1.7  christos    %<bitfield>T		print as an ARM register + 1
    471   1.7  christos    %<bitfield>R		as %r but r13 is UNPREDICTABLE
    472   1.7  christos    %<bitfield>S		as %r but rX where X > 10 is UNPREDICTABLE
    473   1.7  christos    %j			print immediate taken from bits (16..21,7,0..5)
    474   1.7  christos    %k			print immediate taken from bits (20..21,7,0..5).
    475   1.7  christos    %l			print immediate taken from bits (20..22,7,4..5).  */
    476   1.7  christos 
    477   1.7  christos /* At the moment there is only one valid position for the coprocessor number,
    478   1.7  christos    and hence that's encoded in the macro below.  */
    479   1.7  christos #define CDE_OPCODE(ARCH, VALUE, MASK, ASM) \
    480   1.7  christos   { ARCH, 8, 7, VALUE, MASK, ASM }
    481   1.7  christos static const struct cdeopcode32 cde_opcodes[] =
    482   1.7  christos {
    483   1.7  christos   /* Custom Datapath Extension instructions.  */
    484   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    485   1.7  christos 	      0xee000000, 0xefc00840,
    486   1.8  christos 	      "cx1%a\t%p, %12-15n, %{I:#%0-5,7,16-21d%}"),
    487   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    488   1.7  christos 	      0xee000040, 0xefc00840,
    489   1.8  christos 	      "cx1d%a\t%p, %12-15S, %12-15T, %{I:#%0-5,7,16-21d%}"),
    490   1.7  christos 
    491   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    492   1.7  christos 	      0xee400000, 0xefc00840,
    493   1.8  christos 	      "cx2%a\t%p, %12-15n, %16-19n, %{I:#%0-5,7,20-21d%}"),
    494   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    495   1.7  christos 	      0xee400040, 0xefc00840,
    496   1.8  christos 	      "cx2d%a\t%p, %12-15S, %12-15T, %16-19n, %{I:#%0-5,7,20-21d%}"),
    497   1.7  christos 
    498   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    499   1.7  christos 	      0xee800000, 0xef800840,
    500   1.8  christos 	      "cx3%a\t%p, %0-3n, %16-19n, %12-15n, %{I:#%4-5,7,20-22d%}"),
    501   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    502   1.7  christos 	      0xee800040, 0xef800840,
    503   1.8  christos 	     "cx3d%a\t%p, %0-3S, %0-3T, %16-19n, %12-15n, %{I:#%4-5,7,20-22d%}"),
    504   1.7  christos 
    505   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    506   1.7  christos 	      0xec200000, 0xeeb00840,
    507   1.8  christos 	      "vcx1%a\t%p, %12-15,22V, %{I:#%0-5,7,16-19d%}"),
    508   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    509   1.7  christos 	      0xec200040, 0xeeb00840,
    510   1.8  christos 	      "vcx1%a\t%p, %12-15,22V, %{I:#%0-5,7,16-19,24d%}"),
    511   1.7  christos 
    512   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    513   1.7  christos 	      0xec300000, 0xeeb00840,
    514   1.8  christos 	      "vcx2%a\t%p, %12-15,22V, %0-3,5V, %{I:#%4,7,16-19d%}"),
    515   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    516   1.7  christos 	      0xec300040, 0xeeb00840,
    517   1.8  christos 	      "vcx2%a\t%p, %12-15,22V, %0-3,5V, %{I:#%4,7,16-19,24d%}"),
    518   1.7  christos 
    519   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    520   1.7  christos 	      0xec800000, 0xee800840,
    521   1.8  christos 	      "vcx3%a\t%p, %12-15,22V, %16-19,7V, %0-3,5V, %{I:#%4,20-21d%}"),
    522   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
    523   1.7  christos 	      0xec800040, 0xee800840,
    524   1.8  christos 	      "vcx3%a\t%p, %12-15,22V, %16-19,7V, %0-3,5V, %{I:#%4,20-21,24d%}"),
    525   1.7  christos 
    526   1.7  christos   CDE_OPCODE (ARM_FEATURE_CORE_LOW (0), 0, 0, 0)
    527   1.7  christos 
    528   1.7  christos };
    529   1.7  christos 
    530   1.7  christos static const struct sopcode32 coprocessor_opcodes[] =
    531   1.1  christos {
    532   1.1  christos   /* XScale instructions.  */
    533   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    534   1.3  christos     0x0e200010, 0x0fff0ff0,
    535   1.8  christos     "mia%c\t%{R:acc0%}, %0-3r, %12-15r"},
    536   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    537   1.3  christos     0x0e280010, 0x0fff0ff0,
    538   1.8  christos     "miaph%c\t%{R:acc0%}, %0-3r, %12-15r"},
    539   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    540   1.8  christos     0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\t%{R:acc0%}, %0-3r, %12-15r"},
    541   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    542   1.8  christos     0x0c400000, 0x0ff00fff, "mar%c\t%{R:acc0%}, %12-15r, %16-19r"},
    543   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    544   1.8  christos     0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, %{R:acc0%}"},
    545   1.1  christos 
    546   1.1  christos   /* Intel Wireless MMX technology instructions.  */
    547   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_IWMMXT_START, 0, "" },
    548   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_IWMMXT),
    549   1.3  christos     0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
    550   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    551   1.3  christos     0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
    552   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    553   1.8  christos     0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, %{I:#%0-2d%}"},
    554   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    555   1.8  christos     0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, %{I:#%0-2d%}"},
    556   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    557   1.8  christos     0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, %{I:#%0-2d%}"},
    558   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    559   1.3  christos     0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
    560   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    561   1.3  christos     0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
    562   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    563   1.3  christos     0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
    564   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    565   1.3  christos     0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
    566   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    567   1.3  christos     0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
    568   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    569   1.3  christos     0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
    570   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    571   1.3  christos     0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
    572   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    573   1.3  christos     0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
    574   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    575   1.3  christos     0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
    576   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    577   1.3  christos     0x0e120190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
    578   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    579   1.3  christos     0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
    580   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    581   1.3  christos     0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
    582   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    583   1.3  christos     0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
    584   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    585   1.3  christos     0x0e2001a0, 0x0fb00ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
    586   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    587   1.3  christos     0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
    588   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    589   1.8  christos     0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, %{I:#%20-22d%}"},
    590   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    591   1.3  christos     0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
    592   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    593   1.3  christos     0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
    594   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    595   1.3  christos     0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
    596   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    597   1.3  christos     0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
    598   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    599   1.3  christos     0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    600   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    601   1.3  christos     0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    602   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    603   1.3  christos     0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
    604   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    605   1.3  christos     0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
    606   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    607   1.3  christos     0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
    608   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    609   1.3  christos     0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
    610   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    611   1.3  christos     0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
    612   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    613   1.3  christos     0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
    614   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    615   1.3  christos     0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    616   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    617   1.8  christos     0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, %{I:#%21-23d%}"},
    618   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    619   1.3  christos     0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
    620   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    621   1.3  christos     0x0e800120, 0x0f800ff0,
    622   1.3  christos     "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
    623   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    624   1.3  christos     0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    625   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    626   1.3  christos     0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
    627   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    628   1.3  christos     0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
    629   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    630   1.3  christos     0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
    631   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    632   1.3  christos     0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
    633   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    634   1.3  christos     0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
    635   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    636   1.3  christos     0x0e8000a0, 0x0f800ff0,
    637   1.3  christos     "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
    638   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    639   1.3  christos     0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
    640   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    641   1.3  christos     0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
    642   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    643   1.3  christos     0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
    644   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    645   1.3  christos     0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
    646   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    647   1.8  christos     0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    648   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    649   1.3  christos     0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    650   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    651   1.3  christos     0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
    652   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    653   1.3  christos     0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
    654   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    655   1.8  christos     0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, %{I:#%Z%}"},
    656   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    657   1.8  christos     0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    658   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    659   1.3  christos     0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
    660   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    661   1.3  christos     0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
    662   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    663   1.8  christos     0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    664   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    665   1.3  christos     0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
    666   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    667   1.3  christos     0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
    668   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    669   1.8  christos     0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, %{I:#%i%}"},
    670   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    671   1.3  christos     0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
    672   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    673   1.3  christos     0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
    674   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    675   1.3  christos     0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
    676   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    677   1.3  christos     0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
    678   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    679   1.3  christos     0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
    680   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    681   1.3  christos     0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
    682   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    683   1.3  christos     0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
    684   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    685   1.3  christos     0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    686   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    687   1.3  christos     0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
    688   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    689   1.3  christos     0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
    690   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    691   1.3  christos     0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
    692   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    693   1.3  christos     0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
    694   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    695   1.3  christos     0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    696   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    697   1.3  christos     0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
    698   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
    699   1.3  christos     0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
    700   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (0),
    701   1.3  christos     SENTINEL_IWMMXT_END, 0, "" },
    702   1.1  christos 
    703   1.7  christos   /* Armv8.1-M Mainline instructions.  */
    704   1.7  christos   {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    705   1.7  christos     0xec9f0b00, 0xffbf0f01, "vscclrm%c\t%C"},
    706   1.7  christos   {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    707   1.7  christos     0xec9f0a00, 0xffbf0f00, "vscclrm%c\t%C"},
    708   1.7  christos 
    709   1.4  christos   /* ARMv8-M Mainline Security Extensions instructions.  */
    710   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
    711   1.4  christos     0xec300a00, 0xfff0ffff, "vlldm\t%16-19r"},
    712   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
    713   1.4  christos     0xec200a00, 0xfff0ffff, "vlstm\t%16-19r"},
    714   1.4  christos 
    715   1.1  christos   /* Register load/store.  */
    716   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    717   1.3  christos     0x0d2d0b00, 0x0fbf0f01, "vpush%c\t%B"},
    718   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    719   1.3  christos     0x0d200b00, 0x0fb00f01, "vstmdb%c\t%16-19r!, %B"},
    720   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    721   1.3  christos     0x0d300b00, 0x0fb00f01, "vldmdb%c\t%16-19r!, %B"},
    722   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    723   1.3  christos     0x0c800b00, 0x0f900f01, "vstmia%c\t%16-19r%21'!, %B"},
    724   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    725   1.3  christos     0x0cbd0b00, 0x0fbf0f01, "vpop%c\t%B"},
    726   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    727   1.3  christos     0x0c900b00, 0x0f900f01, "vldmia%c\t%16-19r%21'!, %B"},
    728   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    729   1.3  christos     0x0d000b00, 0x0f300f00, "vstr%c\t%12-15,22D, %A"},
    730   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
    731   1.3  christos     0x0d100b00, 0x0f300f00, "vldr%c\t%12-15,22D, %A"},
    732   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    733   1.3  christos     0x0d2d0a00, 0x0fbf0f00, "vpush%c\t%y3"},
    734   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    735   1.3  christos     0x0d200a00, 0x0fb00f00, "vstmdb%c\t%16-19r!, %y3"},
    736   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    737   1.3  christos     0x0d300a00, 0x0fb00f00, "vldmdb%c\t%16-19r!, %y3"},
    738   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    739   1.3  christos     0x0c800a00, 0x0f900f00, "vstmia%c\t%16-19r%21'!, %y3"},
    740   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    741   1.3  christos     0x0cbd0a00, 0x0fbf0f00, "vpop%c\t%y3"},
    742   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    743   1.3  christos     0x0c900a00, 0x0f900f00, "vldmia%c\t%16-19r%21'!, %y3"},
    744   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    745   1.3  christos     0x0d000a00, 0x0f300f00, "vstr%c\t%y1, %A"},
    746   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    747   1.3  christos     0x0d100a00, 0x0f300f00, "vldr%c\t%y1, %A"},
    748   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
    749   1.7  christos     0xec100f80, 0xfe101f80, "vldr%c\t%J, %K"},
    750   1.7  christos   {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
    751   1.7  christos     0xec000f80, 0xfe101f80, "vstr%c\t%J, %K"},
    752   1.3  christos 
    753   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    754   1.8  christos     0x0d200b01, 0x0fb00f01, "fstmdbx%c\t%16-19r!, %z3\t@ Deprecated"},
    755   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    756   1.8  christos     0x0d300b01, 0x0fb00f01, "fldmdbx%c\t%16-19r!, %z3\t@ Deprecated"},
    757   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    758   1.8  christos     0x0c800b01, 0x0f900f01, "fstmiax%c\t%16-19r%21'!, %z3\t@ Deprecated"},
    759   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    760   1.8  christos     0x0c900b01, 0x0f900f01, "fldmiax%c\t%16-19r%21'!, %z3\t@ Deprecated"},
    761   1.1  christos 
    762   1.1  christos   /* Data transfer between ARM and NEON registers.  */
    763   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    764   1.3  christos     0x0c400b10, 0x0ff00fd0, "vmov%c\t%0-3,5D, %12-15r, %16-19r"},
    765   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    766   1.3  christos     0x0c500b10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %0-3,5D"},
    767   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    768   1.8  christos     0x0e000b10, 0x0fd00f70, "vmov%c.32\t%{R:%16-19,7D[%21d]%}, %12-15r"},
    769   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    770   1.8  christos     0x0e100b10, 0x0f500f70, "vmov%c.32\t%12-15r, %{R:%16-19,7D[%21d]%}"},
    771   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    772   1.8  christos     0x0e000b30, 0x0fd00f30, "vmov%c.16\t%{R:%16-19,7D[%6,21d]%}, %12-15r"},
    773   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    774   1.8  christos     0x0e100b30, 0x0f500f30, "vmov%c.%23?us16\t%12-15r, %{R:%16-19,7D[%6,21d]%}"},
    775   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    776   1.8  christos     0x0e400b10, 0x0fd00f10, "vmov%c.8\t%{R:%16-19,7D[%5,6,21d]%}, %12-15r"},
    777   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
    778   1.8  christos     0x0e500b10, 0x0f500f10, "vmov%c.%23?us8\t%12-15r, %{R:%16-19,7D[%5,6,21d]%}"},
    779   1.1  christos   /* Half-precision conversion instructions.  */
    780   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    781   1.3  christos     0x0eb20b40, 0x0fbf0f50, "vcvt%7?tb%c.f64.f16\t%z1, %y0"},
    782   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    783   1.3  christos     0x0eb30b40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f64\t%y1, %z0"},
    784   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
    785   1.3  christos     0x0eb20a40, 0x0fbf0f50, "vcvt%7?tb%c.f32.f16\t%y1, %y0"},
    786   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
    787   1.3  christos     0x0eb30a40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f32\t%y1, %y0"},
    788   1.1  christos 
    789   1.1  christos   /* Floating point coprocessor (VFP) instructions.  */
    790   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    791   1.8  christos     0x0ee00a10, 0x0fff0fff, "vmsr%c\t%{R:fpsid%}, %12-15r"},
    792   1.7  christos   {ANY, ARM_FEATURE (0, ARM_EXT2_V8_1M_MAIN, FPU_VFP_EXT_V1xD),
    793   1.8  christos     0x0ee10a10, 0x0fff0fff, "vmsr%c\t%{R:fpscr%}, %12-15r"},
    794   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    795   1.8  christos     0x0ee20a10, 0x0fff0fff, "vmsr%c\t%{R:fpscr_nzcvqc%}, %12-15r"},
    796   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    797   1.8  christos     0x0ee60a10, 0x0fff0fff, "vmsr%c\t%{R:mvfr1%}, %12-15r"},
    798   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    799   1.8  christos     0x0ee70a10, 0x0fff0fff, "vmsr%c\t%{R:mvfr0%}, %12-15r"},
    800   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    801   1.8  christos     0x0ee50a10, 0x0fff0fff, "vmsr%c\t%{R:mvfr2%}, %12-15r"},
    802   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    803   1.8  christos     0x0ee80a10, 0x0fff0fff, "vmsr%c\t%{R:fpexc%}, %12-15r"},
    804   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    805   1.8  christos     0x0ee90a10, 0x0fff0fff, "vmsr%c\t%{R:fpinst%}, %12-15r\t@ Impl def"},
    806   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    807   1.8  christos     0x0eea0a10, 0x0fff0fff, "vmsr%c\t%{R:fpinst2%}, %12-15r\t@ Impl def"},
    808   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    809   1.8  christos     0x0eec0a10, 0x0fff0fff, "vmsr%c\t%{R:vpr%}, %12-15r"},
    810   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    811   1.8  christos     0x0eed0a10, 0x0fff0fff, "vmsr%c\t%{R:p0%}, %12-15r"},
    812   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    813   1.8  christos     0x0eee0a10, 0x0fff0fff, "vmsr%c\t%{R:fpcxt_ns%}, %12-15r"},
    814   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    815   1.8  christos     0x0eef0a10, 0x0fff0fff, "vmsr%c\t%{R:fpcxt_s%}, %12-15r"},
    816   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    817   1.8  christos     0x0ef00a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpsid%}"},
    818   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    819   1.8  christos     0x0ef1fa10, 0x0fffffff, "vmrs%c\t%{R:APSR_nzcv%}, %{R:fpscr%}"},
    820   1.7  christos   {ANY, ARM_FEATURE (0, ARM_EXT2_V8_1M_MAIN, FPU_VFP_EXT_V1xD),
    821   1.8  christos     0x0ef10a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpscr%}"},
    822   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    823   1.8  christos     0x0ef20a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpscr_nzcvqc%}"},
    824   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    825   1.8  christos     0x0ef50a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:mvfr2%}"},
    826   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    827   1.8  christos     0x0ef60a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:mvfr1%}"},
    828   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    829   1.8  christos     0x0ef70a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:mvfr0%}"},
    830   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    831   1.8  christos     0x0ef80a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpexc%}"},
    832   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    833   1.8  christos     0x0ef90a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpinst%}\t@ Impl def"},
    834   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    835   1.8  christos     0x0efa0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpinst2%}\t@ Impl def"},
    836   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    837   1.8  christos     0x0efc0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:vpr%}"},
    838   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
    839   1.8  christos     0x0efd0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:p0%}"},
    840   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    841   1.8  christos     0x0efe0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpcxt_ns%}"},
    842   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    843   1.8  christos     0x0eff0a10, 0x0fff0fff, "vmrs%c\t%12-15r, %{R:fpcxt_s%}"},
    844   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    845   1.8  christos     0x0e000b10, 0x0fd00fff, "vmov%c.32\t%z2[%{I:%21d%}], %12-15r"},
    846   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    847   1.8  christos     0x0e100b10, 0x0fd00fff, "vmov%c.32\t%12-15r, %z2[%{I:%21d%}]"},
    848   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    849   1.3  christos     0x0ee00a10, 0x0ff00fff, "vmsr%c\t<impl def %16-19x>, %12-15r"},
    850   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    851   1.3  christos     0x0ef00a10, 0x0ff00fff, "vmrs%c\t%12-15r, <impl def %16-19x>"},
    852   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    853   1.3  christos     0x0e000a10, 0x0ff00f7f, "vmov%c\t%y2, %12-15r"},
    854   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    855   1.3  christos     0x0e100a10, 0x0ff00f7f, "vmov%c\t%12-15r, %y2"},
    856   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    857   1.8  christos     0x0eb50a40, 0x0fbf0f70, "vcmp%7'e%c.f32\t%y1, %{I:#0.0%}"},
    858   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    859   1.8  christos     0x0eb50b40, 0x0fbf0f70, "vcmp%7'e%c.f64\t%z1, %{I:#0.0%}"},
    860   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    861   1.3  christos     0x0eb00a40, 0x0fbf0fd0, "vmov%c.f32\t%y1, %y0"},
    862   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    863   1.3  christos     0x0eb00ac0, 0x0fbf0fd0, "vabs%c.f32\t%y1, %y0"},
    864   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    865   1.3  christos     0x0eb00b40, 0x0fbf0fd0, "vmov%c.f64\t%z1, %z0"},
    866   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    867   1.3  christos     0x0eb00bc0, 0x0fbf0fd0, "vabs%c.f64\t%z1, %z0"},
    868   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    869   1.3  christos     0x0eb10a40, 0x0fbf0fd0, "vneg%c.f32\t%y1, %y0"},
    870   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    871   1.3  christos     0x0eb10ac0, 0x0fbf0fd0, "vsqrt%c.f32\t%y1, %y0"},
    872   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    873   1.3  christos     0x0eb10b40, 0x0fbf0fd0, "vneg%c.f64\t%z1, %z0"},
    874   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    875   1.3  christos     0x0eb10bc0, 0x0fbf0fd0, "vsqrt%c.f64\t%z1, %z0"},
    876   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    877   1.3  christos     0x0eb70ac0, 0x0fbf0fd0, "vcvt%c.f64.f32\t%z1, %y0"},
    878   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    879   1.3  christos     0x0eb70bc0, 0x0fbf0fd0, "vcvt%c.f32.f64\t%y1, %z0"},
    880   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    881   1.3  christos     0x0eb80a40, 0x0fbf0f50, "vcvt%c.f32.%7?su32\t%y1, %y0"},
    882   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    883   1.3  christos     0x0eb80b40, 0x0fbf0f50, "vcvt%c.f64.%7?su32\t%z1, %y0"},
    884   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    885   1.3  christos     0x0eb40a40, 0x0fbf0f50, "vcmp%7'e%c.f32\t%y1, %y0"},
    886   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    887   1.3  christos     0x0eb40b40, 0x0fbf0f50, "vcmp%7'e%c.f64\t%z1, %z0"},
    888   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
    889   1.8  christos     0x0eba0a40, 0x0fbe0f50, "vcvt%c.f32.%16?us%7?31%7?26\t%y1, %y1, %{I:#%5,0-3k%}"},
    890   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
    891   1.8  christos     0x0eba0b40, 0x0fbe0f50, "vcvt%c.f64.%16?us%7?31%7?26\t%z1, %z1, %{I:#%5,0-3k%}"},
    892   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    893   1.3  christos     0x0ebc0a40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f32\t%y1, %y0"},
    894   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    895   1.3  christos     0x0ebc0b40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f64\t%y1, %z0"},
    896   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
    897   1.8  christos     0x0ebe0a40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f32\t%y1, %y1, %{I:#%5,0-3k%}"},
    898   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
    899   1.8  christos     0x0ebe0b40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f64\t%z1, %z1, %{I:#%5,0-3k%}"},
    900   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    901   1.3  christos     0x0c500b10, 0x0fb00ff0, "vmov%c\t%12-15r, %16-19r, %z0"},
    902   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
    903   1.8  christos     0x0eb00a00, 0x0fb00ff0, "vmov%c.f32\t%y1, %{I:#%0-3,16-19E%}"},
    904   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
    905   1.8  christos     0x0eb00b00, 0x0fb00ff0, "vmov%c.f64\t%z1, %{I:#%0-3,16-19E%}"},
    906   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
    907   1.3  christos     0x0c400a10, 0x0ff00fd0, "vmov%c\t%y4, %12-15r, %16-19r"},
    908   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
    909   1.3  christos     0x0c400b10, 0x0ff00fd0, "vmov%c\t%z0, %12-15r, %16-19r"},
    910   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
    911   1.3  christos     0x0c500a10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %y4"},
    912   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    913   1.3  christos     0x0e000a00, 0x0fb00f50, "vmla%c.f32\t%y1, %y2, %y0"},
    914   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    915   1.3  christos     0x0e000a40, 0x0fb00f50, "vmls%c.f32\t%y1, %y2, %y0"},
    916   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    917   1.3  christos     0x0e000b00, 0x0fb00f50, "vmla%c.f64\t%z1, %z2, %z0"},
    918   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    919   1.3  christos     0x0e000b40, 0x0fb00f50, "vmls%c.f64\t%z1, %z2, %z0"},
    920   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    921   1.3  christos     0x0e100a00, 0x0fb00f50, "vnmls%c.f32\t%y1, %y2, %y0"},
    922   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    923   1.3  christos     0x0e100a40, 0x0fb00f50, "vnmla%c.f32\t%y1, %y2, %y0"},
    924   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    925   1.3  christos     0x0e100b00, 0x0fb00f50, "vnmls%c.f64\t%z1, %z2, %z0"},
    926   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    927   1.3  christos     0x0e100b40, 0x0fb00f50, "vnmla%c.f64\t%z1, %z2, %z0"},
    928   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    929   1.3  christos     0x0e200a00, 0x0fb00f50, "vmul%c.f32\t%y1, %y2, %y0"},
    930   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    931   1.3  christos     0x0e200a40, 0x0fb00f50, "vnmul%c.f32\t%y1, %y2, %y0"},
    932   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    933   1.3  christos     0x0e200b00, 0x0fb00f50, "vmul%c.f64\t%z1, %z2, %z0"},
    934   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    935   1.3  christos     0x0e200b40, 0x0fb00f50, "vnmul%c.f64\t%z1, %z2, %z0"},
    936   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    937   1.3  christos     0x0e300a00, 0x0fb00f50, "vadd%c.f32\t%y1, %y2, %y0"},
    938   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    939   1.3  christos     0x0e300a40, 0x0fb00f50, "vsub%c.f32\t%y1, %y2, %y0"},
    940   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    941   1.3  christos     0x0e300b00, 0x0fb00f50, "vadd%c.f64\t%z1, %z2, %z0"},
    942   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    943   1.3  christos     0x0e300b40, 0x0fb00f50, "vsub%c.f64\t%z1, %z2, %z0"},
    944   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
    945   1.3  christos     0x0e800a00, 0x0fb00f50, "vdiv%c.f32\t%y1, %y2, %y0"},
    946   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
    947   1.3  christos     0x0e800b00, 0x0fb00f50, "vdiv%c.f64\t%z1, %z2, %z0"},
    948   1.1  christos 
    949   1.1  christos   /* VFP Fused multiply add instructions.  */
    950   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    951   1.3  christos     0x0ea00a00, 0x0fb00f50, "vfma%c.f32\t%y1, %y2, %y0"},
    952   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    953   1.3  christos     0x0ea00b00, 0x0fb00f50, "vfma%c.f64\t%z1, %z2, %z0"},
    954   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    955   1.3  christos     0x0ea00a40, 0x0fb00f50, "vfms%c.f32\t%y1, %y2, %y0"},
    956   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    957   1.3  christos     0x0ea00b40, 0x0fb00f50, "vfms%c.f64\t%z1, %z2, %z0"},
    958   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    959   1.3  christos     0x0e900a40, 0x0fb00f50, "vfnma%c.f32\t%y1, %y2, %y0"},
    960   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    961   1.3  christos     0x0e900b40, 0x0fb00f50, "vfnma%c.f64\t%z1, %z2, %z0"},
    962   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    963   1.3  christos     0x0e900a00, 0x0fb00f50, "vfnms%c.f32\t%y1, %y2, %y0"},
    964   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
    965   1.3  christos     0x0e900b00, 0x0fb00f50, "vfnms%c.f64\t%z1, %z2, %z0"},
    966   1.1  christos 
    967   1.2     joerg   /* FP v5.  */
    968   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    969   1.4  christos     0xfe000a00, 0xff800f50, "vsel%20-21c%u.f32\t%y1, %y2, %y0"},
    970   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    971   1.4  christos     0xfe000b00, 0xff800f50, "vsel%20-21c%u.f64\t%z1, %z2, %z0"},
    972   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    973   1.4  christos     0xfe800a00, 0xffb00f50, "vmaxnm%u.f32\t%y1, %y2, %y0"},
    974   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    975   1.4  christos     0xfe800b00, 0xffb00f50, "vmaxnm%u.f64\t%z1, %z2, %z0"},
    976   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    977   1.4  christos     0xfe800a40, 0xffb00f50, "vminnm%u.f32\t%y1, %y2, %y0"},
    978   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    979   1.4  christos     0xfe800b40, 0xffb00f50, "vminnm%u.f64\t%z1, %z2, %z0"},
    980   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    981   1.3  christos     0xfebc0a40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f32\t%y1, %y0"},
    982   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    983   1.3  christos     0xfebc0b40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f64\t%y1, %z0"},
    984   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    985   1.3  christos     0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32\t%y1, %y0"},
    986   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    987   1.3  christos     0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64\t%z1, %z0"},
    988   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    989   1.4  christos     0xfeb80a40, 0xffbc0fd0, "vrint%16-17?mpna%u.f32\t%y1, %y0"},
    990   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
    991   1.4  christos     0xfeb80b40, 0xffbc0fd0, "vrint%16-17?mpna%u.f64\t%z1, %z0"},
    992   1.2     joerg 
    993   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_GENERIC_START, 0, "" },
    994   1.5  christos   /* ARMv8.3 AdvSIMD instructions in the space of coprocessor 8.  */
    995   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
    996   1.8  christos     0xfc800800, 0xfeb00f10, "vcadd%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%24?29%24'70%}"},
    997   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
    998   1.8  christos     0xfc900800, 0xfeb00f10, "vcadd%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%24?29%24'70%}"},
    999   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1000   1.8  christos     0xfc200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23'90%}"},
   1001   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1002   1.8  christos     0xfd200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23?21%23?780%}"},
   1003   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1004   1.8  christos     0xfc300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23'90%}"},
   1005   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1006   1.8  christos     0xfd300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, %{I:#%23?21%23?780%}"},
   1007   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1008   1.8  christos     0xfe000800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %{R:%0-3D[%5?10]%}, %{I:#%20'90%}"},
   1009   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1010   1.8  christos     0xfe200800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %{R:%0-3D[%5?10]%}, %{I:#%20?21%20?780%}"},
   1011   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1012   1.8  christos     0xfe800800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %{R:%0-3,5D[0]%}, %{I:#%20'90%}"},
   1013   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1014   1.8  christos     0xfea00800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %{R:%0-3,5D[0]%}, %{I:#%20?21%20?780%}"},
   1015   1.5  christos 
   1016   1.7  christos   /* BFloat16 instructions.  */
   1017   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1018   1.7  christos     0x0eb30940, 0x0fbf0f50, "vcvt%7?tb%b.bf16.f32\t%y1, %y0"},
   1019   1.7  christos 
   1020   1.6  christos   /* Dot Product instructions in the space of coprocessor 13.  */
   1021   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
   1022   1.6  christos     0xfc200d00, 0xffb00f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3,5V"},
   1023   1.7  christos   {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
   1024   1.8  christos     0xfe200d00, 0xff200f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %{R:%0-3D[%5?10]%}"},
   1025   1.6  christos 
   1026   1.6  christos   /* ARMv8.2 FMAC Long instructions in the space of coprocessor 8.  */
   1027   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1028   1.8  christos     0xfc200810, 0xffb00f50, "vfmal.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-3d%}"},
   1029   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1030   1.8  christos     0xfca00810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-3d%}"},
   1031   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1032   1.8  christos     0xfc200850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-3,5d%}"},
   1033   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1034   1.8  christos     0xfca00850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-3,5d%}"},
   1035   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1036   1.8  christos     0xfe000810, 0xffb00f50, "vfmal.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-2d[%3d]%}"},
   1037   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1038   1.8  christos     0xfe100810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, %{R:s%7,16-19d%}, %{R:s%5,0-2d[%3d]%}"},
   1039   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1040   1.8  christos     0xfe000850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-2d[%3,5d]%}"},
   1041   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
   1042   1.8  christos     0xfe100850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, %{R:d%16-19,7d%}, %{R:d%0-2d[%3,5d]%}"},
   1043   1.6  christos 
   1044   1.4  christos   /* ARMv8.2 half-precision Floating point coprocessor 9 (VFP) instructions.
   1045   1.4  christos      cp_num: bit <11:8> == 0b1001.
   1046   1.4  christos      cond: bit <31:28> == 0b1110, otherwise, it's UNPREDICTABLE.  */
   1047   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1048   1.4  christos     0x0eb009c0, 0x0fbf0fd0, "vabs%c.f16\t%y1, %y0"},
   1049   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1050   1.4  christos     0x0e300900, 0x0fb00f50, "vadd%c.f16\t%y1, %y2, %y0"},
   1051   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1052   1.4  christos     0x0eb40940, 0x0fbf0f50, "vcmp%7'e%c.f16\t%y1, %y0"},
   1053   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1054   1.8  christos     0x0eb50940, 0x0fbf0f70, "vcmp%7'e%c.f16\t%y1, %{I:#0.0%}"},
   1055   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1056   1.8  christos     0x0eba09c0, 0x0fbe0fd0, "vcvt%c.f16.%16?us%7?31%7?26\t%y1, %y1, %{I:#%5,0-3k%}"},
   1057   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1058   1.8  christos     0x0ebe09c0, 0x0fbe0fd0, "vcvt%c.%16?us%7?31%7?26.f16\t%y1, %y1, %{I:#%5,0-3k%}"},
   1059   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1060   1.4  christos     0x0ebc0940, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f16\t%y1, %y0"},
   1061   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1062   1.4  christos     0x0eb80940, 0x0fbf0f50, "vcvt%c.f16.%7?su32\t%y1, %y0"},
   1063   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1064   1.4  christos     0xfebc0940, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f16\t%y1, %y0"},
   1065   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1066   1.4  christos     0x0e800900, 0x0fb00f50, "vdiv%c.f16\t%y1, %y2, %y0"},
   1067   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1068   1.4  christos     0x0ea00900, 0x0fb00f50, "vfma%c.f16\t%y1, %y2, %y0"},
   1069   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1070   1.4  christos     0x0ea00940, 0x0fb00f50, "vfms%c.f16\t%y1, %y2, %y0"},
   1071   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1072   1.4  christos     0x0e900940, 0x0fb00f50, "vfnma%c.f16\t%y1, %y2, %y0"},
   1073   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1074   1.4  christos     0x0e900900, 0x0fb00f50, "vfnms%c.f16\t%y1, %y2, %y0"},
   1075   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1076   1.4  christos     0xfeb00ac0, 0xffbf0fd0, "vins.f16\t%y1, %y0"},
   1077   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1078   1.4  christos     0xfeb00a40, 0xffbf0fd0, "vmovx%c.f16\t%y1, %y0"},
   1079   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1080   1.4  christos     0x0d100900, 0x0f300f00, "vldr%c.16\t%y1, %A"},
   1081   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1082   1.4  christos     0x0d000900, 0x0f300f00, "vstr%c.16\t%y1, %A"},
   1083   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1084   1.4  christos     0xfe800900, 0xffb00f50, "vmaxnm%c.f16\t%y1, %y2, %y0"},
   1085   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1086   1.4  christos     0xfe800940, 0xffb00f50, "vminnm%c.f16\t%y1, %y2, %y0"},
   1087   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1088   1.4  christos     0x0e000900, 0x0fb00f50, "vmla%c.f16\t%y1, %y2, %y0"},
   1089   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1090   1.4  christos     0x0e000940, 0x0fb00f50, "vmls%c.f16\t%y1, %y2, %y0"},
   1091   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1092   1.4  christos     0x0e100910, 0x0ff00f7f, "vmov%c.f16\t%12-15r, %y2"},
   1093   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1094   1.4  christos     0x0e000910, 0x0ff00f7f, "vmov%c.f16\t%y2, %12-15r"},
   1095   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1096   1.8  christos     0xeb00900, 0x0fb00ff0, "vmov%c.f16\t%y1, %{I:#%0-3,16-19E%}"},
   1097   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1098   1.4  christos     0x0e200900, 0x0fb00f50, "vmul%c.f16\t%y1, %y2, %y0"},
   1099   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1100   1.4  christos     0x0eb10940, 0x0fbf0fd0, "vneg%c.f16\t%y1, %y0"},
   1101   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1102   1.4  christos     0x0e100940, 0x0fb00f50, "vnmla%c.f16\t%y1, %y2, %y0"},
   1103   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1104   1.4  christos     0x0e100900, 0x0fb00f50, "vnmls%c.f16\t%y1, %y2, %y0"},
   1105   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1106   1.4  christos     0x0e200940, 0x0fb00f50, "vnmul%c.f16\t%y1, %y2, %y0"},
   1107   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1108   1.4  christos     0x0eb60940, 0x0fbe0f50, "vrint%7,16??xzr%c.f16\t%y1, %y0"},
   1109   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1110   1.4  christos     0xfeb80940, 0xffbc0fd0, "vrint%16-17?mpna%u.f16\t%y1, %y0"},
   1111   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1112   1.4  christos     0xfe000900, 0xff800f50, "vsel%20-21c%u.f16\t%y1, %y2, %y0"},
   1113   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1114   1.4  christos     0x0eb109c0, 0x0fbf0fd0, "vsqrt%c.f16\t%y1, %y0"},
   1115   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1116   1.4  christos     0x0e300940, 0x0fb00f50, "vsub%c.f16\t%y1, %y2, %y0"},
   1117   1.4  christos 
   1118   1.5  christos   /* ARMv8.3 javascript conversion instruction.  */
   1119   1.7  christos   {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
   1120   1.5  christos     0x0eb90bc0, 0x0fbf0fd0, "vjcvt%c.s32.f64\t%y1, %z0"},
   1121   1.5  christos 
   1122   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   1123   1.7  christos };
   1124   1.7  christos 
   1125   1.7  christos /* Generic coprocessor instructions.  These are only matched if a more specific
   1126   1.7  christos    SIMD or co-processor instruction does not match first.  */
   1127   1.7  christos 
   1128   1.7  christos static const struct sopcode32 generic_coprocessor_opcodes[] =
   1129   1.7  christos {
   1130   1.7  christos   /* Generic coprocessor instructions.  */
   1131   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   1132   1.8  christos     0x0c400000, 0x0ff00000, "mcrr%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15R, %16-19r, %{R:cr%0-3d%}"},
   1133   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   1134   1.7  christos     0x0c500000, 0x0ff00000,
   1135   1.8  christos     "mrrc%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15Ru, %16-19Ru, %{R:cr%0-3d%}"},
   1136   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1137   1.7  christos     0x0e000000, 0x0f000010,
   1138   1.8  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%}}"},
   1139   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1140   1.7  christos     0x0e10f010, 0x0f10f010,
   1141   1.8  christos     "mrc%c\t%{I:%8-11d%}, %{I:%21-23d%}, %{R:APSR_nzcv%}, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1142   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1143   1.7  christos     0x0e100010, 0x0f100010,
   1144   1.8  christos     "mrc%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15r, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1145   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1146   1.7  christos     0x0e000010, 0x0f100010,
   1147   1.8  christos     "mcr%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15R, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1148   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1149   1.8  christos     0x0c000000, 0x0e100000, "stc%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1150   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   1151   1.8  christos     0x0c100000, 0x0e100000, "ldc%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1152   1.7  christos 
   1153   1.7  christos   /* V6 coprocessor instructions.  */
   1154   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   1155   1.7  christos     0xfc500000, 0xfff00000,
   1156   1.8  christos     "mrrc2%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15Ru, %16-19Ru, %{R:cr%0-3d%}"},
   1157   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   1158   1.7  christos     0xfc400000, 0xfff00000,
   1159   1.8  christos     "mcrr2%c\t%{I:%8-11d%}, %{I:%4-7d%}, %12-15R, %16-19R, %{R:cr%0-3d%}"},
   1160   1.7  christos 
   1161   1.7  christos   /* V5 coprocessor instructions.  */
   1162   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1163   1.8  christos     0xfc100000, 0xfe100000, "ldc2%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1164   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1165   1.8  christos     0xfc000000, 0xfe100000, "stc2%22'l%c\t%{I:%8-11d%}, %{R:cr%12-15d%}, %A"},
   1166   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1167   1.7  christos     0xfe000000, 0xff000010,
   1168   1.8  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%}}"},
   1169   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1170   1.7  christos     0xfe000010, 0xff100010,
   1171   1.8  christos     "mcr2%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15R, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1172   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   1173   1.7  christos     0xfe100010, 0xff100010,
   1174   1.8  christos     "mrc2%c\t%{I:%8-11d%}, %{I:%21-23d%}, %12-15r, %{R:cr%16-19d%}, %{R:cr%0-3d%}, {%{I:%5-7d%}}"},
   1175   1.7  christos 
   1176   1.7  christos   {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   1177   1.1  christos };
   1178   1.1  christos 
   1179   1.1  christos /* Neon opcode table:  This does not encode the top byte -- that is
   1180   1.1  christos    checked by the print_insn_neon routine, as it depends on whether we are
   1181   1.1  christos    doing thumb32 or arm32 disassembly.  */
   1182   1.1  christos 
   1183   1.1  christos /* print_insn_neon recognizes the following format control codes:
   1184   1.1  christos 
   1185   1.1  christos    %%			%
   1186   1.1  christos 
   1187   1.1  christos    %c			print condition code
   1188   1.2     joerg    %u			print condition code (unconditional in ARM mode,
   1189   1.2     joerg                           UNPREDICTABLE if not AL in Thumb)
   1190   1.1  christos    %A			print v{st,ld}[1234] operands
   1191   1.1  christos    %B			print v{st,ld}[1234] any one operands
   1192   1.1  christos    %C			print v{st,ld}[1234] single->all operands
   1193   1.1  christos    %D			print scalar
   1194   1.1  christos    %E			print vmov, vmvn, vorr, vbic encoded constant
   1195   1.1  christos    %F			print vtbl,vtbx register list
   1196   1.1  christos 
   1197   1.1  christos    %<bitfield>r		print as an ARM register
   1198   1.1  christos    %<bitfield>d		print the bitfield in decimal
   1199   1.1  christos    %<bitfield>e         print the 2^N - bitfield in decimal
   1200   1.1  christos    %<bitfield>D		print as a NEON D register
   1201   1.1  christos    %<bitfield>Q		print as a NEON Q register
   1202   1.1  christos    %<bitfield>R		print as a NEON D or Q register
   1203   1.1  christos    %<bitfield>Sn	print byte scaled width limited by n
   1204   1.1  christos    %<bitfield>Tn	print short scaled width limited by n
   1205   1.1  christos    %<bitfield>Un	print long scaled width limited by n
   1206   1.4  christos 
   1207   1.1  christos    %<bitfield>'c	print specified char iff bitfield is all ones
   1208   1.1  christos    %<bitfield>`c	print specified char iff bitfield is all zeroes
   1209   1.1  christos    %<bitfield>?ab...    select from array of values in big endian order.  */
   1210   1.1  christos 
   1211   1.1  christos static const struct opcode32 neon_opcodes[] =
   1212   1.1  christos {
   1213   1.1  christos   /* Extract.  */
   1214   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1215   1.3  christos     0xf2b00840, 0xffb00850,
   1216   1.8  christos     "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, %{I:#%8-11d%}"},
   1217   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1218   1.3  christos     0xf2b00000, 0xffb00810,
   1219   1.8  christos     "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, %{I:#%8-11d%}"},
   1220   1.1  christos 
   1221   1.7  christos   /* Data transfer between ARM and NEON registers.  */
   1222   1.7  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1223   1.7  christos     0x0e800b10, 0x0ff00f70, "vdup%c.32\t%16-19,7D, %12-15r"},
   1224   1.7  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1225   1.7  christos     0x0e800b30, 0x0ff00f70, "vdup%c.16\t%16-19,7D, %12-15r"},
   1226   1.7  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1227   1.7  christos     0x0ea00b10, 0x0ff00f70, "vdup%c.32\t%16-19,7Q, %12-15r"},
   1228   1.7  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1229   1.7  christos     0x0ea00b30, 0x0ff00f70, "vdup%c.16\t%16-19,7Q, %12-15r"},
   1230   1.7  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1231   1.7  christos     0x0ec00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7D, %12-15r"},
   1232   1.7  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1233   1.7  christos     0x0ee00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7Q, %12-15r"},
   1234   1.7  christos 
   1235   1.1  christos   /* Move data element to all lanes.  */
   1236   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1237   1.8  christos     0xf3b40c00, 0xffb70f90, "vdup%c.32\t%12-15,22R, %{R:%0-3,5D[%19d]%}"},
   1238   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1239   1.8  christos     0xf3b20c00, 0xffb30f90, "vdup%c.16\t%12-15,22R, %{R:%0-3,5D[%18-19d]%}"},
   1240   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1241   1.8  christos     0xf3b10c00, 0xffb10f90, "vdup%c.8\t%12-15,22R, %{R:%0-3,5D[%17-19d]%}"},
   1242   1.1  christos 
   1243   1.1  christos   /* Table lookup.  */
   1244   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1245   1.3  christos     0xf3b00800, 0xffb00c50, "vtbl%c.8\t%12-15,22D, %F, %0-3,5D"},
   1246   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1247   1.3  christos     0xf3b00840, 0xffb00c50, "vtbx%c.8\t%12-15,22D, %F, %0-3,5D"},
   1248   1.3  christos 
   1249   1.1  christos   /* Half-precision conversions.  */
   1250   1.3  christos   {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
   1251   1.3  christos     0xf3b60600, 0xffbf0fd0, "vcvt%c.f16.f32\t%12-15,22D, %0-3,5Q"},
   1252   1.3  christos   {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
   1253   1.3  christos     0xf3b60700, 0xffbf0fd0, "vcvt%c.f32.f16\t%12-15,22Q, %0-3,5D"},
   1254   1.1  christos 
   1255   1.1  christos   /* NEON fused multiply add instructions.  */
   1256   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
   1257   1.4  christos     0xf2000c10, 0xffb00f10, "vfma%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1258   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1259   1.4  christos     0xf2100c10, 0xffb00f10, "vfma%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1260   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
   1261   1.4  christos     0xf2200c10, 0xffb00f10, "vfms%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1262   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1263   1.4  christos     0xf2300c10, 0xffb00f10, "vfms%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1264   1.1  christos 
   1265   1.7  christos   /* BFloat16 instructions.  */
   1266   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1267   1.7  christos     0xfc000d00, 0xffb00f10, "vdot.bf16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1268   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1269   1.8  christos     0xfe000d00, 0xffb00f10, "vdot.bf16\t%12-15,22R, %16-19,7R, %{R:d%0-3d[%5d]%}"},
   1270   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1271   1.7  christos     0xfc000c40, 0xffb00f50, "vmmla.bf16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1272   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1273   1.7  christos     0xf3b60640, 0xffbf0fd0, "vcvt%c.bf16.f32\t%12-15,22D, %0-3,5Q"},
   1274   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1275   1.7  christos     0xfc300810, 0xffb00f10, "vfma%6?tb.bf16\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1276   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
   1277   1.8  christos     0xfe300810, 0xffb00f10, "vfma%6?tb.bf16\t%12-15,22Q, %16-19,7Q, %{R:%0-2D[%3,5d]%}"},
   1278   1.7  christos 
   1279   1.7  christos   /* Matrix Multiply instructions.  */
   1280   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1281   1.7  christos     0xfc200c40, 0xffb00f50, "vsmmla.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1282   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1283   1.7  christos     0xfc200c50, 0xffb00f50, "vummla.u8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1284   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1285   1.7  christos     0xfca00c40, 0xffb00f50, "vusmmla.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1286   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1287   1.7  christos     0xfca00d00, 0xffb00f10, "vusdot.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1288   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1289   1.8  christos     0xfe800d00, 0xffb00f10, "vusdot.s8\t%12-15,22R, %16-19,7R, %{R:d%0-3d[%5d]%}"},
   1290   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
   1291   1.8  christos     0xfe800d10, 0xffb00f10, "vsudot.u8\t%12-15,22R, %16-19,7R, %{R:d%0-3d[%5d]%}"},
   1292   1.7  christos 
   1293   1.1  christos   /* Two registers, miscellaneous.  */
   1294   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1295   1.3  christos     0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32\t%12-15,22R, %0-3,5R"},
   1296   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1297   1.4  christos     0xf3b60400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f16\t%12-15,22R, %0-3,5R"},
   1298   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1299   1.3  christos     0xf3bb0000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us32.f32\t%12-15,22R, %0-3,5R"},
   1300   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1301   1.4  christos     0xf3b70000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us16.f16\t%12-15,22R, %0-3,5R"},
   1302   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1303   1.3  christos     0xf3b00300, 0xffbf0fd0, "aese%u.8\t%12-15,22Q, %0-3,5Q"},
   1304   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1305   1.3  christos     0xf3b00340, 0xffbf0fd0, "aesd%u.8\t%12-15,22Q, %0-3,5Q"},
   1306   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1307   1.3  christos     0xf3b00380, 0xffbf0fd0, "aesmc%u.8\t%12-15,22Q, %0-3,5Q"},
   1308   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1309   1.3  christos     0xf3b003c0, 0xffbf0fd0, "aesimc%u.8\t%12-15,22Q, %0-3,5Q"},
   1310   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1311   1.3  christos     0xf3b902c0, 0xffbf0fd0, "sha1h%u.32\t%12-15,22Q, %0-3,5Q"},
   1312   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1313   1.3  christos     0xf3ba0380, 0xffbf0fd0, "sha1su1%u.32\t%12-15,22Q, %0-3,5Q"},
   1314   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1315   1.3  christos     0xf3ba03c0, 0xffbf0fd0, "sha256su0%u.32\t%12-15,22Q, %0-3,5Q"},
   1316   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1317   1.3  christos     0xf2880a10, 0xfebf0fd0, "vmovl%c.%24?us8\t%12-15,22Q, %0-3,5D"},
   1318   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1319   1.3  christos     0xf2900a10, 0xfebf0fd0, "vmovl%c.%24?us16\t%12-15,22Q, %0-3,5D"},
   1320   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1321   1.3  christos     0xf2a00a10, 0xfebf0fd0, "vmovl%c.%24?us32\t%12-15,22Q, %0-3,5D"},
   1322   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1323   1.3  christos     0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
   1324   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1325   1.3  christos     0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
   1326   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1327   1.3  christos     0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
   1328   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1329   1.3  christos     0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
   1330   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1331   1.3  christos     0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
   1332   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1333   1.3  christos     0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
   1334   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1335   1.3  christos     0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
   1336   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1337   1.3  christos     0xf3b20300, 0xffb30fd0,
   1338   1.8  christos     "vshll%c.i%18-19S2\t%12-15,22Q, %0-3,5D, %{I:#%18-19S2%}"},
   1339   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1340   1.3  christos     0xf3bb0400, 0xffbf0e90, "vrecpe%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
   1341   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1342   1.4  christos     0xf3b70400, 0xffbf0e90, "vrecpe%c.%8?fu16\t%12-15,22R, %0-3,5R"},
   1343   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1344   1.3  christos     0xf3bb0480, 0xffbf0e90, "vrsqrte%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
   1345   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1346   1.4  christos     0xf3b70480, 0xffbf0e90, "vrsqrte%c.%8?fu16\t%12-15,22R, %0-3,5R"},
   1347   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1348   1.3  christos     0xf3b00000, 0xffb30f90, "vrev64%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1349   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1350   1.3  christos     0xf3b00080, 0xffb30f90, "vrev32%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1351   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1352   1.3  christos     0xf3b00100, 0xffb30f90, "vrev16%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1353   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1354   1.3  christos     0xf3b00400, 0xffb30f90, "vcls%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
   1355   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1356   1.3  christos     0xf3b00480, 0xffb30f90, "vclz%c.i%18-19S2\t%12-15,22R, %0-3,5R"},
   1357   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1358   1.3  christos     0xf3b00700, 0xffb30f90, "vqabs%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
   1359   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1360   1.3  christos     0xf3b00780, 0xffb30f90, "vqneg%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
   1361   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1362   1.3  christos     0xf3b20080, 0xffb30f90, "vtrn%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1363   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1364   1.3  christos     0xf3b20100, 0xffb30f90, "vuzp%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1365   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1366   1.3  christos     0xf3b20180, 0xffb30f90, "vzip%c.%18-19S2\t%12-15,22R, %0-3,5R"},
   1367   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1368   1.8  christos     0xf3b10000, 0xffb30b90, "vcgt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1369   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1370   1.8  christos     0xf3b10080, 0xffb30b90, "vcge%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1371   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1372   1.8  christos     0xf3b10100, 0xffb30b90, "vceq%c.%10?fi%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1373   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1374   1.8  christos     0xf3b10180, 0xffb30b90, "vcle%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1375   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1376   1.8  christos     0xf3b10200, 0xffb30b90, "vclt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, %{I:#0%}"},
   1377   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1378   1.3  christos     0xf3b10300, 0xffb30b90, "vabs%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
   1379   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1380   1.3  christos     0xf3b10380, 0xffb30b90, "vneg%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
   1381   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1382   1.3  christos     0xf3b00200, 0xffb30f10, "vpaddl%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
   1383   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1384   1.3  christos     0xf3b00600, 0xffb30f10, "vpadal%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
   1385   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1386   1.4  christos     0xf3bb0600, 0xffbf0e10,
   1387   1.3  christos     "vcvt%c.%7-8?usff%18-19Sa.%7-8?ffus%18-19Sa\t%12-15,22R, %0-3,5R"},
   1388   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1389   1.4  christos     0xf3b70600, 0xffbf0e10,
   1390   1.4  christos     "vcvt%c.%7-8?usff16.%7-8?ffus16\t%12-15,22R, %0-3,5R"},
   1391   1.1  christos 
   1392   1.1  christos   /* Three registers of the same length.  */
   1393   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1394   1.3  christos     0xf2000c40, 0xffb00f50, "sha1c%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1395   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1396   1.3  christos     0xf2100c40, 0xffb00f50, "sha1p%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1397   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1398   1.3  christos     0xf2200c40, 0xffb00f50, "sha1m%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1399   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1400   1.3  christos     0xf2300c40, 0xffb00f50, "sha1su0%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1401   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1402   1.3  christos     0xf3000c40, 0xffb00f50, "sha256h%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1403   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1404   1.3  christos     0xf3100c40, 0xffb00f50, "sha256h2%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1405   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1406   1.3  christos     0xf3200c40, 0xffb00f50, "sha256su1%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
   1407   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1408   1.4  christos     0xf3000f10, 0xffb00f10, "vmaxnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1409   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1410   1.4  christos     0xf3100f10, 0xffb00f10, "vmaxnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1411   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
   1412   1.4  christos     0xf3200f10, 0xffb00f10, "vminnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1413   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1414   1.4  christos     0xf3300f10, 0xffb00f10, "vminnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1415   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1416   1.3  christos     0xf2000110, 0xffb00f10, "vand%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1417   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1418   1.3  christos     0xf2100110, 0xffb00f10, "vbic%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1419   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1420   1.3  christos     0xf2200110, 0xffb00f10, "vorr%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1421   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1422   1.3  christos     0xf2300110, 0xffb00f10, "vorn%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1423   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1424   1.3  christos     0xf3000110, 0xffb00f10, "veor%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1425   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1426   1.3  christos     0xf3100110, 0xffb00f10, "vbsl%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1427   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1428   1.3  christos     0xf3200110, 0xffb00f10, "vbit%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1429   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1430   1.3  christos     0xf3300110, 0xffb00f10, "vbif%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1431   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1432   1.4  christos     0xf2000d00, 0xffb00f10, "vadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1433   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1434   1.4  christos     0xf2100d00, 0xffb00f10, "vadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1435   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1436   1.4  christos     0xf2000d10, 0xffb00f10, "vmla%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1437   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1438   1.4  christos     0xf2100d10, 0xffb00f10, "vmla%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1439   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1440   1.4  christos     0xf2000e00, 0xffb00f10, "vceq%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1441   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1442   1.4  christos     0xf2100e00, 0xffb00f10, "vceq%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1443   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1444   1.4  christos     0xf2000f00, 0xffb00f10, "vmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1445   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1446   1.4  christos     0xf2100f00, 0xffb00f10, "vmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1447   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1448   1.4  christos     0xf2000f10, 0xffb00f10, "vrecps%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1449   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1450   1.4  christos     0xf2100f10, 0xffb00f10, "vrecps%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1451   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1452   1.4  christos     0xf2200d00, 0xffb00f10, "vsub%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1453   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1454   1.4  christos     0xf2300d00, 0xffb00f10, "vsub%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1455   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1456   1.4  christos     0xf2200d10, 0xffb00f10, "vmls%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1457   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1458   1.4  christos     0xf2300d10, 0xffb00f10, "vmls%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1459   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1460   1.4  christos     0xf2200f00, 0xffb00f10, "vmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1461   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1462   1.4  christos     0xf2300f00, 0xffb00f10, "vmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1463   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1464   1.4  christos     0xf2200f10, 0xffb00f10, "vrsqrts%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1465   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1466   1.4  christos     0xf2300f10, 0xffb00f10, "vrsqrts%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1467   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1468   1.4  christos     0xf3000d00, 0xffb00f10, "vpadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1469   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1470   1.4  christos     0xf3100d00, 0xffb00f10, "vpadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1471   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1472   1.4  christos     0xf3000d10, 0xffb00f10, "vmul%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1473   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1474   1.4  christos     0xf3100d10, 0xffb00f10, "vmul%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1475   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1476   1.4  christos     0xf3000e00, 0xffb00f10, "vcge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1477   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1478   1.4  christos     0xf3100e00, 0xffb00f10, "vcge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1479   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1480   1.4  christos     0xf3000e10, 0xffb00f10, "vacge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1481   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1482   1.4  christos     0xf3100e10, 0xffb00f10, "vacge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1483   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1484   1.4  christos     0xf3000f00, 0xffb00f10, "vpmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1485   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1486   1.4  christos     0xf3100f00, 0xffb00f10, "vpmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1487   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1488   1.4  christos     0xf3200d00, 0xffb00f10, "vabd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1489   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1490   1.4  christos     0xf3300d00, 0xffb00f10, "vabd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1491   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1492   1.4  christos     0xf3200e00, 0xffb00f10, "vcgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1493   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1494   1.4  christos     0xf3300e00, 0xffb00f10, "vcgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1495   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1496   1.4  christos     0xf3200e10, 0xffb00f10, "vacgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1497   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1498   1.4  christos     0xf3300e10, 0xffb00f10, "vacgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1499   1.4  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1500   1.4  christos     0xf3200f00, 0xffb00f10, "vpmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1501   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1502   1.4  christos     0xf3300f00, 0xffb00f10, "vpmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1503   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1504   1.3  christos     0xf2000800, 0xff800f10, "vadd%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1505   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1506   1.3  christos     0xf2000810, 0xff800f10, "vtst%c.%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1507   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1508   1.3  christos     0xf2000900, 0xff800f10, "vmla%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1509   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1510   1.3  christos     0xf2000b00, 0xff800f10,
   1511   1.3  christos     "vqdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1512   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1513   1.3  christos     0xf2000b10, 0xff800f10,
   1514   1.3  christos     "vpadd%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1515   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1516   1.3  christos     0xf3000800, 0xff800f10, "vsub%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1517   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1518   1.3  christos     0xf3000810, 0xff800f10, "vceq%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1519   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1520   1.3  christos     0xf3000900, 0xff800f10, "vmls%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1521   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1522   1.3  christos     0xf3000b00, 0xff800f10,
   1523   1.3  christos     "vqrdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1524   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1525   1.3  christos     0xf2000000, 0xfe800f10,
   1526   1.3  christos     "vhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1527   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1528   1.3  christos     0xf2000010, 0xfe800f10,
   1529   1.3  christos     "vqadd%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1530   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1531   1.3  christos     0xf2000100, 0xfe800f10,
   1532   1.3  christos     "vrhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1533   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1534   1.3  christos     0xf2000200, 0xfe800f10,
   1535   1.3  christos     "vhsub%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1536   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1537   1.3  christos     0xf2000210, 0xfe800f10,
   1538   1.3  christos     "vqsub%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1539   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1540   1.3  christos     0xf2000300, 0xfe800f10,
   1541   1.3  christos     "vcgt%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1542   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1543   1.3  christos     0xf2000310, 0xfe800f10,
   1544   1.3  christos     "vcge%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1545   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1546   1.3  christos     0xf2000400, 0xfe800f10,
   1547   1.3  christos     "vshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1548   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1549   1.3  christos     0xf2000410, 0xfe800f10,
   1550   1.3  christos     "vqshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1551   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1552   1.3  christos     0xf2000500, 0xfe800f10,
   1553   1.3  christos     "vrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1554   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1555   1.3  christos     0xf2000510, 0xfe800f10,
   1556   1.3  christos     "vqrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
   1557   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1558   1.3  christos     0xf2000600, 0xfe800f10,
   1559   1.3  christos     "vmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1560   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1561   1.3  christos     0xf2000610, 0xfe800f10,
   1562   1.3  christos     "vmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1563   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1564   1.3  christos     0xf2000700, 0xfe800f10,
   1565   1.3  christos     "vabd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1566   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1567   1.3  christos     0xf2000710, 0xfe800f10,
   1568   1.3  christos     "vaba%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1569   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1570   1.3  christos     0xf2000910, 0xfe800f10,
   1571   1.3  christos     "vmul%c.%24?pi%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1572   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1573   1.3  christos     0xf2000a00, 0xfe800f10,
   1574   1.3  christos     "vpmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1575   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1576   1.3  christos     0xf2000a10, 0xfe800f10,
   1577   1.3  christos     "vpmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1578   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1579   1.3  christos     0xf3000b10, 0xff800f10,
   1580   1.3  christos     "vqrdmlah%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1581   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1582   1.3  christos     0xf3000c10, 0xff800f10,
   1583   1.3  christos     "vqrdmlsh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
   1584   1.1  christos 
   1585   1.1  christos   /* One register and an immediate value.  */
   1586   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1587   1.3  christos     0xf2800e10, 0xfeb80fb0, "vmov%c.i8\t%12-15,22R, %E"},
   1588   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1589   1.3  christos     0xf2800e30, 0xfeb80fb0, "vmov%c.i64\t%12-15,22R, %E"},
   1590   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1591   1.3  christos     0xf2800f10, 0xfeb80fb0, "vmov%c.f32\t%12-15,22R, %E"},
   1592   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1593   1.3  christos     0xf2800810, 0xfeb80db0, "vmov%c.i16\t%12-15,22R, %E"},
   1594   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1595   1.3  christos     0xf2800830, 0xfeb80db0, "vmvn%c.i16\t%12-15,22R, %E"},
   1596   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1597   1.3  christos     0xf2800910, 0xfeb80db0, "vorr%c.i16\t%12-15,22R, %E"},
   1598   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1599   1.3  christos     0xf2800930, 0xfeb80db0, "vbic%c.i16\t%12-15,22R, %E"},
   1600   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1601   1.3  christos     0xf2800c10, 0xfeb80eb0, "vmov%c.i32\t%12-15,22R, %E"},
   1602   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1603   1.3  christos     0xf2800c30, 0xfeb80eb0, "vmvn%c.i32\t%12-15,22R, %E"},
   1604   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1605   1.3  christos     0xf2800110, 0xfeb809b0, "vorr%c.i32\t%12-15,22R, %E"},
   1606   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1607   1.3  christos     0xf2800130, 0xfeb809b0, "vbic%c.i32\t%12-15,22R, %E"},
   1608   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1609   1.3  christos     0xf2800010, 0xfeb808b0, "vmov%c.i32\t%12-15,22R, %E"},
   1610   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1611   1.3  christos     0xf2800030, 0xfeb808b0, "vmvn%c.i32\t%12-15,22R, %E"},
   1612   1.1  christos 
   1613   1.1  christos   /* Two registers and a shift amount.  */
   1614   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1615   1.8  christos     0xf2880810, 0xffb80fd0, "vshrn%c.i16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1616   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1617   1.8  christos     0xf2880850, 0xffb80fd0, "vrshrn%c.i16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1618   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1619   1.8  christos     0xf2880810, 0xfeb80fd0, "vqshrun%c.s16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1620   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1621   1.8  christos     0xf2880850, 0xfeb80fd0, "vqrshrun%c.s16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1622   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1623   1.8  christos     0xf2880910, 0xfeb80fd0, "vqshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1624   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1625   1.3  christos     0xf2880950, 0xfeb80fd0,
   1626   1.8  christos     "vqrshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, %{I:#%16-18e%}"},
   1627   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1628   1.8  christos     0xf2880a10, 0xfeb80fd0, "vshll%c.%24?us8\t%12-15,22Q, %0-3,5D, %{I:#%16-18d%}"},
   1629   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1630   1.8  christos     0xf2900810, 0xffb00fd0, "vshrn%c.i32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1631   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1632   1.8  christos     0xf2900850, 0xffb00fd0, "vrshrn%c.i32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1633   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1634   1.8  christos     0xf2880510, 0xffb80f90, "vshl%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1635   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1636   1.8  christos     0xf3880410, 0xffb80f90, "vsri%c.8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1637   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1638   1.8  christos     0xf3880510, 0xffb80f90, "vsli%c.8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1639   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1640   1.8  christos     0xf3880610, 0xffb80f90, "vqshlu%c.s8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1641   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1642   1.8  christos     0xf2900810, 0xfeb00fd0, "vqshrun%c.s32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1643   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1644   1.8  christos     0xf2900850, 0xfeb00fd0, "vqrshrun%c.s32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1645   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1646   1.8  christos     0xf2900910, 0xfeb00fd0, "vqshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1647   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1648   1.3  christos     0xf2900950, 0xfeb00fd0,
   1649   1.8  christos     "vqrshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, %{I:#%16-19e%}"},
   1650   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1651   1.8  christos     0xf2900a10, 0xfeb00fd0, "vshll%c.%24?us16\t%12-15,22Q, %0-3,5D, %{I:#%16-19d%}"},
   1652   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1653   1.8  christos     0xf2880010, 0xfeb80f90, "vshr%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1654   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1655   1.8  christos     0xf2880110, 0xfeb80f90, "vsra%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1656   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1657   1.8  christos     0xf2880210, 0xfeb80f90, "vrshr%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1658   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1659   1.8  christos     0xf2880310, 0xfeb80f90, "vrsra%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18e%}"},
   1660   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1661   1.8  christos     0xf2880710, 0xfeb80f90, "vqshl%c.%24?us8\t%12-15,22R, %0-3,5R, %{I:#%16-18d%}"},
   1662   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1663   1.8  christos     0xf2a00810, 0xffa00fd0, "vshrn%c.i64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1664   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1665   1.8  christos     0xf2a00850, 0xffa00fd0, "vrshrn%c.i64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1666   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1667   1.8  christos     0xf2900510, 0xffb00f90, "vshl%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1668   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1669   1.8  christos     0xf3900410, 0xffb00f90, "vsri%c.16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1670   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1671   1.8  christos     0xf3900510, 0xffb00f90, "vsli%c.16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1672   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1673   1.8  christos     0xf3900610, 0xffb00f90, "vqshlu%c.s16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1674   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1675   1.8  christos     0xf2a00a10, 0xfea00fd0, "vshll%c.%24?us32\t%12-15,22Q, %0-3,5D, %{I:#%16-20d%}"},
   1676   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1677   1.8  christos     0xf2900010, 0xfeb00f90, "vshr%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1678   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1679   1.8  christos     0xf2900110, 0xfeb00f90, "vsra%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1680   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1681   1.8  christos     0xf2900210, 0xfeb00f90, "vrshr%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1682   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1683   1.8  christos     0xf2900310, 0xfeb00f90, "vrsra%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19e%}"},
   1684   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1685   1.8  christos     0xf2900710, 0xfeb00f90, "vqshl%c.%24?us16\t%12-15,22R, %0-3,5R, %{I:#%16-19d%}"},
   1686   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1687   1.8  christos     0xf2a00810, 0xfea00fd0, "vqshrun%c.s64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1688   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1689   1.8  christos     0xf2a00850, 0xfea00fd0, "vqrshrun%c.s64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1690   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1691   1.8  christos     0xf2a00910, 0xfea00fd0, "vqshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1692   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1693   1.3  christos     0xf2a00950, 0xfea00fd0,
   1694   1.8  christos     "vqrshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, %{I:#%16-20e%}"},
   1695   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1696   1.8  christos     0xf2a00510, 0xffa00f90, "vshl%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1697   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1698   1.8  christos     0xf3a00410, 0xffa00f90, "vsri%c.32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1699   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1700   1.8  christos     0xf3a00510, 0xffa00f90, "vsli%c.32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1701   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1702   1.8  christos     0xf3a00610, 0xffa00f90, "vqshlu%c.s32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1703   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1704   1.8  christos     0xf2a00010, 0xfea00f90, "vshr%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1705   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1706   1.8  christos     0xf2a00110, 0xfea00f90, "vsra%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1707   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1708   1.8  christos     0xf2a00210, 0xfea00f90, "vrshr%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1709   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1710   1.8  christos     0xf2a00310, 0xfea00f90, "vrsra%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1711   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1712   1.8  christos     0xf2a00710, 0xfea00f90, "vqshl%c.%24?us32\t%12-15,22R, %0-3,5R, %{I:#%16-20d%}"},
   1713   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1714   1.8  christos     0xf2800590, 0xff800f90, "vshl%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1715   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1716   1.8  christos     0xf3800490, 0xff800f90, "vsri%c.64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1717   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1718   1.8  christos     0xf3800590, 0xff800f90, "vsli%c.64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1719   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1720   1.8  christos     0xf3800690, 0xff800f90, "vqshlu%c.s64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1721   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1722   1.8  christos     0xf2800090, 0xfe800f90, "vshr%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1723   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1724   1.8  christos     0xf2800190, 0xfe800f90, "vsra%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1725   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1726   1.8  christos     0xf2800290, 0xfe800f90, "vrshr%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1727   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1728   1.8  christos     0xf2800390, 0xfe800f90, "vrsra%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21e%}"},
   1729   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1730   1.8  christos     0xf2800790, 0xfe800f90, "vqshl%c.%24?us64\t%12-15,22R, %0-3,5R, %{I:#%16-21d%}"},
   1731   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1732   1.3  christos     0xf2a00e10, 0xfea00e90,
   1733   1.8  christos     "vcvt%c.%24,8?usff32.%24,8?ffus32\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1734   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
   1735   1.4  christos     0xf2a00c10, 0xfea00e90,
   1736   1.8  christos     "vcvt%c.%24,8?usff16.%24,8?ffus16\t%12-15,22R, %0-3,5R, %{I:#%16-20e%}"},
   1737   1.1  christos 
   1738   1.1  christos   /* Three registers of different lengths.  */
   1739   1.3  christos   {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
   1740   1.3  christos     0xf2a00e00, 0xfeb00f50, "vmull%c.p64\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1741   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1742   1.3  christos     0xf2800e00, 0xfea00f50, "vmull%c.p%20S0\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1743   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1744   1.3  christos     0xf2800400, 0xff800f50,
   1745   1.3  christos     "vaddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1746   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1747   1.3  christos     0xf2800600, 0xff800f50,
   1748   1.3  christos     "vsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1749   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1750   1.3  christos     0xf2800900, 0xff800f50,
   1751   1.3  christos     "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1752   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1753   1.3  christos     0xf2800b00, 0xff800f50,
   1754   1.3  christos     "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1755   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1756   1.3  christos     0xf2800d00, 0xff800f50,
   1757   1.3  christos     "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1758   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1759   1.3  christos     0xf3800400, 0xff800f50,
   1760   1.3  christos     "vraddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1761   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1762   1.3  christos     0xf3800600, 0xff800f50,
   1763   1.3  christos     "vrsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
   1764   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1765   1.3  christos     0xf2800000, 0xfe800f50,
   1766   1.3  christos     "vaddl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1767   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1768   1.3  christos     0xf2800100, 0xfe800f50,
   1769   1.3  christos     "vaddw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
   1770   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1771   1.3  christos     0xf2800200, 0xfe800f50,
   1772   1.3  christos     "vsubl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1773   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1774   1.3  christos     0xf2800300, 0xfe800f50,
   1775   1.3  christos     "vsubw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
   1776   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1777   1.3  christos     0xf2800500, 0xfe800f50,
   1778   1.3  christos     "vabal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1779   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1780   1.3  christos     0xf2800700, 0xfe800f50,
   1781   1.3  christos     "vabdl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1782   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1783   1.3  christos     0xf2800800, 0xfe800f50,
   1784   1.3  christos     "vmlal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1785   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1786   1.3  christos     0xf2800a00, 0xfe800f50,
   1787   1.3  christos     "vmlsl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1788   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1789   1.3  christos     0xf2800c00, 0xfe800f50,
   1790   1.3  christos     "vmull%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
   1791   1.1  christos 
   1792   1.1  christos   /* Two registers and a scalar.  */
   1793   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1794   1.3  christos     0xf2800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1795   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1796   1.4  christos     0xf2800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
   1797   1.4  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1798   1.4  christos     0xf2900140, 0xffb00f50, "vmla%c.f16\t%12-15,22D, %16-19,7D, %D"},
   1799   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1800   1.3  christos     0xf2800340, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1801   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1802   1.3  christos     0xf2800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1803   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1804   1.4  christos     0xf2800540, 0xff900f50, "vmls%c.f%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1805   1.4  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1806   1.4  christos     0xf2900540, 0xffb00f50, "vmls%c.f16\t%12-15,22D, %16-19,7D, %D"},
   1807   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1808   1.3  christos     0xf2800740, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1809   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1810   1.3  christos     0xf2800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1811   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1812   1.4  christos     0xf2800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
   1813   1.4  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1814   1.4  christos     0xf2900940, 0xffb00f50, "vmul%c.f16\t%12-15,22D, %16-19,7D, %D"},
   1815   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1816   1.3  christos     0xf2800b40, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1817   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1818   1.3  christos     0xf2800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1819   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1820   1.3  christos     0xf2800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1821   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1822   1.3  christos     0xf3800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1823   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1824   1.4  christos     0xf3800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
   1825   1.4  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1826   1.4  christos     0xf3900140, 0xffb00f50, "vmla%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
   1827   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1828   1.3  christos     0xf3800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1829   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1830   1.4  christos     0xf3800540, 0xff900f50, "vmls%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
   1831   1.4  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1832   1.4  christos     0xf3900540, 0xffb00f50, "vmls%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
   1833   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1834   1.3  christos     0xf3800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1835   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1836   1.4  christos     0xf3800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
   1837   1.4  christos   {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
   1838   1.4  christos     0xf3900940, 0xffb00f50, "vmul%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
   1839   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1840   1.3  christos     0xf3800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1841   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1842   1.3  christos     0xf3800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1843   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1844   1.3  christos     0xf2800240, 0xfe800f50,
   1845   1.3  christos     "vmlal%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1846   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1847   1.3  christos     0xf2800640, 0xfe800f50,
   1848   1.3  christos     "vmlsl%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1849   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1850   1.3  christos     0xf2800a40, 0xfe800f50,
   1851   1.3  christos     "vmull%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
   1852   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1853   1.3  christos     0xf2800e40, 0xff800f50,
   1854   1.3  christos    "vqrdmlah%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1855   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1856   1.3  christos     0xf2800f40, 0xff800f50,
   1857   1.3  christos    "vqrdmlsh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
   1858   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1859   1.3  christos     0xf3800e40, 0xff800f50,
   1860   1.3  christos    "vqrdmlah%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
   1861   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
   1862   1.3  christos     0xf3800f40, 0xff800f50,
   1863   1.3  christos    "vqrdmlsh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"
   1864   1.3  christos   },
   1865   1.1  christos 
   1866   1.1  christos   /* Element and structure load/store.  */
   1867   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1868   1.3  christos     0xf4a00fc0, 0xffb00fc0, "vld4%c.32\t%C"},
   1869   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1870   1.3  christos     0xf4a00c00, 0xffb00f00, "vld1%c.%6-7S2\t%C"},
   1871   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1872   1.3  christos     0xf4a00d00, 0xffb00f00, "vld2%c.%6-7S2\t%C"},
   1873   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1874   1.3  christos     0xf4a00e00, 0xffb00f00, "vld3%c.%6-7S2\t%C"},
   1875   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1876   1.3  christos     0xf4a00f00, 0xffb00f00, "vld4%c.%6-7S2\t%C"},
   1877   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1878   1.3  christos     0xf4000200, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1879   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1880   1.3  christos     0xf4000300, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
   1881   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1882   1.3  christos     0xf4000400, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
   1883   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1884   1.3  christos     0xf4000500, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
   1885   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1886   1.3  christos     0xf4000600, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1887   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1888   1.3  christos     0xf4000700, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1889   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1890   1.3  christos     0xf4000800, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
   1891   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1892   1.3  christos     0xf4000900, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
   1893   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1894   1.3  christos     0xf4000a00, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
   1895   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1896   1.3  christos     0xf4000000, 0xff900e00, "v%21?ls%21?dt4%c.%6-7S2\t%A"},
   1897   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1898   1.3  christos     0xf4800000, 0xff900300, "v%21?ls%21?dt1%c.%10-11S2\t%B"},
   1899   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1900   1.3  christos     0xf4800100, 0xff900300, "v%21?ls%21?dt2%c.%10-11S2\t%B"},
   1901   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1902   1.3  christos     0xf4800200, 0xff900300, "v%21?ls%21?dt3%c.%10-11S2\t%B"},
   1903   1.3  christos   {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
   1904   1.3  christos     0xf4800300, 0xff900300, "v%21?ls%21?dt4%c.%10-11S2\t%B"},
   1905   1.1  christos 
   1906   1.3  christos   {ARM_FEATURE_CORE_LOW (0), 0 ,0, 0}
   1907   1.1  christos };
   1908   1.1  christos 
   1909   1.7  christos /* mve opcode table.  */
   1910   1.7  christos 
   1911   1.7  christos /* print_insn_mve recognizes the following format control codes:
   1912   1.7  christos 
   1913   1.7  christos    %%			%
   1914   1.7  christos 
   1915   1.7  christos    %a			print '+' or '-' or imm offset in vldr[bhwd] and
   1916   1.7  christos 			vstr[bhwd]
   1917   1.7  christos    %c			print condition code
   1918   1.7  christos    %d			print addr mode of MVE vldr[bhw] and vstr[bhw]
   1919   1.7  christos    %u			print 'U' (unsigned) or 'S' for various mve instructions
   1920   1.7  christos    %i			print MVE predicate(s) for vpt and vpst
   1921   1.7  christos    %j			print a 5-bit immediate from hw2[14:12,7:6]
   1922   1.7  christos    %k			print 48 if the 7th position bit is set else print 64.
   1923   1.7  christos    %m			print rounding mode for vcvt and vrint
   1924   1.7  christos    %n			print vector comparison code for predicated instruction
   1925   1.7  christos    %s			print size for various vcvt instructions
   1926   1.7  christos    %v			print vector predicate for instruction in predicated
   1927   1.7  christos 			block
   1928   1.7  christos    %o			print offset scaled for vldr[hwd] and vstr[hwd]
   1929   1.7  christos    %w			print writeback mode for MVE v{st,ld}[24]
   1930   1.7  christos    %B			print v{st,ld}[24] any one operands
   1931   1.7  christos    %E			print vmov, vmvn, vorr, vbic encoded constant
   1932   1.7  christos    %N			print generic index for vmov
   1933   1.7  christos    %T			print bottom ('b') or top ('t') of source register
   1934   1.7  christos    %X			print exchange field in vmla* instructions
   1935   1.7  christos 
   1936   1.7  christos    %<bitfield>r		print as an ARM register
   1937   1.7  christos    %<bitfield>d		print the bitfield in decimal
   1938   1.7  christos    %<bitfield>A		print accumulate or not
   1939   1.7  christos    %<bitfield>c		print bitfield as a condition code
   1940   1.7  christos    %<bitfield>C		print bitfield as an inverted condition code
   1941   1.7  christos    %<bitfield>Q		print as a MVE Q register
   1942   1.7  christos    %<bitfield>F		print as a MVE S register
   1943   1.7  christos    %<bitfield>Z		as %<>r but r15 is ZR instead of PC and r13 is
   1944   1.7  christos 			UNPREDICTABLE
   1945   1.7  christos 
   1946   1.7  christos    %<bitfield>S		as %<>r but r15 or r13 is UNPREDICTABLE
   1947   1.7  christos    %<bitfield>s		print size for vector predicate & non VMOV instructions
   1948   1.7  christos    %<bitfield>I		print carry flag or not
   1949   1.7  christos    %<bitfield>i		print immediate for vstr/vldr reg +/- imm
   1950   1.7  christos    %<bitfield>h		print high half of 64-bit destination reg
   1951   1.7  christos    %<bitfield>k		print immediate for vector conversion instruction
   1952   1.7  christos    %<bitfield>l		print low half of 64-bit destination reg
   1953   1.7  christos    %<bitfield>o		print rotate value for vcmul
   1954   1.7  christos    %<bitfield>u		print immediate value for vddup/vdwdup
   1955   1.7  christos    %<bitfield>x		print the bitfield in hex.
   1956   1.7  christos   */
   1957   1.7  christos 
   1958   1.7  christos static const struct mopcode32 mve_opcodes[] =
   1959   1.7  christos {
   1960   1.7  christos   /* MVE.  */
   1961   1.7  christos 
   1962   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   1963   1.7  christos    MVE_VPST,
   1964   1.7  christos    0xfe310f4d, 0xffbf1fff,
   1965   1.7  christos    "vpst%i"
   1966   1.7  christos   },
   1967   1.7  christos 
   1968   1.7  christos   /* Floating point VPT T1.  */
   1969   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   1970   1.7  christos    MVE_VPT_FP_T1,
   1971   1.7  christos    0xee310f00, 0xefb10f50,
   1972   1.7  christos    "vpt%i.f%28s\t%n, %17-19Q, %1-3,5Q"},
   1973   1.7  christos   /* Floating point VPT T2.  */
   1974   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   1975   1.7  christos    MVE_VPT_FP_T2,
   1976   1.7  christos    0xee310f40, 0xefb10f50,
   1977   1.7  christos    "vpt%i.f%28s\t%n, %17-19Q, %0-3Z"},
   1978   1.7  christos 
   1979   1.7  christos   /* Vector VPT T1.  */
   1980   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   1981   1.7  christos    MVE_VPT_VEC_T1,
   1982   1.7  christos    0xfe010f00, 0xff811f51,
   1983   1.7  christos    "vpt%i.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
   1984   1.7  christos   /* Vector VPT T2.  */
   1985   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   1986   1.7  christos    MVE_VPT_VEC_T2,
   1987   1.7  christos    0xfe010f01, 0xff811f51,
   1988   1.7  christos    "vpt%i.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
   1989   1.7  christos   /* Vector VPT T3.  */
   1990   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   1991   1.7  christos    MVE_VPT_VEC_T3,
   1992   1.7  christos    0xfe011f00, 0xff811f50,
   1993   1.7  christos    "vpt%i.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
   1994   1.7  christos   /* Vector VPT T4.  */
   1995   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   1996   1.7  christos    MVE_VPT_VEC_T4,
   1997   1.7  christos    0xfe010f40, 0xff811f70,
   1998   1.7  christos    "vpt%i.i%20-21s\t%n, %17-19Q, %0-3Z"},
   1999   1.7  christos   /* Vector VPT T5.  */
   2000   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2001   1.7  christos    MVE_VPT_VEC_T5,
   2002   1.7  christos    0xfe010f60, 0xff811f70,
   2003   1.7  christos    "vpt%i.u%20-21s\t%n, %17-19Q, %0-3Z"},
   2004   1.7  christos   /* Vector VPT T6.  */
   2005   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2006   1.7  christos    MVE_VPT_VEC_T6,
   2007   1.7  christos    0xfe011f40, 0xff811f50,
   2008   1.7  christos    "vpt%i.s%20-21s\t%n, %17-19Q, %0-3Z"},
   2009   1.7  christos 
   2010   1.7  christos   /* Vector VBIC immediate.  */
   2011   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2012   1.7  christos    MVE_VBIC_IMM,
   2013   1.7  christos    0xef800070, 0xefb81070,
   2014   1.7  christos    "vbic%v.i%8-11s\t%13-15,22Q, %E"},
   2015   1.7  christos 
   2016   1.7  christos   /* Vector VBIC register.  */
   2017   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2018   1.7  christos    MVE_VBIC_REG,
   2019   1.7  christos    0xef100150, 0xffb11f51,
   2020   1.7  christos    "vbic%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2021   1.7  christos 
   2022   1.7  christos   /* Vector VABAV.  */
   2023   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2024   1.7  christos    MVE_VABAV,
   2025   1.7  christos    0xee800f01, 0xefc10f51,
   2026   1.7  christos    "vabav%v.%u%20-21s\t%12-15r, %17-19,7Q, %1-3,5Q"},
   2027   1.7  christos 
   2028   1.7  christos   /* Vector VABD floating point.  */
   2029   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2030   1.7  christos    MVE_VABD_FP,
   2031   1.7  christos    0xff200d40, 0xffa11f51,
   2032   1.7  christos    "vabd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2033   1.7  christos 
   2034   1.7  christos   /* Vector VABD.  */
   2035   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2036   1.7  christos    MVE_VABD_VEC,
   2037   1.7  christos    0xef000740, 0xef811f51,
   2038   1.7  christos    "vabd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2039   1.7  christos 
   2040   1.7  christos   /* Vector VABS floating point.  */
   2041   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2042   1.7  christos    MVE_VABS_FP,
   2043   1.7  christos    0xFFB10740, 0xFFB31FD1,
   2044   1.7  christos    "vabs%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
   2045   1.7  christos   /* Vector VABS.  */
   2046   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2047   1.7  christos    MVE_VABS_VEC,
   2048   1.7  christos    0xffb10340, 0xffb31fd1,
   2049   1.7  christos    "vabs%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2050   1.7  christos 
   2051   1.7  christos   /* Vector VADD floating point T1.  */
   2052   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2053   1.7  christos    MVE_VADD_FP_T1,
   2054   1.7  christos    0xef000d40, 0xffa11f51,
   2055   1.7  christos    "vadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2056   1.7  christos   /* Vector VADD floating point T2.  */
   2057   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2058   1.7  christos    MVE_VADD_FP_T2,
   2059   1.7  christos    0xee300f40, 0xefb11f70,
   2060   1.7  christos    "vadd%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2061   1.7  christos   /* Vector VADD T1.  */
   2062   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2063   1.7  christos    MVE_VADD_VEC_T1,
   2064   1.7  christos    0xef000840, 0xff811f51,
   2065   1.7  christos    "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2066   1.7  christos   /* Vector VADD T2.  */
   2067   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2068   1.7  christos    MVE_VADD_VEC_T2,
   2069   1.7  christos    0xee010f40, 0xff811f70,
   2070   1.7  christos    "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2071   1.7  christos 
   2072   1.7  christos   /* Vector VADDLV.  */
   2073   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2074   1.7  christos    MVE_VADDLV,
   2075   1.7  christos    0xee890f00, 0xef8f1fd1,
   2076   1.7  christos    "vaddlv%5A%v.%u32\t%13-15l, %20-22h, %1-3Q"},
   2077   1.7  christos 
   2078   1.7  christos   /* Vector VADDV.  */
   2079   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2080   1.7  christos    MVE_VADDV,
   2081   1.7  christos    0xeef10f00, 0xeff31fd1,
   2082   1.7  christos    "vaddv%5A%v.%u%18-19s\t%13-15l, %1-3Q"},
   2083   1.7  christos 
   2084   1.7  christos   /* Vector VADC.  */
   2085   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2086   1.7  christos    MVE_VADC,
   2087   1.7  christos    0xee300f00, 0xffb10f51,
   2088   1.7  christos    "vadc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2089   1.7  christos 
   2090   1.7  christos   /* Vector VAND.  */
   2091   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2092   1.7  christos    MVE_VAND,
   2093   1.7  christos    0xef000150, 0xffb11f51,
   2094   1.7  christos    "vand%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2095   1.7  christos 
   2096   1.7  christos   /* Vector VBRSR register.  */
   2097   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2098   1.7  christos    MVE_VBRSR,
   2099   1.7  christos    0xfe011e60, 0xff811f70,
   2100   1.7  christos    "vbrsr%v.%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2101   1.7  christos 
   2102   1.7  christos   /* Vector VCADD floating point.  */
   2103   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2104   1.7  christos    MVE_VCADD_FP,
   2105   1.7  christos    0xfc800840, 0xfea11f51,
   2106   1.8  christos    "vcadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%24o%}"},
   2107   1.7  christos 
   2108   1.7  christos   /* Vector VCADD.  */
   2109   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2110   1.7  christos    MVE_VCADD_VEC,
   2111   1.7  christos    0xfe000f00, 0xff810f51,
   2112   1.8  christos    "vcadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%12o%}"},
   2113   1.7  christos 
   2114   1.7  christos   /* Vector VCLS.  */
   2115   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2116   1.7  christos    MVE_VCLS,
   2117   1.7  christos    0xffb00440, 0xffb31fd1,
   2118   1.7  christos    "vcls%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2119   1.7  christos 
   2120   1.7  christos   /* Vector VCLZ.  */
   2121   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2122   1.7  christos    MVE_VCLZ,
   2123   1.7  christos    0xffb004c0, 0xffb31fd1,
   2124   1.7  christos    "vclz%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
   2125   1.7  christos 
   2126   1.7  christos   /* Vector VCMLA.  */
   2127   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2128   1.7  christos    MVE_VCMLA_FP,
   2129   1.7  christos    0xfc200840, 0xfe211f51,
   2130   1.8  christos    "vcmla%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%23-24o%}"},
   2131   1.7  christos 
   2132   1.7  christos   /* Vector VCMP floating point T1.  */
   2133   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2134   1.7  christos    MVE_VCMP_FP_T1,
   2135   1.7  christos    0xee310f00, 0xeff1ef50,
   2136   1.7  christos    "vcmp%v.f%28s\t%n, %17-19Q, %1-3,5Q"},
   2137   1.7  christos 
   2138   1.7  christos   /* Vector VCMP floating point T2.  */
   2139   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2140   1.7  christos    MVE_VCMP_FP_T2,
   2141   1.7  christos    0xee310f40, 0xeff1ef50,
   2142   1.7  christos    "vcmp%v.f%28s\t%n, %17-19Q, %0-3Z"},
   2143   1.7  christos 
   2144   1.7  christos   /* Vector VCMP T1.  */
   2145   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2146   1.7  christos    MVE_VCMP_VEC_T1,
   2147   1.7  christos    0xfe010f00, 0xffc1ff51,
   2148   1.7  christos    "vcmp%v.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2149   1.7  christos   /* Vector VCMP T2.  */
   2150   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2151   1.7  christos    MVE_VCMP_VEC_T2,
   2152   1.7  christos    0xfe010f01, 0xffc1ff51,
   2153   1.7  christos    "vcmp%v.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2154   1.7  christos   /* Vector VCMP T3.  */
   2155   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2156   1.7  christos    MVE_VCMP_VEC_T3,
   2157   1.7  christos    0xfe011f00, 0xffc1ff50,
   2158   1.7  christos    "vcmp%v.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
   2159   1.7  christos   /* Vector VCMP T4.  */
   2160   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2161   1.7  christos    MVE_VCMP_VEC_T4,
   2162   1.7  christos    0xfe010f40, 0xffc1ff70,
   2163   1.7  christos    "vcmp%v.i%20-21s\t%n, %17-19Q, %0-3Z"},
   2164   1.7  christos   /* Vector VCMP T5.  */
   2165   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2166   1.7  christos    MVE_VCMP_VEC_T5,
   2167   1.7  christos    0xfe010f60, 0xffc1ff70,
   2168   1.7  christos    "vcmp%v.u%20-21s\t%n, %17-19Q, %0-3Z"},
   2169   1.7  christos   /* Vector VCMP T6.  */
   2170   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2171   1.7  christos    MVE_VCMP_VEC_T6,
   2172   1.7  christos    0xfe011f40, 0xffc1ff50,
   2173   1.7  christos    "vcmp%v.s%20-21s\t%n, %17-19Q, %0-3Z"},
   2174   1.7  christos 
   2175   1.7  christos   /* Vector VDUP.  */
   2176   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2177   1.7  christos    MVE_VDUP,
   2178   1.7  christos    0xeea00b10, 0xffb10f5f,
   2179   1.7  christos    "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
   2180   1.7  christos 
   2181   1.7  christos   /* Vector VEOR.  */
   2182   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2183   1.7  christos    MVE_VEOR,
   2184   1.7  christos    0xff000150, 0xffd11f51,
   2185   1.7  christos    "veor%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2186   1.7  christos 
   2187   1.7  christos   /* Vector VFMA, vector * scalar.  */
   2188   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2189   1.7  christos    MVE_VFMA_FP_SCALAR,
   2190   1.7  christos    0xee310e40, 0xefb11f70,
   2191   1.7  christos    "vfma%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2192   1.7  christos 
   2193   1.7  christos   /* Vector VFMA floating point.  */
   2194   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2195   1.7  christos    MVE_VFMA_FP,
   2196   1.7  christos    0xef000c50, 0xffa11f51,
   2197   1.7  christos    "vfma%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2198   1.7  christos 
   2199   1.7  christos   /* Vector VFMS floating point.  */
   2200   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2201   1.7  christos    MVE_VFMS_FP,
   2202   1.7  christos    0xef200c50, 0xffa11f51,
   2203   1.7  christos    "vfms%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2204   1.7  christos 
   2205   1.7  christos   /* Vector VFMAS, vector * scalar.  */
   2206   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2207   1.7  christos    MVE_VFMAS_FP_SCALAR,
   2208   1.7  christos    0xee311e40, 0xefb11f70,
   2209   1.7  christos    "vfmas%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2210   1.7  christos 
   2211   1.7  christos   /* Vector VHADD T1.  */
   2212   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2213   1.7  christos    MVE_VHADD_T1,
   2214   1.7  christos    0xef000040, 0xef811f51,
   2215   1.7  christos    "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2216   1.7  christos 
   2217   1.7  christos   /* Vector VHADD T2.  */
   2218   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2219   1.7  christos    MVE_VHADD_T2,
   2220   1.7  christos    0xee000f40, 0xef811f70,
   2221   1.7  christos    "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2222   1.7  christos 
   2223   1.7  christos   /* Vector VHSUB T1.  */
   2224   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2225   1.7  christos    MVE_VHSUB_T1,
   2226   1.7  christos    0xef000240, 0xef811f51,
   2227   1.7  christos    "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2228   1.7  christos 
   2229   1.7  christos   /* Vector VHSUB T2.  */
   2230   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2231   1.7  christos    MVE_VHSUB_T2,
   2232   1.7  christos    0xee001f40, 0xef811f70,
   2233   1.7  christos    "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2234   1.7  christos 
   2235   1.7  christos   /* Vector VCMUL.  */
   2236   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2237   1.7  christos    MVE_VCMUL_FP,
   2238   1.7  christos    0xee300e00, 0xefb10f50,
   2239   1.8  christos    "vcmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%0,12o%}"},
   2240   1.7  christos 
   2241   1.7  christos    /* Vector VCTP.  */
   2242   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2243   1.7  christos    MVE_VCTP,
   2244   1.7  christos    0xf000e801, 0xffc0ffff,
   2245   1.7  christos    "vctp%v.%20-21s\t%16-19r"},
   2246   1.7  christos 
   2247   1.7  christos   /* Vector VDUP.  */
   2248   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2249   1.7  christos    MVE_VDUP,
   2250   1.7  christos    0xeea00b10, 0xffb10f5f,
   2251   1.7  christos    "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
   2252   1.7  christos 
   2253   1.7  christos   /* Vector VRHADD.  */
   2254   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2255   1.7  christos    MVE_VRHADD,
   2256   1.7  christos    0xef000140, 0xef811f51,
   2257   1.7  christos    "vrhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2258   1.7  christos 
   2259   1.7  christos   /* Vector VCVT.  */
   2260   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2261   1.7  christos    MVE_VCVT_FP_FIX_VEC,
   2262   1.7  christos    0xef800c50, 0xef801cd1,
   2263   1.8  christos    "vcvt%v.%s\t%13-15,22Q, %1-3,5Q, %{I:#%16-21k%}"},
   2264   1.7  christos 
   2265   1.7  christos   /* Vector VCVT.  */
   2266   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2267   1.7  christos    MVE_VCVT_BETWEEN_FP_INT,
   2268   1.7  christos    0xffb30640, 0xffb31e51,
   2269   1.7  christos    "vcvt%v.%s\t%13-15,22Q, %1-3,5Q"},
   2270   1.7  christos 
   2271   1.7  christos   /* Vector VCVT between single and half-precision float, bottom half.  */
   2272   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2273   1.7  christos    MVE_VCVT_FP_HALF_FP,
   2274   1.7  christos    0xee3f0e01, 0xefbf1fd1,
   2275   1.7  christos    "vcvtb%v.%s\t%13-15,22Q, %1-3,5Q"},
   2276   1.7  christos 
   2277   1.7  christos   /* Vector VCVT between single and half-precision float, top half.  */
   2278   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2279   1.7  christos    MVE_VCVT_FP_HALF_FP,
   2280   1.7  christos    0xee3f1e01, 0xefbf1fd1,
   2281   1.7  christos    "vcvtt%v.%s\t%13-15,22Q, %1-3,5Q"},
   2282   1.7  christos 
   2283   1.7  christos   /* Vector VCVT.  */
   2284   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2285   1.7  christos    MVE_VCVT_FROM_FP_TO_INT,
   2286   1.7  christos    0xffb30040, 0xffb31c51,
   2287   1.7  christos    "vcvt%m%v.%s\t%13-15,22Q, %1-3,5Q"},
   2288   1.7  christos 
   2289   1.7  christos   /* Vector VDDUP.  */
   2290   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2291   1.7  christos    MVE_VDDUP,
   2292   1.7  christos    0xee011f6e, 0xff811f7e,
   2293   1.8  christos    "vddup%v.u%20-21s\t%13-15,22Q, %17-19l, %{I:#%0,7u%}"},
   2294   1.7  christos 
   2295   1.7  christos   /* Vector VDWDUP.  */
   2296   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2297   1.7  christos    MVE_VDWDUP,
   2298   1.7  christos    0xee011f60, 0xff811f70,
   2299   1.8  christos    "vdwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, %{I:#%0,7u%}"},
   2300   1.7  christos 
   2301   1.7  christos   /* Vector VHCADD.  */
   2302   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2303   1.7  christos    MVE_VHCADD,
   2304   1.7  christos    0xee000f00, 0xff810f51,
   2305   1.8  christos    "vhcadd%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, %{I:#%12o%}"},
   2306   1.7  christos 
   2307   1.7  christos   /* Vector VIWDUP.  */
   2308   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2309   1.7  christos    MVE_VIWDUP,
   2310   1.7  christos    0xee010f60, 0xff811f70,
   2311   1.8  christos    "viwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, %{I:#%0,7u%}"},
   2312   1.7  christos 
   2313   1.7  christos   /* Vector VIDUP.  */
   2314   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2315   1.7  christos    MVE_VIDUP,
   2316   1.7  christos    0xee010f6e, 0xff811f7e,
   2317   1.8  christos    "vidup%v.u%20-21s\t%13-15,22Q, %17-19l, %{I:#%0,7u%}"},
   2318   1.7  christos 
   2319   1.7  christos   /* Vector VLD2.  */
   2320   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2321   1.7  christos    MVE_VLD2,
   2322   1.7  christos    0xfc901e00, 0xff901e5f,
   2323   1.7  christos    "vld2%5d.%7-8s\t%B, [%16-19r]%w"},
   2324   1.7  christos 
   2325   1.7  christos   /* Vector VLD4.  */
   2326   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2327   1.7  christos    MVE_VLD4,
   2328   1.7  christos    0xfc901e01, 0xff901e1f,
   2329   1.7  christos    "vld4%5-6d.%7-8s\t%B, [%16-19r]%w"},
   2330   1.7  christos 
   2331   1.7  christos   /* Vector VLDRB gather load.  */
   2332   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2333   1.7  christos    MVE_VLDRB_GATHER_T1,
   2334   1.7  christos    0xec900e00, 0xefb01e50,
   2335   1.7  christos    "vldrb%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
   2336   1.7  christos 
   2337   1.7  christos   /* Vector VLDRH gather load.  */
   2338   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2339   1.7  christos    MVE_VLDRH_GATHER_T2,
   2340   1.7  christos    0xec900e10, 0xefb01e50,
   2341   1.7  christos    "vldrh%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   2342   1.7  christos 
   2343   1.7  christos   /* Vector VLDRW gather load.  */
   2344   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2345   1.7  christos    MVE_VLDRW_GATHER_T3,
   2346   1.7  christos    0xfc900f40, 0xffb01fd0,
   2347   1.7  christos    "vldrw%v.u32\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   2348   1.7  christos 
   2349   1.7  christos   /* Vector VLDRD gather load.  */
   2350   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2351   1.7  christos    MVE_VLDRD_GATHER_T4,
   2352   1.7  christos    0xec900fd0, 0xefb01fd0,
   2353   1.7  christos    "vldrd%v.u64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   2354   1.7  christos 
   2355   1.7  christos   /* Vector VLDRW gather load.  */
   2356   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2357   1.7  christos    MVE_VLDRW_GATHER_T5,
   2358   1.7  christos    0xfd101e00, 0xff111f00,
   2359   1.8  christos    "vldrw%v.u32\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   2360   1.7  christos 
   2361   1.7  christos   /* Vector VLDRD gather load, variant T6.  */
   2362   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2363   1.7  christos    MVE_VLDRD_GATHER_T6,
   2364   1.7  christos    0xfd101f00, 0xff111f00,
   2365   1.8  christos    "vldrd%v.u64\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   2366   1.7  christos 
   2367   1.7  christos   /* Vector VLDRB.  */
   2368   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2369   1.7  christos    MVE_VLDRB_T1,
   2370   1.7  christos    0xec100e00, 0xee581e00,
   2371   1.7  christos    "vldrb%v.%u%7-8s\t%13-15Q, %d"},
   2372   1.7  christos 
   2373   1.7  christos   /* Vector VLDRH.  */
   2374   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2375   1.7  christos    MVE_VLDRH_T2,
   2376   1.7  christos    0xec180e00, 0xee581e00,
   2377   1.7  christos    "vldrh%v.%u%7-8s\t%13-15Q, %d"},
   2378   1.7  christos 
   2379   1.7  christos   /* Vector VLDRB unsigned, variant T5.  */
   2380   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2381   1.7  christos    MVE_VLDRB_T5,
   2382   1.7  christos    0xec101e00, 0xfe101f80,
   2383   1.7  christos    "vldrb%v.u8\t%13-15,22Q, %d"},
   2384   1.7  christos 
   2385   1.7  christos   /* Vector VLDRH unsigned, variant T6.  */
   2386   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2387   1.7  christos    MVE_VLDRH_T6,
   2388   1.7  christos    0xec101e80, 0xfe101f80,
   2389   1.7  christos    "vldrh%v.u16\t%13-15,22Q, %d"},
   2390   1.7  christos 
   2391   1.7  christos   /* Vector VLDRW unsigned, variant T7.  */
   2392   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2393   1.7  christos    MVE_VLDRW_T7,
   2394   1.7  christos    0xec101f00, 0xfe101f80,
   2395   1.7  christos    "vldrw%v.u32\t%13-15,22Q, %d"},
   2396   1.7  christos 
   2397   1.7  christos   /* Vector VMAX.  */
   2398   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2399   1.7  christos    MVE_VMAX,
   2400   1.7  christos    0xef000640, 0xef811f51,
   2401   1.7  christos    "vmax%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2402   1.7  christos 
   2403   1.7  christos   /* Vector VMAXA.  */
   2404   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2405   1.7  christos    MVE_VMAXA,
   2406   1.7  christos    0xee330e81, 0xffb31fd1,
   2407   1.7  christos    "vmaxa%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2408   1.7  christos 
   2409   1.7  christos   /* Vector VMAXNM floating point.  */
   2410   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2411   1.7  christos    MVE_VMAXNM_FP,
   2412   1.7  christos    0xff000f50, 0xffa11f51,
   2413   1.7  christos    "vmaxnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2414   1.7  christos 
   2415   1.7  christos   /* Vector VMAXNMA floating point.  */
   2416   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2417   1.7  christos    MVE_VMAXNMA_FP,
   2418   1.7  christos    0xee3f0e81, 0xefbf1fd1,
   2419   1.7  christos    "vmaxnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
   2420   1.7  christos 
   2421   1.7  christos   /* Vector VMAXNMV floating point.  */
   2422   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2423   1.7  christos    MVE_VMAXNMV_FP,
   2424   1.7  christos    0xeeee0f00, 0xefff0fd1,
   2425   1.7  christos    "vmaxnmv%v.f%28s\t%12-15r, %1-3,5Q"},
   2426   1.7  christos 
   2427   1.7  christos   /* Vector VMAXNMAV floating point.  */
   2428   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2429   1.7  christos    MVE_VMAXNMAV_FP,
   2430   1.7  christos    0xeeec0f00, 0xefff0fd1,
   2431   1.7  christos    "vmaxnmav%v.f%28s\t%12-15r, %1-3,5Q"},
   2432   1.7  christos 
   2433   1.7  christos   /* Vector VMAXV.  */
   2434   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2435   1.7  christos    MVE_VMAXV,
   2436   1.7  christos    0xeee20f00, 0xeff30fd1,
   2437   1.7  christos    "vmaxv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
   2438   1.7  christos 
   2439   1.7  christos   /* Vector VMAXAV.  */
   2440   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2441   1.7  christos    MVE_VMAXAV,
   2442   1.7  christos    0xeee00f00, 0xfff30fd1,
   2443   1.7  christos    "vmaxav%v.s%18-19s\t%12-15r, %1-3,5Q"},
   2444   1.7  christos 
   2445   1.7  christos   /* Vector VMIN.  */
   2446   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2447   1.7  christos    MVE_VMIN,
   2448   1.7  christos    0xef000650, 0xef811f51,
   2449   1.7  christos    "vmin%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2450   1.7  christos 
   2451   1.7  christos   /* Vector VMINA.  */
   2452   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2453   1.7  christos    MVE_VMINA,
   2454   1.7  christos    0xee331e81, 0xffb31fd1,
   2455   1.7  christos    "vmina%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2456   1.7  christos 
   2457   1.7  christos   /* Vector VMINNM floating point.  */
   2458   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2459   1.7  christos    MVE_VMINNM_FP,
   2460   1.7  christos    0xff200f50, 0xffa11f51,
   2461   1.7  christos    "vminnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2462   1.7  christos 
   2463   1.7  christos   /* Vector VMINNMA floating point.  */
   2464   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2465   1.7  christos    MVE_VMINNMA_FP,
   2466   1.7  christos    0xee3f1e81, 0xefbf1fd1,
   2467   1.7  christos    "vminnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
   2468   1.7  christos 
   2469   1.7  christos   /* Vector VMINNMV floating point.  */
   2470   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2471   1.7  christos    MVE_VMINNMV_FP,
   2472   1.7  christos    0xeeee0f80, 0xefff0fd1,
   2473   1.7  christos    "vminnmv%v.f%28s\t%12-15r, %1-3,5Q"},
   2474   1.7  christos 
   2475   1.7  christos   /* Vector VMINNMAV floating point.  */
   2476   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2477   1.7  christos    MVE_VMINNMAV_FP,
   2478   1.7  christos    0xeeec0f80, 0xefff0fd1,
   2479   1.7  christos    "vminnmav%v.f%28s\t%12-15r, %1-3,5Q"},
   2480   1.7  christos 
   2481   1.7  christos   /* Vector VMINV.  */
   2482   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2483   1.7  christos    MVE_VMINV,
   2484   1.7  christos    0xeee20f80, 0xeff30fd1,
   2485   1.7  christos    "vminv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
   2486   1.7  christos 
   2487   1.7  christos   /* Vector VMINAV.  */
   2488   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2489   1.7  christos    MVE_VMINAV,
   2490   1.7  christos    0xeee00f80, 0xfff30fd1,
   2491   1.7  christos    "vminav%v.s%18-19s\t%12-15r, %1-3,5Q"},
   2492   1.7  christos 
   2493   1.7  christos   /* Vector VMLA.  */
   2494   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2495   1.7  christos    MVE_VMLA,
   2496   1.7  christos    0xee010e40, 0xef811f70,
   2497   1.9  christos    "vmla%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2498   1.7  christos 
   2499   1.7  christos   /* Vector VMLALDAV.  Note must appear before VMLADAV due to instruction
   2500   1.7  christos      opcode aliasing.  */
   2501   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2502   1.7  christos    MVE_VMLALDAV,
   2503   1.7  christos    0xee801e00, 0xef801f51,
   2504   1.7  christos    "vmlaldav%5Ax%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2505   1.7  christos 
   2506   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2507   1.7  christos    MVE_VMLALDAV,
   2508   1.7  christos    0xee800e00, 0xef801f51,
   2509   1.7  christos    "vmlalv%5A%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2510   1.7  christos 
   2511   1.7  christos   /* Vector VMLAV T1 variant, same as VMLADAV but with X == 0.  */
   2512   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2513   1.7  christos    MVE_VMLADAV_T1,
   2514   1.7  christos    0xeef00e00, 0xeff01f51,
   2515   1.7  christos    "vmlav%5A%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
   2516   1.7  christos 
   2517   1.7  christos   /* Vector VMLAV T2 variant, same as VMLADAV but with X == 0.  */
   2518   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2519   1.7  christos    MVE_VMLADAV_T2,
   2520   1.7  christos    0xeef00f00, 0xeff11f51,
   2521   1.7  christos    "vmlav%5A%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
   2522   1.7  christos 
   2523   1.7  christos   /* Vector VMLADAV T1 variant.  */
   2524   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2525   1.7  christos    MVE_VMLADAV_T1,
   2526   1.7  christos    0xeef01e00, 0xeff01f51,
   2527   1.7  christos    "vmladav%5Ax%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
   2528   1.7  christos 
   2529   1.7  christos   /* Vector VMLADAV T2 variant.  */
   2530   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2531   1.7  christos    MVE_VMLADAV_T2,
   2532   1.7  christos    0xeef01f00, 0xeff11f51,
   2533   1.7  christos    "vmladav%5Ax%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
   2534   1.7  christos 
   2535   1.7  christos   /* Vector VMLAS.  */
   2536   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2537   1.7  christos    MVE_VMLAS,
   2538   1.7  christos    0xee011e40, 0xef811f70,
   2539   1.7  christos    "vmlas%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2540   1.7  christos 
   2541   1.7  christos   /* Vector VRMLSLDAVH.  Note must appear before VMLSDAV due to instruction
   2542   1.7  christos      opcode aliasing.  */
   2543   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2544   1.7  christos    MVE_VRMLSLDAVH,
   2545   1.7  christos    0xfe800e01, 0xff810f51,
   2546   1.7  christos    "vrmlsldavh%5A%X%v.s32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2547   1.7  christos 
   2548   1.7  christos   /* Vector VMLSLDAV.  Note must appear before VMLSDAV due to instruction
   2549   1.7  christos      opcdoe aliasing.  */
   2550   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2551   1.7  christos    MVE_VMLSLDAV,
   2552   1.7  christos    0xee800e01, 0xff800f51,
   2553   1.7  christos    "vmlsldav%5A%X%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   2554   1.7  christos 
   2555   1.7  christos   /* Vector VMLSDAV T1 Variant.  */
   2556   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2557   1.7  christos    MVE_VMLSDAV_T1,
   2558   1.7  christos    0xeef00e01, 0xfff00f51,
   2559   1.7  christos    "vmlsdav%5A%X%v.s%16s\t%13-15l, %17-19,7Q, %1-3Q"},
   2560   1.7  christos 
   2561   1.7  christos   /* Vector VMLSDAV T2 Variant.  */
   2562   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2563   1.7  christos    MVE_VMLSDAV_T2,
   2564   1.7  christos    0xfef00e01, 0xfff10f51,
   2565   1.7  christos    "vmlsdav%5A%X%v.s8\t%13-15l, %17-19,7Q, %1-3Q"},
   2566   1.7  christos 
   2567   1.7  christos   /* Vector VMOV between gpr and half precision register, op == 0.  */
   2568   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2569   1.7  christos    MVE_VMOV_HFP_TO_GP,
   2570   1.7  christos    0xee000910, 0xfff00f7f,
   2571   1.7  christos    "vmov.f16\t%7,16-19F, %12-15r"},
   2572   1.7  christos 
   2573   1.7  christos   /* Vector VMOV between gpr and half precision register, op == 1.  */
   2574   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2575   1.7  christos    MVE_VMOV_HFP_TO_GP,
   2576   1.7  christos    0xee100910, 0xfff00f7f,
   2577   1.7  christos    "vmov.f16\t%12-15r, %7,16-19F"},
   2578   1.7  christos 
   2579   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2580   1.7  christos    MVE_VMOV_GP_TO_VEC_LANE,
   2581   1.7  christos    0xee000b10, 0xff900f1f,
   2582   1.8  christos    "vmov%c.%5-6,21-22s\t%{R:%17-19,7Q[%N]%}, %12-15r"},
   2583   1.7  christos 
   2584   1.7  christos   /* Vector VORR immediate to vector.
   2585   1.7  christos      NOTE: MVE_VORR_IMM must appear in the table
   2586   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2587   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2588   1.7  christos    MVE_VORR_IMM,
   2589   1.7  christos    0xef800050, 0xefb810f0,
   2590   1.7  christos    "vorr%v.i%8-11s\t%13-15,22Q, %E"},
   2591   1.7  christos 
   2592   1.7  christos   /* Vector VQSHL T2 Variant.
   2593   1.7  christos      NOTE: MVE_VQSHL_T2 must appear in the table before
   2594   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2595   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2596   1.7  christos    MVE_VQSHL_T2,
   2597   1.7  christos    0xef800750, 0xef801fd1,
   2598   1.8  christos    "vqshl%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2599   1.7  christos 
   2600   1.7  christos   /* Vector VQSHLU T3 Variant
   2601   1.7  christos      NOTE: MVE_VQSHL_T2 must appear in the table before
   2602   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2603   1.7  christos 
   2604   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2605   1.7  christos    MVE_VQSHLU_T3,
   2606   1.7  christos    0xff800650, 0xff801fd1,
   2607   1.8  christos    "vqshlu%v.s%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2608   1.7  christos 
   2609   1.7  christos   /* Vector VRSHR
   2610   1.7  christos      NOTE: MVE_VRSHR must appear in the table before
   2611   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2612   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2613   1.7  christos    MVE_VRSHR,
   2614   1.7  christos    0xef800250, 0xef801fd1,
   2615   1.8  christos    "vrshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2616   1.7  christos 
   2617   1.7  christos   /* Vector VSHL.
   2618   1.7  christos      NOTE: MVE_VSHL must appear in the table before
   2619   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2620   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2621   1.7  christos    MVE_VSHL_T1,
   2622   1.7  christos    0xef800550, 0xff801fd1,
   2623   1.8  christos    "vshl%v.i%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2624   1.7  christos 
   2625   1.7  christos   /* Vector VSHR
   2626   1.7  christos      NOTE: MVE_VSHR must appear in the table before
   2627   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2628   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2629   1.7  christos    MVE_VSHR,
   2630   1.7  christos    0xef800050, 0xef801fd1,
   2631   1.8  christos    "vshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2632   1.7  christos 
   2633   1.7  christos   /* Vector VSLI
   2634   1.7  christos      NOTE: MVE_VSLI must appear in the table before
   2635   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2636   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2637   1.7  christos    MVE_VSLI,
   2638   1.7  christos    0xff800550, 0xff801fd1,
   2639   1.8  christos    "vsli%v.%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2640   1.7  christos 
   2641   1.7  christos   /* Vector VSRI
   2642   1.7  christos      NOTE: MVE_VSRI must appear in the table before
   2643   1.7  christos      before MVE_VMOV_IMM_TO_VEC due to opcode aliasing.  */
   2644   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2645   1.7  christos    MVE_VSRI,
   2646   1.7  christos    0xff800450, 0xff801fd1,
   2647   1.8  christos    "vsri%v.%19-21s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2648   1.7  christos 
   2649   1.7  christos   /* Vector VMOV immediate to vector,
   2650   1.7  christos      undefinded for cmode == 1111 */
   2651   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2652   1.7  christos    MVE_VMVN_IMM, 0xef800f70, 0xefb81ff0, UNDEFINED_INSTRUCTION},
   2653   1.7  christos 
   2654   1.7  christos   /* Vector VMOV immediate to vector,
   2655   1.7  christos      cmode == 1101 */
   2656   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2657   1.7  christos    MVE_VMOV_IMM_TO_VEC, 0xef800d50, 0xefb81fd0,
   2658   1.7  christos    "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
   2659   1.7  christos 
   2660   1.7  christos   /* Vector VMOV immediate to vector.  */
   2661   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2662   1.7  christos    MVE_VMOV_IMM_TO_VEC,
   2663   1.7  christos    0xef800050, 0xefb810d0,
   2664   1.7  christos    "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
   2665   1.7  christos 
   2666   1.7  christos   /* Vector VMOV two 32-bit lanes to two gprs, idx = 0.  */
   2667   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2668   1.7  christos    MVE_VMOV2_VEC_LANE_TO_GP,
   2669   1.7  christos    0xec000f00, 0xffb01ff0,
   2670   1.8  christos    "vmov%c\t%0-3r, %16-19r, %{R:%13-15,22Q[2]%}, %{R:%13-15,22Q[0]%}"},
   2671   1.7  christos 
   2672   1.7  christos   /* Vector VMOV two 32-bit lanes to two gprs, idx = 1.  */
   2673   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2674   1.7  christos    MVE_VMOV2_VEC_LANE_TO_GP,
   2675   1.7  christos    0xec000f10, 0xffb01ff0,
   2676   1.8  christos    "vmov%c\t%0-3r, %16-19r, %{R:%13-15,22Q[3]%}, %{R:%13-15,22Q[1]%}"},
   2677   1.7  christos 
   2678   1.7  christos   /* Vector VMOV Two gprs to two 32-bit lanes, idx = 0.  */
   2679   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2680   1.7  christos    MVE_VMOV2_GP_TO_VEC_LANE,
   2681   1.7  christos    0xec100f00, 0xffb01ff0,
   2682   1.8  christos    "vmov%c\t%{R:%13-15,22Q[2]%}, %{R:%13-15,22Q[0]%}, %0-3r, %16-19r"},
   2683   1.7  christos 
   2684   1.7  christos   /* Vector VMOV Two gprs to two 32-bit lanes, idx = 1.  */
   2685   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2686   1.7  christos    MVE_VMOV2_GP_TO_VEC_LANE,
   2687   1.7  christos    0xec100f10, 0xffb01ff0,
   2688   1.8  christos    "vmov%c\t%{R:%13-15,22Q[3]%}, %{R:%13-15,22Q[1]%}, %0-3r, %16-19r"},
   2689   1.7  christos 
   2690   1.7  christos   /* Vector VMOV Vector lane to gpr.  */
   2691   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2692   1.7  christos    MVE_VMOV_VEC_LANE_TO_GP,
   2693   1.7  christos    0xee100b10, 0xff100f1f,
   2694   1.8  christos    "vmov%c.%u%5-6,21-22s\t%12-15r, %{R:%17-19,7Q[%N]%}"},
   2695   1.7  christos 
   2696   1.7  christos   /* Vector VSHLL T1 Variant.  Note: VSHLL T1 must appear before MVE_VMOVL due
   2697   1.7  christos      to instruction opcode aliasing.  */
   2698   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2699   1.7  christos    MVE_VSHLL_T1,
   2700   1.7  christos    0xeea00f40, 0xefa00fd1,
   2701   1.8  christos    "vshll%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2702   1.7  christos 
   2703   1.7  christos   /* Vector VMOVL long.  */
   2704   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2705   1.7  christos    MVE_VMOVL,
   2706   1.7  christos    0xeea00f40, 0xefa70fd1,
   2707   1.7  christos    "vmovl%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q"},
   2708   1.7  christos 
   2709   1.7  christos   /* Vector VMOV and narrow.  */
   2710   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2711   1.7  christos    MVE_VMOVN,
   2712   1.7  christos    0xfe310e81, 0xffb30fd1,
   2713   1.7  christos    "vmovn%T%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
   2714   1.7  christos 
   2715   1.7  christos   /* Floating point move extract.  */
   2716   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2717   1.7  christos    MVE_VMOVX,
   2718   1.7  christos    0xfeb00a40, 0xffbf0fd0,
   2719   1.7  christos    "vmovx.f16\t%22,12-15F, %5,0-3F"},
   2720   1.7  christos 
   2721   1.7  christos   /* Vector VMUL floating-point T1 variant.  */
   2722   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2723   1.7  christos    MVE_VMUL_FP_T1,
   2724   1.7  christos    0xff000d50, 0xffa11f51,
   2725   1.7  christos    "vmul%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2726   1.7  christos 
   2727   1.7  christos   /* Vector VMUL floating-point T2 variant.  */
   2728   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2729   1.7  christos    MVE_VMUL_FP_T2,
   2730   1.7  christos    0xee310e60, 0xefb11f70,
   2731   1.7  christos    "vmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2732   1.7  christos 
   2733   1.7  christos   /* Vector VMUL T1 variant.  */
   2734   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2735   1.7  christos    MVE_VMUL_VEC_T1,
   2736   1.7  christos    0xef000950, 0xff811f51,
   2737   1.7  christos    "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2738   1.7  christos 
   2739   1.7  christos   /* Vector VMUL T2 variant.  */
   2740   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2741   1.7  christos    MVE_VMUL_VEC_T2,
   2742   1.7  christos    0xee011e60, 0xff811f70,
   2743   1.7  christos    "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2744   1.7  christos 
   2745   1.7  christos   /* Vector VMULH.  */
   2746   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2747   1.7  christos    MVE_VMULH,
   2748   1.7  christos    0xee010e01, 0xef811f51,
   2749   1.7  christos    "vmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2750   1.7  christos 
   2751   1.7  christos   /* Vector VRMULH.  */
   2752   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2753   1.7  christos    MVE_VRMULH,
   2754   1.7  christos    0xee011e01, 0xef811f51,
   2755   1.7  christos    "vrmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2756   1.7  christos 
   2757   1.7  christos   /* Vector VMULL integer.  */
   2758   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2759   1.7  christos    MVE_VMULL_INT,
   2760   1.7  christos    0xee010e00, 0xef810f51,
   2761   1.7  christos    "vmull%T%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2762   1.7  christos 
   2763   1.7  christos   /* Vector VMULL polynomial.  */
   2764   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2765   1.7  christos    MVE_VMULL_POLY,
   2766   1.7  christos    0xee310e00, 0xefb10f51,
   2767   1.7  christos    "vmull%T%v.%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2768   1.7  christos 
   2769   1.7  christos   /* Vector VMVN immediate to vector.  */
   2770   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2771   1.7  christos    MVE_VMVN_IMM,
   2772   1.7  christos    0xef800070, 0xefb810f0,
   2773   1.7  christos    "vmvn%v.i%8-11s\t%13-15,22Q, %E"},
   2774   1.7  christos 
   2775   1.7  christos   /* Vector VMVN register.  */
   2776   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2777   1.7  christos    MVE_VMVN_REG,
   2778   1.7  christos    0xffb005c0, 0xffbf1fd1,
   2779   1.7  christos    "vmvn%v\t%13-15,22Q, %1-3,5Q"},
   2780   1.7  christos 
   2781   1.7  christos   /* Vector VNEG floating point.  */
   2782   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   2783   1.7  christos    MVE_VNEG_FP,
   2784   1.7  christos    0xffb107c0, 0xffb31fd1,
   2785   1.7  christos    "vneg%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
   2786   1.7  christos 
   2787   1.7  christos   /* Vector VNEG.  */
   2788   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2789   1.7  christos    MVE_VNEG_VEC,
   2790   1.7  christos    0xffb103c0, 0xffb31fd1,
   2791   1.7  christos    "vneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2792   1.7  christos 
   2793   1.7  christos   /* Vector VORN, vector bitwise or not.  */
   2794   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2795   1.7  christos    MVE_VORN,
   2796   1.7  christos    0xef300150, 0xffb11f51,
   2797   1.7  christos    "vorn%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2798   1.7  christos 
   2799   1.7  christos   /* Vector VORR register.  */
   2800   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2801   1.7  christos    MVE_VORR_REG,
   2802   1.7  christos    0xef200150, 0xffb11f51,
   2803   1.7  christos    "vorr%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2804   1.7  christos 
   2805   1.7  christos   /* Vector VMOV, vector to vector move. While decoding MVE_VORR_REG if
   2806   1.7  christos      "Qm==Qn", VORR should replaced by its alias VMOV. For that to happen
   2807   1.7  christos      MVE_VMOV_VEC_TO_VEC need to placed after MVE_VORR_REG in this mve_opcodes
   2808   1.7  christos      array.  */
   2809   1.7  christos 
   2810   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2811   1.7  christos    MVE_VMOV_VEC_TO_VEC,
   2812   1.7  christos    0xef200150, 0xffb11f51,
   2813   1.7  christos    "vmov%v\t%13-15,22Q, %17-19,7Q"},
   2814   1.7  christos 
   2815   1.7  christos   /* Vector VQDMULL T1 variant.  */
   2816   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2817   1.7  christos    MVE_VQDMULL_T1,
   2818   1.7  christos    0xee300f01, 0xefb10f51,
   2819   1.7  christos    "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2820   1.7  christos 
   2821   1.7  christos   /* Vector VPNOT.  */
   2822   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2823   1.7  christos    MVE_VPNOT,
   2824   1.7  christos    0xfe310f4d, 0xffffffff,
   2825   1.7  christos    "vpnot%v"},
   2826   1.7  christos 
   2827   1.7  christos   /* Vector VPSEL.  */
   2828   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2829   1.7  christos    MVE_VPSEL,
   2830   1.7  christos    0xfe310f01, 0xffb11f51,
   2831   1.7  christos    "vpsel%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2832   1.7  christos 
   2833   1.7  christos   /* Vector VQABS.  */
   2834   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2835   1.7  christos    MVE_VQABS,
   2836   1.7  christos    0xffb00740, 0xffb31fd1,
   2837   1.7  christos    "vqabs%v.s%18-19s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2838   1.7  christos 
   2839   1.7  christos   /* Vector VQADD T1 variant.  */
   2840   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2841   1.7  christos    MVE_VQADD_T1,
   2842   1.7  christos    0xef000050, 0xef811f51,
   2843   1.7  christos    "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2844   1.7  christos 
   2845   1.7  christos   /* Vector VQADD T2 variant.  */
   2846   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2847   1.7  christos    MVE_VQADD_T2,
   2848   1.7  christos    0xee000f60, 0xef811f70,
   2849   1.7  christos    "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2850   1.7  christos 
   2851   1.7  christos   /* Vector VQDMULL T2 variant.  */
   2852   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2853   1.7  christos    MVE_VQDMULL_T2,
   2854   1.7  christos    0xee300f60, 0xefb10f70,
   2855   1.7  christos    "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2856   1.7  christos 
   2857   1.7  christos   /* Vector VQMOVN.  */
   2858   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2859   1.7  christos    MVE_VQMOVN,
   2860   1.7  christos    0xee330e01, 0xefb30fd1,
   2861   1.7  christos    "vqmovn%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q"},
   2862   1.7  christos 
   2863   1.7  christos   /* Vector VQMOVUN.  */
   2864   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2865   1.7  christos    MVE_VQMOVUN,
   2866   1.7  christos    0xee310e81, 0xffb30fd1,
   2867   1.7  christos    "vqmovun%T%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2868   1.7  christos 
   2869   1.7  christos   /* Vector VQDMLADH.  */
   2870   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2871   1.7  christos    MVE_VQDMLADH,
   2872   1.7  christos    0xee000e00, 0xff810f51,
   2873   1.7  christos    "vqdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2874   1.7  christos 
   2875   1.7  christos   /* Vector VQRDMLADH.  */
   2876   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2877   1.7  christos    MVE_VQRDMLADH,
   2878   1.7  christos    0xee000e01, 0xff810f51,
   2879   1.7  christos    "vqrdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2880   1.7  christos 
   2881   1.7  christos   /* Vector VQDMLAH.  */
   2882   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2883   1.7  christos    MVE_VQDMLAH,
   2884   1.7  christos    0xee000e60, 0xff811f70,
   2885   1.7  christos    "vqdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2886   1.7  christos 
   2887   1.7  christos   /* Vector VQRDMLAH.  */
   2888   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2889   1.7  christos    MVE_VQRDMLAH,
   2890   1.7  christos    0xee000e40, 0xff811f70,
   2891   1.7  christos    "vqrdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2892   1.7  christos 
   2893   1.7  christos   /* Vector VQDMLASH.  */
   2894   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2895   1.7  christos    MVE_VQDMLASH,
   2896   1.7  christos    0xee001e60, 0xff811f70,
   2897   1.7  christos    "vqdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2898   1.7  christos 
   2899   1.7  christos   /* Vector VQRDMLASH.  */
   2900   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2901   1.7  christos    MVE_VQRDMLASH,
   2902   1.7  christos    0xee001e40, 0xff811f70,
   2903   1.7  christos    "vqrdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2904   1.7  christos 
   2905   1.7  christos   /* Vector VQDMLSDH.  */
   2906   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2907   1.7  christos    MVE_VQDMLSDH,
   2908   1.7  christos    0xfe000e00, 0xff810f51,
   2909   1.7  christos    "vqdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2910   1.7  christos 
   2911   1.7  christos   /* Vector VQRDMLSDH.  */
   2912   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2913   1.7  christos    MVE_VQRDMLSDH,
   2914   1.7  christos    0xfe000e01, 0xff810f51,
   2915   1.7  christos    "vqrdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2916   1.7  christos 
   2917   1.7  christos   /* Vector VQDMULH T1 variant.  */
   2918   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2919   1.7  christos    MVE_VQDMULH_T1,
   2920   1.7  christos    0xef000b40, 0xff811f51,
   2921   1.7  christos    "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2922   1.7  christos 
   2923   1.7  christos   /* Vector VQRDMULH T2 variant.  */
   2924   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2925   1.7  christos    MVE_VQRDMULH_T2,
   2926   1.7  christos    0xff000b40, 0xff811f51,
   2927   1.7  christos    "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   2928   1.7  christos 
   2929   1.7  christos   /* Vector VQDMULH T3 variant.  */
   2930   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2931   1.7  christos    MVE_VQDMULH_T3,
   2932   1.7  christos    0xee010e60, 0xff811f70,
   2933   1.7  christos    "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2934   1.7  christos 
   2935   1.7  christos   /* Vector VQRDMULH T4 variant.  */
   2936   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2937   1.7  christos    MVE_VQRDMULH_T4,
   2938   1.7  christos    0xfe010e60, 0xff811f70,
   2939   1.7  christos    "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   2940   1.7  christos 
   2941   1.7  christos   /* Vector VQNEG.  */
   2942   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2943   1.7  christos    MVE_VQNEG,
   2944   1.7  christos    0xffb007c0, 0xffb31fd1,
   2945   1.7  christos    "vqneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
   2946   1.7  christos 
   2947   1.7  christos   /* Vector VQRSHL T1 variant.  */
   2948   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2949   1.7  christos    MVE_VQRSHL_T1,
   2950   1.7  christos    0xef000550, 0xef811f51,
   2951   1.7  christos    "vqrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   2952   1.7  christos 
   2953   1.7  christos   /* Vector VQRSHL T2 variant.  */
   2954   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2955   1.7  christos    MVE_VQRSHL_T2,
   2956   1.7  christos    0xee331ee0, 0xefb31ff0,
   2957   1.7  christos    "vqrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   2958   1.7  christos 
   2959   1.7  christos   /* Vector VQRSHRN.  */
   2960   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2961   1.7  christos    MVE_VQRSHRN,
   2962   1.7  christos    0xee800f41, 0xefa00fd1,
   2963   1.8  christos    "vqrshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2964   1.7  christos 
   2965   1.7  christos   /* Vector VQRSHRUN.  */
   2966   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2967   1.7  christos    MVE_VQRSHRUN,
   2968   1.7  christos    0xfe800fc0, 0xffa00fd1,
   2969   1.8  christos    "vqrshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2970   1.7  christos 
   2971   1.7  christos   /* Vector VQSHL T1 Variant.  */
   2972   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2973   1.7  christos    MVE_VQSHL_T1,
   2974   1.7  christos    0xee311ee0, 0xefb31ff0,
   2975   1.7  christos    "vqshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   2976   1.7  christos 
   2977   1.7  christos   /* Vector VQSHL T4 Variant.  */
   2978   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2979   1.7  christos    MVE_VQSHL_T4,
   2980   1.7  christos    0xef000450, 0xef811f51,
   2981   1.7  christos    "vqshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   2982   1.7  christos 
   2983   1.7  christos   /* Vector VQSHRN.  */
   2984   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2985   1.7  christos    MVE_VQSHRN,
   2986   1.7  christos    0xee800f40, 0xefa00fd1,
   2987   1.8  christos    "vqshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2988   1.7  christos 
   2989   1.7  christos   /* Vector VQSHRUN.  */
   2990   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2991   1.7  christos    MVE_VQSHRUN,
   2992   1.7  christos    0xee800fc0, 0xffa00fd1,
   2993   1.8  christos    "vqshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   2994   1.7  christos 
   2995   1.7  christos   /* Vector VQSUB T1 Variant.  */
   2996   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   2997   1.7  christos    MVE_VQSUB_T1,
   2998   1.7  christos    0xef000250, 0xef811f51,
   2999   1.7  christos    "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3000   1.7  christos 
   3001   1.7  christos   /* Vector VQSUB T2 Variant.  */
   3002   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3003   1.7  christos    MVE_VQSUB_T2,
   3004   1.7  christos    0xee001f60, 0xef811f70,
   3005   1.7  christos    "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3006   1.7  christos 
   3007   1.7  christos   /* Vector VREV16.  */
   3008   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3009   1.7  christos    MVE_VREV16,
   3010   1.7  christos    0xffb00140, 0xffb31fd1,
   3011   1.7  christos    "vrev16%v.8\t%13-15,22Q, %1-3,5Q"},
   3012   1.7  christos 
   3013   1.7  christos   /* Vector VREV32.  */
   3014   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3015   1.7  christos    MVE_VREV32,
   3016   1.7  christos    0xffb000c0, 0xffb31fd1,
   3017   1.7  christos    "vrev32%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
   3018   1.7  christos 
   3019   1.7  christos   /* Vector VREV64.  */
   3020   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3021   1.7  christos    MVE_VREV64,
   3022   1.7  christos    0xffb00040, 0xffb31fd1,
   3023   1.7  christos    "vrev64%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
   3024   1.7  christos 
   3025   1.7  christos   /* Vector VRINT floating point.  */
   3026   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   3027   1.7  christos    MVE_VRINT_FP,
   3028   1.7  christos    0xffb20440, 0xffb31c51,
   3029   1.7  christos    "vrint%m%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
   3030   1.7  christos 
   3031   1.7  christos   /* Vector VRMLALDAVH.  */
   3032   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3033   1.7  christos    MVE_VRMLALDAVH,
   3034   1.7  christos    0xee800f00, 0xef811f51,
   3035   1.7  christos    "vrmlalvh%5A%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   3036   1.7  christos 
   3037   1.7  christos   /* Vector VRMLALDAVH.  */
   3038   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3039   1.7  christos    MVE_VRMLALDAVH,
   3040   1.7  christos    0xee801f00, 0xef811f51,
   3041   1.7  christos    "vrmlaldavh%5Ax%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
   3042   1.7  christos 
   3043   1.7  christos   /* Vector VRSHL T1 Variant.  */
   3044   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3045   1.7  christos    MVE_VRSHL_T1,
   3046   1.7  christos    0xef000540, 0xef811f51,
   3047   1.7  christos    "vrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   3048   1.7  christos 
   3049   1.7  christos   /* Vector VRSHL T2 Variant.  */
   3050   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3051   1.7  christos    MVE_VRSHL_T2,
   3052   1.7  christos    0xee331e60, 0xefb31ff0,
   3053   1.7  christos    "vrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   3054   1.7  christos 
   3055   1.7  christos   /* Vector VRSHRN.  */
   3056   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3057   1.7  christos    MVE_VRSHRN,
   3058   1.7  christos    0xfe800fc1, 0xffa00fd1,
   3059   1.8  christos    "vrshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3060   1.7  christos 
   3061   1.7  christos   /* Vector VSBC.  */
   3062   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3063   1.7  christos    MVE_VSBC,
   3064   1.7  christos    0xfe300f00, 0xffb10f51,
   3065   1.7  christos    "vsbc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3066   1.7  christos 
   3067   1.7  christos   /* Vector VSHL T2 Variant.  */
   3068   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3069   1.7  christos    MVE_VSHL_T2,
   3070   1.7  christos    0xee311e60, 0xefb31ff0,
   3071   1.7  christos    "vshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
   3072   1.7  christos 
   3073   1.7  christos   /* Vector VSHL T3 Variant.  */
   3074   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3075   1.7  christos    MVE_VSHL_T3,
   3076   1.7  christos    0xef000440, 0xef811f51,
   3077   1.7  christos    "vshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
   3078   1.7  christos 
   3079   1.7  christos   /* Vector VSHLC.  */
   3080   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3081   1.7  christos    MVE_VSHLC,
   3082   1.7  christos    0xeea00fc0, 0xffa01ff0,
   3083   1.8  christos    "vshlc%v\t%13-15,22Q, %0-3r, %{I:#%16-20d%}"},
   3084   1.7  christos 
   3085   1.7  christos   /* Vector VSHLL T2 Variant.  */
   3086   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3087   1.7  christos    MVE_VSHLL_T2,
   3088   1.7  christos    0xee310e01, 0xefb30fd1,
   3089   1.8  christos    "vshll%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q, %{I:#%18-19d%}"},
   3090   1.7  christos 
   3091   1.7  christos   /* Vector VSHRN.  */
   3092   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3093   1.7  christos    MVE_VSHRN,
   3094   1.7  christos    0xee800fc1, 0xffa00fd1,
   3095   1.8  christos    "vshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, %{I:#%16-18d%}"},
   3096   1.7  christos 
   3097   1.7  christos   /* Vector VST2 no writeback.  */
   3098   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3099   1.7  christos    MVE_VST2,
   3100   1.7  christos    0xfc801e00, 0xffb01e5f,
   3101   1.7  christos    "vst2%5d.%7-8s\t%B, [%16-19r]"},
   3102   1.7  christos 
   3103   1.7  christos   /* Vector VST2 writeback.  */
   3104   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3105   1.7  christos    MVE_VST2,
   3106   1.7  christos    0xfca01e00, 0xffb01e5f,
   3107   1.7  christos    "vst2%5d.%7-8s\t%B, [%16-19r]!"},
   3108   1.7  christos 
   3109   1.7  christos   /* Vector VST4 no writeback.  */
   3110   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3111   1.7  christos    MVE_VST4,
   3112   1.7  christos    0xfc801e01, 0xffb01e1f,
   3113   1.7  christos    "vst4%5-6d.%7-8s\t%B, [%16-19r]"},
   3114   1.7  christos 
   3115   1.7  christos   /* Vector VST4 writeback.  */
   3116   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3117   1.7  christos    MVE_VST4,
   3118   1.7  christos    0xfca01e01, 0xffb01e1f,
   3119   1.7  christos    "vst4%5-6d.%7-8s\t%B, [%16-19r]!"},
   3120   1.7  christos 
   3121   1.7  christos   /* Vector VSTRB scatter store, T1 variant.  */
   3122   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3123   1.7  christos    MVE_VSTRB_SCATTER_T1,
   3124   1.7  christos    0xec800e00, 0xffb01e50,
   3125   1.7  christos    "vstrb%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
   3126   1.7  christos 
   3127   1.7  christos   /* Vector VSTRH scatter store, T2 variant.  */
   3128   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3129   1.7  christos    MVE_VSTRH_SCATTER_T2,
   3130   1.7  christos    0xec800e10, 0xffb01e50,
   3131   1.7  christos    "vstrh%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   3132   1.7  christos 
   3133   1.7  christos   /* Vector VSTRW scatter store, T3 variant.  */
   3134   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3135   1.7  christos    MVE_VSTRW_SCATTER_T3,
   3136   1.7  christos    0xec800e40, 0xffb01e50,
   3137   1.7  christos    "vstrw%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   3138   1.7  christos 
   3139   1.7  christos   /* Vector VSTRD scatter store, T4 variant.  */
   3140   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3141   1.7  christos    MVE_VSTRD_SCATTER_T4,
   3142   1.7  christos    0xec800fd0, 0xffb01fd0,
   3143   1.7  christos    "vstrd%v.64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
   3144   1.7  christos 
   3145   1.7  christos   /* Vector VSTRW scatter store, T5 variant.  */
   3146   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3147   1.7  christos    MVE_VSTRW_SCATTER_T5,
   3148   1.7  christos    0xfd001e00, 0xff111f00,
   3149   1.8  christos    "vstrw%v.32\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   3150   1.7  christos 
   3151   1.7  christos   /* Vector VSTRD scatter store, T6 variant.  */
   3152   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3153   1.7  christos    MVE_VSTRD_SCATTER_T6,
   3154   1.7  christos    0xfd001f00, 0xff111f00,
   3155   1.8  christos    "vstrd%v.64\t%13-15,22Q, [%17-19,7Q, %{I:#%a%0-6i%}]%w"},
   3156   1.7  christos 
   3157   1.7  christos   /* Vector VSTRB.  */
   3158   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3159   1.7  christos    MVE_VSTRB_T1,
   3160   1.7  christos    0xec000e00, 0xfe581e00,
   3161   1.7  christos    "vstrb%v.%7-8s\t%13-15Q, %d"},
   3162   1.7  christos 
   3163   1.7  christos   /* Vector VSTRH.  */
   3164   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3165   1.7  christos    MVE_VSTRH_T2,
   3166   1.7  christos    0xec080e00, 0xfe581e00,
   3167   1.7  christos    "vstrh%v.%7-8s\t%13-15Q, %d"},
   3168   1.7  christos 
   3169   1.7  christos   /* Vector VSTRB variant T5.  */
   3170   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3171   1.7  christos    MVE_VSTRB_T5,
   3172   1.7  christos    0xec001e00, 0xfe101f80,
   3173   1.7  christos    "vstrb%v.8\t%13-15,22Q, %d"},
   3174   1.7  christos 
   3175   1.7  christos   /* Vector VSTRH variant T6.  */
   3176   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3177   1.7  christos    MVE_VSTRH_T6,
   3178   1.7  christos    0xec001e80, 0xfe101f80,
   3179   1.7  christos    "vstrh%v.16\t%13-15,22Q, %d"},
   3180   1.7  christos 
   3181   1.7  christos   /* Vector VSTRW variant T7.  */
   3182   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3183   1.7  christos    MVE_VSTRW_T7,
   3184   1.7  christos    0xec001f00, 0xfe101f80,
   3185   1.7  christos    "vstrw%v.32\t%13-15,22Q, %d"},
   3186   1.7  christos 
   3187   1.7  christos   /* Vector VSUB floating point T1 variant.  */
   3188   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   3189   1.7  christos    MVE_VSUB_FP_T1,
   3190   1.7  christos    0xef200d40, 0xffa11f51,
   3191   1.7  christos    "vsub%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3192   1.7  christos 
   3193   1.7  christos   /* Vector VSUB floating point T2 variant.  */
   3194   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
   3195   1.7  christos    MVE_VSUB_FP_T2,
   3196   1.7  christos    0xee301f40, 0xefb11f70,
   3197   1.7  christos    "vsub%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3198   1.7  christos 
   3199   1.7  christos   /* Vector VSUB T1 variant.  */
   3200   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3201   1.7  christos    MVE_VSUB_VEC_T1,
   3202   1.7  christos    0xff000840, 0xff811f51,
   3203   1.7  christos    "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
   3204   1.7  christos 
   3205   1.7  christos   /* Vector VSUB T2 variant.  */
   3206   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3207   1.7  christos    MVE_VSUB_VEC_T2,
   3208   1.7  christos    0xee011f40, 0xff811f70,
   3209   1.7  christos    "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
   3210   1.7  christos 
   3211   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3212   1.7  christos    MVE_ASRLI,
   3213   1.7  christos    0xea50012f, 0xfff1813f,
   3214   1.7  christos    "asrl%c\t%17-19l, %9-11h, %j"},
   3215   1.7  christos 
   3216   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3217   1.7  christos    MVE_ASRL,
   3218   1.7  christos    0xea50012d, 0xfff101ff,
   3219   1.7  christos    "asrl%c\t%17-19l, %9-11h, %12-15S"},
   3220   1.7  christos 
   3221   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3222   1.7  christos    MVE_LSLLI,
   3223   1.7  christos    0xea50010f, 0xfff1813f,
   3224   1.7  christos    "lsll%c\t%17-19l, %9-11h, %j"},
   3225   1.7  christos 
   3226   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3227   1.7  christos    MVE_LSLL,
   3228   1.7  christos    0xea50010d, 0xfff101ff,
   3229   1.7  christos    "lsll%c\t%17-19l, %9-11h, %12-15S"},
   3230   1.7  christos 
   3231   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3232   1.7  christos    MVE_LSRL,
   3233   1.7  christos    0xea50011f, 0xfff1813f,
   3234   1.7  christos    "lsrl%c\t%17-19l, %9-11h, %j"},
   3235   1.7  christos 
   3236   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3237   1.7  christos    MVE_SQRSHRL,
   3238   1.7  christos    0xea51012d, 0xfff1017f,
   3239   1.7  christos    "sqrshrl%c\t%17-19l, %9-11h, %k, %12-15S"},
   3240   1.7  christos 
   3241   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3242   1.7  christos    MVE_SQRSHR,
   3243   1.7  christos    0xea500f2d, 0xfff00fff,
   3244   1.7  christos    "sqrshr%c\t%16-19S, %12-15S"},
   3245   1.7  christos 
   3246   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3247   1.7  christos    MVE_SQSHLL,
   3248   1.7  christos    0xea51013f, 0xfff1813f,
   3249   1.7  christos    "sqshll%c\t%17-19l, %9-11h, %j"},
   3250   1.7  christos 
   3251   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3252   1.7  christos    MVE_SQSHL,
   3253   1.7  christos    0xea500f3f, 0xfff08f3f,
   3254   1.7  christos    "sqshl%c\t%16-19S, %j"},
   3255   1.7  christos 
   3256   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3257   1.7  christos    MVE_SRSHRL,
   3258   1.7  christos    0xea51012f, 0xfff1813f,
   3259   1.7  christos    "srshrl%c\t%17-19l, %9-11h, %j"},
   3260   1.7  christos 
   3261   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3262   1.7  christos    MVE_SRSHR,
   3263   1.7  christos    0xea500f2f, 0xfff08f3f,
   3264   1.7  christos    "srshr%c\t%16-19S, %j"},
   3265   1.7  christos 
   3266   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3267   1.7  christos    MVE_UQRSHLL,
   3268   1.7  christos    0xea51010d, 0xfff1017f,
   3269   1.7  christos    "uqrshll%c\t%17-19l, %9-11h, %k, %12-15S"},
   3270   1.7  christos 
   3271   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3272   1.7  christos    MVE_UQRSHL,
   3273   1.7  christos    0xea500f0d, 0xfff00fff,
   3274   1.7  christos    "uqrshl%c\t%16-19S, %12-15S"},
   3275   1.7  christos 
   3276   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3277   1.7  christos    MVE_UQSHLL,
   3278   1.7  christos     0xea51010f, 0xfff1813f,
   3279   1.7  christos    "uqshll%c\t%17-19l, %9-11h, %j"},
   3280   1.7  christos 
   3281   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3282   1.7  christos    MVE_UQSHL,
   3283   1.7  christos    0xea500f0f, 0xfff08f3f,
   3284   1.7  christos    "uqshl%c\t%16-19S, %j"},
   3285   1.7  christos 
   3286   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3287   1.7  christos    MVE_URSHRL,
   3288   1.7  christos     0xea51011f, 0xfff1813f,
   3289   1.7  christos    "urshrl%c\t%17-19l, %9-11h, %j"},
   3290   1.7  christos 
   3291   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
   3292   1.7  christos    MVE_URSHR,
   3293   1.7  christos    0xea500f1f, 0xfff08f3f,
   3294   1.7  christos    "urshr%c\t%16-19S, %j"},
   3295   1.7  christos 
   3296   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3297   1.7  christos    MVE_CSINC,
   3298   1.7  christos    0xea509000, 0xfff0f000,
   3299   1.7  christos    "csinc\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3300   1.7  christos 
   3301   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3302   1.7  christos    MVE_CSINV,
   3303   1.7  christos    0xea50a000, 0xfff0f000,
   3304   1.7  christos    "csinv\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3305   1.7  christos 
   3306   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3307   1.7  christos    MVE_CSET,
   3308   1.7  christos    0xea5f900f, 0xfffff00f,
   3309   1.7  christos    "cset\t%8-11S, %4-7C"},
   3310   1.7  christos 
   3311   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3312   1.7  christos    MVE_CSETM,
   3313   1.7  christos    0xea5fa00f, 0xfffff00f,
   3314   1.7  christos    "csetm\t%8-11S, %4-7C"},
   3315   1.7  christos 
   3316   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3317   1.7  christos    MVE_CSEL,
   3318   1.7  christos    0xea508000, 0xfff0f000,
   3319   1.7  christos    "csel\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3320   1.7  christos 
   3321   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3322   1.7  christos    MVE_CSNEG,
   3323   1.7  christos    0xea50b000, 0xfff0f000,
   3324   1.7  christos    "csneg\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
   3325   1.7  christos 
   3326   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3327   1.7  christos    MVE_CINC,
   3328   1.7  christos    0xea509000, 0xfff0f000,
   3329   1.7  christos    "cinc\t%8-11S, %16-19Z, %4-7C"},
   3330   1.7  christos 
   3331   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3332   1.7  christos    MVE_CINV,
   3333   1.7  christos    0xea50a000, 0xfff0f000,
   3334   1.7  christos    "cinv\t%8-11S, %16-19Z, %4-7C"},
   3335   1.7  christos 
   3336   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   3337   1.7  christos    MVE_CNEG,
   3338   1.7  christos    0xea50b000, 0xfff0f000,
   3339   1.7  christos    "cneg\t%8-11S, %16-19Z, %4-7C"},
   3340   1.7  christos 
   3341   1.7  christos   {ARM_FEATURE_CORE_LOW (0),
   3342   1.7  christos    MVE_NONE,
   3343   1.7  christos    0x00000000, 0x00000000, 0}
   3344   1.7  christos };
   3345   1.7  christos 
   3346   1.1  christos /* Opcode tables: ARM, 16-bit Thumb, 32-bit Thumb.  All three are partially
   3347   1.1  christos    ordered: they must be searched linearly from the top to obtain a correct
   3348   1.1  christos    match.  */
   3349   1.1  christos 
   3350   1.1  christos /* print_insn_arm recognizes the following format control codes:
   3351   1.1  christos 
   3352   1.1  christos    %%			%
   3353   1.1  christos 
   3354   1.1  christos    %a			print address for ldr/str instruction
   3355   1.1  christos    %s                   print address for ldr/str halfword/signextend instruction
   3356   1.1  christos    %S                   like %s but allow UNPREDICTABLE addressing
   3357   1.1  christos    %b			print branch destination
   3358   1.1  christos    %c			print condition code (always bits 28-31)
   3359   1.1  christos    %m			print register mask for ldm/stm instruction
   3360   1.1  christos    %o			print operand2 (immediate or register + shift)
   3361   1.1  christos    %p			print 'p' iff bits 12-15 are 15
   3362  1.10  christos    %O			print 'OBSOLETE' iff bits 12-15 are 15
   3363   1.1  christos    %t			print 't' iff bit 21 set and bit 24 clear
   3364   1.1  christos    %B			print arm BLX(1) destination
   3365   1.1  christos    %C			print the PSR sub type.
   3366   1.1  christos    %U			print barrier type.
   3367   1.1  christos    %P			print address for pli instruction.
   3368  1.10  christos    %T			print 'from Armv4T onwards'
   3369   1.1  christos 
   3370   1.1  christos    %<bitfield>r		print as an ARM register
   3371   1.2     joerg    %<bitfield>T		print as an ARM register + 1
   3372   1.1  christos    %<bitfield>R		as %r but r15 is UNPREDICTABLE
   3373   1.1  christos    %<bitfield>{r|R}u    as %{r|R} but if matches the other %u field then is UNPREDICTABLE
   3374   1.1  christos    %<bitfield>{r|R}U    as %{r|R} but if matches the other %U field then is UNPREDICTABLE
   3375   1.1  christos    %<bitfield>d		print the bitfield in decimal
   3376   1.4  christos    %<bitfield>W         print the bitfield plus one in decimal
   3377   1.1  christos    %<bitfield>x		print the bitfield in hex
   3378   1.1  christos    %<bitfield>X		print the bitfield as 1 hex digit without leading "0x"
   3379   1.4  christos 
   3380   1.1  christos    %<bitfield>'c	print specified char iff bitfield is all ones
   3381   1.1  christos    %<bitfield>`c	print specified char iff bitfield is all zeroes
   3382   1.1  christos    %<bitfield>?ab...    select from array of values in big endian order
   3383   1.1  christos 
   3384   1.1  christos    %e                   print arm SMI operand (bits 0..7,8..19).
   3385   1.1  christos    %E			print the LSB and WIDTH fields of a BFI or BFC instruction.
   3386   1.1  christos    %V                   print the 16-bit immediate field of a MOVT or MOVW instruction.
   3387   1.1  christos    %R			print the SPSR/CPSR or banked register of an MRS.  */
   3388   1.1  christos 
   3389   1.1  christos static const struct opcode32 arm_opcodes[] =
   3390   1.1  christos {
   3391   1.1  christos   /* ARM instructions.  */
   3392   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3393   1.8  christos     0xe1a00000, 0xffffffff, "nop\t\t\t@ (mov r0, r0)"},
   3394   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3395   1.8  christos     0xe7f000f0, 0xfff000f0, "udf\t%{I:#%e%}"},
   3396   1.3  christos 
   3397  1.10  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4),
   3398  1.10  christos     0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r%T"},
   3399   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   3400   1.3  christos     0x00000090, 0x0fe000f0, "mul%20's%c\t%16-19R, %0-3R, %8-11R"},
   3401   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
   3402   1.3  christos     0x00200090, 0x0fe000f0, "mla%20's%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3403   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V2S),
   3404   1.3  christos     0x01000090, 0x0fb00ff0, "swp%22'b%c\t%12-15RU, %0-3Ru, [%16-19RuU]"},
   3405   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
   3406   1.3  christos     0x00800090, 0x0fa000f0,
   3407   1.3  christos     "%22?sumull%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3408   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
   3409   1.3  christos     0x00a00090, 0x0fa000f0,
   3410   1.3  christos     "%22?sumlal%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3411   1.1  christos 
   3412   1.4  christos   /* V8.2 RAS extension instructions.  */
   3413   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
   3414   1.4  christos     0xe320f010, 0xffffffff, "esb"},
   3415   1.4  christos 
   3416   1.7  christos   /* V8-R instructions.  */
   3417   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R),
   3418   1.7  christos     0xf57ff04c, 0xffffffff, "dfb"},
   3419   1.7  christos 
   3420   1.2     joerg   /* V8 instructions.  */
   3421   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   3422   1.3  christos     0x0320f005, 0x0fffffff, "sevl"},
   3423   1.6  christos   /* Defined in V8 but is in NOP space so available to all arch.  */
   3424   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3425   1.8  christos     0xe1000070, 0xfff000f0, "hlt\t%{I:0x%16-19X%12-15X%8-11X%0-3X%}"},
   3426   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_ATOMICS),
   3427   1.3  christos     0x01800e90, 0x0ff00ff0, "stlex%c\t%12-15r, %0-3r, [%16-19R]"},
   3428   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3429   1.3  christos     0x01900e9f, 0x0ff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
   3430   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   3431   1.3  christos     0x01a00e90, 0x0ff00ff0, "stlexd%c\t%12-15r, %0-3r, %0-3T, [%16-19R]"},
   3432   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   3433   1.3  christos     0x01b00e9f, 0x0ff00fff, "ldaexd%c\t%12-15r, %12-15T, [%16-19R]"},
   3434   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3435   1.3  christos     0x01c00e90, 0x0ff00ff0, "stlexb%c\t%12-15r, %0-3r, [%16-19R]"},
   3436   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3437   1.3  christos     0x01d00e9f, 0x0ff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
   3438   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3439   1.3  christos     0x01e00e90, 0x0ff00ff0, "stlexh%c\t%12-15r, %0-3r, [%16-19R]"},
   3440   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3441   1.3  christos     0x01f00e9f, 0x0ff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
   3442   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3443   1.3  christos     0x0180fc90, 0x0ff0fff0, "stl%c\t%0-3r, [%16-19R]"},
   3444   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3445   1.3  christos     0x01900c9f, 0x0ff00fff, "lda%c\t%12-15r, [%16-19R]"},
   3446   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3447   1.3  christos     0x01c0fc90, 0x0ff0fff0, "stlb%c\t%0-3r, [%16-19R]"},
   3448   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3449   1.3  christos     0x01d00c9f, 0x0ff00fff, "ldab%c\t%12-15r, [%16-19R]"},
   3450   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3451   1.3  christos     0x01e0fc90, 0x0ff0fff0, "stlh%c\t%0-3r, [%16-19R]"},
   3452   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
   3453   1.4  christos     0x01f00c9f, 0x0ff00fff, "ldah%c\t%12-15r, [%16-19R]"},
   3454   1.2     joerg   /* CRC32 instructions.  */
   3455   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3456   1.3  christos     0xe1000040, 0xfff00ff0, "crc32b\t%12-15R, %16-19R, %0-3R"},
   3457   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3458   1.3  christos     0xe1200040, 0xfff00ff0, "crc32h\t%12-15R, %16-19R, %0-3R"},
   3459   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3460   1.3  christos     0xe1400040, 0xfff00ff0, "crc32w\t%12-15R, %16-19R, %0-3R"},
   3461   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3462   1.3  christos     0xe1000240, 0xfff00ff0, "crc32cb\t%12-15R, %16-19R, %0-3R"},
   3463   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3464   1.3  christos     0xe1200240, 0xfff00ff0, "crc32ch\t%12-15R, %16-19R, %0-3R"},
   3465   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   3466   1.3  christos     0xe1400240, 0xfff00ff0, "crc32cw\t%12-15R, %16-19R, %0-3R"},
   3467   1.3  christos 
   3468   1.3  christos   /* Privileged Access Never extension instructions.  */
   3469   1.3  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),
   3470   1.8  christos     0xf1100000, 0xfffffdff, "setpan\t%{I:#%9-9d%}"},
   3471   1.2     joerg 
   3472   1.1  christos   /* Virtualization Extension instructions.  */
   3473   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x0160006e, 0x0fffffff, "eret%c"},
   3474   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x01400070, 0x0ff000f0, "hvc%c\t%e"},
   3475   1.1  christos 
   3476   1.1  christos   /* Integer Divide Extension instructions.  */
   3477   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
   3478   1.3  christos     0x0710f010, 0x0ff0f0f0, "sdiv%c\t%16-19r, %0-3r, %8-11r"},
   3479   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
   3480   1.3  christos     0x0730f010, 0x0ff0f0f0, "udiv%c\t%16-19r, %0-3r, %8-11r"},
   3481   1.1  christos 
   3482   1.1  christos   /* MP Extension instructions.  */
   3483   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf410f000, 0xfc70f000, "pldw\t%a"},
   3484   1.1  christos 
   3485   1.6  christos   /* Speculation Barriers.  */
   3486   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xe320f014, 0xffffffff, "csdb"},
   3487   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff040, 0xffffffff, "ssbb"},
   3488   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff044, 0xffffffff, "pssbb"},
   3489   1.6  christos 
   3490   1.1  christos   /* V7 instructions.  */
   3491   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf450f000, 0xfd70f000, "pli\t%P"},
   3492   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0x0320f0f0, 0x0ffffff0, "dbg%c\t%{I:#%0-3d%}"},
   3493   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff051, 0xfffffff3, "dmb\t%U"},
   3494   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff041, 0xfffffff3, "dsb\t%U"},
   3495   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff050, 0xfffffff0, "dmb\t%U"},
   3496   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff040, 0xfffffff0, "dsb\t%U"},
   3497   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff060, 0xfffffff0, "isb\t%U"},
   3498   1.4  christos    {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
   3499   1.8  christos     0x0320f000, 0x0fffffff, "nop%c\t{%{I:%0-7d%}}"},
   3500   1.1  christos 
   3501   1.1  christos   /* ARM V6T2 instructions.  */
   3502   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3503   1.3  christos     0x07c0001f, 0x0fe0007f, "bfc%c\t%12-15R, %E"},
   3504   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3505   1.3  christos     0x07c00010, 0x0fe00070, "bfi%c\t%12-15R, %0-3r, %E"},
   3506   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3507   1.3  christos     0x00600090, 0x0ff000f0, "mls%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3508   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3509   1.3  christos     0x002000b0, 0x0f3000f0, "strht%c\t%12-15R, %S"},
   3510   1.3  christos 
   3511   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3512   1.3  christos     0x00300090, 0x0f3000f0, UNDEFINED_INSTRUCTION },
   3513   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3514   1.3  christos     0x00300090, 0x0f300090, "ldr%6's%5?hbt%c\t%12-15R, %S"},
   3515   1.3  christos 
   3516   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   3517   1.3  christos     0x03000000, 0x0ff00000, "movw%c\t%12-15R, %V"},
   3518   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   3519   1.3  christos     0x03400000, 0x0ff00000, "movt%c\t%12-15R, %V"},
   3520   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3521   1.3  christos     0x06ff0f30, 0x0fff0ff0, "rbit%c\t%12-15R, %0-3R"},
   3522   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   3523   1.8  christos     0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, %{I:#%7-11d%}, %{I:#%16-20W%}"},
   3524   1.1  christos 
   3525   1.1  christos   /* ARM Security extension instructions.  */
   3526   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),
   3527   1.3  christos     0x01600070, 0x0ff000f0, "smc%c\t%e"},
   3528   1.1  christos 
   3529   1.1  christos   /* ARM V6K instructions.  */
   3530   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3531   1.3  christos     0xf57ff01f, 0xffffffff, "clrex"},
   3532   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3533   1.3  christos     0x01d00f9f, 0x0ff00fff, "ldrexb%c\t%12-15R, [%16-19R]"},
   3534   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3535   1.3  christos     0x01b00f9f, 0x0ff00fff, "ldrexd%c\t%12-15r, [%16-19R]"},
   3536   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3537   1.3  christos     0x01f00f9f, 0x0ff00fff, "ldrexh%c\t%12-15R, [%16-19R]"},
   3538   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3539   1.3  christos     0x01c00f90, 0x0ff00ff0, "strexb%c\t%12-15R, %0-3R, [%16-19R]"},
   3540   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3541   1.3  christos     0x01a00f90, 0x0ff00ff0, "strexd%c\t%12-15R, %0-3r, [%16-19R]"},
   3542   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3543   1.3  christos     0x01e00f90, 0x0ff00ff0, "strexh%c\t%12-15R, %0-3R, [%16-19R]"},
   3544   1.1  christos 
   3545   1.6  christos   /* ARMv8.5-A instructions.  */
   3546   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf57ff070, 0xffffffff, "sb"},
   3547   1.6  christos 
   3548   1.1  christos   /* ARM V6K NOP hints.  */
   3549   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3550   1.3  christos     0x0320f001, 0x0fffffff, "yield%c"},
   3551   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3552   1.3  christos     0x0320f002, 0x0fffffff, "wfe%c"},
   3553   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3554   1.3  christos     0x0320f003, 0x0fffffff, "wfi%c"},
   3555   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3556   1.3  christos     0x0320f004, 0x0fffffff, "sev%c"},
   3557   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
   3558   1.8  christos     0x0320f000, 0x0fffff00, "nop%c\t{%{I:%0-7d%}}"},
   3559   1.1  christos 
   3560   1.1  christos   /* ARM V6 instructions.  */
   3561   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3562   1.8  christos     0xf1080000, 0xfffffe3f, "cpsie\t%{B:%8'a%7'i%6'f%}"},
   3563   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3564   1.9  christos     0xf10a0000, 0xfffffe20, "cpsie\t%{B:%8'a%7'i%6'f%}, %{I:#%0-4d%}"},
   3565   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3566   1.8  christos     0xf10C0000, 0xfffffe3f, "cpsid\t%{B:%8'a%7'i%6'f%}"},
   3567   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3568   1.9  christos     0xf10e0000, 0xfffffe20, "cpsid\t%{B:%8'a%7'i%6'f%}, %{I:#%0-4d%}"},
   3569   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3570   1.8  christos     0xf1000000, 0xfff1fe20, "cps\t%{I:#%0-4d%}"},
   3571   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3572   1.3  christos     0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15R, %16-19R, %0-3R"},
   3573   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3574   1.8  christos     0x06800010, 0x0ff00070, "pkhbt%c\t%12-15R, %16-19R, %0-3R, %{B:lsl%} %{I:#%7-11d%}"},
   3575   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3576   1.8  christos     0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15R, %16-19R, %0-3R, %{B:asr%} %{I:#32%}"},
   3577   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3578   1.8  christos     0x06800050, 0x0ff00070, "pkhtb%c\t%12-15R, %16-19R, %0-3R, %{B:asr%} %{I:#%7-11d%}"},
   3579   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3580   1.8  christos     0x01900f9f, 0x0ff00fff, "ldrex%c\t%{R:r%12-15d%}, [%16-19R]"},
   3581   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3582   1.3  christos     0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15R, %16-19R, %0-3R"},
   3583   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3584   1.3  christos     0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15R, %16-19R, %0-3R"},
   3585   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3586   1.3  christos     0x06200f30, 0x0ff00ff0, "qasx%c\t%12-15R, %16-19R, %0-3R"},
   3587   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3588   1.3  christos     0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15R, %16-19R, %0-3R"},
   3589   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3590   1.3  christos     0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15R, %16-19R, %0-3R"},
   3591   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3592   1.3  christos     0x06200f50, 0x0ff00ff0, "qsax%c\t%12-15R, %16-19R, %0-3R"},
   3593   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3594   1.3  christos     0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15R, %16-19R, %0-3R"},
   3595   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3596   1.3  christos     0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15R, %16-19R, %0-3R"},
   3597   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3598   1.3  christos     0x06100f30, 0x0ff00ff0, "sasx%c\t%12-15R, %16-19R, %0-3R"},
   3599   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3600   1.3  christos     0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15R, %16-19R, %0-3R"},
   3601   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3602   1.3  christos     0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15R, %16-19R, %0-3R"},
   3603   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3604   1.3  christos     0x06300f30, 0x0ff00ff0, "shasx%c\t%12-15R, %16-19R, %0-3R"},
   3605   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3606   1.3  christos     0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15R, %16-19R, %0-3R"},
   3607   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3608   1.3  christos     0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15R, %16-19R, %0-3R"},
   3609   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3610   1.3  christos     0x06300f50, 0x0ff00ff0, "shsax%c\t%12-15R, %16-19R, %0-3R"},
   3611   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3612   1.3  christos     0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15R, %16-19R, %0-3R"},
   3613   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3614   1.3  christos     0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15R, %16-19R, %0-3R"},
   3615   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3616   1.3  christos     0x06100f50, 0x0ff00ff0, "ssax%c\t%12-15R, %16-19R, %0-3R"},
   3617   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3618   1.3  christos     0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15R, %16-19R, %0-3R"},
   3619   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3620   1.3  christos     0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15R, %16-19R, %0-3R"},
   3621   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3622   1.3  christos     0x06500f30, 0x0ff00ff0, "uasx%c\t%12-15R, %16-19R, %0-3R"},
   3623   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3624   1.3  christos     0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15R, %16-19R, %0-3R"},
   3625   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3626   1.3  christos     0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15R, %16-19R, %0-3R"},
   3627   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3628   1.3  christos     0x06700f30, 0x0ff00ff0, "uhasx%c\t%12-15R, %16-19R, %0-3R"},
   3629   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3630   1.3  christos     0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15R, %16-19R, %0-3R"},
   3631   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3632   1.3  christos     0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15R, %16-19R, %0-3R"},
   3633   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3634   1.3  christos     0x06700f50, 0x0ff00ff0, "uhsax%c\t%12-15R, %16-19R, %0-3R"},
   3635   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3636   1.3  christos     0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15R, %16-19R, %0-3R"},
   3637   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3638   1.3  christos     0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15R, %16-19R, %0-3R"},
   3639   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3640   1.3  christos     0x06600f30, 0x0ff00ff0, "uqasx%c\t%12-15R, %16-19R, %0-3R"},
   3641   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3642   1.3  christos     0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15R, %16-19R, %0-3R"},
   3643   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3644   1.3  christos     0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15R, %16-19R, %0-3R"},
   3645   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3646   1.3  christos     0x06600f50, 0x0ff00ff0, "uqsax%c\t%12-15R, %16-19R, %0-3R"},
   3647   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3648   1.3  christos     0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15R, %16-19R, %0-3R"},
   3649   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3650   1.3  christos     0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15R, %16-19R, %0-3R"},
   3651   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3652   1.3  christos     0x06500f50, 0x0ff00ff0, "usax%c\t%12-15R, %16-19R, %0-3R"},
   3653   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3654   1.3  christos     0x06bf0f30, 0x0fff0ff0, "rev%c\t%12-15R, %0-3R"},
   3655   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3656   1.3  christos     0x06bf0fb0, 0x0fff0ff0, "rev16%c\t%12-15R, %0-3R"},
   3657   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3658   1.3  christos     0x06ff0fb0, 0x0fff0ff0, "revsh%c\t%12-15R, %0-3R"},
   3659   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3660   1.3  christos     0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t%16-19r%21'!"},
   3661   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3662   1.3  christos     0x06bf0070, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R"},
   3663   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3664   1.8  christos     0x06bf0470, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3665   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3666   1.8  christos     0x06bf0870, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3667   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3668   1.8  christos     0x06bf0c70, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3669   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3670   1.3  christos     0x068f0070, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R"},
   3671   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3672   1.8  christos     0x068f0470, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3673   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3674   1.8  christos     0x068f0870, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3675   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3676   1.8  christos     0x068f0c70, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3677   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3678   1.3  christos     0x06af0070, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R"},
   3679   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3680   1.8  christos     0x06af0470, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3681   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3682   1.8  christos     0x06af0870, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3683   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3684   1.8  christos     0x06af0c70, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3685   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3686   1.3  christos     0x06ff0070, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R"},
   3687   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3688   1.8  christos     0x06ff0470, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3689   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3690   1.8  christos     0x06ff0870, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3691   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3692   1.8  christos     0x06ff0c70, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3693   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3694   1.3  christos     0x06cf0070, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R"},
   3695   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3696   1.8  christos     0x06cf0470, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3697   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3698   1.8  christos     0x06cf0870, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3699   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3700   1.8  christos     0x06cf0c70, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3701   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3702   1.3  christos     0x06ef0070, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R"},
   3703   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3704   1.8  christos     0x06ef0470, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#8%}"},
   3705   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3706   1.8  christos     0x06ef0870, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#16%}"},
   3707   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3708   1.8  christos     0x06ef0c70, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, %{B:ror%} %{I:#24%}"},
   3709   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3710   1.3  christos     0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R"},
   3711   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3712   1.8  christos     0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3713   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3714   1.8  christos     0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3715   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3716   1.8  christos     0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3717   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3718   1.3  christos     0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R"},
   3719   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3720   1.8  christos     0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3721   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3722   1.8  christos     0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3723   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3724   1.8  christos     0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3725   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3726   1.3  christos     0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R"},
   3727   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3728   1.8  christos     0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3729   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3730   1.8  christos     0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3731   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3732   1.8  christos     0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3733   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3734   1.3  christos     0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R"},
   3735   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3736   1.8  christos     0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3737   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3738   1.8  christos     0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3739   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3740   1.8  christos     0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3741   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3742   1.3  christos     0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R"},
   3743   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3744   1.8  christos     0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3745   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3746   1.8  christos     0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3747   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3748   1.8  christos     0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ROR %{I:#24%}"},
   3749   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3750   1.3  christos     0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R"},
   3751   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3752   1.8  christos     0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#8%}"},
   3753   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3754   1.8  christos     0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#16%}"},
   3755   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3756   1.8  christos     0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, %{B:ror%} %{I:#24%}"},
   3757   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3758   1.3  christos     0x06800fb0, 0x0ff00ff0, "sel%c\t%12-15R, %16-19R, %0-3R"},
   3759   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3760   1.8  christos     0xf1010000, 0xfffffc00, "setend\t%{B:%9?ble%}"},
   3761   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3762   1.3  christos     0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19R, %0-3R, %8-11R"},
   3763   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3764   1.3  christos     0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19R, %0-3R, %8-11R"},
   3765   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3766   1.3  christos     0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3767   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3768   1.3  christos     0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3769   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3770   1.3  christos     0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3771   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3772   1.3  christos     0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3773   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3774   1.3  christos     0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19R, %0-3R, %8-11R"},
   3775   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3776   1.3  christos     0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3777   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3778   1.3  christos     0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3779   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3780   1.8  christos     0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t%16-19r%21'!, %{I:#%0-4d%}"},
   3781   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3782   1.8  christos     0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15R, %{I:#%16-20W%}, %0-3R"},
   3783   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3784   1.8  christos     0x06a00010, 0x0fe00070, "ssat%c\t%12-15R, %{I:#%16-20W%}, %0-3R, %{B:lsl%} %{I:#%7-11d%}"},
   3785   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3786   1.8  christos     0x06a00050, 0x0fe00070, "ssat%c\t%12-15R, %{I:#%16-20W%}, %0-3R, %{B:asr%} %{I:#%7-11d%}"},
   3787   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3788   1.8  christos     0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, %{I:#%16-19W%}, %0-3r"},
   3789   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3790   1.3  christos     0x01800f90, 0x0ff00ff0, "strex%c\t%12-15R, %0-3R, [%16-19R]"},
   3791   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3792   1.3  christos     0x00400090, 0x0ff000f0, "umaal%c\t%12-15R, %16-19R, %0-3R, %8-11R"},
   3793   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3794   1.3  christos     0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19R, %0-3R, %8-11R"},
   3795   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3796   1.3  christos     0x07800010, 0x0ff000f0, "usada8%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3797   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3798   1.8  christos     0x06e00010, 0x0fe00ff0, "usat%c\t%12-15R, %{I:#%16-20d%}, %0-3R"},
   3799   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3800   1.8  christos     0x06e00010, 0x0fe00070, "usat%c\t%12-15R, %{I:#%16-20d%}, %0-3R, %{B:lsl%} %{I:#%7-11d%}"},
   3801   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3802   1.8  christos     0x06e00050, 0x0fe00070, "usat%c\t%12-15R, %{I:#%16-20d%}, %0-3R, %{B:asr%} %{I:#%7-11d%}"},
   3803   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
   3804   1.8  christos     0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15R, %{I:#%16-19d%}, %0-3R"},
   3805   1.1  christos 
   3806   1.1  christos   /* V5J instruction.  */
   3807   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5J),
   3808   1.3  christos     0x012fff20, 0x0ffffff0, "bxj%c\t%0-3R"},
   3809   1.1  christos 
   3810   1.1  christos   /* V5 Instructions.  */
   3811   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3812   1.3  christos     0xe1200070, 0xfff000f0,
   3813   1.8  christos     "bkpt\t%{I:0x%16-19X%12-15X%8-11X%0-3X%}"},
   3814   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3815   1.3  christos     0xfa000000, 0xfe000000, "blx\t%B"},
   3816   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3817   1.3  christos     0x012fff30, 0x0ffffff0, "blx%c\t%0-3R"},
   3818   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
   3819   1.3  christos     0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15R, %0-3R"},
   3820   1.3  christos 
   3821   1.3  christos   /* V5E "El Segundo" Instructions.  */
   3822   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   3823   1.3  christos     0x000000d0, 0x0e1000f0, "ldrd%c\t%12-15r, %s"},
   3824   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   3825   1.3  christos     0x000000f0, 0x0e1000f0, "strd%c\t%12-15r, %s"},
   3826   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
   3827   1.3  christos     0xf450f000, 0xfc70f000, "pld\t%a"},
   3828   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3829   1.3  christos     0x01000080, 0x0ff000f0, "smlabb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3830   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3831   1.3  christos     0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3832   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3833   1.3  christos     0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3834   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3835   1.3  christos     0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11R, %12-15R"},
   3836   1.3  christos 
   3837   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3838   1.3  christos     0x01200080, 0x0ff000f0, "smlawb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
   3839   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3840   1.3  christos     0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19R, %0-3r, %8-11R, %12-15R"},
   3841   1.3  christos 
   3842   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3843   1.3  christos     0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3844   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3845   1.3  christos     0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3846   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3847   1.3  christos     0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3848   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3849   1.3  christos     0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
   3850   1.3  christos 
   3851   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3852   1.3  christos     0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19R, %0-3R, %8-11R"},
   3853   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3854   1.3  christos     0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19R, %0-3R, %8-11R"},
   3855   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3856   1.3  christos     0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19R, %0-3R, %8-11R"},
   3857   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3858   1.3  christos     0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19R, %0-3R, %8-11R"},
   3859   1.3  christos 
   3860   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3861   1.3  christos     0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19R, %0-3R, %8-11R"},
   3862   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3863   1.3  christos     0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19R, %0-3R, %8-11R"},
   3864   1.3  christos 
   3865   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3866   1.3  christos     0x01000050, 0x0ff00ff0,  "qadd%c\t%12-15R, %0-3R, %16-19R"},
   3867   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3868   1.3  christos     0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15R, %0-3R, %16-19R"},
   3869   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3870   1.3  christos     0x01200050, 0x0ff00ff0,  "qsub%c\t%12-15R, %0-3R, %16-19R"},
   3871   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
   3872   1.3  christos     0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15R, %0-3R, %16-19R"},
   3873   1.1  christos 
   3874   1.1  christos   /* ARM Instructions.  */
   3875   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3876   1.8  christos     0x052d0004, 0x0fff0fff, "push%c\t{%12-15r}\t\t@ (str%c %12-15r, %a)"},
   3877   1.2     joerg 
   3878   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3879   1.3  christos     0x04400000, 0x0e500000, "strb%t%c\t%12-15R, %a"},
   3880   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3881   1.3  christos     0x04000000, 0x0e500000, "str%t%c\t%12-15r, %a"},
   3882   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3883   1.3  christos     0x06400000, 0x0e500ff0, "strb%t%c\t%12-15R, %a"},
   3884   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3885   1.3  christos     0x06000000, 0x0e500ff0, "str%t%c\t%12-15r, %a"},
   3886   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3887   1.3  christos     0x04400000, 0x0c500010, "strb%t%c\t%12-15R, %a"},
   3888   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3889   1.3  christos     0x04000000, 0x0c500010, "str%t%c\t%12-15r, %a"},
   3890   1.3  christos 
   3891   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3892   1.3  christos     0x04400000, 0x0e500000, "strb%c\t%12-15R, %a"},
   3893   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3894   1.3  christos     0x06400000, 0x0e500010, "strb%c\t%12-15R, %a"},
   3895   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3896   1.3  christos     0x004000b0, 0x0e5000f0, "strh%c\t%12-15R, %s"},
   3897   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3898   1.3  christos     0x000000b0, 0x0e500ff0, "strh%c\t%12-15R, %s"},
   3899   1.3  christos 
   3900   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3901   1.3  christos     0x00500090, 0x0e5000f0, UNDEFINED_INSTRUCTION},
   3902   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3903   1.3  christos     0x00500090, 0x0e500090, "ldr%6's%5?hb%c\t%12-15R, %s"},
   3904   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3905   1.3  christos     0x00100090, 0x0e500ff0, UNDEFINED_INSTRUCTION},
   3906   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3907   1.3  christos     0x00100090, 0x0e500f90, "ldr%6's%5?hb%c\t%12-15R, %s"},
   3908   1.3  christos 
   3909   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3910   1.3  christos     0x02000000, 0x0fe00000, "and%20's%c\t%12-15r, %16-19r, %o"},
   3911   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3912   1.3  christos     0x00000000, 0x0fe00010, "and%20's%c\t%12-15r, %16-19r, %o"},
   3913   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3914   1.3  christos     0x00000010, 0x0fe00090, "and%20's%c\t%12-15R, %16-19R, %o"},
   3915   1.3  christos 
   3916   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3917   1.3  christos     0x02200000, 0x0fe00000, "eor%20's%c\t%12-15r, %16-19r, %o"},
   3918   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3919   1.3  christos     0x00200000, 0x0fe00010, "eor%20's%c\t%12-15r, %16-19r, %o"},
   3920   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3921   1.3  christos     0x00200010, 0x0fe00090, "eor%20's%c\t%12-15R, %16-19R, %o"},
   3922   1.3  christos 
   3923   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3924   1.3  christos     0x02400000, 0x0fe00000, "sub%20's%c\t%12-15r, %16-19r, %o"},
   3925   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3926   1.3  christos     0x00400000, 0x0fe00010, "sub%20's%c\t%12-15r, %16-19r, %o"},
   3927   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3928   1.3  christos     0x00400010, 0x0fe00090, "sub%20's%c\t%12-15R, %16-19R, %o"},
   3929   1.3  christos 
   3930   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3931   1.3  christos     0x02600000, 0x0fe00000, "rsb%20's%c\t%12-15r, %16-19r, %o"},
   3932   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3933   1.3  christos     0x00600000, 0x0fe00010, "rsb%20's%c\t%12-15r, %16-19r, %o"},
   3934   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3935   1.3  christos     0x00600010, 0x0fe00090, "rsb%20's%c\t%12-15R, %16-19R, %o"},
   3936   1.3  christos 
   3937   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3938   1.3  christos     0x02800000, 0x0fe00000, "add%20's%c\t%12-15r, %16-19r, %o"},
   3939   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3940   1.3  christos     0x00800000, 0x0fe00010, "add%20's%c\t%12-15r, %16-19r, %o"},
   3941   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3942   1.3  christos     0x00800010, 0x0fe00090, "add%20's%c\t%12-15R, %16-19R, %o"},
   3943   1.3  christos 
   3944   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3945   1.3  christos     0x02a00000, 0x0fe00000, "adc%20's%c\t%12-15r, %16-19r, %o"},
   3946   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3947   1.3  christos     0x00a00000, 0x0fe00010, "adc%20's%c\t%12-15r, %16-19r, %o"},
   3948   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3949   1.3  christos     0x00a00010, 0x0fe00090, "adc%20's%c\t%12-15R, %16-19R, %o"},
   3950   1.3  christos 
   3951   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3952   1.3  christos     0x02c00000, 0x0fe00000, "sbc%20's%c\t%12-15r, %16-19r, %o"},
   3953   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3954   1.3  christos     0x00c00000, 0x0fe00010, "sbc%20's%c\t%12-15r, %16-19r, %o"},
   3955   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3956   1.3  christos     0x00c00010, 0x0fe00090, "sbc%20's%c\t%12-15R, %16-19R, %o"},
   3957   1.3  christos 
   3958   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3959   1.3  christos     0x02e00000, 0x0fe00000, "rsc%20's%c\t%12-15r, %16-19r, %o"},
   3960   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3961   1.3  christos     0x00e00000, 0x0fe00010, "rsc%20's%c\t%12-15r, %16-19r, %o"},
   3962   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3963   1.3  christos     0x00e00010, 0x0fe00090, "rsc%20's%c\t%12-15R, %16-19R, %o"},
   3964   1.3  christos 
   3965   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT),
   3966   1.3  christos     0x0120f200, 0x0fb0f200, "msr%c\t%C, %0-3r"},
   3967   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
   3968   1.3  christos     0x0120f000, 0x0db0f000, "msr%c\t%C, %o"},
   3969   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
   3970   1.3  christos     0x01000000, 0x0fb00cff, "mrs%c\t%12-15R, %R"},
   3971   1.3  christos 
   3972   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3973  1.10  christos     0x03000000, 0x0fe00000, "tst%p%c\t%16-19r, %o%O"},
   3974   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3975  1.10  christos     0x01000000, 0x0fe00010, "tst%p%c\t%16-19r, %o%O"},
   3976   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3977  1.10  christos     0x01000010, 0x0fe00090, "tst%p%c\t%16-19R, %o%O"},
   3978   1.3  christos 
   3979   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3980  1.10  christos     0x03300000, 0x0ff00000, "teq%p%c\t%16-19r, %o%O"},
   3981   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3982  1.10  christos     0x01300000, 0x0ff00010, "teq%p%c\t%16-19r, %o%O"},
   3983   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3984  1.10  christos     0x01300010, 0x0ff00010, "teq%p%c\t%16-19R, %o%O"},
   3985   1.3  christos 
   3986   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3987  1.10  christos     0x03400000, 0x0fe00000, "cmp%p%c\t%16-19r, %o%O"},
   3988   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3989  1.10  christos     0x01400000, 0x0fe00010, "cmp%p%c\t%16-19r, %o%O"},
   3990   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3991  1.10  christos     0x01400010, 0x0fe00090, "cmp%p%c\t%16-19R, %o%O"},
   3992   1.3  christos 
   3993   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3994  1.10  christos     0x03600000, 0x0fe00000, "cmn%p%c\t%16-19r, %o%O"},
   3995   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3996  1.10  christos     0x01600000, 0x0fe00010, "cmn%p%c\t%16-19r, %o%O"},
   3997   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   3998  1.10  christos     0x01600010, 0x0fe00090, "cmn%p%c\t%16-19R, %o%O"},
   3999   1.3  christos 
   4000   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4001   1.3  christos     0x03800000, 0x0fe00000, "orr%20's%c\t%12-15r, %16-19r, %o"},
   4002   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4003   1.3  christos     0x01800000, 0x0fe00010, "orr%20's%c\t%12-15r, %16-19r, %o"},
   4004   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4005   1.3  christos     0x01800010, 0x0fe00090, "orr%20's%c\t%12-15R, %16-19R, %o"},
   4006   1.3  christos 
   4007   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4008   1.3  christos     0x03a00000, 0x0fef0000, "mov%20's%c\t%12-15r, %o"},
   4009   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4010   1.3  christos     0x01a00000, 0x0def0ff0, "mov%20's%c\t%12-15r, %0-3r"},
   4011   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4012   1.3  christos     0x01a00000, 0x0def0060, "lsl%20's%c\t%12-15R, %q"},
   4013   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4014   1.3  christos     0x01a00020, 0x0def0060, "lsr%20's%c\t%12-15R, %q"},
   4015   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4016   1.3  christos     0x01a00040, 0x0def0060, "asr%20's%c\t%12-15R, %q"},
   4017   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4018   1.3  christos     0x01a00060, 0x0def0ff0, "rrx%20's%c\t%12-15r, %0-3r"},
   4019   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4020   1.3  christos     0x01a00060, 0x0def0060, "ror%20's%c\t%12-15R, %q"},
   4021   1.3  christos 
   4022   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4023   1.3  christos     0x03c00000, 0x0fe00000, "bic%20's%c\t%12-15r, %16-19r, %o"},
   4024   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4025   1.3  christos     0x01c00000, 0x0fe00010, "bic%20's%c\t%12-15r, %16-19r, %o"},
   4026   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4027   1.3  christos     0x01c00010, 0x0fe00090, "bic%20's%c\t%12-15R, %16-19R, %o"},
   4028   1.3  christos 
   4029   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4030   1.3  christos     0x03e00000, 0x0fe00000, "mvn%20's%c\t%12-15r, %o"},
   4031   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4032   1.3  christos     0x01e00000, 0x0fe00010, "mvn%20's%c\t%12-15r, %o"},
   4033   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4034   1.3  christos     0x01e00010, 0x0fe00090, "mvn%20's%c\t%12-15R, %o"},
   4035   1.3  christos 
   4036   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4037   1.3  christos     0x06000010, 0x0e000010, UNDEFINED_INSTRUCTION},
   4038   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4039   1.8  christos     0x049d0004, 0x0fff0fff, "pop%c\t{%12-15r}\t\t@ (ldr%c %12-15r, %a)"},
   4040   1.3  christos 
   4041   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4042   1.3  christos     0x04500000, 0x0c500000, "ldrb%t%c\t%12-15R, %a"},
   4043   1.3  christos 
   4044   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4045   1.3  christos     0x04300000, 0x0d700000, "ldrt%c\t%12-15R, %a"},
   4046   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4047   1.3  christos     0x04100000, 0x0c500000, "ldr%c\t%12-15r, %a"},
   4048   1.3  christos 
   4049   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4050   1.3  christos     0x092d0001, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4051   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4052   1.3  christos     0x092d0002, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4053   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4054   1.3  christos     0x092d0004, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4055   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4056   1.3  christos     0x092d0008, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4057   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4058   1.3  christos     0x092d0010, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4059   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4060   1.3  christos     0x092d0020, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4061   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4062   1.3  christos     0x092d0040, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4063   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4064   1.3  christos     0x092d0080, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4065   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4066   1.3  christos     0x092d0100, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4067   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4068   1.3  christos     0x092d0200, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4069   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4070   1.3  christos     0x092d0400, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4071   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4072   1.3  christos     0x092d0800, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4073   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4074   1.3  christos     0x092d1000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4075   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4076   1.3  christos     0x092d2000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4077   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4078   1.3  christos     0x092d4000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4079   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4080   1.3  christos     0x092d8000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
   4081   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4082   1.3  christos     0x092d0000, 0x0fff0000, "push%c\t%m"},
   4083   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4084   1.3  christos     0x08800000, 0x0ff00000, "stm%c\t%16-19R%21'!, %m%22'^"},
   4085   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4086   1.3  christos     0x08000000, 0x0e100000, "stm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
   4087   1.3  christos 
   4088   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4089   1.3  christos     0x08bd0001, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4090   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4091   1.3  christos     0x08bd0002, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4092   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4093   1.3  christos     0x08bd0004, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4094   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4095   1.3  christos     0x08bd0008, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4096   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4097   1.3  christos     0x08bd0010, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4098   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4099   1.3  christos     0x08bd0020, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4100   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4101   1.3  christos     0x08bd0040, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4102   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4103   1.3  christos     0x08bd0080, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4104   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4105   1.3  christos     0x08bd0100, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4106   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4107   1.3  christos     0x08bd0200, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4108   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4109   1.3  christos     0x08bd0400, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4110   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4111   1.3  christos     0x08bd0800, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4112   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4113   1.3  christos     0x08bd1000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4114   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4115   1.3  christos     0x08bd2000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4116   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4117   1.3  christos     0x08bd4000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4118   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4119   1.3  christos     0x08bd8000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
   4120   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4121   1.3  christos     0x08bd0000, 0x0fff0000, "pop%c\t%m"},
   4122   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4123   1.3  christos     0x08900000, 0x0f900000, "ldm%c\t%16-19R%21'!, %m%22'^"},
   4124   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4125   1.3  christos     0x08100000, 0x0e100000, "ldm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
   4126   1.3  christos 
   4127   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4128   1.3  christos     0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
   4129   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4130   1.3  christos     0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
   4131   1.1  christos 
   4132   1.1  christos   /* The rest.  */
   4133   1.4  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
   4134   1.8  christos     0x03200000, 0x0fff00ff, "nop%c\t{%{I:%0-7d%}}" UNPREDICTABLE_INSTRUCTION},
   4135   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4136   1.3  christos     0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
   4137   1.3  christos   {ARM_FEATURE_CORE_LOW (0),
   4138   1.3  christos     0x00000000, 0x00000000, 0}
   4139   1.1  christos };
   4140   1.1  christos 
   4141   1.1  christos /* print_insn_thumb16 recognizes the following format control codes:
   4142   1.1  christos 
   4143   1.1  christos    %S                   print Thumb register (bits 3..5 as high number if bit 6 set)
   4144   1.1  christos    %D                   print Thumb register (bits 0..2 as high number if bit 7 set)
   4145   1.1  christos    %<bitfield>I         print bitfield as a signed decimal
   4146   1.1  christos    				(top bit of range being the sign bit)
   4147   1.1  christos    %N                   print Thumb register mask (with LR)
   4148   1.1  christos    %O                   print Thumb register mask (with PC)
   4149   1.1  christos    %M                   print Thumb register mask
   4150   1.1  christos    %b			print CZB's 6-bit unsigned branch destination
   4151   1.1  christos    %s			print Thumb right-shift immediate (6..10; 0 == 32).
   4152   1.1  christos    %c			print the condition code
   4153   1.1  christos    %C			print the condition code, or "s" if not conditional
   4154   1.1  christos    %x			print warning if conditional an not at end of IT block"
   4155   1.8  christos    %X			print "\t@ unpredictable <IT:code>" if conditional
   4156   1.1  christos    %I			print IT instruction suffix and operands
   4157   1.1  christos    %W			print Thumb Writeback indicator for LDMIA
   4158   1.1  christos    %<bitfield>r		print bitfield as an ARM register
   4159   1.1  christos    %<bitfield>d		print bitfield as a decimal
   4160   1.1  christos    %<bitfield>H         print (bitfield * 2) as a decimal
   4161   1.1  christos    %<bitfield>W         print (bitfield * 4) as a decimal
   4162   1.1  christos    %<bitfield>a         print (bitfield * 4) as a pc-rel offset + decoded symbol
   4163   1.1  christos    %<bitfield>B         print Thumb branch destination (signed displacement)
   4164   1.1  christos    %<bitfield>c         print bitfield as a condition code
   4165   1.1  christos    %<bitnum>'c		print specified char iff bit is one
   4166   1.1  christos    %<bitnum>?ab		print a if bit is one else print b.  */
   4167   1.1  christos 
   4168   1.1  christos static const struct opcode16 thumb_opcodes[] =
   4169   1.1  christos {
   4170   1.1  christos   /* Thumb instructions.  */
   4171   1.1  christos 
   4172   1.4  christos   /* ARMv8-M Security Extensions instructions.  */
   4173   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4784, 0xff87, "blxns\t%3-6r"},
   4174   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4704, 0xff87, "bxns\t%3-6r"},
   4175   1.4  christos 
   4176   1.2     joerg   /* ARM V8 instructions.  */
   4177   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),  0xbf50, 0xffff, "sevl%c"},
   4178   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),  0xba80, 0xffc0, "hlt\t%0-5x"},
   4179   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),  0xb610, 0xfff7, "setpan\t%{I:#%3-3d%}"},
   4180   1.2     joerg 
   4181   1.1  christos   /* ARM V6K no-argument instructions.  */
   4182   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xffff, "nop%c"},
   4183   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf10, 0xffff, "yield%c"},
   4184   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf20, 0xffff, "wfe%c"},
   4185   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf30, 0xffff, "wfi%c"},
   4186   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf40, 0xffff, "sev%c"},
   4187   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xff0f, "nop%c\t{%4-7d}"},
   4188   1.1  christos 
   4189   1.1  christos   /* ARM V6T2 instructions.  */
   4190   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4191   1.4  christos     0xb900, 0xfd00, "cbnz\t%0-2r, %b%X"},
   4192   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4193   1.4  christos     0xb100, 0xfd00, "cbz\t%0-2r, %b%X"},
   4194   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xbf00, 0xff00, "it%I%X"},
   4195   1.1  christos 
   4196   1.1  christos   /* ARM V6.  */
   4197   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb660, 0xfff8, "cpsie\t%{B:%2'a%1'i%0'f%}%X"},
   4198   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb670, 0xfff8, "cpsid\t%{B:%2'a%1'i%0'f%}%X"},
   4199   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0x4600, 0xffc0, "mov%c\t%0-2r, %3-5r"},
   4200   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba00, 0xffc0, "rev%c\t%0-2r, %3-5r"},
   4201   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba40, 0xffc0, "rev16%c\t%0-2r, %3-5r"},
   4202   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xbac0, 0xffc0, "revsh%c\t%0-2r, %3-5r"},
   4203   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb650, 0xfff7, "setend\t%{B:%3?ble%}%X"},
   4204   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb200, 0xffc0, "sxth%c\t%0-2r, %3-5r"},
   4205   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb240, 0xffc0, "sxtb%c\t%0-2r, %3-5r"},
   4206   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb280, 0xffc0, "uxth%c\t%0-2r, %3-5r"},
   4207   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb2c0, 0xffc0, "uxtb%c\t%0-2r, %3-5r"},
   4208   1.1  christos 
   4209   1.1  christos   /* ARM V5 ISA extends Thumb.  */
   4210   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
   4211   1.3  christos     0xbe00, 0xff00, "bkpt\t%0-7x"}, /* Is always unconditional.  */
   4212   1.1  christos   /* This is BLX(2).  BLX(1) is a 32-bit instruction.  */
   4213   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
   4214   1.3  christos     0x4780, 0xff87, "blx%c\t%3-6r%x"},	/* note: 4 bit register number.  */
   4215   1.1  christos   /* ARM V4T ISA (Thumb v1).  */
   4216   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4217   1.8  christos     0x46C0, 0xFFFF, "nop%c\t\t\t@ (mov r8, r8)"},
   4218   1.1  christos   /* Format 4.  */
   4219   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4000, 0xFFC0, "and%C\t%0-2r, %3-5r"},
   4220   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4040, 0xFFC0, "eor%C\t%0-2r, %3-5r"},
   4221   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4080, 0xFFC0, "lsl%C\t%0-2r, %3-5r"},
   4222   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x40C0, 0xFFC0, "lsr%C\t%0-2r, %3-5r"},
   4223   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4100, 0xFFC0, "asr%C\t%0-2r, %3-5r"},
   4224   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4140, 0xFFC0, "adc%C\t%0-2r, %3-5r"},
   4225   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4180, 0xFFC0, "sbc%C\t%0-2r, %3-5r"},
   4226   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x41C0, 0xFFC0, "ror%C\t%0-2r, %3-5r"},
   4227   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4200, 0xFFC0, "tst%c\t%0-2r, %3-5r"},
   4228   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4240, 0xFFC0, "neg%C\t%0-2r, %3-5r"},
   4229   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4280, 0xFFC0, "cmp%c\t%0-2r, %3-5r"},
   4230   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x42C0, 0xFFC0, "cmn%c\t%0-2r, %3-5r"},
   4231   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4300, 0xFFC0, "orr%C\t%0-2r, %3-5r"},
   4232   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4340, 0xFFC0, "mul%C\t%0-2r, %3-5r"},
   4233   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4380, 0xFFC0, "bic%C\t%0-2r, %3-5r"},
   4234   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x43C0, 0xFFC0, "mvn%C\t%0-2r, %3-5r"},
   4235   1.1  christos   /* format 13 */
   4236   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB000, 0xFF80, "add%c\t%{R:sp%}, %{I:#%0-6W%}"},
   4237   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB080, 0xFF80, "sub%c\t%{R:sp%}, %{I:#%0-6W%}"},
   4238   1.1  christos   /* format 5 */
   4239   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4700, 0xFF80, "bx%c\t%S%x"},
   4240   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4400, 0xFF00, "add%c\t%D, %S"},
   4241   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4500, 0xFF00, "cmp%c\t%D, %S"},
   4242   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4600, 0xFF00, "mov%c\t%D, %S"},
   4243   1.1  christos   /* format 14 */
   4244   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB400, 0xFE00, "push%c\t%N"},
   4245   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xBC00, 0xFE00, "pop%c\t%O"},
   4246   1.1  christos   /* format 2 */
   4247   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4248   1.3  christos     0x1800, 0xFE00, "add%C\t%0-2r, %3-5r, %6-8r"},
   4249   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4250   1.3  christos     0x1A00, 0xFE00, "sub%C\t%0-2r, %3-5r, %6-8r"},
   4251   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4252   1.8  christos     0x1C00, 0xFE00, "add%C\t%0-2r, %3-5r, %{I:#%6-8d%}"},
   4253   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4254   1.8  christos     0x1E00, 0xFE00, "sub%C\t%0-2r, %3-5r, %{I:#%6-8d%}"},
   4255   1.1  christos   /* format 8 */
   4256   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4257   1.3  christos     0x5200, 0xFE00, "strh%c\t%0-2r, [%3-5r, %6-8r]"},
   4258   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4259   1.3  christos     0x5A00, 0xFE00, "ldrh%c\t%0-2r, [%3-5r, %6-8r]"},
   4260   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4261   1.3  christos     0x5600, 0xF600, "ldrs%11?hb%c\t%0-2r, [%3-5r, %6-8r]"},
   4262   1.1  christos   /* format 7 */
   4263   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4264   1.3  christos     0x5000, 0xFA00, "str%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
   4265   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4266   1.3  christos     0x5800, 0xFA00, "ldr%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
   4267   1.1  christos   /* format 1 */
   4268   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0000, 0xFFC0, "mov%C\t%0-2r, %3-5r"},
   4269   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4270   1.8  christos     0x0000, 0xF800, "lsl%C\t%0-2r, %3-5r, %{I:#%6-10d%}"},
   4271   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0800, 0xF800, "lsr%C\t%0-2r, %3-5r, %s"},
   4272   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x1000, 0xF800, "asr%C\t%0-2r, %3-5r, %s"},
   4273   1.1  christos   /* format 3 */
   4274   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2000, 0xF800, "mov%C\t%8-10r, %{I:#%0-7d%}"},
   4275   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2800, 0xF800, "cmp%c\t%8-10r, %{I:#%0-7d%}"},
   4276   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3000, 0xF800, "add%C\t%8-10r, %{I:#%0-7d%}"},
   4277   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3800, 0xF800, "sub%C\t%8-10r, %{I:#%0-7d%}"},
   4278   1.1  christos   /* format 6 */
   4279   1.3  christos   /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
   4280   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4281   1.3  christos     0x4800, 0xF800,
   4282   1.8  christos     "ldr%c\t%8-10r, [%{R:pc%}, %{I:#%0-7W%}]\t@ (%0-7a)"},
   4283   1.1  christos   /* format 9 */
   4284   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4285   1.8  christos     0x6000, 0xF800, "str%c\t%0-2r, [%3-5r, %{I:#%6-10W%}]"},
   4286   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4287   1.8  christos     0x6800, 0xF800, "ldr%c\t%0-2r, [%3-5r, %{I:#%6-10W%}]"},
   4288   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4289   1.8  christos     0x7000, 0xF800, "strb%c\t%0-2r, [%3-5r, %{I:#%6-10d%}]"},
   4290   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4291   1.8  christos     0x7800, 0xF800, "ldrb%c\t%0-2r, [%3-5r, %{I:#%6-10d%}]"},
   4292   1.1  christos   /* format 10 */
   4293   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4294   1.8  christos     0x8000, 0xF800, "strh%c\t%0-2r, [%3-5r, %{I:#%6-10H%}]"},
   4295   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4296   1.8  christos     0x8800, 0xF800, "ldrh%c\t%0-2r, [%3-5r, %{I:#%6-10H%}]"},
   4297   1.1  christos   /* format 11 */
   4298   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4299   1.8  christos     0x9000, 0xF800, "str%c\t%8-10r, [%{R:sp%}, %{I:#%0-7W%}]"},
   4300   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4301   1.8  christos     0x9800, 0xF800, "ldr%c\t%8-10r, [%{R:sp%}, %{I:#%0-7W%}]"},
   4302   1.1  christos   /* format 12 */
   4303   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4304   1.8  christos     0xA000, 0xF800, "add%c\t%8-10r, %{R:pc%}, %{I:#%0-7W%}\t@ (adr %8-10r, %0-7a)"},
   4305   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4306   1.8  christos     0xA800, 0xF800, "add%c\t%8-10r, %{R:sp%}, %{I:#%0-7W%}"},
   4307   1.1  christos   /* format 15 */
   4308   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC000, 0xF800, "stmia%c\t%8-10r!, %M"},
   4309   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC800, 0xF800, "ldmia%c\t%8-10r%W, %M"},
   4310   1.1  christos   /* format 17 */
   4311   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDF00, 0xFF00, "svc%c\t%0-7d"},
   4312   1.1  christos   /* format 16 */
   4313   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFF00, "udf%c\t%{I:#%0-7d%}"},
   4314   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFE00, UNDEFINED_INSTRUCTION},
   4315   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xD000, 0xF000, "b%8-11c.n\t%0-7B%X"},
   4316   1.1  christos   /* format 18 */
   4317   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xE000, 0xF800, "b%c.n\t%0-10B%x"},
   4318   1.1  christos 
   4319   1.1  christos   /* The E800 .. FFFF range is unconditionally redirected to the
   4320   1.1  christos      32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
   4321   1.1  christos      are processed via that table.  Thus, we can never encounter a
   4322   1.1  christos      bare "second half of BL/BLX(1)" instruction here.  */
   4323   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),  0x0000, 0x0000, UNDEFINED_INSTRUCTION},
   4324   1.3  christos   {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   4325   1.1  christos };
   4326   1.1  christos 
   4327   1.1  christos /* Thumb32 opcodes use the same table structure as the ARM opcodes.
   4328   1.1  christos    We adopt the convention that hw1 is the high 16 bits of .value and
   4329   1.1  christos    .mask, hw2 the low 16 bits.
   4330   1.1  christos 
   4331   1.1  christos    print_insn_thumb32 recognizes the following format control codes:
   4332   1.1  christos 
   4333   1.1  christos        %%		%
   4334   1.1  christos 
   4335   1.1  christos        %I		print a 12-bit immediate from hw1[10],hw2[14:12,7:0]
   4336   1.1  christos        %M		print a modified 12-bit immediate (same location)
   4337   1.1  christos        %J		print a 16-bit immediate from hw1[3:0,10],hw2[14:12,7:0]
   4338   1.1  christos        %K		print a 16-bit immediate from hw2[3:0],hw1[3:0],hw2[11:4]
   4339   1.1  christos        %H		print a 16-bit immediate from hw2[3:0],hw1[11:0]
   4340   1.1  christos        %S		print a possibly-shifted Rm
   4341   1.1  christos 
   4342   1.2     joerg        %L		print address for a ldrd/strd instruction
   4343   1.1  christos        %a		print the address of a plain load/store
   4344   1.1  christos        %w		print the width and signedness of a core load/store
   4345   1.1  christos        %m		print register mask for ldm/stm
   4346   1.7  christos        %n		print register mask for clrm
   4347   1.1  christos 
   4348   1.1  christos        %E		print the lsb and width fields of a bfc/bfi instruction
   4349   1.1  christos        %F		print the lsb and width fields of a sbfx/ubfx instruction
   4350   1.7  christos        %G		print a fallback offset for Branch Future instructions
   4351   1.7  christos        %W		print an offset for BF instruction
   4352   1.7  christos        %Y		print an offset for BFL instruction
   4353   1.7  christos        %Z		print an offset for BFCSEL instruction
   4354   1.7  christos        %Q		print an offset for Low Overhead Loop instructions
   4355   1.7  christos        %P		print an offset for Low Overhead Loop end instructions
   4356   1.1  christos        %b		print a conditional branch offset
   4357   1.1  christos        %B		print an unconditional branch offset
   4358   1.1  christos        %s		print the shift field of an SSAT instruction
   4359   1.1  christos        %R		print the rotation field of an SXT instruction
   4360   1.1  christos        %U		print barrier type.
   4361   1.1  christos        %P		print address for pli instruction.
   4362   1.1  christos        %c		print the condition code
   4363   1.1  christos        %x		print warning if conditional an not at end of IT block"
   4364   1.8  christos        %X		print "\t@ unpredictable <IT:code>" if conditional
   4365   1.1  christos 
   4366   1.1  christos        %<bitfield>d	print bitfield in decimal
   4367   1.3  christos        %<bitfield>D     print bitfield plus one in decimal
   4368   1.1  christos        %<bitfield>W	print bitfield*4 in decimal
   4369   1.1  christos        %<bitfield>r	print bitfield as an ARM register
   4370   1.2     joerg        %<bitfield>R	as %<>r but r15 is UNPREDICTABLE
   4371   1.7  christos        %<bitfield>S	as %<>r but r13 and r15 is UNPREDICTABLE
   4372   1.1  christos        %<bitfield>c	print bitfield as a condition code
   4373   1.1  christos 
   4374   1.1  christos        %<bitfield>'c	print specified char iff bitfield is all ones
   4375   1.1  christos        %<bitfield>`c	print specified char iff bitfield is all zeroes
   4376   1.1  christos        %<bitfield>?ab... select from array of values in big endian order
   4377   1.1  christos 
   4378   1.1  christos    With one exception at the bottom (done because BL and BLX(1) need
   4379   1.1  christos    to come dead last), this table was machine-sorted first in
   4380   1.1  christos    decreasing order of number of bits set in the mask, then in
   4381   1.1  christos    increasing numeric order of mask, then in increasing numeric order
   4382   1.1  christos    of opcode.  This order is not the clearest for a human reader, but
   4383   1.1  christos    is guaranteed never to catch a special-case bit pattern with a more
   4384   1.1  christos    general mask, which is important, because this instruction encoding
   4385   1.1  christos    makes heavy use of special-case bit patterns.  */
   4386   1.1  christos static const struct opcode32 thumb32_opcodes[] =
   4387   1.1  christos {
   4388   1.8  christos   /* Arm v8.1-M Mainline Pointer Authentication and Branch Target
   4389   1.8  christos      Identification Extension.  */
   4390   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4391   1.8  christos    0xf3af802d, 0xffffffff, "aut\t%{R:r12%}, %{R:lr%}, %{R:sp%}"},
   4392   1.8  christos   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
   4393   1.8  christos    0xfb500f00, 0xfff00ff0, "autg%c\t%12-15r, %16-19r, %0-3r"},
   4394   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4395   1.8  christos    0xf3af800f, 0xffffffff, "bti"},
   4396   1.8  christos   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
   4397   1.8  christos    0xfb500f10, 0xfff00ff0, "bxaut%c\t%12-15r, %16-19r, %0-3r"},
   4398   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4399   1.8  christos    0xf3af801d, 0xffffffff, "pac\t%{R:r12%}, %{R:lr%}, %{R:sp%}"},
   4400   1.8  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4401   1.8  christos    0xf3af800d, 0xffffffff, "pacbti\t%{R:r12%}, %{R:lr%}, %{R:sp%}"},
   4402   1.8  christos   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
   4403   1.8  christos    0xfb60f000, 0xfff0f0f0, "pacg%c\t%8-11r, %16-19r, %0-3r"},
   4404   1.8  christos 
   4405   1.7  christos   /* Armv8.1-M Mainline and Armv8.1-M Mainline Security Extensions
   4406   1.7  christos      instructions.  */
   4407   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4408   1.7  christos     0xf00fe001, 0xffffffff, "lctp%c"},
   4409   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4410   1.7  christos     0xf02fc001, 0xfffff001, "le\t%P"},
   4411   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4412   1.8  christos     0xf00fc001, 0xfffff001, "le\t%{R:lr%}, %P"},
   4413   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4414   1.8  christos     0xf01fc001, 0xfffff001, "letp\t%{R:lr%}, %P"},
   4415   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4416   1.8  christos     0xf040c001, 0xfff0f001, "wls\t%{R:lr%}, %16-19S, %Q"},
   4417   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4418   1.8  christos     0xf000c001, 0xffc0f001, "wlstp.%20-21s\t%{R:lr%}, %16-19S, %Q"},
   4419   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4420   1.8  christos     0xf040e001, 0xfff0ffff, "dls\t%{R:lr%}, %16-19S"},
   4421   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4422   1.8  christos     0xf000e001, 0xffc0ffff, "dlstp.%20-21s\t%{R:lr%}, %16-19S"},
   4423   1.7  christos 
   4424   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4425   1.7  christos     0xf040e001, 0xf860f001, "bf%c\t%G, %W"},
   4426   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4427   1.7  christos     0xf060e001, 0xf8f0f001, "bfx%c\t%G, %16-19S"},
   4428   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4429   1.7  christos     0xf000c001, 0xf800f001, "bfl%c\t%G, %Y"},
   4430   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4431   1.7  christos     0xf070e001, 0xf8f0f001, "bflx%c\t%G, %16-19S"},
   4432   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4433   1.8  christos     0xf000e001, 0xf840f001, "bfcsel\t%G, %Z, %{B:%18-21c%}"},
   4434   1.7  christos 
   4435   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
   4436   1.7  christos     0xe89f0000, 0xffff2000, "clrm%c\t%n"},
   4437   1.7  christos 
   4438   1.4  christos   /* ARMv8-M and ARMv8-M Security Extensions instructions.  */
   4439   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0xe97fe97f, 0xffffffff, "sg"},
   4440   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4441   1.4  christos     0xe840f000, 0xfff0f0ff, "tt\t%8-11r, %16-19r"},
   4442   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4443   1.4  christos     0xe840f040, 0xfff0f0ff, "ttt\t%8-11r, %16-19r"},
   4444   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4445   1.4  christos     0xe840f080, 0xfff0f0ff, "tta\t%8-11r, %16-19r"},
   4446   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
   4447   1.4  christos     0xe840f0c0, 0xfff0f0ff, "ttat\t%8-11r, %16-19r"},
   4448   1.4  christos 
   4449   1.4  christos   /* ARM V8.2 RAS extension instructions.  */
   4450   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
   4451   1.4  christos     0xf3af8010, 0xffffffff, "esb"},
   4452   1.4  christos 
   4453   1.2     joerg   /* V8 instructions.  */
   4454   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4455   1.3  christos     0xf3af8005, 0xffffffff, "sevl%c.w"},
   4456   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4457   1.3  christos     0xf78f8000, 0xfffffffc, "dcps%0-1d"},
   4458   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4459   1.3  christos     0xe8c00f8f, 0xfff00fff, "stlb%c\t%12-15r, [%16-19R]"},
   4460   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4461   1.3  christos     0xe8c00f9f, 0xfff00fff, "stlh%c\t%12-15r, [%16-19R]"},
   4462   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4463   1.3  christos     0xe8c00faf, 0xfff00fff, "stl%c\t%12-15r, [%16-19R]"},
   4464   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4465   1.3  christos     0xe8c00fc0, 0xfff00ff0, "stlexb%c\t%0-3r, %12-15r, [%16-19R]"},
   4466   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4467   1.3  christos     0xe8c00fd0, 0xfff00ff0, "stlexh%c\t%0-3r, %12-15r, [%16-19R]"},
   4468   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4469   1.3  christos     0xe8c00fe0, 0xfff00ff0, "stlex%c\t%0-3r, %12-15r, [%16-19R]"},
   4470   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4471   1.3  christos     0xe8c000f0, 0xfff000f0, "stlexd%c\t%0-3r, %12-15r, %8-11r, [%16-19R]"},
   4472   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4473   1.3  christos     0xe8d00f8f, 0xfff00fff, "ldab%c\t%12-15r, [%16-19R]"},
   4474   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4475   1.3  christos     0xe8d00f9f, 0xfff00fff, "ldah%c\t%12-15r, [%16-19R]"},
   4476   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4477   1.3  christos     0xe8d00faf, 0xfff00fff, "lda%c\t%12-15r, [%16-19R]"},
   4478   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4479   1.3  christos     0xe8d00fcf, 0xfff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
   4480   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4481   1.3  christos     0xe8d00fdf, 0xfff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
   4482   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4483   1.3  christos     0xe8d00fef, 0xfff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
   4484   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
   4485   1.3  christos     0xe8d000ff, 0xfff000ff, "ldaexd%c\t%12-15r, %8-11r, [%16-19R]"},
   4486   1.2     joerg 
   4487   1.7  christos   /* V8-R instructions.  */
   4488   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R),
   4489   1.7  christos     0xf3bf8f4c, 0xffffffff, "dfb%c"},
   4490   1.7  christos 
   4491   1.2     joerg   /* CRC32 instructions.  */
   4492   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4493   1.6  christos     0xfac0f080, 0xfff0f0f0, "crc32b\t%8-11R, %16-19R, %0-3R"},
   4494   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4495   1.6  christos     0xfac0f090, 0xfff0f0f0, "crc32h\t%9-11R, %16-19R, %0-3R"},
   4496   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4497   1.6  christos     0xfac0f0a0, 0xfff0f0f0, "crc32w\t%8-11R, %16-19R, %0-3R"},
   4498   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4499   1.6  christos     0xfad0f080, 0xfff0f0f0, "crc32cb\t%8-11R, %16-19R, %0-3R"},
   4500   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4501   1.6  christos     0xfad0f090, 0xfff0f0f0, "crc32ch\t%8-11R, %16-19R, %0-3R"},
   4502   1.7  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
   4503   1.6  christos     0xfad0f0a0, 0xfff0f0f0, "crc32cw\t%8-11R, %16-19R, %0-3R"},
   4504   1.6  christos 
   4505   1.6  christos   /* Speculation Barriers.  */
   4506   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8014, 0xffffffff, "csdb"},
   4507   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f40, 0xffffffff, "ssbb"},
   4508   1.6  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f44, 0xffffffff, "pssbb"},
   4509   1.2     joerg 
   4510   1.1  christos   /* V7 instructions.  */
   4511   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf910f000, 0xff70f000, "pli%c\t%a"},
   4512   1.8  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3af80f0, 0xfffffff0, "dbg%c\t%{I:#%0-3d%}"},
   4513   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f51, 0xfffffff3, "dmb%c\t%U"},
   4514   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f41, 0xfffffff3, "dsb%c\t%U"},
   4515   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f50, 0xfffffff0, "dmb%c\t%U"},
   4516   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f40, 0xfffffff0, "dsb%c\t%U"},
   4517   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f60, 0xfffffff0, "isb%c\t%U"},
   4518   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
   4519   1.3  christos     0xfb90f0f0, 0xfff0f0f0, "sdiv%c\t%8-11r, %16-19r, %0-3r"},
   4520   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
   4521   1.3  christos     0xfbb0f0f0, 0xfff0f0f0, "udiv%c\t%8-11r, %16-19r, %0-3r"},
   4522   1.1  christos 
   4523   1.1  christos   /* Virtualization Extension instructions.  */
   4524   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0xf7e08000, 0xfff0f000, "hvc%c\t%V"},
   4525   1.1  christos   /* We skip ERET as that is SUBS pc, lr, #0.  */
   4526   1.1  christos 
   4527   1.1  christos   /* MP Extension instructions.  */
   4528   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_MP),   0xf830f000, 0xff70f000, "pldw%c\t%a"},
   4529   1.1  christos 
   4530   1.1  christos   /* Security extension instructions.  */
   4531   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),  0xf7f08000, 0xfff0f000, "smc%c\t%K"},
   4532   1.1  christos 
   4533   1.6  christos   /* ARMv8.5-A instructions.  */
   4534   1.6  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf3bf8f70, 0xffffffff, "sb"},
   4535   1.6  christos 
   4536   1.1  christos   /* Instructions defined in the basic V6T2 set.  */
   4537   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8000, 0xffffffff, "nop%c.w"},
   4538   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8001, 0xffffffff, "yield%c.w"},
   4539   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8002, 0xffffffff, "wfe%c.w"},
   4540   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8003, 0xffffffff, "wfi%c.w"},
   4541   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8004, 0xffffffff, "sev%c.w"},
   4542   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4543   1.8  christos     0xf3af8000, 0xffffff00, "nop%c.w\t{%{I:%0-7d%}}"},
   4544   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf7f0a000, 0xfff0f000, "udf%c.w\t%H"},
   4545   1.3  christos 
   4546   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4547   1.3  christos     0xf3bf8f2f, 0xffffffff, "clrex%c"},
   4548   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4549   1.8  christos     0xf3af8400, 0xffffff1f, "cpsie.w\t%{B:%7'a%6'i%5'f%}%X"},
   4550   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4551   1.8  christos     0xf3af8600, 0xffffff1f, "cpsid.w\t%{B:%7'a%6'i%5'f%}%X"},
   4552   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4553   1.3  christos     0xf3c08f00, 0xfff0ffff, "bxj%c\t%16-19r%x"},
   4554   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4555   1.3  christos     0xe810c000, 0xffd0ffff, "rfedb%c\t%16-19r%21'!"},
   4556   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4557   1.3  christos     0xe990c000, 0xffd0ffff, "rfeia%c\t%16-19r%21'!"},
   4558   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4559   1.3  christos     0xf3e08000, 0xffe0f000, "mrs%c\t%8-11r, %D"},
   4560   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4561   1.8  christos     0xf3af8100, 0xffffffe0, "cps\t%{I:#%0-4d%}%X"},
   4562   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4563   1.3  christos     0xe8d0f000, 0xfff0fff0, "tbb%c\t[%16-19r, %0-3r]%x"},
   4564   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4565   1.8  christos     0xe8d0f010, 0xfff0fff0, "tbh%c\t[%16-19r, %0-3r, %{B:lsl%} %{I:#1%}]%x"},
   4566   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4567   1.8  christos     0xf3af8500, 0xffffff00, "cpsie\t%{B:%7'a%6'i%5'f%}, %{I:#%0-4d%}%X"},
   4568   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4569   1.8  christos     0xf3af8700, 0xffffff00, "cpsid\t%{B:%7'a%6'i%5'f%}, %{I:#%0-4d%}%X"},
   4570   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4571   1.8  christos     0xf3de8f00, 0xffffff00, "subs%c\t%{R:pc%}, %{R:lr%}, %{I:#%0-7d%}"},
   4572   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4573   1.3  christos     0xf3808000, 0xffe0f000, "msr%c\t%C, %16-19r"},
   4574   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4575   1.3  christos     0xe8500f00, 0xfff00fff, "ldrex%c\t%12-15r, [%16-19r]"},
   4576   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4577   1.3  christos     0xe8d00f4f, 0xfff00fef, "ldrex%4?hb%c\t%12-15r, [%16-19r]"},
   4578   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4579   1.8  christos     0xe800c000, 0xffd0ffe0, "srsdb%c\t%16-19r%21'!, %{I:#%0-4d%}"},
   4580   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4581   1.8  christos     0xe980c000, 0xffd0ffe0, "srsia%c\t%16-19r%21'!, %{I:#%0-4d%}"},
   4582   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4583   1.3  christos     0xfa0ff080, 0xfffff0c0, "sxth%c.w\t%8-11r, %0-3r%R"},
   4584   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4585   1.3  christos     0xfa1ff080, 0xfffff0c0, "uxth%c.w\t%8-11r, %0-3r%R"},
   4586   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4587   1.3  christos     0xfa2ff080, 0xfffff0c0, "sxtb16%c\t%8-11r, %0-3r%R"},
   4588   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4589   1.3  christos     0xfa3ff080, 0xfffff0c0, "uxtb16%c\t%8-11r, %0-3r%R"},
   4590   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4591   1.3  christos     0xfa4ff080, 0xfffff0c0, "sxtb%c.w\t%8-11r, %0-3r%R"},
   4592   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4593   1.3  christos     0xfa5ff080, 0xfffff0c0, "uxtb%c.w\t%8-11r, %0-3r%R"},
   4594   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4595   1.3  christos     0xe8400000, 0xfff000ff, "strex%c\t%8-11r, %12-15r, [%16-19r]"},
   4596   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4597   1.3  christos     0xe8d0007f, 0xfff000ff, "ldrexd%c\t%12-15r, %8-11r, [%16-19r]"},
   4598   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4599   1.3  christos     0xfa80f000, 0xfff0f0f0, "sadd8%c\t%8-11r, %16-19r, %0-3r"},
   4600   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4601   1.3  christos     0xfa80f010, 0xfff0f0f0, "qadd8%c\t%8-11r, %16-19r, %0-3r"},
   4602   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4603   1.3  christos     0xfa80f020, 0xfff0f0f0, "shadd8%c\t%8-11r, %16-19r, %0-3r"},
   4604   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4605   1.3  christos     0xfa80f040, 0xfff0f0f0, "uadd8%c\t%8-11r, %16-19r, %0-3r"},
   4606   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4607   1.3  christos     0xfa80f050, 0xfff0f0f0, "uqadd8%c\t%8-11r, %16-19r, %0-3r"},
   4608   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4609   1.3  christos     0xfa80f060, 0xfff0f0f0, "uhadd8%c\t%8-11r, %16-19r, %0-3r"},
   4610   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4611   1.3  christos     0xfa80f080, 0xfff0f0f0, "qadd%c\t%8-11r, %0-3r, %16-19r"},
   4612   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4613   1.3  christos     0xfa80f090, 0xfff0f0f0, "qdadd%c\t%8-11r, %0-3r, %16-19r"},
   4614   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4615   1.3  christos     0xfa80f0a0, 0xfff0f0f0, "qsub%c\t%8-11r, %0-3r, %16-19r"},
   4616   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4617   1.3  christos     0xfa80f0b0, 0xfff0f0f0, "qdsub%c\t%8-11r, %0-3r, %16-19r"},
   4618   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4619   1.3  christos     0xfa90f000, 0xfff0f0f0, "sadd16%c\t%8-11r, %16-19r, %0-3r"},
   4620   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4621   1.3  christos     0xfa90f010, 0xfff0f0f0, "qadd16%c\t%8-11r, %16-19r, %0-3r"},
   4622   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4623   1.3  christos     0xfa90f020, 0xfff0f0f0, "shadd16%c\t%8-11r, %16-19r, %0-3r"},
   4624   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4625   1.3  christos     0xfa90f040, 0xfff0f0f0, "uadd16%c\t%8-11r, %16-19r, %0-3r"},
   4626   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4627   1.3  christos     0xfa90f050, 0xfff0f0f0, "uqadd16%c\t%8-11r, %16-19r, %0-3r"},
   4628   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4629   1.3  christos     0xfa90f060, 0xfff0f0f0, "uhadd16%c\t%8-11r, %16-19r, %0-3r"},
   4630   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4631   1.3  christos     0xfa90f080, 0xfff0f0f0, "rev%c.w\t%8-11r, %16-19r"},
   4632   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4633   1.3  christos     0xfa90f090, 0xfff0f0f0, "rev16%c.w\t%8-11r, %16-19r"},
   4634   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4635   1.3  christos     0xfa90f0a0, 0xfff0f0f0, "rbit%c\t%8-11r, %16-19r"},
   4636   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4637   1.3  christos     0xfa90f0b0, 0xfff0f0f0, "revsh%c.w\t%8-11r, %16-19r"},
   4638   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4639   1.3  christos     0xfaa0f000, 0xfff0f0f0, "sasx%c\t%8-11r, %16-19r, %0-3r"},
   4640   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4641   1.3  christos     0xfaa0f010, 0xfff0f0f0, "qasx%c\t%8-11r, %16-19r, %0-3r"},
   4642   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4643   1.3  christos     0xfaa0f020, 0xfff0f0f0, "shasx%c\t%8-11r, %16-19r, %0-3r"},
   4644   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4645   1.3  christos     0xfaa0f040, 0xfff0f0f0, "uasx%c\t%8-11r, %16-19r, %0-3r"},
   4646   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4647   1.3  christos     0xfaa0f050, 0xfff0f0f0, "uqasx%c\t%8-11r, %16-19r, %0-3r"},
   4648   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4649   1.3  christos     0xfaa0f060, 0xfff0f0f0, "uhasx%c\t%8-11r, %16-19r, %0-3r"},
   4650   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4651   1.3  christos     0xfaa0f080, 0xfff0f0f0, "sel%c\t%8-11r, %16-19r, %0-3r"},
   4652   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4653   1.3  christos     0xfab0f080, 0xfff0f0f0, "clz%c\t%8-11r, %16-19r"},
   4654   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4655   1.3  christos     0xfac0f000, 0xfff0f0f0, "ssub8%c\t%8-11r, %16-19r, %0-3r"},
   4656   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4657   1.3  christos     0xfac0f010, 0xfff0f0f0, "qsub8%c\t%8-11r, %16-19r, %0-3r"},
   4658   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4659   1.3  christos     0xfac0f020, 0xfff0f0f0, "shsub8%c\t%8-11r, %16-19r, %0-3r"},
   4660   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4661   1.3  christos     0xfac0f040, 0xfff0f0f0, "usub8%c\t%8-11r, %16-19r, %0-3r"},
   4662   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4663   1.3  christos     0xfac0f050, 0xfff0f0f0, "uqsub8%c\t%8-11r, %16-19r, %0-3r"},
   4664   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4665   1.3  christos     0xfac0f060, 0xfff0f0f0, "uhsub8%c\t%8-11r, %16-19r, %0-3r"},
   4666   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4667   1.3  christos     0xfad0f000, 0xfff0f0f0, "ssub16%c\t%8-11r, %16-19r, %0-3r"},
   4668   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4669   1.3  christos     0xfad0f010, 0xfff0f0f0, "qsub16%c\t%8-11r, %16-19r, %0-3r"},
   4670   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4671   1.3  christos     0xfad0f020, 0xfff0f0f0, "shsub16%c\t%8-11r, %16-19r, %0-3r"},
   4672   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4673   1.3  christos     0xfad0f040, 0xfff0f0f0, "usub16%c\t%8-11r, %16-19r, %0-3r"},
   4674   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4675   1.3  christos     0xfad0f050, 0xfff0f0f0, "uqsub16%c\t%8-11r, %16-19r, %0-3r"},
   4676   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4677   1.3  christos     0xfad0f060, 0xfff0f0f0, "uhsub16%c\t%8-11r, %16-19r, %0-3r"},
   4678   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4679   1.3  christos     0xfae0f000, 0xfff0f0f0, "ssax%c\t%8-11r, %16-19r, %0-3r"},
   4680   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4681   1.3  christos     0xfae0f010, 0xfff0f0f0, "qsax%c\t%8-11r, %16-19r, %0-3r"},
   4682   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4683   1.3  christos     0xfae0f020, 0xfff0f0f0, "shsax%c\t%8-11r, %16-19r, %0-3r"},
   4684   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4685   1.3  christos     0xfae0f040, 0xfff0f0f0, "usax%c\t%8-11r, %16-19r, %0-3r"},
   4686   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4687   1.3  christos     0xfae0f050, 0xfff0f0f0, "uqsax%c\t%8-11r, %16-19r, %0-3r"},
   4688   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4689   1.3  christos     0xfae0f060, 0xfff0f0f0, "uhsax%c\t%8-11r, %16-19r, %0-3r"},
   4690   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4691   1.3  christos     0xfb00f000, 0xfff0f0f0, "mul%c.w\t%8-11r, %16-19r, %0-3r"},
   4692   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4693   1.3  christos     0xfb70f000, 0xfff0f0f0, "usad8%c\t%8-11r, %16-19r, %0-3r"},
   4694   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4695   1.3  christos     0xfa00f000, 0xffe0f0f0, "lsl%20's%c.w\t%8-11R, %16-19R, %0-3R"},
   4696   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4697   1.3  christos     0xfa20f000, 0xffe0f0f0, "lsr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
   4698   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4699   1.3  christos     0xfa40f000, 0xffe0f0f0, "asr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
   4700   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4701   1.3  christos     0xfa60f000, 0xffe0f0f0, "ror%20's%c.w\t%8-11r, %16-19r, %0-3r"},
   4702   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4703   1.3  christos     0xe8c00f40, 0xfff00fe0, "strex%4?hb%c\t%0-3r, %12-15r, [%16-19r]"},
   4704   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4705   1.8  christos     0xf3200000, 0xfff0f0e0, "ssat16%c\t%8-11r, %{I:#%0-4D%}, %16-19r"},
   4706   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4707   1.8  christos     0xf3a00000, 0xfff0f0e0, "usat16%c\t%8-11r, %{I:#%0-4d%}, %16-19r"},
   4708   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4709   1.3  christos     0xfb20f000, 0xfff0f0e0, "smuad%4'x%c\t%8-11r, %16-19r, %0-3r"},
   4710   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4711   1.3  christos     0xfb30f000, 0xfff0f0e0, "smulw%4?tb%c\t%8-11r, %16-19r, %0-3r"},
   4712   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4713   1.3  christos     0xfb40f000, 0xfff0f0e0, "smusd%4'x%c\t%8-11r, %16-19r, %0-3r"},
   4714   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4715   1.3  christos     0xfb50f000, 0xfff0f0e0, "smmul%4'r%c\t%8-11r, %16-19r, %0-3r"},
   4716   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4717   1.3  christos     0xfa00f080, 0xfff0f0c0, "sxtah%c\t%8-11r, %16-19r, %0-3r%R"},
   4718   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4719   1.3  christos     0xfa10f080, 0xfff0f0c0, "uxtah%c\t%8-11r, %16-19r, %0-3r%R"},
   4720   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4721   1.3  christos     0xfa20f080, 0xfff0f0c0, "sxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
   4722   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4723   1.3  christos     0xfa30f080, 0xfff0f0c0, "uxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
   4724   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4725   1.3  christos     0xfa40f080, 0xfff0f0c0, "sxtab%c\t%8-11r, %16-19r, %0-3r%R"},
   4726   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4727   1.3  christos     0xfa50f080, 0xfff0f0c0, "uxtab%c\t%8-11r, %16-19r, %0-3r%R"},
   4728   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4729   1.3  christos     0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r"},
   4730   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4731   1.3  christos     0xf36f0000, 0xffff8020, "bfc%c\t%8-11r, %E"},
   4732   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4733   1.3  christos     0xea100f00, 0xfff08f00, "tst%c.w\t%16-19r, %S"},
   4734   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4735   1.3  christos     0xea900f00, 0xfff08f00, "teq%c\t%16-19r, %S"},
   4736   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4737   1.3  christos     0xeb100f00, 0xfff08f00, "cmn%c.w\t%16-19r, %S"},
   4738   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4739   1.3  christos     0xebb00f00, 0xfff08f00, "cmp%c.w\t%16-19r, %S"},
   4740   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4741   1.3  christos     0xf0100f00, 0xfbf08f00, "tst%c.w\t%16-19r, %M"},
   4742   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4743   1.3  christos     0xf0900f00, 0xfbf08f00, "teq%c\t%16-19r, %M"},
   4744   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4745   1.3  christos     0xf1100f00, 0xfbf08f00, "cmn%c.w\t%16-19r, %M"},
   4746   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4747   1.3  christos     0xf1b00f00, 0xfbf08f00, "cmp%c.w\t%16-19r, %M"},
   4748   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4749   1.3  christos     0xea4f0000, 0xffef8000, "mov%20's%c.w\t%8-11r, %S"},
   4750   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4751   1.3  christos     0xea6f0000, 0xffef8000, "mvn%20's%c.w\t%8-11r, %S"},
   4752   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4753   1.3  christos     0xe8c00070, 0xfff000f0, "strexd%c\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
   4754   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4755   1.3  christos     0xfb000000, 0xfff000f0, "mla%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
   4756   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4757   1.3  christos     0xfb000010, 0xfff000f0, "mls%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
   4758   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4759   1.3  christos     0xfb700000, 0xfff000f0, "usada8%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4760   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4761   1.3  christos     0xfb800000, 0xfff000f0, "smull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4762   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4763   1.3  christos     0xfba00000, 0xfff000f0, "umull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4764   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4765   1.3  christos     0xfbc00000, 0xfff000f0, "smlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4766   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4767   1.3  christos     0xfbe00000, 0xfff000f0, "umlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4768   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4769   1.3  christos     0xfbe00060, 0xfff000f0, "umaal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4770   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4771   1.8  christos     0xe8500f00, 0xfff00f00, "ldrex%c\t%12-15r, [%16-19r, %{I:#%0-7W%}]"},
   4772   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4773   1.3  christos     0xf04f0000, 0xfbef8000, "mov%20's%c.w\t%8-11r, %M"},
   4774   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4775   1.3  christos     0xf06f0000, 0xfbef8000, "mvn%20's%c.w\t%8-11r, %M"},
   4776   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4777   1.3  christos     0xf810f000, 0xff70f000, "pld%c\t%a"},
   4778   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4779   1.3  christos     0xfb200000, 0xfff000e0, "smlad%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4780   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4781   1.3  christos     0xfb300000, 0xfff000e0, "smlaw%4?tb%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4782   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4783   1.3  christos     0xfb400000, 0xfff000e0, "smlsd%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4784   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4785   1.3  christos     0xfb500000, 0xfff000e0, "smmla%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4786   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4787   1.3  christos     0xfb600000, 0xfff000e0, "smmls%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
   4788   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4789   1.3  christos     0xfbc000c0, 0xfff000e0, "smlald%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4790   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4791   1.3  christos     0xfbd000c0, 0xfff000e0, "smlsld%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
   4792   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4793   1.3  christos     0xeac00000, 0xfff08030, "pkhbt%c\t%8-11r, %16-19r, %S"},
   4794   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4795   1.3  christos     0xeac00020, 0xfff08030, "pkhtb%c\t%8-11r, %16-19r, %S"},
   4796   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4797   1.3  christos     0xf3400000, 0xfff08020, "sbfx%c\t%8-11r, %16-19r, %F"},
   4798   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4799   1.3  christos     0xf3c00000, 0xfff08020, "ubfx%c\t%8-11r, %16-19r, %F"},
   4800   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4801   1.3  christos     0xf8000e00, 0xff900f00, "str%wt%c\t%12-15r, %a"},
   4802   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4803   1.3  christos     0xfb100000, 0xfff000c0,
   4804   1.3  christos     "smla%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
   4805   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4806   1.3  christos     0xfbc00080, 0xfff000c0,
   4807   1.3  christos     "smlal%5?tb%4?tb%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
   4808   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4809   1.3  christos     0xf3600000, 0xfff08020, "bfi%c\t%8-11r, %16-19r, %E"},
   4810   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4811   1.3  christos     0xf8100e00, 0xfe900f00, "ldr%wt%c\t%12-15r, %a"},
   4812   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4813   1.8  christos     0xf3000000, 0xffd08020, "ssat%c\t%8-11r, %{I:#%0-4D%}, %16-19r%s"},
   4814   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4815   1.8  christos     0xf3800000, 0xffd08020, "usat%c\t%8-11r, %{I:#%0-4d%}, %16-19r%s"},
   4816   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4817   1.3  christos     0xf2000000, 0xfbf08000, "addw%c\t%8-11r, %16-19r, %I"},
   4818   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4819   1.3  christos     0xf2400000, 0xfbf08000, "movw%c\t%8-11r, %J"},
   4820   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4821   1.3  christos     0xf2a00000, 0xfbf08000, "subw%c\t%8-11r, %16-19r, %I"},
   4822   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4823   1.3  christos     0xf2c00000, 0xfbf08000, "movt%c\t%8-11r, %J"},
   4824   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4825   1.3  christos     0xea000000, 0xffe08000, "and%20's%c.w\t%8-11r, %16-19r, %S"},
   4826   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4827   1.3  christos     0xea200000, 0xffe08000, "bic%20's%c.w\t%8-11r, %16-19r, %S"},
   4828   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4829   1.3  christos     0xea400000, 0xffe08000, "orr%20's%c.w\t%8-11r, %16-19r, %S"},
   4830   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4831   1.3  christos     0xea600000, 0xffe08000, "orn%20's%c\t%8-11r, %16-19r, %S"},
   4832   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4833   1.3  christos     0xea800000, 0xffe08000, "eor%20's%c.w\t%8-11r, %16-19r, %S"},
   4834   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4835   1.3  christos     0xeb000000, 0xffe08000, "add%20's%c.w\t%8-11r, %16-19r, %S"},
   4836   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4837   1.3  christos     0xeb400000, 0xffe08000, "adc%20's%c.w\t%8-11r, %16-19r, %S"},
   4838   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4839   1.3  christos     0xeb600000, 0xffe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %S"},
   4840   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4841   1.3  christos     0xeba00000, 0xffe08000, "sub%20's%c.w\t%8-11r, %16-19r, %S"},
   4842   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4843   1.3  christos     0xebc00000, 0xffe08000, "rsb%20's%c\t%8-11r, %16-19r, %S"},
   4844   1.4  christos   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
   4845   1.8  christos     0xe8400000, 0xfff00000, "strex%c\t%8-11r, %12-15r, [%16-19r, %{I:#%0-7W%}]"},
   4846   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4847   1.3  christos     0xf0000000, 0xfbe08000, "and%20's%c.w\t%8-11r, %16-19r, %M"},
   4848   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4849   1.3  christos     0xf0200000, 0xfbe08000, "bic%20's%c.w\t%8-11r, %16-19r, %M"},
   4850   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4851   1.3  christos     0xf0400000, 0xfbe08000, "orr%20's%c.w\t%8-11r, %16-19r, %M"},
   4852   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4853   1.3  christos     0xf0600000, 0xfbe08000, "orn%20's%c\t%8-11r, %16-19r, %M"},
   4854   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4855   1.3  christos     0xf0800000, 0xfbe08000, "eor%20's%c.w\t%8-11r, %16-19r, %M"},
   4856   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4857   1.3  christos     0xf1000000, 0xfbe08000, "add%20's%c.w\t%8-11r, %16-19r, %M"},
   4858   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4859   1.3  christos     0xf1400000, 0xfbe08000, "adc%20's%c.w\t%8-11r, %16-19r, %M"},
   4860   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4861   1.3  christos     0xf1600000, 0xfbe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %M"},
   4862   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4863   1.3  christos     0xf1a00000, 0xfbe08000, "sub%20's%c.w\t%8-11r, %16-19r, %M"},
   4864   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4865   1.3  christos     0xf1c00000, 0xfbe08000, "rsb%20's%c\t%8-11r, %16-19r, %M"},
   4866   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4867   1.3  christos     0xe8800000, 0xffd00000, "stmia%c.w\t%16-19r%21'!, %m"},
   4868   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4869   1.3  christos     0xe8900000, 0xffd00000, "ldmia%c.w\t%16-19r%21'!, %m"},
   4870   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4871   1.3  christos     0xe9000000, 0xffd00000, "stmdb%c\t%16-19r%21'!, %m"},
   4872   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4873   1.3  christos     0xe9100000, 0xffd00000, "ldmdb%c\t%16-19r%21'!, %m"},
   4874   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4875   1.3  christos     0xe9c00000, 0xffd000ff, "strd%c\t%12-15r, %8-11r, [%16-19r]"},
   4876   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4877   1.3  christos     0xe9d00000, 0xffd000ff, "ldrd%c\t%12-15r, %8-11r, [%16-19r]"},
   4878   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4879   1.3  christos     0xe9400000, 0xff500000,
   4880   1.8  christos     "strd%c\t%12-15r, %8-11r, [%16-19r, %{I:#%23`-%0-7W%}]%21'!%L"},
   4881   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4882   1.3  christos     0xe9500000, 0xff500000,
   4883   1.8  christos     "ldrd%c\t%12-15r, %8-11r, [%16-19r, %{I:#%23`-%0-7W%}]%21'!%L"},
   4884   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4885   1.3  christos     0xe8600000, 0xff700000,
   4886   1.8  christos     "strd%c\t%12-15r, %8-11r, [%16-19r], %{I:#%23`-%0-7W%}%L"},
   4887   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4888   1.3  christos     0xe8700000, 0xff700000,
   4889   1.8  christos     "ldrd%c\t%12-15r, %8-11r, [%16-19r], %{I:#%23`-%0-7W%}%L"},
   4890   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4891   1.3  christos     0xf8000000, 0xff100000, "str%w%c.w\t%12-15r, %a"},
   4892   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4893   1.3  christos     0xf8100000, 0xfe100000, "ldr%w%c.w\t%12-15r, %a"},
   4894   1.1  christos 
   4895   1.1  christos   /* Filter out Bcc with cond=E or F, which are used for other instructions.  */
   4896   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4897   1.3  christos     0xf3c08000, 0xfbc0d000, "undefined (bcc, cond=0xF)"},
   4898   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4899   1.3  christos     0xf3808000, 0xfbc0d000, "undefined (bcc, cond=0xE)"},
   4900   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4901   1.3  christos     0xf0008000, 0xf800d000, "b%22-25c.w\t%b%X"},
   4902   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
   4903   1.3  christos     0xf0009000, 0xf800d000, "b%c.w\t%B%x"},
   4904   1.1  christos 
   4905   1.1  christos   /* These have been 32-bit since the invention of Thumb.  */
   4906   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4907   1.3  christos      0xf000c000, 0xf800d001, "blx%c\t%B%x"},
   4908   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
   4909   1.3  christos      0xf000d000, 0xf800d000, "bl%c\t%B%x"},
   4910   1.1  christos 
   4911   1.1  christos   /* Fallback.  */
   4912   1.3  christos   {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
   4913   1.3  christos       0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
   4914   1.3  christos   {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
   4915   1.1  christos };
   4916   1.1  christos 
   4917   1.1  christos static const char *const arm_conditional[] =
   4918   1.1  christos {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
   4919   1.1  christos  "hi", "ls", "ge", "lt", "gt", "le", "al", "<und>", ""};
   4920   1.1  christos 
   4921   1.1  christos static const char *const arm_shift[] =
   4922   1.1  christos {"lsl", "lsr", "asr", "ror"};
   4923   1.1  christos 
   4924   1.1  christos typedef struct
   4925   1.1  christos {
   4926   1.1  christos   const char *name;
   4927   1.1  christos   const char *description;
   4928   1.1  christos   const char *reg_names[16];
   4929   1.1  christos }
   4930   1.1  christos arm_regname;
   4931   1.1  christos 
   4932   1.1  christos static const arm_regname regnames[] =
   4933   1.1  christos {
   4934   1.5  christos   { "reg-names-raw", N_("Select raw register names"),
   4935   1.1  christos     { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
   4936   1.5  christos   { "reg-names-gcc", N_("Select register names used by GCC"),
   4937   1.1  christos     { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "sl",  "fp",  "ip",  "sp",  "lr",  "pc" }},
   4938   1.5  christos   { "reg-names-std", N_("Select register names used in ARM's ISA documentation"),
   4939   1.1  christos     { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp",  "lr",  "pc" }},
   4940   1.5  christos   { "force-thumb", N_("Assume all insns are Thumb insns"), {NULL} },
   4941   1.5  christos   { "no-force-thumb", N_("Examine preceding label to determine an insn's type"), {NULL} },
   4942   1.5  christos   { "reg-names-apcs", N_("Select register names used in the APCS"),
   4943   1.1  christos     { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl",  "fp",  "ip",  "sp",  "lr",  "pc" }},
   4944   1.5  christos   { "reg-names-atpcs", N_("Select register names used in the ATPCS"),
   4945   1.1  christos     { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7",  "v8",  "IP",  "SP",  "LR",  "PC" }},
   4946   1.5  christos   { "reg-names-special-atpcs", N_("Select special register names used in the ATPCS"),
   4947   1.7  christos     { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL",  "FP",  "IP",  "SP",  "LR",  "PC" }},
   4948   1.7  christos   { "coproc<N>=(cde|generic)", N_("Enable CDE extensions for coprocessor N space"), { NULL } }
   4949   1.1  christos };
   4950   1.1  christos 
   4951   1.1  christos static const char *const iwmmxt_wwnames[] =
   4952   1.1  christos {"b", "h", "w", "d"};
   4953   1.1  christos 
   4954   1.1  christos static const char *const iwmmxt_wwssnames[] =
   4955   1.1  christos {"b", "bus", "bc", "bss",
   4956   1.1  christos  "h", "hus", "hc", "hss",
   4957   1.1  christos  "w", "wus", "wc", "wss",
   4958   1.1  christos  "d", "dus", "dc", "dss"
   4959   1.1  christos };
   4960   1.1  christos 
   4961   1.1  christos static const char *const iwmmxt_regnames[] =
   4962   1.1  christos { "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7",
   4963   1.1  christos   "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"
   4964   1.1  christos };
   4965   1.1  christos 
   4966   1.1  christos static const char *const iwmmxt_cregnames[] =
   4967   1.1  christos { "wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved",
   4968   1.1  christos   "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"
   4969   1.1  christos };
   4970   1.1  christos 
   4971   1.7  christos static const char *const vec_condnames[] =
   4972   1.7  christos { "eq", "ne", "cs", "hi", "ge", "lt", "gt", "le"
   4973   1.7  christos };
   4974   1.7  christos 
   4975   1.7  christos static const char *const mve_predicatenames[] =
   4976   1.7  christos { "", "ttt", "tt", "tte", "t", "tee", "te", "tet", "",
   4977   1.7  christos   "eee", "ee", "eet", "e", "ett", "et", "ete"
   4978   1.7  christos };
   4979   1.7  christos 
   4980   1.7  christos /* Names for 2-bit size field for mve vector isntructions.  */
   4981   1.7  christos static const char *const mve_vec_sizename[] =
   4982   1.7  christos   { "8", "16", "32", "64"};
   4983   1.7  christos 
   4984   1.7  christos /* Indicates whether we are processing a then predicate,
   4985   1.7  christos    else predicate or none at all.  */
   4986   1.7  christos enum vpt_pred_state
   4987   1.7  christos {
   4988   1.7  christos   PRED_NONE,
   4989   1.7  christos   PRED_THEN,
   4990   1.7  christos   PRED_ELSE
   4991   1.7  christos };
   4992   1.7  christos 
   4993   1.7  christos /* Information used to process a vpt block and subsequent instructions.  */
   4994   1.7  christos struct vpt_block
   4995   1.7  christos {
   4996   1.7  christos   /* Are we in a vpt block.  */
   4997   1.8  christos   bool in_vpt_block;
   4998   1.7  christos 
   4999   1.7  christos   /* Next predicate state if in vpt block.  */
   5000   1.7  christos   enum vpt_pred_state next_pred_state;
   5001   1.7  christos 
   5002   1.7  christos   /* Mask from vpt/vpst instruction.  */
   5003   1.7  christos   long predicate_mask;
   5004   1.7  christos 
   5005   1.7  christos   /* Instruction number in vpt block.  */
   5006   1.7  christos   long current_insn_num;
   5007   1.7  christos 
   5008   1.7  christos   /* Number of instructions in vpt block..   */
   5009   1.7  christos   long num_pred_insn;
   5010   1.7  christos };
   5011   1.7  christos 
   5012   1.7  christos static struct vpt_block vpt_block_state =
   5013   1.7  christos {
   5014   1.8  christos   false,
   5015   1.7  christos   PRED_NONE,
   5016   1.7  christos   0,
   5017   1.7  christos   0,
   5018   1.7  christos   0
   5019   1.7  christos };
   5020   1.7  christos 
   5021   1.1  christos /* Default to GCC register name set.  */
   5022   1.1  christos static unsigned int regname_selected = 1;
   5023   1.1  christos 
   5024   1.5  christos #define NUM_ARM_OPTIONS   ARRAY_SIZE (regnames)
   5025   1.1  christos #define arm_regnames      regnames[regname_selected].reg_names
   5026   1.1  christos 
   5027   1.8  christos static bool force_thumb = false;
   5028   1.7  christos static uint16_t cde_coprocs = 0;
   5029   1.1  christos 
   5030   1.1  christos /* Current IT instruction state.  This contains the same state as the IT
   5031   1.1  christos    bits in the CPSR.  */
   5032   1.1  christos static unsigned int ifthen_state;
   5033   1.1  christos /* IT state for the next instruction.  */
   5034   1.1  christos static unsigned int ifthen_next_state;
   5035   1.1  christos /* The address of the insn for which the IT state is valid.  */
   5036   1.1  christos static bfd_vma ifthen_address;
   5037   1.1  christos #define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
   5038   1.2     joerg /* Indicates that the current Conditional state is unconditional or outside
   5039   1.2     joerg    an IT block.  */
   5040   1.2     joerg #define COND_UNCOND 16
   5041   1.1  christos 
   5042   1.1  christos 
   5043   1.1  christos /* Functions.  */
   5045   1.7  christos /* Extract the predicate mask for a VPT or VPST instruction.
   5046   1.1  christos    The mask is composed of bits 13-15 (Mkl) and bit 22 (Mkh).  */
   5047   1.7  christos 
   5048   1.7  christos static long
   5049   1.7  christos mve_extract_pred_mask (long given)
   5050   1.7  christos {
   5051   1.7  christos   return ((given & 0x00400000) >> 19) | ((given & 0xe000) >> 13);
   5052   1.1  christos }
   5053   1.7  christos 
   5054   1.7  christos /* Return the number of instructions in a MVE predicate block.  */
   5055   1.7  christos static long
   5056   1.1  christos num_instructions_vpt_block (long given)
   5057   1.7  christos {
   5058   1.7  christos   long mask = mve_extract_pred_mask (given);
   5059   1.7  christos   if (mask == 0)
   5060   1.7  christos     return 0;
   5061   1.7  christos 
   5062   1.7  christos   if (mask == 8)
   5063   1.4  christos     return 1;
   5064   1.7  christos 
   5065   1.7  christos   if ((mask & 7) == 4)
   5066   1.7  christos     return 2;
   5067   1.7  christos 
   5068   1.7  christos   if ((mask & 3) == 2)
   5069   1.7  christos     return 3;
   5070   1.7  christos 
   5071   1.7  christos   if ((mask & 1) == 1)
   5072   1.7  christos     return 4;
   5073   1.7  christos 
   5074   1.7  christos   return 0;
   5075   1.7  christos }
   5076   1.7  christos 
   5077   1.7  christos static void
   5078   1.7  christos mark_outside_vpt_block (void)
   5079   1.8  christos {
   5080   1.7  christos   vpt_block_state.in_vpt_block = false;
   5081   1.7  christos   vpt_block_state.next_pred_state = PRED_NONE;
   5082   1.7  christos   vpt_block_state.predicate_mask = 0;
   5083   1.7  christos   vpt_block_state.current_insn_num = 0;
   5084   1.7  christos   vpt_block_state.num_pred_insn = 0;
   5085   1.7  christos }
   5086   1.7  christos 
   5087   1.7  christos static void
   5088   1.7  christos mark_inside_vpt_block (long given)
   5089   1.8  christos {
   5090   1.7  christos   vpt_block_state.in_vpt_block = true;
   5091   1.7  christos   vpt_block_state.next_pred_state = PRED_THEN;
   5092   1.7  christos   vpt_block_state.predicate_mask = mve_extract_pred_mask (given);
   5093   1.7  christos   vpt_block_state.current_insn_num = 0;
   5094   1.7  christos   vpt_block_state.num_pred_insn = num_instructions_vpt_block (given);
   5095   1.7  christos   assert (vpt_block_state.num_pred_insn >= 1);
   5096   1.7  christos }
   5097   1.7  christos 
   5098   1.7  christos static enum vpt_pred_state
   5099   1.7  christos invert_next_predicate_state (enum vpt_pred_state astate)
   5100   1.7  christos {
   5101   1.7  christos   if (astate == PRED_THEN)
   5102   1.7  christos     return PRED_ELSE;
   5103   1.7  christos   else if (astate == PRED_ELSE)
   5104   1.7  christos     return PRED_THEN;
   5105   1.7  christos   else
   5106   1.7  christos     return PRED_NONE;
   5107   1.7  christos }
   5108   1.7  christos 
   5109   1.7  christos static enum vpt_pred_state
   5110   1.7  christos update_next_predicate_state (void)
   5111   1.7  christos {
   5112   1.7  christos   long pred_mask = vpt_block_state.predicate_mask;
   5113   1.7  christos   long mask_for_insn = 0;
   5114   1.7  christos 
   5115   1.7  christos   switch (vpt_block_state.current_insn_num)
   5116   1.7  christos     {
   5117   1.7  christos     case 1:
   5118   1.7  christos       mask_for_insn = 8;
   5119   1.7  christos       break;
   5120   1.7  christos 
   5121   1.7  christos     case 2:
   5122   1.7  christos       mask_for_insn = 4;
   5123   1.7  christos       break;
   5124   1.7  christos 
   5125   1.7  christos     case 3:
   5126   1.7  christos       mask_for_insn = 2;
   5127   1.7  christos       break;
   5128   1.7  christos 
   5129   1.7  christos     case 4:
   5130   1.7  christos       return PRED_NONE;
   5131   1.7  christos     }
   5132   1.7  christos 
   5133   1.7  christos   if (pred_mask & mask_for_insn)
   5134   1.7  christos     return invert_next_predicate_state (vpt_block_state.next_pred_state);
   5135   1.7  christos   else
   5136   1.7  christos     return vpt_block_state.next_pred_state;
   5137   1.7  christos }
   5138   1.7  christos 
   5139   1.7  christos static void
   5140   1.7  christos update_vpt_block_state (void)
   5141   1.7  christos {
   5142   1.7  christos   vpt_block_state.current_insn_num++;
   5143   1.7  christos   if (vpt_block_state.current_insn_num == vpt_block_state.num_pred_insn)
   5144   1.7  christos     {
   5145   1.7  christos       /* No more instructions to process in vpt block.  */
   5146   1.7  christos       mark_outside_vpt_block ();
   5147   1.7  christos       return;
   5148   1.7  christos     }
   5149   1.7  christos 
   5150   1.7  christos   vpt_block_state.next_pred_state = update_next_predicate_state ();
   5151   1.7  christos }
   5152   1.7  christos 
   5153   1.7  christos /* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
   5154   1.7  christos    Returns pointer to following character of the format string and
   5155   1.7  christos    fills in *VALUEP and *WIDTHP with the extracted value and number of
   5156   1.7  christos    bits extracted.  WIDTHP can be NULL.  */
   5157   1.7  christos 
   5158   1.7  christos static const char *
   5159   1.7  christos arm_decode_bitfield (const char *ptr,
   5160   1.7  christos 		     unsigned long insn,
   5161   1.7  christos 		     unsigned long *valuep,
   5162   1.7  christos 		     int *widthp)
   5163   1.7  christos {
   5164   1.7  christos   unsigned long value = 0;
   5165   1.7  christos   int width = 0;
   5166   1.7  christos 
   5167   1.7  christos   do
   5168   1.7  christos     {
   5169   1.7  christos       int start, end;
   5170   1.7  christos       int bits;
   5171   1.7  christos 
   5172   1.7  christos       for (start = 0; *ptr >= '0' && *ptr <= '9'; ptr++)
   5173   1.7  christos 	start = start * 10 + *ptr - '0';
   5174   1.7  christos       if (*ptr == '-')
   5175   1.7  christos 	for (end = 0, ptr++; *ptr >= '0' && *ptr <= '9'; ptr++)
   5176   1.7  christos 	  end = end * 10 + *ptr - '0';
   5177   1.7  christos       else
   5178   1.7  christos 	end = start;
   5179   1.7  christos       bits = end - start;
   5180   1.7  christos       if (bits < 0)
   5181   1.7  christos 	abort ();
   5182   1.7  christos       value |= ((insn >> start) & ((2ul << bits) - 1)) << width;
   5183   1.7  christos       width += bits + 1;
   5184   1.7  christos     }
   5185   1.7  christos   while (*ptr++ == ',');
   5186   1.7  christos   *valuep = value;
   5187   1.7  christos   if (widthp)
   5188   1.7  christos     *widthp = width;
   5189   1.7  christos   return ptr - 1;
   5190   1.7  christos }
   5191   1.7  christos 
   5192   1.8  christos static void
   5193   1.8  christos arm_decode_shift (long given, fprintf_styled_ftype func, void *stream,
   5194   1.7  christos 		  bool print_shift)
   5195   1.8  christos {
   5196   1.7  christos   func (stream, dis_style_register, "%s", arm_regnames[given & 0xf]);
   5197   1.7  christos 
   5198   1.7  christos   if ((given & 0xff0) != 0)
   5199   1.7  christos     {
   5200   1.7  christos       if ((given & 0x10) == 0)
   5201   1.7  christos 	{
   5202   1.7  christos 	  int amount = (given & 0xf80) >> 7;
   5203   1.7  christos 	  int shift = (given & 0x60) >> 5;
   5204   1.7  christos 
   5205   1.7  christos 	  if (amount == 0)
   5206   1.7  christos 	    {
   5207   1.7  christos 	      if (shift == 3)
   5208   1.8  christos 		{
   5209   1.8  christos 		  func (stream, dis_style_text, ", ");
   5210   1.7  christos 		  func (stream, dis_style_sub_mnemonic, "rrx");
   5211   1.7  christos 		  return;
   5212   1.7  christos 		}
   5213   1.7  christos 
   5214   1.7  christos 	      amount = 32;
   5215   1.7  christos 	    }
   5216   1.7  christos 
   5217   1.8  christos 	  if (print_shift)
   5218   1.8  christos 	    {
   5219   1.8  christos 	      func (stream, dis_style_text, ", ");
   5220   1.8  christos 	      func (stream, dis_style_sub_mnemonic, "%s ", arm_shift[shift]);
   5221   1.8  christos 	      func (stream, dis_style_immediate, "#%d", amount);
   5222   1.7  christos 	    }
   5223   1.8  christos 	  else
   5224   1.8  christos 	    {
   5225   1.8  christos 	      func (stream, dis_style_text, ", ");
   5226   1.8  christos 	      func (stream, dis_style_immediate, "#%d", amount);
   5227   1.7  christos 	    }
   5228   1.7  christos 	}
   5229   1.8  christos       else if ((given & 0x80) == 0x80)
   5230   1.8  christos 	func (stream, dis_style_comment_start,
   5231   1.7  christos 	      "\t@ <illegal shifter operand>");
   5232   1.8  christos       else if (print_shift)
   5233   1.8  christos 	{
   5234   1.8  christos 	  func (stream, dis_style_text, ", ");
   5235   1.8  christos 	  func (stream, dis_style_sub_mnemonic, "%s ",
   5236   1.8  christos 		arm_shift[(given & 0x60) >> 5]);
   5237   1.8  christos 	  func (stream, dis_style_register, "%s",
   5238   1.8  christos 		arm_regnames[(given & 0xf00) >> 8]);
   5239   1.7  christos 	}
   5240   1.8  christos       else
   5241   1.8  christos 	{
   5242   1.8  christos 	  func (stream, dis_style_text, ", ");
   5243   1.8  christos 	  func (stream, dis_style_register, "%s",
   5244   1.8  christos 		arm_regnames[(given & 0xf00) >> 8]);
   5245   1.7  christos 	}
   5246   1.7  christos     }
   5247   1.7  christos }
   5248   1.7  christos 
   5249   1.7  christos /* Return TRUE if the MATCHED_INSN can be inside an IT block.  */
   5250   1.8  christos 
   5251   1.7  christos static bool
   5252   1.7  christos is_mve_okay_in_it (enum mve_instructions matched_insn)
   5253   1.7  christos {
   5254   1.7  christos   switch (matched_insn)
   5255   1.7  christos     {
   5256   1.7  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   5257   1.7  christos     case MVE_VMOV2_VEC_LANE_TO_GP:
   5258   1.7  christos     case MVE_VMOV2_GP_TO_VEC_LANE:
   5259   1.7  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   5260   1.7  christos     case MVE_LSLL:
   5261   1.7  christos     case MVE_LSLLI:
   5262   1.7  christos     case MVE_LSRL:
   5263   1.7  christos     case MVE_ASRL:
   5264   1.7  christos     case MVE_ASRLI:
   5265   1.7  christos     case MVE_SQRSHRL:
   5266   1.7  christos     case MVE_SQRSHR:
   5267   1.7  christos     case MVE_UQRSHL:
   5268   1.7  christos     case MVE_UQRSHLL:
   5269   1.7  christos     case MVE_UQSHL:
   5270   1.7  christos     case MVE_UQSHLL:
   5271   1.7  christos     case MVE_URSHRL:
   5272   1.7  christos     case MVE_URSHR:
   5273   1.7  christos     case MVE_SRSHRL:
   5274   1.7  christos     case MVE_SRSHR:
   5275   1.7  christos     case MVE_SQSHLL:
   5276   1.8  christos     case MVE_SQSHL:
   5277   1.7  christos       return true;
   5278   1.8  christos     default:
   5279   1.7  christos       return false;
   5280   1.7  christos     }
   5281   1.7  christos }
   5282   1.8  christos 
   5283  1.10  christos static bool
   5284   1.7  christos is_v81m_architecture (struct disassemble_info *info)
   5285   1.7  christos {
   5286   1.7  christos   struct arm_private_data *private_data = info->private_data;
   5287   1.7  christos   arm_feature_set allowed_arches = private_data->features;
   5288   1.7  christos 
   5289   1.7  christos   arm_feature_set arm_ext_v8_1m_main
   5290   1.7  christos     = ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
   5291   1.7  christos 
   5292   1.7  christos   if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
   5293   1.8  christos       && !ARM_CPU_IS_ANY (allowed_arches))
   5294   1.7  christos     return true;
   5295   1.8  christos   else
   5296   1.7  christos     return false;
   5297   1.7  christos }
   5298   1.8  christos 
   5299   1.7  christos static bool
   5300   1.7  christos is_vpt_instruction (long given)
   5301   1.7  christos {
   5302   1.7  christos 
   5303   1.7  christos   /* If mkh:mkl is '0000' then its not a vpt/vpst instruction.  */
   5304   1.8  christos   if ((given & 0x0040e000) == 0)
   5305   1.7  christos     return false;
   5306   1.7  christos 
   5307   1.7  christos   /* VPT floating point T1 variant.  */
   5308   1.7  christos   if (((given & 0xefb10f50) == 0xee310f00 && ((given & 0x1001) != 0x1))
   5309   1.7  christos   /* VPT floating point T2 variant.  */
   5310   1.7  christos       || ((given & 0xefb10f50) == 0xee310f40)
   5311   1.7  christos   /* VPT vector T1 variant.  */
   5312   1.7  christos       || ((given & 0xff811f51) == 0xfe010f00)
   5313   1.7  christos   /* VPT vector T2 variant.  */
   5314   1.7  christos       || ((given & 0xff811f51) == 0xfe010f01
   5315   1.7  christos 	  && ((given & 0x300000) != 0x300000))
   5316   1.7  christos   /* VPT vector T3 variant.  */
   5317   1.7  christos       || ((given & 0xff811f50) == 0xfe011f00)
   5318   1.7  christos   /* VPT vector T4 variant.  */
   5319   1.7  christos       || ((given & 0xff811f70) == 0xfe010f40)
   5320   1.7  christos   /* VPT vector T5 variant.  */
   5321   1.7  christos       || ((given & 0xff811f70) == 0xfe010f60)
   5322   1.7  christos   /* VPT vector T6 variant.  */
   5323   1.7  christos       || ((given & 0xff811f50) == 0xfe011f40)
   5324   1.7  christos   /* VPST vector T variant.  */
   5325   1.8  christos       || ((given & 0xffbf1fff) == 0xfe310f4d))
   5326   1.7  christos     return true;
   5327   1.8  christos   else
   5328   1.7  christos     return false;
   5329   1.7  christos }
   5330   1.7  christos 
   5331   1.7  christos /* Decode a bitfield from opcode GIVEN, with starting bitfield = START
   5332   1.7  christos    and ending bitfield = END.  END must be greater than START.  */
   5333   1.7  christos 
   5334   1.7  christos static unsigned long
   5335   1.7  christos arm_decode_field (unsigned long given, unsigned int start, unsigned int end)
   5336   1.7  christos {
   5337   1.7  christos   int bits = end - start;
   5338   1.7  christos 
   5339   1.7  christos   if (bits < 0)
   5340   1.7  christos     abort ();
   5341   1.7  christos 
   5342   1.7  christos   return ((given >> start) & ((2ul << bits) - 1));
   5343   1.7  christos }
   5344   1.7  christos 
   5345   1.7  christos /* Decode a bitfield from opcode GIVEN, with multiple bitfields:
   5346   1.7  christos    START:END and START2:END2.  END/END2 must be greater than
   5347   1.7  christos    START/START2.  */
   5348   1.7  christos 
   5349   1.7  christos static unsigned long
   5350   1.7  christos arm_decode_field_multiple (unsigned long given, unsigned int start,
   5351   1.7  christos 			   unsigned int end, unsigned int start2,
   5352   1.7  christos 			   unsigned int end2)
   5353   1.7  christos {
   5354   1.7  christos   int bits = end - start;
   5355   1.7  christos   int bits2 = end2 - start2;
   5356   1.7  christos   unsigned long value = 0;
   5357   1.7  christos   int width = 0;
   5358   1.7  christos 
   5359   1.7  christos   if (bits2 < 0)
   5360   1.7  christos     abort ();
   5361   1.7  christos 
   5362   1.7  christos   value = arm_decode_field (given, start, end);
   5363   1.7  christos   width += bits + 1;
   5364   1.7  christos 
   5365   1.7  christos   value |= ((given >> start2) & ((2ul << bits2) - 1)) << width;
   5366   1.7  christos   return value;
   5367   1.7  christos }
   5368   1.7  christos 
   5369   1.7  christos /* Return TRUE if the GIVEN encoding should not be decoded as MATCHED_INSN.
   5370   1.7  christos    This helps us decode instructions that change mnemonic depending on specific
   5371   1.7  christos    operand values/encodings.  */
   5372   1.8  christos 
   5373   1.7  christos static bool
   5374   1.7  christos is_mve_encoding_conflict (unsigned long given,
   5375   1.7  christos 			  enum mve_instructions matched_insn)
   5376   1.7  christos {
   5377   1.7  christos   switch (matched_insn)
   5378   1.7  christos     {
   5379   1.7  christos     case MVE_VPST:
   5380   1.8  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5381   1.7  christos 	return true;
   5382   1.8  christos       else
   5383   1.7  christos 	return false;
   5384   1.7  christos 
   5385   1.7  christos     case MVE_VPT_FP_T1:
   5386   1.8  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5387   1.7  christos 	return true;
   5388   1.7  christos       if ((arm_decode_field (given, 12, 12) == 0)
   5389   1.8  christos 	  && (arm_decode_field (given, 0, 0) == 1))
   5390   1.8  christos 	return true;
   5391   1.7  christos       return false;
   5392   1.7  christos 
   5393   1.7  christos     case MVE_VPT_FP_T2:
   5394   1.8  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5395   1.7  christos 	return true;
   5396   1.8  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   5397   1.8  christos 	return true;
   5398   1.7  christos       return false;
   5399   1.7  christos 
   5400   1.7  christos     case MVE_VPT_VEC_T1:
   5401   1.7  christos     case MVE_VPT_VEC_T2:
   5402   1.7  christos     case MVE_VPT_VEC_T3:
   5403   1.7  christos     case MVE_VPT_VEC_T4:
   5404   1.7  christos     case MVE_VPT_VEC_T5:
   5405   1.7  christos     case MVE_VPT_VEC_T6:
   5406   1.8  christos       if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
   5407   1.7  christos 	return true;
   5408   1.8  christos       if (arm_decode_field (given, 20, 21) == 3)
   5409   1.8  christos 	return true;
   5410   1.7  christos       return false;
   5411   1.7  christos 
   5412   1.7  christos     case MVE_VCMP_FP_T1:
   5413   1.7  christos       if ((arm_decode_field (given, 12, 12) == 0)
   5414   1.8  christos 	  && (arm_decode_field (given, 0, 0) == 1))
   5415   1.7  christos 	return true;
   5416   1.8  christos       else
   5417   1.7  christos 	return false;
   5418   1.7  christos 
   5419   1.7  christos     case MVE_VCMP_FP_T2:
   5420   1.8  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   5421   1.7  christos 	return true;
   5422   1.8  christos       else
   5423   1.7  christos 	return false;
   5424   1.7  christos 
   5425   1.7  christos     case MVE_VQADD_T2:
   5426   1.7  christos     case MVE_VQSUB_T2:
   5427   1.7  christos     case MVE_VMUL_VEC_T2:
   5428   1.7  christos     case MVE_VMULH:
   5429   1.7  christos     case MVE_VRMULH:
   5430   1.7  christos     case MVE_VMLA:
   5431   1.7  christos     case MVE_VMAX:
   5432   1.7  christos     case MVE_VMIN:
   5433   1.7  christos     case MVE_VBRSR:
   5434   1.7  christos     case MVE_VADD_VEC_T2:
   5435   1.7  christos     case MVE_VSUB_VEC_T2:
   5436   1.7  christos     case MVE_VABAV:
   5437   1.7  christos     case MVE_VQRSHL_T1:
   5438   1.7  christos     case MVE_VQSHL_T4:
   5439   1.7  christos     case MVE_VRSHL_T1:
   5440   1.7  christos     case MVE_VSHL_T3:
   5441   1.7  christos     case MVE_VCADD_VEC:
   5442   1.7  christos     case MVE_VHCADD:
   5443   1.7  christos     case MVE_VDDUP:
   5444   1.7  christos     case MVE_VIDUP:
   5445   1.7  christos     case MVE_VQRDMLADH:
   5446   1.7  christos     case MVE_VQDMLAH:
   5447   1.7  christos     case MVE_VQRDMLAH:
   5448   1.7  christos     case MVE_VQDMLASH:
   5449   1.7  christos     case MVE_VQRDMLASH:
   5450   1.7  christos     case MVE_VQDMLSDH:
   5451   1.7  christos     case MVE_VQRDMLSDH:
   5452   1.7  christos     case MVE_VQDMULH_T3:
   5453   1.7  christos     case MVE_VQRDMULH_T4:
   5454   1.7  christos     case MVE_VQDMLADH:
   5455   1.7  christos     case MVE_VMLAS:
   5456   1.7  christos     case MVE_VMULL_INT:
   5457   1.7  christos     case MVE_VHADD_T2:
   5458   1.7  christos     case MVE_VHSUB_T2:
   5459   1.7  christos     case MVE_VCMP_VEC_T1:
   5460   1.7  christos     case MVE_VCMP_VEC_T2:
   5461   1.7  christos     case MVE_VCMP_VEC_T3:
   5462   1.7  christos     case MVE_VCMP_VEC_T4:
   5463   1.7  christos     case MVE_VCMP_VEC_T5:
   5464   1.7  christos     case MVE_VCMP_VEC_T6:
   5465   1.8  christos       if (arm_decode_field (given, 20, 21) == 3)
   5466   1.7  christos 	return true;
   5467   1.8  christos       else
   5468   1.7  christos 	return false;
   5469   1.7  christos 
   5470   1.7  christos     case MVE_VLD2:
   5471   1.7  christos     case MVE_VLD4:
   5472   1.7  christos     case MVE_VST2:
   5473   1.7  christos     case MVE_VST4:
   5474   1.8  christos       if (arm_decode_field (given, 7, 8) == 3)
   5475   1.7  christos 	return true;
   5476   1.8  christos       else
   5477   1.7  christos 	return false;
   5478   1.7  christos 
   5479   1.7  christos     case MVE_VSTRB_T1:
   5480   1.7  christos     case MVE_VSTRH_T2:
   5481   1.7  christos       if ((arm_decode_field (given, 24, 24) == 0)
   5482   1.7  christos 	  && (arm_decode_field (given, 21, 21) == 0))
   5483   1.8  christos 	{
   5484   1.7  christos 	    return true;
   5485   1.7  christos 	}
   5486   1.8  christos       else if ((arm_decode_field (given, 7, 8) == 3))
   5487   1.7  christos 	return true;
   5488   1.8  christos       else
   5489   1.7  christos 	return false;
   5490   1.8  christos 
   5491   1.8  christos     case MVE_VLDRB_T1:
   5492   1.8  christos     case MVE_VLDRH_T2:
   5493   1.7  christos     case MVE_VLDRW_T7:
   5494   1.7  christos     case MVE_VSTRB_T5:
   5495   1.7  christos     case MVE_VSTRH_T6:
   5496   1.7  christos     case MVE_VSTRW_T7:
   5497   1.7  christos       if ((arm_decode_field (given, 24, 24) == 0)
   5498   1.7  christos 	  && (arm_decode_field (given, 21, 21) == 0))
   5499   1.8  christos 	{
   5500   1.7  christos 	    return true;
   5501   1.7  christos 	}
   5502   1.8  christos       else
   5503   1.7  christos 	return false;
   5504   1.7  christos 
   5505   1.7  christos     case MVE_VCVT_FP_FIX_VEC:
   5506   1.7  christos       return (arm_decode_field (given, 16, 21) & 0x38) == 0;
   5507   1.7  christos 
   5508   1.7  christos     case MVE_VBIC_IMM:
   5509   1.7  christos     case MVE_VORR_IMM:
   5510   1.7  christos       {
   5511   1.7  christos 	unsigned long cmode = arm_decode_field (given, 8, 11);
   5512   1.7  christos 
   5513   1.8  christos 	if ((cmode & 1) == 0)
   5514   1.7  christos 	  return true;
   5515   1.8  christos 	else if ((cmode & 0xc) == 0xc)
   5516   1.7  christos 	  return true;
   5517   1.8  christos 	else
   5518   1.7  christos 	  return false;
   5519   1.7  christos       }
   5520   1.7  christos 
   5521   1.7  christos     case MVE_VMVN_IMM:
   5522   1.7  christos       {
   5523   1.7  christos 	unsigned long cmode = arm_decode_field (given, 8, 11);
   5524   1.7  christos 
   5525   1.8  christos 	if (cmode == 0xe)
   5526   1.7  christos 	  return true;
   5527   1.8  christos 	else if ((cmode & 0x9) == 1)
   5528   1.7  christos 	  return true;
   5529   1.8  christos 	else if ((cmode & 0xd) == 9)
   5530   1.7  christos 	  return true;
   5531   1.8  christos 	else
   5532   1.7  christos 	  return false;
   5533   1.7  christos       }
   5534   1.7  christos 
   5535   1.7  christos     case MVE_VMOV_IMM_TO_VEC:
   5536   1.7  christos       if ((arm_decode_field (given, 5, 5) == 1)
   5537   1.8  christos 	  && (arm_decode_field (given, 8, 11) != 0xe))
   5538   1.7  christos 	return true;
   5539   1.8  christos       else
   5540   1.7  christos 	return false;
   5541   1.7  christos 
   5542   1.7  christos     case MVE_VMOVL:
   5543   1.7  christos       {
   5544   1.7  christos 	unsigned long size = arm_decode_field (given, 19, 20);
   5545   1.8  christos 	if ((size == 0) || (size == 3))
   5546   1.7  christos 	  return true;
   5547   1.8  christos 	else
   5548   1.7  christos 	  return false;
   5549   1.7  christos       }
   5550   1.7  christos 
   5551   1.7  christos     case MVE_VMAXA:
   5552   1.7  christos     case MVE_VMINA:
   5553   1.7  christos     case MVE_VMAXV:
   5554   1.7  christos     case MVE_VMAXAV:
   5555   1.7  christos     case MVE_VMINV:
   5556   1.7  christos     case MVE_VMINAV:
   5557   1.7  christos     case MVE_VQRSHL_T2:
   5558   1.7  christos     case MVE_VQSHL_T1:
   5559   1.7  christos     case MVE_VRSHL_T2:
   5560   1.7  christos     case MVE_VSHL_T2:
   5561   1.7  christos     case MVE_VSHLL_T2:
   5562   1.7  christos     case MVE_VADDV:
   5563   1.7  christos     case MVE_VMOVN:
   5564   1.7  christos     case MVE_VQMOVUN:
   5565   1.7  christos     case MVE_VQMOVN:
   5566   1.8  christos       if (arm_decode_field (given, 18, 19) == 3)
   5567   1.7  christos 	return true;
   5568   1.8  christos       else
   5569   1.7  christos 	return false;
   5570   1.7  christos 
   5571   1.7  christos     case MVE_VMLSLDAV:
   5572   1.7  christos     case MVE_VRMLSLDAVH:
   5573   1.7  christos     case MVE_VMLALDAV:
   5574   1.7  christos     case MVE_VADDLV:
   5575   1.8  christos       if (arm_decode_field (given, 20, 22) == 7)
   5576   1.7  christos 	return true;
   5577   1.8  christos       else
   5578   1.7  christos 	return false;
   5579   1.7  christos 
   5580   1.7  christos     case MVE_VRMLALDAVH:
   5581   1.8  christos       if ((arm_decode_field (given, 20, 22) & 6) == 6)
   5582   1.7  christos 	return true;
   5583   1.8  christos       else
   5584   1.7  christos 	return false;
   5585   1.7  christos 
   5586   1.7  christos     case MVE_VDWDUP:
   5587   1.7  christos     case MVE_VIWDUP:
   5588   1.7  christos       if ((arm_decode_field (given, 20, 21) == 3)
   5589   1.8  christos 	  || (arm_decode_field (given, 1, 3) == 7))
   5590   1.7  christos 	return true;
   5591   1.8  christos       else
   5592   1.7  christos 	return false;
   5593   1.7  christos 
   5594   1.7  christos 
   5595   1.7  christos     case MVE_VSHLL_T1:
   5596   1.7  christos       if (arm_decode_field (given, 16, 18) == 0)
   5597   1.7  christos 	{
   5598   1.7  christos 	  unsigned long sz = arm_decode_field (given, 19, 20);
   5599   1.7  christos 
   5600   1.8  christos 	  if ((sz == 1) || (sz == 2))
   5601   1.7  christos 	    return true;
   5602   1.8  christos 	  else
   5603   1.7  christos 	    return false;
   5604   1.7  christos 	}
   5605   1.8  christos       else
   5606   1.7  christos 	return false;
   5607   1.7  christos 
   5608   1.7  christos     case MVE_VQSHL_T2:
   5609   1.7  christos     case MVE_VQSHLU_T3:
   5610   1.7  christos     case MVE_VRSHR:
   5611   1.7  christos     case MVE_VSHL_T1:
   5612   1.7  christos     case MVE_VSHR:
   5613   1.7  christos     case MVE_VSLI:
   5614   1.7  christos     case MVE_VSRI:
   5615   1.8  christos       if (arm_decode_field (given, 19, 21) == 0)
   5616   1.7  christos 	return true;
   5617   1.8  christos       else
   5618   1.7  christos 	return false;
   5619   1.7  christos 
   5620   1.7  christos     case MVE_VCTP:
   5621   1.8  christos     if (arm_decode_field (given, 16, 19) == 0xf)
   5622   1.7  christos       return true;
   5623   1.8  christos     else
   5624   1.7  christos       return false;
   5625   1.7  christos 
   5626   1.7  christos     case MVE_ASRLI:
   5627   1.7  christos     case MVE_ASRL:
   5628   1.7  christos     case MVE_LSLLI:
   5629   1.7  christos     case MVE_LSLL:
   5630   1.7  christos     case MVE_LSRL:
   5631   1.7  christos     case MVE_SQRSHRL:
   5632   1.7  christos     case MVE_SQSHLL:
   5633   1.7  christos     case MVE_SRSHRL:
   5634   1.7  christos     case MVE_UQRSHLL:
   5635   1.7  christos     case MVE_UQSHLL:
   5636   1.7  christos     case MVE_URSHRL:
   5637   1.8  christos       if (arm_decode_field (given, 9, 11) == 0x7)
   5638   1.7  christos 	return true;
   5639   1.8  christos       else
   5640   1.7  christos 	return false;
   5641   1.7  christos 
   5642   1.7  christos     case MVE_CSINC:
   5643   1.7  christos     case MVE_CSINV:
   5644   1.7  christos       {
   5645   1.7  christos 	unsigned long rm, rn;
   5646   1.7  christos 	rm = arm_decode_field (given, 0, 3);
   5647   1.7  christos 	rn = arm_decode_field (given, 16, 19);
   5648   1.7  christos 	/* CSET/CSETM.  */
   5649   1.8  christos 	if (rm == 0xf && rn == 0xf)
   5650   1.7  christos 	  return true;
   5651   1.7  christos 	/* CINC/CINV.  */
   5652   1.8  christos 	else if (rn == rm && rn != 0xf)
   5653   1.7  christos 	  return true;
   5654   1.7  christos       }
   5655   1.7  christos     /* Fall through.  */
   5656   1.7  christos     case MVE_CSEL:
   5657   1.7  christos     case MVE_CSNEG:
   5658   1.8  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   5659   1.7  christos 	return true;
   5660   1.7  christos       /* CNEG.  */
   5661   1.7  christos       else if (matched_insn == MVE_CSNEG)
   5662   1.8  christos 	if (arm_decode_field (given, 0, 3) == arm_decode_field (given, 16, 19))
   5663   1.8  christos 	  return true;
   5664   1.7  christos       return false;
   5665   1.7  christos 
   5666   1.7  christos     default:
   5667   1.7  christos     case MVE_VADD_FP_T1:
   5668   1.7  christos     case MVE_VADD_FP_T2:
   5669   1.8  christos     case MVE_VADD_VEC_T1:
   5670   1.7  christos       return false;
   5671   1.7  christos 
   5672   1.7  christos     }
   5673   1.7  christos }
   5674   1.7  christos 
   5675   1.7  christos static void
   5676   1.7  christos print_mve_vld_str_addr (struct disassemble_info *info,
   5677   1.7  christos 			unsigned long given,
   5678   1.7  christos 			enum mve_instructions matched_insn)
   5679   1.7  christos {
   5680   1.8  christos   void *stream = info->stream;
   5681   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   5682   1.7  christos 
   5683   1.7  christos   unsigned long p, w, gpr, imm, add, mod_imm;
   5684   1.7  christos 
   5685   1.7  christos   imm = arm_decode_field (given, 0, 6);
   5686   1.7  christos   mod_imm = imm;
   5687   1.7  christos 
   5688   1.7  christos   switch (matched_insn)
   5689   1.7  christos     {
   5690   1.7  christos     case MVE_VLDRB_T1:
   5691   1.7  christos     case MVE_VSTRB_T1:
   5692   1.7  christos       gpr = arm_decode_field (given, 16, 18);
   5693   1.7  christos       break;
   5694   1.7  christos 
   5695   1.7  christos     case MVE_VLDRH_T2:
   5696   1.7  christos     case MVE_VSTRH_T2:
   5697   1.7  christos       gpr = arm_decode_field (given, 16, 18);
   5698   1.7  christos       mod_imm = imm << 1;
   5699   1.7  christos       break;
   5700   1.7  christos 
   5701   1.7  christos     case MVE_VLDRH_T6:
   5702   1.7  christos     case MVE_VSTRH_T6:
   5703   1.7  christos       gpr = arm_decode_field (given, 16, 19);
   5704   1.7  christos       mod_imm = imm << 1;
   5705   1.7  christos       break;
   5706   1.7  christos 
   5707   1.7  christos     case MVE_VLDRW_T7:
   5708   1.7  christos     case MVE_VSTRW_T7:
   5709   1.7  christos       gpr = arm_decode_field (given, 16, 19);
   5710   1.7  christos       mod_imm = imm << 2;
   5711   1.7  christos       break;
   5712   1.7  christos 
   5713   1.7  christos     case MVE_VLDRB_T5:
   5714   1.7  christos     case MVE_VSTRB_T5:
   5715   1.7  christos       gpr = arm_decode_field (given, 16, 19);
   5716   1.7  christos       break;
   5717   1.7  christos 
   5718   1.7  christos     default:
   5719   1.7  christos       return;
   5720   1.7  christos     }
   5721   1.7  christos 
   5722   1.7  christos   p = arm_decode_field (given, 24, 24);
   5723   1.7  christos   w = arm_decode_field (given, 21, 21);
   5724   1.7  christos 
   5725   1.7  christos   add = arm_decode_field (given, 23, 23);
   5726   1.7  christos 
   5727   1.7  christos   char * add_sub;
   5728   1.7  christos 
   5729   1.7  christos   /* Don't print anything for '+' as it is implied.  */
   5730   1.7  christos   if (add == 1)
   5731   1.7  christos     add_sub = "";
   5732   1.7  christos   else
   5733   1.7  christos     add_sub = "-";
   5734   1.8  christos 
   5735   1.8  christos   func (stream, dis_style_text, "[");
   5736   1.7  christos   func (stream, dis_style_register, "%s", arm_regnames[gpr]);
   5737   1.7  christos   if (p == 1)
   5738   1.8  christos     {
   5739   1.8  christos       func (stream, dis_style_text, ", ");
   5740   1.7  christos       func (stream, dis_style_immediate, "#%s%lu", add_sub, mod_imm);
   5741   1.7  christos       /* Offset mode.  */
   5742   1.8  christos       if (w == 0)
   5743   1.7  christos 	func (stream, dis_style_text, "]");
   5744   1.7  christos       /* Pre-indexed mode.  */
   5745   1.8  christos       else
   5746   1.7  christos 	func (stream, dis_style_text, "]!");
   5747   1.7  christos     }
   5748   1.8  christos   else if ((p == 0) && (w == 1))
   5749   1.8  christos     {
   5750   1.8  christos       /* Post-index mode.  */
   5751   1.8  christos       func (stream, dis_style_text, "], ");
   5752   1.8  christos       func (stream, dis_style_immediate, "#%s%lu", add_sub, mod_imm);
   5753   1.7  christos     }
   5754   1.7  christos }
   5755   1.7  christos 
   5756   1.7  christos /* Return FALSE if GIVEN is not an undefined encoding for MATCHED_INSN.
   5757   1.7  christos    Otherwise, return TRUE and set UNDEFINED_CODE to give a reason as to why
   5758   1.7  christos    this encoding is undefined.  */
   5759   1.8  christos 
   5760   1.7  christos static bool
   5761   1.7  christos is_mve_undefined (unsigned long given, enum mve_instructions matched_insn,
   5762   1.7  christos 		  enum mve_undefined *undefined_code)
   5763   1.7  christos {
   5764   1.7  christos   *undefined_code = UNDEF_NONE;
   5765   1.7  christos 
   5766   1.7  christos   switch (matched_insn)
   5767   1.7  christos     {
   5768   1.7  christos     case MVE_VDUP:
   5769   1.7  christos       if (arm_decode_field_multiple (given, 5, 5, 22, 22) == 3)
   5770   1.7  christos 	{
   5771   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   5772   1.7  christos 	  return true;
   5773   1.7  christos 	}
   5774   1.8  christos       else
   5775   1.7  christos 	return false;
   5776   1.7  christos 
   5777   1.7  christos     case MVE_VQADD_T1:
   5778   1.7  christos     case MVE_VQSUB_T1:
   5779   1.7  christos     case MVE_VMUL_VEC_T1:
   5780   1.7  christos     case MVE_VABD_VEC:
   5781   1.7  christos     case MVE_VADD_VEC_T1:
   5782   1.7  christos     case MVE_VSUB_VEC_T1:
   5783   1.7  christos     case MVE_VQDMULH_T1:
   5784   1.7  christos     case MVE_VQRDMULH_T2:
   5785   1.7  christos     case MVE_VRHADD:
   5786   1.7  christos     case MVE_VHADD_T1:
   5787   1.7  christos     case MVE_VHSUB_T1:
   5788   1.7  christos       if (arm_decode_field (given, 20, 21) == 3)
   5789   1.7  christos 	{
   5790   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   5791   1.7  christos 	  return true;
   5792   1.7  christos 	}
   5793   1.8  christos       else
   5794   1.7  christos 	return false;
   5795   1.7  christos 
   5796   1.7  christos     case MVE_VLDRB_T1:
   5797   1.7  christos       if (arm_decode_field (given, 7, 8) == 3)
   5798   1.7  christos 	{
   5799   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   5800   1.7  christos 	  return true;
   5801   1.7  christos 	}
   5802   1.8  christos       else
   5803   1.7  christos 	return false;
   5804   1.7  christos 
   5805   1.7  christos     case MVE_VLDRH_T2:
   5806   1.7  christos       if (arm_decode_field (given, 7, 8) <= 1)
   5807   1.7  christos 	{
   5808   1.8  christos 	  *undefined_code = UNDEF_SIZE_LE_1;
   5809   1.7  christos 	  return true;
   5810   1.7  christos 	}
   5811   1.8  christos       else
   5812   1.7  christos 	return false;
   5813   1.7  christos 
   5814   1.7  christos     case MVE_VSTRB_T1:
   5815   1.7  christos       if ((arm_decode_field (given, 7, 8) == 0))
   5816   1.7  christos 	{
   5817   1.8  christos 	  *undefined_code = UNDEF_SIZE_0;
   5818   1.7  christos 	  return true;
   5819   1.7  christos 	}
   5820   1.8  christos       else
   5821   1.7  christos 	return false;
   5822   1.7  christos 
   5823   1.7  christos     case MVE_VSTRH_T2:
   5824   1.7  christos       if ((arm_decode_field (given, 7, 8) <= 1))
   5825   1.7  christos 	{
   5826   1.8  christos 	  *undefined_code = UNDEF_SIZE_LE_1;
   5827   1.7  christos 	  return true;
   5828   1.7  christos 	}
   5829   1.8  christos       else
   5830   1.7  christos 	return false;
   5831   1.7  christos 
   5832   1.7  christos     case MVE_VLDRB_GATHER_T1:
   5833   1.7  christos       if (arm_decode_field (given, 7, 8) == 3)
   5834   1.7  christos 	{
   5835   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   5836   1.7  christos 	  return true;
   5837   1.7  christos 	}
   5838   1.7  christos       else if ((arm_decode_field (given, 28, 28) == 0)
   5839   1.7  christos 	       && (arm_decode_field (given, 7, 8) == 0))
   5840   1.7  christos 	{
   5841   1.8  christos 	  *undefined_code = UNDEF_NOT_UNS_SIZE_0;
   5842   1.7  christos 	  return true;
   5843   1.7  christos 	}
   5844   1.8  christos       else
   5845   1.7  christos 	return false;
   5846   1.7  christos 
   5847   1.7  christos     case MVE_VLDRH_GATHER_T2:
   5848   1.7  christos       if (arm_decode_field (given, 7, 8) == 3)
   5849   1.7  christos 	{
   5850   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   5851   1.7  christos 	  return true;
   5852   1.7  christos 	}
   5853   1.7  christos       else if ((arm_decode_field (given, 28, 28) == 0)
   5854   1.7  christos 	       && (arm_decode_field (given, 7, 8) == 1))
   5855   1.7  christos 	{
   5856   1.8  christos 	  *undefined_code = UNDEF_NOT_UNS_SIZE_1;
   5857   1.7  christos 	  return true;
   5858   1.7  christos 	}
   5859   1.7  christos       else if (arm_decode_field (given, 7, 8) == 0)
   5860   1.7  christos 	{
   5861   1.8  christos 	  *undefined_code = UNDEF_SIZE_0;
   5862   1.7  christos 	  return true;
   5863   1.7  christos 	}
   5864   1.8  christos       else
   5865   1.7  christos 	return false;
   5866   1.7  christos 
   5867   1.7  christos     case MVE_VLDRW_GATHER_T3:
   5868   1.7  christos       if (arm_decode_field (given, 7, 8) != 2)
   5869   1.7  christos 	{
   5870   1.8  christos 	  *undefined_code = UNDEF_SIZE_NOT_2;
   5871   1.7  christos 	  return true;
   5872   1.7  christos 	}
   5873   1.7  christos       else if (arm_decode_field (given, 28, 28) == 0)
   5874   1.7  christos 	{
   5875   1.8  christos 	  *undefined_code = UNDEF_NOT_UNSIGNED;
   5876   1.7  christos 	  return true;
   5877   1.7  christos 	}
   5878   1.8  christos       else
   5879   1.7  christos 	return false;
   5880   1.7  christos 
   5881   1.7  christos     case MVE_VLDRD_GATHER_T4:
   5882   1.7  christos       if (arm_decode_field (given, 7, 8) != 3)
   5883   1.7  christos 	{
   5884   1.8  christos 	  *undefined_code = UNDEF_SIZE_NOT_3;
   5885   1.7  christos 	  return true;
   5886   1.7  christos 	}
   5887   1.7  christos       else if (arm_decode_field (given, 28, 28) == 0)
   5888   1.7  christos 	{
   5889   1.8  christos 	  *undefined_code = UNDEF_NOT_UNSIGNED;
   5890   1.7  christos 	  return true;
   5891   1.7  christos 	}
   5892   1.8  christos       else
   5893   1.7  christos 	return false;
   5894   1.7  christos 
   5895   1.7  christos     case MVE_VSTRB_SCATTER_T1:
   5896   1.7  christos       if (arm_decode_field (given, 7, 8) == 3)
   5897   1.7  christos 	{
   5898   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   5899   1.7  christos 	  return true;
   5900   1.7  christos 	}
   5901   1.8  christos       else
   5902   1.7  christos 	return false;
   5903   1.7  christos 
   5904   1.7  christos     case MVE_VSTRH_SCATTER_T2:
   5905   1.7  christos       {
   5906   1.7  christos 	unsigned long size = arm_decode_field (given, 7, 8);
   5907   1.7  christos 	if (size == 3)
   5908   1.7  christos 	  {
   5909   1.8  christos 	    *undefined_code = UNDEF_SIZE_3;
   5910   1.7  christos 	    return true;
   5911   1.7  christos 	  }
   5912   1.7  christos 	else if (size == 0)
   5913   1.7  christos 	  {
   5914   1.8  christos 	    *undefined_code = UNDEF_SIZE_0;
   5915   1.7  christos 	    return true;
   5916   1.7  christos 	  }
   5917   1.8  christos 	else
   5918   1.7  christos 	  return false;
   5919   1.7  christos       }
   5920   1.7  christos 
   5921   1.7  christos     case MVE_VSTRW_SCATTER_T3:
   5922   1.7  christos       if (arm_decode_field (given, 7, 8) != 2)
   5923   1.7  christos 	{
   5924   1.8  christos 	  *undefined_code = UNDEF_SIZE_NOT_2;
   5925   1.7  christos 	  return true;
   5926   1.7  christos 	}
   5927   1.8  christos       else
   5928   1.7  christos 	return false;
   5929   1.7  christos 
   5930   1.7  christos     case MVE_VSTRD_SCATTER_T4:
   5931   1.7  christos       if (arm_decode_field (given, 7, 8) != 3)
   5932   1.7  christos 	{
   5933   1.8  christos 	  *undefined_code = UNDEF_SIZE_NOT_3;
   5934   1.7  christos 	  return true;
   5935   1.7  christos 	}
   5936   1.8  christos       else
   5937   1.7  christos 	return false;
   5938   1.7  christos 
   5939   1.7  christos     case MVE_VCVT_FP_FIX_VEC:
   5940   1.7  christos       {
   5941   1.7  christos 	unsigned long imm6 = arm_decode_field (given, 16, 21);
   5942   1.7  christos 	if ((imm6 & 0x20) == 0)
   5943   1.7  christos 	  {
   5944   1.8  christos 	    *undefined_code = UNDEF_VCVT_IMM6;
   5945   1.7  christos 	    return true;
   5946   1.7  christos 	  }
   5947   1.7  christos 
   5948   1.7  christos 	if ((arm_decode_field (given, 9, 9) == 0)
   5949   1.7  christos 	    && ((imm6 & 0x30) == 0x20))
   5950   1.7  christos 	  {
   5951   1.8  christos 	    *undefined_code = UNDEF_VCVT_FSI_IMM6;
   5952   1.7  christos 	    return true;
   5953   1.7  christos 	  }
   5954   1.8  christos 
   5955   1.7  christos 	return false;
   5956   1.7  christos       }
   5957   1.7  christos 
   5958   1.7  christos     case MVE_VNEG_FP:
   5959   1.7  christos     case MVE_VABS_FP:
   5960   1.7  christos     case MVE_VCVT_BETWEEN_FP_INT:
   5961   1.7  christos     case MVE_VCVT_FROM_FP_TO_INT:
   5962   1.7  christos       {
   5963   1.7  christos 	unsigned long size = arm_decode_field (given, 18, 19);
   5964   1.7  christos 	if (size == 0)
   5965   1.7  christos 	  {
   5966   1.8  christos 	    *undefined_code = UNDEF_SIZE_0;
   5967   1.7  christos 	    return true;
   5968   1.7  christos 	  }
   5969   1.7  christos 	else if (size == 3)
   5970   1.7  christos 	  {
   5971   1.8  christos 	    *undefined_code = UNDEF_SIZE_3;
   5972   1.7  christos 	    return true;
   5973   1.7  christos 	  }
   5974   1.8  christos 	else
   5975   1.7  christos 	  return false;
   5976   1.7  christos       }
   5977   1.7  christos 
   5978   1.7  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   5979   1.7  christos       {
   5980   1.7  christos 	unsigned long op1 = arm_decode_field (given, 21, 22);
   5981   1.7  christos 	unsigned long op2 = arm_decode_field (given, 5, 6);
   5982   1.7  christos 	unsigned long u = arm_decode_field (given, 23, 23);
   5983   1.7  christos 
   5984   1.7  christos 	if ((op2 == 0) && (u == 1))
   5985   1.7  christos 	  {
   5986   1.7  christos 	    if ((op1 == 0) || (op1 == 1))
   5987   1.7  christos 	      {
   5988   1.8  christos 		*undefined_code = UNDEF_BAD_U_OP1_OP2;
   5989   1.7  christos 		return true;
   5990   1.7  christos 	      }
   5991   1.8  christos 	    else
   5992   1.7  christos 	      return false;
   5993   1.7  christos 	  }
   5994   1.7  christos 	else if (op2 == 2)
   5995   1.7  christos 	  {
   5996   1.7  christos 	    if ((op1 == 0) || (op1 == 1))
   5997   1.7  christos 	      {
   5998   1.8  christos 		*undefined_code = UNDEF_BAD_OP1_OP2;
   5999   1.7  christos 		return true;
   6000   1.7  christos 	      }
   6001   1.8  christos 	    else
   6002   1.7  christos 	      return false;
   6003   1.7  christos 	  }
   6004   1.8  christos 
   6005   1.7  christos 	return false;
   6006   1.7  christos       }
   6007   1.7  christos 
   6008   1.7  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   6009   1.7  christos       if (arm_decode_field (given, 5, 6) == 2)
   6010   1.7  christos 	{
   6011   1.7  christos 	  unsigned long op1 = arm_decode_field (given, 21, 22);
   6012   1.7  christos 	  if ((op1 == 0) || (op1 == 1))
   6013   1.7  christos 	    {
   6014   1.8  christos 	      *undefined_code = UNDEF_BAD_OP1_OP2;
   6015   1.7  christos 	      return true;
   6016   1.7  christos 	    }
   6017   1.8  christos 	  else
   6018   1.7  christos 	    return false;
   6019   1.7  christos 	}
   6020   1.8  christos       else
   6021   1.7  christos 	return false;
   6022   1.7  christos 
   6023   1.7  christos     case MVE_VMOV_VEC_TO_VEC:
   6024   1.7  christos       if ((arm_decode_field (given, 5, 5) == 1)
   6025   1.8  christos 	  || (arm_decode_field (given, 22, 22) == 1))
   6026   1.8  christos 	  return true;
   6027   1.7  christos       return false;
   6028   1.7  christos 
   6029   1.7  christos     case MVE_VMOV_IMM_TO_VEC:
   6030   1.7  christos       if (arm_decode_field (given, 5, 5) == 0)
   6031   1.7  christos       {
   6032   1.7  christos 	unsigned long cmode = arm_decode_field (given, 8, 11);
   6033   1.7  christos 
   6034   1.7  christos 	if (((cmode & 9) == 1) || ((cmode & 5) == 1))
   6035   1.7  christos 	  {
   6036   1.8  christos 	    *undefined_code = UNDEF_OP_0_BAD_CMODE;
   6037   1.7  christos 	    return true;
   6038   1.7  christos 	  }
   6039   1.8  christos 	else
   6040   1.7  christos 	  return false;
   6041   1.7  christos       }
   6042   1.8  christos       else
   6043   1.7  christos 	return false;
   6044   1.7  christos 
   6045   1.7  christos     case MVE_VSHLL_T2:
   6046   1.7  christos     case MVE_VMOVN:
   6047   1.7  christos       if (arm_decode_field (given, 18, 19) == 2)
   6048   1.7  christos 	{
   6049   1.8  christos 	  *undefined_code = UNDEF_SIZE_2;
   6050   1.7  christos 	  return true;
   6051   1.7  christos 	}
   6052   1.8  christos       else
   6053   1.7  christos 	return false;
   6054   1.7  christos 
   6055   1.7  christos     case MVE_VRMLALDAVH:
   6056   1.7  christos     case MVE_VMLADAV_T1:
   6057   1.7  christos     case MVE_VMLADAV_T2:
   6058   1.7  christos     case MVE_VMLALDAV:
   6059   1.7  christos       if ((arm_decode_field (given, 28, 28) == 1)
   6060   1.7  christos 	  && (arm_decode_field (given, 12, 12) == 1))
   6061   1.7  christos 	{
   6062   1.8  christos 	  *undefined_code = UNDEF_XCHG_UNS;
   6063   1.7  christos 	  return true;
   6064   1.7  christos 	}
   6065   1.8  christos       else
   6066   1.7  christos 	return false;
   6067   1.7  christos 
   6068   1.7  christos     case MVE_VQSHRN:
   6069   1.7  christos     case MVE_VQSHRUN:
   6070   1.7  christos     case MVE_VSHLL_T1:
   6071   1.7  christos     case MVE_VSHRN:
   6072   1.7  christos       {
   6073   1.7  christos 	unsigned long sz = arm_decode_field (given, 19, 20);
   6074   1.8  christos 	if (sz == 1)
   6075   1.7  christos 	  return false;
   6076   1.8  christos 	else if ((sz & 2) == 2)
   6077   1.7  christos 	  return false;
   6078   1.7  christos 	else
   6079   1.7  christos 	  {
   6080   1.8  christos 	    *undefined_code = UNDEF_SIZE;
   6081   1.7  christos 	    return true;
   6082   1.7  christos 	  }
   6083   1.7  christos       }
   6084   1.7  christos       break;
   6085   1.7  christos 
   6086   1.7  christos     case MVE_VQSHL_T2:
   6087   1.7  christos     case MVE_VQSHLU_T3:
   6088   1.7  christos     case MVE_VRSHR:
   6089   1.7  christos     case MVE_VSHL_T1:
   6090   1.7  christos     case MVE_VSHR:
   6091   1.7  christos     case MVE_VSLI:
   6092   1.7  christos     case MVE_VSRI:
   6093   1.7  christos       {
   6094   1.7  christos 	unsigned long sz = arm_decode_field (given, 19, 21);
   6095   1.8  christos 	if ((sz & 7) == 1)
   6096   1.7  christos 	  return false;
   6097   1.8  christos 	else if ((sz & 6) == 2)
   6098   1.7  christos 	  return false;
   6099   1.8  christos 	else if ((sz & 4) == 4)
   6100   1.7  christos 	  return false;
   6101   1.7  christos 	else
   6102   1.7  christos 	  {
   6103   1.8  christos 	    *undefined_code = UNDEF_SIZE;
   6104   1.7  christos 	    return true;
   6105   1.7  christos 	  }
   6106   1.7  christos       }
   6107   1.7  christos 
   6108   1.7  christos     case MVE_VQRSHRN:
   6109   1.7  christos     case MVE_VQRSHRUN:
   6110   1.7  christos       if (arm_decode_field (given, 19, 20) == 0)
   6111   1.7  christos 	{
   6112   1.8  christos 	  *undefined_code = UNDEF_SIZE_0;
   6113   1.7  christos 	  return true;
   6114   1.7  christos 	}
   6115   1.8  christos       else
   6116   1.7  christos 	return false;
   6117   1.7  christos 
   6118   1.7  christos     case MVE_VABS_VEC:
   6119   1.7  christos 	if (arm_decode_field (given, 18, 19) == 3)
   6120   1.7  christos 	{
   6121   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   6122   1.7  christos 	  return true;
   6123   1.7  christos 	}
   6124   1.8  christos 	else
   6125   1.7  christos 	  return false;
   6126   1.7  christos 
   6127   1.7  christos     case MVE_VQNEG:
   6128   1.7  christos     case MVE_VQABS:
   6129   1.7  christos     case MVE_VNEG_VEC:
   6130   1.7  christos     case MVE_VCLS:
   6131   1.7  christos     case MVE_VCLZ:
   6132   1.7  christos       if (arm_decode_field (given, 18, 19) == 3)
   6133   1.7  christos 	{
   6134   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   6135   1.7  christos 	  return true;
   6136   1.7  christos 	}
   6137   1.8  christos       else
   6138   1.7  christos 	return false;
   6139   1.7  christos 
   6140   1.7  christos     case MVE_VREV16:
   6141   1.8  christos       if (arm_decode_field (given, 18, 19) == 0)
   6142   1.7  christos 	return false;
   6143   1.7  christos       else
   6144   1.7  christos 	{
   6145   1.8  christos 	  *undefined_code = UNDEF_SIZE_NOT_0;
   6146   1.7  christos 	  return true;
   6147   1.7  christos 	}
   6148   1.7  christos 
   6149   1.7  christos     case MVE_VREV32:
   6150   1.7  christos       {
   6151   1.7  christos 	unsigned long size = arm_decode_field (given, 18, 19);
   6152   1.7  christos 	if ((size & 2) == 2)
   6153   1.7  christos 	  {
   6154   1.8  christos 	    *undefined_code = UNDEF_SIZE_2;
   6155   1.7  christos 	    return true;
   6156   1.7  christos 	  }
   6157   1.8  christos 	else
   6158   1.7  christos 	  return false;
   6159   1.7  christos       }
   6160   1.7  christos 
   6161   1.7  christos     case MVE_VREV64:
   6162   1.8  christos       if (arm_decode_field (given, 18, 19) != 3)
   6163   1.7  christos 	return false;
   6164   1.7  christos       else
   6165   1.7  christos 	{
   6166   1.8  christos 	  *undefined_code = UNDEF_SIZE_3;
   6167   1.7  christos 	  return true;
   6168   1.7  christos 	}
   6169   1.7  christos 
   6170   1.8  christos     default:
   6171   1.7  christos       return false;
   6172   1.7  christos     }
   6173   1.7  christos }
   6174   1.7  christos 
   6175   1.7  christos /* Return FALSE if GIVEN is not an unpredictable encoding for MATCHED_INSN.
   6176   1.7  christos    Otherwise, return TRUE and set UNPREDICTABLE_CODE to give a reason as to
   6177   1.7  christos    why this encoding is unpredictable.  */
   6178   1.8  christos 
   6179   1.7  christos static bool
   6180   1.7  christos is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
   6181   1.7  christos 		      enum mve_unpredictable *unpredictable_code)
   6182   1.7  christos {
   6183   1.7  christos   *unpredictable_code = UNPRED_NONE;
   6184   1.7  christos 
   6185   1.7  christos   switch (matched_insn)
   6186   1.7  christos     {
   6187   1.7  christos     case MVE_VCMP_FP_T2:
   6188   1.7  christos     case MVE_VPT_FP_T2:
   6189   1.7  christos       if ((arm_decode_field (given, 12, 12) == 0)
   6190   1.7  christos 	  && (arm_decode_field (given, 5, 5) == 1))
   6191   1.7  christos 	{
   6192   1.8  christos 	  *unpredictable_code = UNPRED_FCA_0_FCB_1;
   6193   1.7  christos 	  return true;
   6194   1.7  christos 	}
   6195   1.8  christos       else
   6196   1.7  christos 	return false;
   6197   1.7  christos 
   6198   1.7  christos     case MVE_VPT_VEC_T4:
   6199   1.7  christos     case MVE_VPT_VEC_T5:
   6200   1.7  christos     case MVE_VPT_VEC_T6:
   6201   1.7  christos     case MVE_VCMP_VEC_T4:
   6202   1.7  christos     case MVE_VCMP_VEC_T5:
   6203   1.7  christos     case MVE_VCMP_VEC_T6:
   6204   1.7  christos       if (arm_decode_field (given, 0, 3) == 0xd)
   6205   1.7  christos 	{
   6206   1.8  christos 	  *unpredictable_code = UNPRED_R13;
   6207   1.7  christos 	  return true;
   6208   1.7  christos 	}
   6209   1.8  christos       else
   6210   1.7  christos 	return false;
   6211   1.7  christos 
   6212   1.7  christos     case MVE_VDUP:
   6213   1.7  christos       {
   6214   1.7  christos 	unsigned long gpr = arm_decode_field (given, 12, 15);
   6215   1.7  christos 	if (gpr == 0xd)
   6216   1.7  christos 	  {
   6217   1.8  christos 	    *unpredictable_code = UNPRED_R13;
   6218   1.7  christos 	    return true;
   6219   1.7  christos 	  }
   6220   1.7  christos 	else if (gpr == 0xf)
   6221   1.7  christos 	  {
   6222   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6223   1.7  christos 	    return true;
   6224   1.7  christos 	  }
   6225   1.8  christos 
   6226   1.7  christos 	return false;
   6227   1.7  christos       }
   6228   1.7  christos 
   6229   1.7  christos     case MVE_VQADD_T2:
   6230   1.7  christos     case MVE_VQSUB_T2:
   6231   1.7  christos     case MVE_VMUL_FP_T2:
   6232   1.7  christos     case MVE_VMUL_VEC_T2:
   6233   1.7  christos     case MVE_VMLA:
   6234   1.7  christos     case MVE_VBRSR:
   6235   1.7  christos     case MVE_VADD_FP_T2:
   6236   1.7  christos     case MVE_VSUB_FP_T2:
   6237   1.7  christos     case MVE_VADD_VEC_T2:
   6238   1.7  christos     case MVE_VSUB_VEC_T2:
   6239   1.7  christos     case MVE_VQRSHL_T2:
   6240   1.7  christos     case MVE_VQSHL_T1:
   6241   1.7  christos     case MVE_VRSHL_T2:
   6242   1.7  christos     case MVE_VSHL_T2:
   6243   1.7  christos     case MVE_VSHLC:
   6244   1.7  christos     case MVE_VQDMLAH:
   6245   1.7  christos     case MVE_VQRDMLAH:
   6246   1.7  christos     case MVE_VQDMLASH:
   6247   1.7  christos     case MVE_VQRDMLASH:
   6248   1.7  christos     case MVE_VQDMULH_T3:
   6249   1.7  christos     case MVE_VQRDMULH_T4:
   6250   1.7  christos     case MVE_VMLAS:
   6251   1.7  christos     case MVE_VFMA_FP_SCALAR:
   6252   1.7  christos     case MVE_VFMAS_FP_SCALAR:
   6253   1.7  christos     case MVE_VHADD_T2:
   6254   1.7  christos     case MVE_VHSUB_T2:
   6255   1.7  christos       {
   6256   1.7  christos 	unsigned long gpr = arm_decode_field (given, 0, 3);
   6257   1.7  christos 	if (gpr == 0xd)
   6258   1.7  christos 	  {
   6259   1.8  christos 	    *unpredictable_code = UNPRED_R13;
   6260   1.7  christos 	    return true;
   6261   1.7  christos 	  }
   6262   1.7  christos 	else if (gpr == 0xf)
   6263   1.7  christos 	  {
   6264   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6265   1.7  christos 	    return true;
   6266   1.7  christos 	  }
   6267   1.8  christos 
   6268   1.7  christos 	return false;
   6269   1.7  christos       }
   6270   1.7  christos 
   6271   1.7  christos     case MVE_VLD2:
   6272   1.7  christos     case MVE_VST2:
   6273   1.7  christos       {
   6274   1.7  christos 	unsigned long rn = arm_decode_field (given, 16, 19);
   6275   1.7  christos 
   6276   1.7  christos 	if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
   6277   1.7  christos 	  {
   6278   1.8  christos 	    *unpredictable_code = UNPRED_R13_AND_WB;
   6279   1.7  christos 	    return true;
   6280   1.7  christos 	  }
   6281   1.7  christos 
   6282   1.7  christos 	if (rn == 0xf)
   6283   1.7  christos 	  {
   6284   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6285   1.7  christos 	    return true;
   6286   1.7  christos 	  }
   6287   1.7  christos 
   6288   1.7  christos 	if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 6)
   6289   1.7  christos 	  {
   6290   1.8  christos 	    *unpredictable_code = UNPRED_Q_GT_6;
   6291   1.7  christos 	    return true;
   6292   1.7  christos 	  }
   6293   1.8  christos 	else
   6294   1.7  christos 	  return false;
   6295   1.7  christos       }
   6296   1.7  christos 
   6297   1.7  christos     case MVE_VLD4:
   6298   1.7  christos     case MVE_VST4:
   6299   1.7  christos       {
   6300   1.7  christos 	unsigned long rn = arm_decode_field (given, 16, 19);
   6301   1.7  christos 
   6302   1.7  christos 	if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
   6303   1.7  christos 	  {
   6304   1.8  christos 	    *unpredictable_code = UNPRED_R13_AND_WB;
   6305   1.7  christos 	    return true;
   6306   1.7  christos 	  }
   6307   1.7  christos 
   6308   1.7  christos 	if (rn == 0xf)
   6309   1.7  christos 	  {
   6310   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6311   1.7  christos 	    return true;
   6312   1.7  christos 	  }
   6313   1.7  christos 
   6314   1.7  christos 	if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 4)
   6315   1.7  christos 	  {
   6316   1.8  christos 	    *unpredictable_code = UNPRED_Q_GT_4;
   6317   1.7  christos 	    return true;
   6318   1.7  christos 	  }
   6319   1.8  christos 	else
   6320   1.7  christos 	  return false;
   6321   1.7  christos       }
   6322   1.7  christos 
   6323   1.7  christos     case MVE_VLDRB_T5:
   6324   1.7  christos     case MVE_VLDRH_T6:
   6325   1.7  christos     case MVE_VLDRW_T7:
   6326   1.7  christos     case MVE_VSTRB_T5:
   6327   1.7  christos     case MVE_VSTRH_T6:
   6328   1.7  christos     case MVE_VSTRW_T7:
   6329   1.7  christos       {
   6330   1.7  christos 	unsigned long rn = arm_decode_field (given, 16, 19);
   6331   1.7  christos 
   6332   1.7  christos 	if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
   6333   1.7  christos 	  {
   6334   1.8  christos 	    *unpredictable_code = UNPRED_R13_AND_WB;
   6335   1.7  christos 	    return true;
   6336   1.7  christos 	  }
   6337   1.7  christos 	else if (rn == 0xf)
   6338   1.7  christos 	  {
   6339   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6340   1.7  christos 	    return true;
   6341   1.7  christos 	  }
   6342   1.8  christos 	else
   6343   1.7  christos 	  return false;
   6344   1.7  christos       }
   6345   1.7  christos 
   6346   1.7  christos     case MVE_VLDRB_GATHER_T1:
   6347   1.7  christos       if (arm_decode_field (given, 0, 0) == 1)
   6348   1.7  christos 	{
   6349   1.8  christos 	  *unpredictable_code = UNPRED_OS;
   6350   1.7  christos 	  return true;
   6351   1.7  christos 	}
   6352   1.7  christos 
   6353   1.7  christos       /*  fall through.  */
   6354   1.7  christos       /* To handle common code with T2-T4 variants.  */
   6355   1.7  christos     case MVE_VLDRH_GATHER_T2:
   6356   1.7  christos     case MVE_VLDRW_GATHER_T3:
   6357   1.7  christos     case MVE_VLDRD_GATHER_T4:
   6358   1.7  christos       {
   6359   1.7  christos 	unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6360   1.7  christos 	unsigned long qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6361   1.7  christos 
   6362   1.7  christos 	if (qd == qm)
   6363   1.7  christos 	  {
   6364   1.8  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQUAL;
   6365   1.7  christos 	    return true;
   6366   1.7  christos 	  }
   6367   1.7  christos 
   6368   1.7  christos 	if (arm_decode_field (given, 16, 19) == 0xf)
   6369   1.7  christos 	  {
   6370   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6371   1.7  christos 	    return true;
   6372   1.7  christos 	  }
   6373   1.8  christos 
   6374   1.7  christos 	return false;
   6375   1.7  christos       }
   6376   1.7  christos 
   6377   1.7  christos     case MVE_VLDRW_GATHER_T5:
   6378   1.7  christos     case MVE_VLDRD_GATHER_T6:
   6379   1.7  christos       {
   6380   1.7  christos 	unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6381   1.7  christos 	unsigned long qm = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6382   1.7  christos 
   6383   1.7  christos 	if (qd == qm)
   6384   1.7  christos 	  {
   6385   1.8  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQUAL;
   6386   1.7  christos 	    return true;
   6387   1.7  christos 	  }
   6388   1.8  christos 	else
   6389   1.7  christos 	  return false;
   6390   1.7  christos       }
   6391   1.7  christos 
   6392   1.7  christos     case MVE_VSTRB_SCATTER_T1:
   6393   1.7  christos       if (arm_decode_field (given, 16, 19) == 0xf)
   6394   1.7  christos 	{
   6395   1.8  christos 	  *unpredictable_code = UNPRED_R15;
   6396   1.7  christos 	  return true;
   6397   1.7  christos 	}
   6398   1.7  christos       else if (arm_decode_field (given, 0, 0) == 1)
   6399   1.7  christos 	{
   6400   1.8  christos 	  *unpredictable_code = UNPRED_OS;
   6401   1.7  christos 	  return true;
   6402   1.7  christos 	}
   6403   1.8  christos       else
   6404   1.7  christos 	return false;
   6405   1.7  christos 
   6406   1.7  christos     case MVE_VSTRH_SCATTER_T2:
   6407   1.7  christos     case MVE_VSTRW_SCATTER_T3:
   6408   1.7  christos     case MVE_VSTRD_SCATTER_T4:
   6409   1.7  christos       if (arm_decode_field (given, 16, 19) == 0xf)
   6410   1.7  christos 	{
   6411   1.8  christos 	  *unpredictable_code = UNPRED_R15;
   6412   1.7  christos 	  return true;
   6413   1.7  christos 	}
   6414   1.8  christos       else
   6415   1.7  christos 	return false;
   6416   1.7  christos 
   6417   1.7  christos     case MVE_VMOV2_VEC_LANE_TO_GP:
   6418   1.7  christos     case MVE_VMOV2_GP_TO_VEC_LANE:
   6419   1.7  christos     case MVE_VCVT_BETWEEN_FP_INT:
   6420   1.7  christos     case MVE_VCVT_FROM_FP_TO_INT:
   6421   1.7  christos       {
   6422   1.7  christos 	unsigned long rt = arm_decode_field (given, 0, 3);
   6423   1.7  christos 	unsigned long rt2 = arm_decode_field (given, 16, 19);
   6424   1.7  christos 
   6425   1.7  christos 	if ((rt == 0xd) || (rt2 == 0xd))
   6426   1.7  christos 	  {
   6427   1.8  christos 	    *unpredictable_code = UNPRED_R13;
   6428   1.7  christos 	    return true;
   6429   1.7  christos 	  }
   6430   1.7  christos 	else if ((rt == 0xf) || (rt2 == 0xf))
   6431   1.7  christos 	  {
   6432   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6433   1.7  christos 	    return true;
   6434   1.8  christos 	  }
   6435   1.7  christos 	else if (rt == rt2 && matched_insn != MVE_VMOV2_GP_TO_VEC_LANE)
   6436   1.7  christos 	  {
   6437   1.8  christos 	    *unpredictable_code = UNPRED_GP_REGS_EQUAL;
   6438   1.7  christos 	    return true;
   6439   1.7  christos 	  }
   6440   1.8  christos 
   6441   1.7  christos 	return false;
   6442   1.7  christos       }
   6443   1.7  christos 
   6444   1.7  christos     case MVE_VMAXV:
   6445   1.7  christos     case MVE_VMAXAV:
   6446   1.7  christos     case MVE_VMAXNMV_FP:
   6447   1.7  christos     case MVE_VMAXNMAV_FP:
   6448   1.7  christos     case MVE_VMINNMV_FP:
   6449   1.7  christos     case MVE_VMINNMAV_FP:
   6450   1.7  christos     case MVE_VMINV:
   6451   1.7  christos     case MVE_VMINAV:
   6452   1.7  christos     case MVE_VABAV:
   6453   1.7  christos     case MVE_VMOV_HFP_TO_GP:
   6454   1.7  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   6455   1.7  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   6456   1.7  christos       {
   6457   1.7  christos 	unsigned long rda = arm_decode_field (given, 12, 15);
   6458   1.7  christos 	if (rda == 0xd)
   6459   1.7  christos 	  {
   6460   1.8  christos 	    *unpredictable_code = UNPRED_R13;
   6461   1.7  christos 	    return true;
   6462   1.7  christos 	  }
   6463   1.7  christos 	else if (rda == 0xf)
   6464   1.7  christos 	  {
   6465   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6466   1.7  christos 	    return true;
   6467   1.7  christos 	  }
   6468   1.8  christos 
   6469   1.7  christos 	return false;
   6470   1.7  christos       }
   6471   1.7  christos 
   6472   1.7  christos     case MVE_VMULL_INT:
   6473   1.7  christos       {
   6474   1.7  christos 	unsigned long Qd;
   6475   1.7  christos 	unsigned long Qm;
   6476   1.7  christos 	unsigned long Qn;
   6477   1.7  christos 
   6478   1.7  christos 	if (arm_decode_field (given, 20, 21) == 2)
   6479   1.7  christos 	  {
   6480   1.7  christos 	    Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6481   1.7  christos 	    Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6482   1.7  christos 	    Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6483   1.7  christos 
   6484   1.7  christos 	    if ((Qd == Qn) || (Qd == Qm))
   6485   1.7  christos 	      {
   6486   1.8  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
   6487   1.7  christos 		return true;
   6488   1.7  christos 	      }
   6489   1.8  christos 	    else
   6490   1.7  christos 	      return false;
   6491   1.7  christos 	  }
   6492   1.8  christos 	else
   6493   1.7  christos 	  return false;
   6494   1.7  christos       }
   6495   1.7  christos 
   6496   1.7  christos     case MVE_VCMUL_FP:
   6497   1.7  christos     case MVE_VQDMULL_T1:
   6498   1.7  christos       {
   6499   1.7  christos 	unsigned long Qd;
   6500   1.7  christos 	unsigned long Qm;
   6501   1.7  christos 	unsigned long Qn;
   6502   1.7  christos 
   6503   1.7  christos 	if (arm_decode_field (given, 28, 28) == 1)
   6504   1.7  christos 	  {
   6505   1.7  christos 	    Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6506   1.7  christos 	    Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6507   1.7  christos 	    Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6508   1.7  christos 
   6509   1.7  christos 	    if ((Qd == Qn) || (Qd == Qm))
   6510   1.7  christos 	      {
   6511   1.8  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6512   1.7  christos 		return true;
   6513   1.7  christos 	      }
   6514   1.8  christos 	    else
   6515   1.7  christos 	      return false;
   6516   1.7  christos 	  }
   6517   1.8  christos 	else
   6518   1.7  christos 	  return false;
   6519   1.7  christos       }
   6520   1.7  christos 
   6521   1.7  christos     case MVE_VQDMULL_T2:
   6522   1.7  christos       {
   6523   1.7  christos 	unsigned long gpr = arm_decode_field (given, 0, 3);
   6524   1.7  christos 	if (gpr == 0xd)
   6525   1.7  christos 	  {
   6526   1.8  christos 	    *unpredictable_code = UNPRED_R13;
   6527   1.7  christos 	    return true;
   6528   1.7  christos 	  }
   6529   1.7  christos 	else if (gpr == 0xf)
   6530   1.7  christos 	  {
   6531   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6532   1.7  christos 	    return true;
   6533   1.7  christos 	  }
   6534   1.7  christos 
   6535   1.7  christos 	if (arm_decode_field (given, 28, 28) == 1)
   6536   1.7  christos 	  {
   6537   1.7  christos 	    unsigned long Qd
   6538   1.7  christos 	      = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6539   1.7  christos 	    unsigned long Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6540   1.7  christos 
   6541   1.7  christos 	    if (Qd == Qn)
   6542   1.7  christos 	      {
   6543   1.8  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6544   1.7  christos 		return true;
   6545   1.7  christos 	      }
   6546   1.8  christos 	    else
   6547   1.7  christos 	      return false;
   6548   1.7  christos 	  }
   6549   1.8  christos 
   6550   1.7  christos 	return false;
   6551   1.7  christos       }
   6552   1.7  christos 
   6553   1.7  christos     case MVE_VMLSLDAV:
   6554   1.7  christos     case MVE_VRMLSLDAVH:
   6555   1.7  christos     case MVE_VMLALDAV:
   6556   1.7  christos     case MVE_VADDLV:
   6557   1.7  christos       if (arm_decode_field (given, 20, 22) == 6)
   6558   1.7  christos 	{
   6559   1.8  christos 	  *unpredictable_code = UNPRED_R13;
   6560   1.7  christos 	  return true;
   6561   1.7  christos 	}
   6562   1.8  christos       else
   6563   1.7  christos 	return false;
   6564   1.7  christos 
   6565   1.7  christos     case MVE_VDWDUP:
   6566   1.7  christos     case MVE_VIWDUP:
   6567   1.7  christos       if (arm_decode_field (given, 1, 3) == 6)
   6568   1.7  christos 	{
   6569   1.8  christos 	  *unpredictable_code = UNPRED_R13;
   6570   1.7  christos 	  return true;
   6571   1.7  christos 	}
   6572   1.8  christos       else
   6573   1.7  christos 	return false;
   6574   1.7  christos 
   6575   1.7  christos     case MVE_VCADD_VEC:
   6576   1.7  christos     case MVE_VHCADD:
   6577   1.7  christos       {
   6578   1.7  christos 	unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6579   1.7  christos 	unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6580   1.7  christos 	if ((Qd == Qm) && arm_decode_field (given, 20, 21) == 2)
   6581   1.7  christos 	  {
   6582   1.8  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
   6583   1.7  christos 	    return true;
   6584   1.7  christos 	  }
   6585   1.8  christos 	else
   6586   1.7  christos 	  return false;
   6587   1.7  christos       }
   6588   1.7  christos 
   6589   1.7  christos     case MVE_VCADD_FP:
   6590   1.7  christos       {
   6591   1.7  christos 	unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6592   1.7  christos 	unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6593   1.7  christos 	if ((Qd == Qm) && arm_decode_field (given, 20, 20) == 1)
   6594   1.7  christos 	  {
   6595   1.8  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6596   1.7  christos 	    return true;
   6597   1.7  christos 	  }
   6598   1.8  christos 	else
   6599   1.7  christos 	  return false;
   6600   1.7  christos       }
   6601   1.7  christos 
   6602   1.7  christos     case MVE_VCMLA_FP:
   6603   1.7  christos       {
   6604   1.7  christos 	unsigned long Qda;
   6605   1.7  christos 	unsigned long Qm;
   6606   1.7  christos 	unsigned long Qn;
   6607   1.7  christos 
   6608   1.7  christos 	if (arm_decode_field (given, 20, 20) == 1)
   6609   1.7  christos 	  {
   6610   1.7  christos 	    Qda = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6611   1.7  christos 	    Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
   6612   1.7  christos 	    Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
   6613   1.7  christos 
   6614   1.7  christos 	    if ((Qda == Qn) || (Qda == Qm))
   6615   1.7  christos 	      {
   6616   1.8  christos 		*unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
   6617   1.7  christos 		return true;
   6618   1.7  christos 	      }
   6619   1.8  christos 	    else
   6620   1.7  christos 	      return false;
   6621   1.7  christos 	  }
   6622   1.8  christos 	else
   6623   1.7  christos 	  return false;
   6624   1.7  christos 
   6625   1.7  christos       }
   6626   1.7  christos 
   6627   1.7  christos     case MVE_VCTP:
   6628   1.7  christos       if (arm_decode_field (given, 16, 19) == 0xd)
   6629   1.7  christos 	{
   6630   1.8  christos 	  *unpredictable_code = UNPRED_R13;
   6631   1.7  christos 	  return true;
   6632   1.7  christos 	}
   6633   1.8  christos       else
   6634   1.7  christos 	return false;
   6635   1.7  christos 
   6636   1.7  christos     case MVE_VREV64:
   6637   1.7  christos       {
   6638   1.7  christos 	unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
   6639   1.7  christos 	unsigned long qm = arm_decode_field_multiple (given, 1, 3, 6, 6);
   6640   1.7  christos 
   6641   1.7  christos 	if (qd == qm)
   6642   1.7  christos 	  {
   6643   1.8  christos 	    *unpredictable_code = UNPRED_Q_REGS_EQUAL;
   6644   1.7  christos 	    return true;
   6645   1.7  christos 	  }
   6646   1.8  christos 	else
   6647   1.7  christos 	  return false;
   6648   1.7  christos       }
   6649   1.7  christos 
   6650   1.7  christos     case MVE_LSLL:
   6651   1.7  christos     case MVE_LSLLI:
   6652   1.7  christos     case MVE_LSRL:
   6653   1.7  christos     case MVE_ASRL:
   6654   1.7  christos     case MVE_ASRLI:
   6655   1.7  christos     case MVE_UQSHLL:
   6656   1.7  christos     case MVE_UQRSHLL:
   6657   1.7  christos     case MVE_URSHRL:
   6658   1.7  christos     case MVE_SRSHRL:
   6659   1.7  christos     case MVE_SQSHLL:
   6660   1.7  christos     case MVE_SQRSHRL:
   6661   1.7  christos       {
   6662   1.7  christos 	unsigned long gpr = arm_decode_field (given, 9, 11);
   6663   1.7  christos 	gpr = ((gpr << 1) | 1);
   6664   1.7  christos 	if (gpr == 0xd)
   6665   1.7  christos 	  {
   6666   1.8  christos 	    *unpredictable_code = UNPRED_R13;
   6667   1.7  christos 	    return true;
   6668   1.7  christos 	  }
   6669   1.7  christos 	else if (gpr == 0xf)
   6670   1.7  christos 	  {
   6671   1.8  christos 	    *unpredictable_code = UNPRED_R15;
   6672   1.7  christos 	    return true;
   6673   1.7  christos 	  }
   6674   1.8  christos 
   6675   1.7  christos 	return false;
   6676   1.7  christos       }
   6677   1.7  christos 
   6678   1.8  christos     default:
   6679   1.7  christos       return false;
   6680   1.7  christos     }
   6681   1.7  christos }
   6682   1.7  christos 
   6683   1.7  christos static void
   6684   1.7  christos print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
   6685   1.7  christos {
   6686   1.7  christos   unsigned long op1 = arm_decode_field (given, 21, 22);
   6687   1.7  christos   unsigned long op2 = arm_decode_field (given, 5, 6);
   6688   1.7  christos   unsigned long h = arm_decode_field (given, 16, 16);
   6689   1.7  christos   unsigned long index_operand, esize, targetBeat, idx;
   6690   1.8  christos   void *stream = info->stream;
   6691   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6692   1.7  christos 
   6693   1.7  christos   if ((op1 & 0x2) == 0x2)
   6694   1.7  christos     {
   6695   1.7  christos       index_operand = op2;
   6696   1.7  christos       esize = 8;
   6697   1.7  christos     }
   6698   1.7  christos   else if (((op1 & 0x2) == 0x0) && ((op2 & 0x1) == 0x1))
   6699   1.7  christos     {
   6700   1.7  christos       index_operand = op2  >> 1;
   6701   1.7  christos       esize = 16;
   6702   1.7  christos     }
   6703   1.7  christos   else if (((op1 & 0x2) == 0) && ((op2 & 0x3) == 0))
   6704   1.7  christos     {
   6705   1.7  christos       index_operand = 0;
   6706   1.7  christos       esize = 32;
   6707   1.7  christos     }
   6708   1.7  christos   else
   6709   1.8  christos     {
   6710   1.7  christos       func (stream, dis_style_text, "<undefined index>");
   6711   1.7  christos       return;
   6712   1.7  christos     }
   6713   1.7  christos 
   6714   1.7  christos   targetBeat =  (op1 & 0x1) | (h << 1);
   6715   1.7  christos   idx = index_operand + targetBeat * (32/esize);
   6716   1.8  christos 
   6717   1.7  christos   func (stream, dis_style_immediate, "%lu", idx);
   6718   1.7  christos }
   6719   1.7  christos 
   6720   1.7  christos /* Print neon and mve 8-bit immediate that can be a 8, 16, 32, or 64-bits
   6721   1.7  christos    in length and integer of floating-point type.  */
   6722   1.7  christos static void
   6723   1.7  christos print_simd_imm8 (struct disassemble_info *info, unsigned long given,
   6724   1.7  christos 		 unsigned int ibit_loc, const struct mopcode32 *insn)
   6725   1.7  christos {
   6726   1.7  christos   int bits = 0;
   6727   1.7  christos   int cmode = (given >> 8) & 0xf;
   6728   1.7  christos   int op = (given >> 5) & 0x1;
   6729   1.7  christos   unsigned long value = 0, hival = 0;
   6730   1.7  christos   unsigned shift;
   6731   1.7  christos   int size = 0;
   6732   1.7  christos   int isfloat = 0;
   6733   1.8  christos   void *stream = info->stream;
   6734   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6735   1.7  christos 
   6736   1.7  christos   /* On Neon the 'i' bit is at bit 24, on mve it is
   6737   1.7  christos      at bit 28.  */
   6738   1.7  christos   bits |= ((given >> ibit_loc) & 1) << 7;
   6739   1.7  christos   bits |= ((given >> 16) & 7) << 4;
   6740   1.7  christos   bits |= ((given >> 0) & 15) << 0;
   6741   1.7  christos 
   6742   1.7  christos   if (cmode < 8)
   6743   1.7  christos     {
   6744   1.7  christos       shift = (cmode >> 1) & 3;
   6745   1.7  christos       value = (unsigned long) bits << (8 * shift);
   6746   1.7  christos       size = 32;
   6747   1.7  christos     }
   6748   1.7  christos   else if (cmode < 12)
   6749   1.7  christos     {
   6750   1.7  christos       shift = (cmode >> 1) & 1;
   6751   1.7  christos       value = (unsigned long) bits << (8 * shift);
   6752   1.7  christos       size = 16;
   6753   1.7  christos     }
   6754   1.7  christos   else if (cmode < 14)
   6755   1.7  christos     {
   6756   1.7  christos       shift = (cmode & 1) + 1;
   6757   1.7  christos       value = (unsigned long) bits << (8 * shift);
   6758   1.7  christos       value |= (1ul << (8 * shift)) - 1;
   6759   1.7  christos       size = 32;
   6760   1.7  christos     }
   6761   1.7  christos   else if (cmode == 14)
   6762   1.7  christos     {
   6763   1.7  christos       if (op)
   6764   1.7  christos 	{
   6765   1.7  christos 	  /* Bit replication into bytes.  */
   6766   1.7  christos 	  int ix;
   6767   1.7  christos 	  unsigned long mask;
   6768   1.7  christos 
   6769   1.7  christos 	  value = 0;
   6770   1.7  christos 	  hival = 0;
   6771   1.7  christos 	  for (ix = 7; ix >= 0; ix--)
   6772   1.7  christos 	    {
   6773   1.7  christos 	      mask = ((bits >> ix) & 1) ? 0xff : 0;
   6774   1.7  christos 	      if (ix <= 3)
   6775   1.7  christos 		value = (value << 8) | mask;
   6776   1.7  christos 	      else
   6777   1.7  christos 		hival = (hival << 8) | mask;
   6778   1.7  christos 	    }
   6779   1.7  christos 	  size = 64;
   6780   1.7  christos 	}
   6781   1.7  christos       else
   6782   1.7  christos 	{
   6783   1.7  christos 	  /* Byte replication.  */
   6784   1.7  christos 	  value = (unsigned long) bits;
   6785   1.7  christos 	  size = 8;
   6786   1.7  christos 	}
   6787   1.7  christos     }
   6788   1.7  christos   else if (!op)
   6789   1.7  christos     {
   6790   1.7  christos       /* Floating point encoding.  */
   6791   1.7  christos       int tmp;
   6792   1.7  christos 
   6793   1.7  christos       value = (unsigned long)  (bits & 0x7f) << 19;
   6794   1.7  christos       value |= (unsigned long) (bits & 0x80) << 24;
   6795   1.7  christos       tmp = bits & 0x40 ? 0x3c : 0x40;
   6796   1.7  christos       value |= (unsigned long) tmp << 24;
   6797   1.7  christos       size = 32;
   6798   1.7  christos       isfloat = 1;
   6799   1.7  christos     }
   6800   1.7  christos   else
   6801   1.8  christos     {
   6802   1.7  christos       func (stream, dis_style_text, "<illegal constant %.8x:%x:%x>",
   6803   1.7  christos 	    bits, cmode, op);
   6804   1.7  christos       size = 32;
   6805   1.7  christos       return;
   6806   1.7  christos     }
   6807   1.7  christos 
   6808   1.7  christos   /* printU determines whether the immediate value should be printed as
   6809   1.7  christos      unsigned.  */
   6810   1.7  christos   unsigned printU = 0;
   6811   1.7  christos   switch (insn->mve_op)
   6812   1.7  christos     {
   6813   1.7  christos     default:
   6814   1.7  christos       break;
   6815   1.7  christos     /* We want this for instructions that don't have a 'signed' type.  */
   6816   1.7  christos     case MVE_VBIC_IMM:
   6817   1.7  christos     case MVE_VORR_IMM:
   6818   1.7  christos     case MVE_VMVN_IMM:
   6819   1.7  christos     case MVE_VMOV_IMM_TO_VEC:
   6820   1.7  christos       printU = 1;
   6821   1.7  christos       break;
   6822   1.7  christos     }
   6823   1.7  christos   switch (size)
   6824   1.7  christos     {
   6825   1.8  christos     case 8:
   6826   1.8  christos       func (stream, dis_style_immediate, "#%ld", value);
   6827   1.7  christos       func (stream, dis_style_comment_start, "\t@ 0x%.2lx", value);
   6828   1.7  christos       break;
   6829   1.7  christos 
   6830   1.8  christos     case 16:
   6831   1.8  christos       func (stream, dis_style_immediate, printU ? "#%lu" : "#%ld", value);
   6832   1.7  christos       func (stream, dis_style_comment_start, "\t@ 0x%.4lx", value);
   6833   1.7  christos       break;
   6834   1.7  christos 
   6835   1.7  christos     case 32:
   6836   1.7  christos       if (isfloat)
   6837   1.7  christos 	{
   6838   1.7  christos 	  unsigned char valbytes[4];
   6839   1.7  christos 	  double fvalue;
   6840   1.7  christos 
   6841   1.7  christos 	  /* Do this a byte at a time so we don't have to
   6842   1.7  christos 	     worry about the host's endianness.  */
   6843   1.7  christos 	  valbytes[0] = value & 0xff;
   6844   1.7  christos 	  valbytes[1] = (value >> 8) & 0xff;
   6845   1.7  christos 	  valbytes[2] = (value >> 16) & 0xff;
   6846   1.7  christos 	  valbytes[3] = (value >> 24) & 0xff;
   6847   1.7  christos 
   6848   1.7  christos 	  floatformat_to_double
   6849   1.7  christos 	    (& floatformat_ieee_single_little, valbytes,
   6850   1.7  christos 	     & fvalue);
   6851   1.8  christos 
   6852   1.8  christos 	  func (stream, dis_style_immediate, "#%.7g", fvalue);
   6853   1.7  christos 	  func (stream, dis_style_comment_start, "\t@ 0x%.8lx", value);
   6854   1.7  christos 	}
   6855   1.8  christos       else
   6856   1.8  christos 	{
   6857   1.8  christos 	  func (stream, dis_style_immediate,
   6858   1.8  christos 		printU ? "#%lu" : "#%ld",
   6859   1.8  christos 		(long) (((value & 0x80000000L) != 0)
   6860   1.8  christos 			&& !printU
   6861   1.8  christos 			? value | ~0xffffffffL : value));
   6862   1.8  christos 	  func (stream, dis_style_comment_start, "\t@ 0x%.8lx", value);
   6863   1.7  christos 	}
   6864   1.7  christos       break;
   6865   1.7  christos 
   6866   1.8  christos     case 64:
   6867   1.7  christos       func (stream, dis_style_immediate, "#0x%.8lx%.8lx", hival, value);
   6868   1.7  christos       break;
   6869   1.7  christos 
   6870   1.7  christos     default:
   6871   1.7  christos       abort ();
   6872   1.7  christos     }
   6873   1.7  christos 
   6874   1.7  christos }
   6875   1.7  christos 
   6876   1.7  christos static void
   6877   1.7  christos print_mve_undefined (struct disassemble_info *info,
   6878   1.7  christos 		     enum mve_undefined undefined_code)
   6879   1.7  christos {
   6880   1.8  christos   void *stream = info->stream;
   6881   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6882   1.8  christos   /* Initialize REASON to avoid compiler warning about uninitialized
   6883   1.8  christos      usage, though such usage should be impossible.  */
   6884   1.7  christos   const char *reason = "??";
   6885   1.7  christos 
   6886   1.7  christos   switch (undefined_code)
   6887   1.7  christos     {
   6888   1.8  christos     case UNDEF_SIZE:
   6889   1.7  christos       reason = "illegal size";
   6890   1.7  christos       break;
   6891   1.7  christos 
   6892   1.8  christos     case UNDEF_SIZE_0:
   6893   1.7  christos       reason = "size equals zero";
   6894   1.7  christos       break;
   6895   1.7  christos 
   6896   1.8  christos     case UNDEF_SIZE_2:
   6897   1.7  christos       reason = "size equals two";
   6898   1.7  christos       break;
   6899   1.7  christos 
   6900   1.8  christos     case UNDEF_SIZE_3:
   6901   1.7  christos       reason = "size equals three";
   6902   1.7  christos       break;
   6903   1.7  christos 
   6904   1.8  christos     case UNDEF_SIZE_LE_1:
   6905   1.7  christos       reason = "size <= 1";
   6906   1.7  christos       break;
   6907   1.7  christos 
   6908   1.8  christos     case UNDEF_SIZE_NOT_0:
   6909   1.7  christos       reason = "size not equal to 0";
   6910   1.7  christos       break;
   6911   1.7  christos 
   6912   1.8  christos     case UNDEF_SIZE_NOT_2:
   6913   1.7  christos       reason = "size not equal to 2";
   6914   1.7  christos       break;
   6915   1.7  christos 
   6916   1.8  christos     case UNDEF_SIZE_NOT_3:
   6917   1.7  christos       reason = "size not equal to 3";
   6918   1.7  christos       break;
   6919   1.7  christos 
   6920   1.8  christos     case UNDEF_NOT_UNS_SIZE_0:
   6921   1.7  christos       reason = "not unsigned and size = zero";
   6922   1.7  christos       break;
   6923   1.7  christos 
   6924   1.8  christos     case UNDEF_NOT_UNS_SIZE_1:
   6925   1.7  christos       reason = "not unsigned and size = one";
   6926   1.7  christos       break;
   6927   1.7  christos 
   6928   1.8  christos     case UNDEF_NOT_UNSIGNED:
   6929   1.7  christos       reason = "not unsigned";
   6930   1.7  christos       break;
   6931   1.7  christos 
   6932   1.8  christos     case UNDEF_VCVT_IMM6:
   6933   1.7  christos       reason = "invalid imm6";
   6934   1.7  christos       break;
   6935   1.7  christos 
   6936   1.8  christos     case UNDEF_VCVT_FSI_IMM6:
   6937   1.7  christos       reason = "fsi = 0 and invalid imm6";
   6938   1.7  christos       break;
   6939   1.7  christos 
   6940   1.8  christos     case UNDEF_BAD_OP1_OP2:
   6941   1.7  christos       reason = "bad size with op2 = 2 and op1 = 0 or 1";
   6942   1.7  christos       break;
   6943   1.7  christos 
   6944   1.8  christos     case UNDEF_BAD_U_OP1_OP2:
   6945   1.7  christos       reason = "unsigned with op2 = 0 and op1 = 0 or 1";
   6946   1.7  christos       break;
   6947   1.7  christos 
   6948   1.8  christos     case UNDEF_OP_0_BAD_CMODE:
   6949   1.7  christos       reason = "op field equal 0 and bad cmode";
   6950   1.7  christos       break;
   6951   1.7  christos 
   6952   1.8  christos     case UNDEF_XCHG_UNS:
   6953   1.7  christos       reason = "exchange and unsigned together";
   6954   1.7  christos       break;
   6955   1.7  christos 
   6956   1.8  christos     case UNDEF_NONE:
   6957   1.7  christos       reason = "";
   6958   1.7  christos       break;
   6959   1.7  christos     }
   6960   1.8  christos 
   6961   1.7  christos   func (stream, dis_style_text, "\t\tundefined instruction: %s", reason);
   6962   1.7  christos }
   6963   1.7  christos 
   6964   1.7  christos static void
   6965   1.7  christos print_mve_unpredictable (struct disassemble_info *info,
   6966   1.7  christos 			 enum mve_unpredictable unpredict_code)
   6967   1.7  christos {
   6968   1.8  christos   void *stream = info->stream;
   6969   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   6970   1.8  christos   /* Initialize REASON to avoid compiler warning about uninitialized
   6971   1.8  christos      usage, though such usage should be impossible.  */
   6972   1.7  christos   const char *reason = "??";
   6973   1.7  christos 
   6974   1.7  christos   switch (unpredict_code)
   6975   1.7  christos     {
   6976   1.8  christos     case UNPRED_IT_BLOCK:
   6977   1.7  christos       reason = "mve instruction in it block";
   6978   1.7  christos       break;
   6979   1.7  christos 
   6980   1.8  christos     case UNPRED_FCA_0_FCB_1:
   6981   1.7  christos       reason = "condition bits, fca = 0 and fcb = 1";
   6982   1.7  christos       break;
   6983   1.7  christos 
   6984   1.8  christos     case UNPRED_R13:
   6985   1.7  christos       reason = "use of r13 (sp)";
   6986   1.7  christos       break;
   6987   1.7  christos 
   6988   1.8  christos     case UNPRED_R15:
   6989   1.7  christos       reason = "use of r15 (pc)";
   6990   1.7  christos       break;
   6991   1.7  christos 
   6992   1.8  christos     case UNPRED_Q_GT_4:
   6993   1.7  christos       reason = "start register block > r4";
   6994   1.7  christos       break;
   6995   1.7  christos 
   6996   1.8  christos     case UNPRED_Q_GT_6:
   6997   1.7  christos       reason = "start register block > r6";
   6998   1.7  christos       break;
   6999   1.7  christos 
   7000   1.8  christos     case UNPRED_R13_AND_WB:
   7001   1.7  christos       reason = "use of r13 and write back";
   7002   1.7  christos       break;
   7003   1.7  christos 
   7004   1.8  christos     case UNPRED_Q_REGS_EQUAL:
   7005   1.7  christos       reason = "same vector register used for destination and other operand";
   7006   1.7  christos       break;
   7007   1.7  christos 
   7008   1.8  christos     case UNPRED_OS:
   7009   1.7  christos       reason = "use of offset scaled";
   7010   1.7  christos       break;
   7011   1.7  christos 
   7012   1.8  christos     case UNPRED_GP_REGS_EQUAL:
   7013   1.7  christos       reason = "same general-purpose register used for both operands";
   7014   1.7  christos       break;
   7015   1.7  christos 
   7016   1.8  christos     case UNPRED_Q_REGS_EQ_AND_SIZE_1:
   7017   1.7  christos       reason = "use of identical q registers and size = 1";
   7018   1.7  christos       break;
   7019   1.7  christos 
   7020   1.8  christos     case UNPRED_Q_REGS_EQ_AND_SIZE_2:
   7021   1.7  christos       reason = "use of identical q registers and size = 1";
   7022   1.7  christos       break;
   7023   1.7  christos 
   7024   1.8  christos     case UNPRED_NONE:
   7025   1.7  christos       reason = "";
   7026   1.7  christos       break;
   7027   1.8  christos     }
   7028   1.8  christos 
   7029   1.8  christos   func (stream, dis_style_comment_start, "%s: %s",
   7030   1.7  christos 	UNPREDICTABLE_INSTRUCTION, reason);
   7031   1.7  christos }
   7032   1.7  christos 
   7033   1.7  christos /* Print register block operand for mve vld2/vld4/vst2/vld4.  */
   7034   1.7  christos 
   7035   1.7  christos static void
   7036   1.7  christos print_mve_register_blocks (struct disassemble_info *info,
   7037   1.7  christos 			   unsigned long given,
   7038   1.7  christos 			   enum mve_instructions matched_insn)
   7039   1.7  christos {
   7040   1.8  christos   void *stream = info->stream;
   7041   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7042   1.7  christos 
   7043   1.7  christos   unsigned long q_reg_start = arm_decode_field_multiple (given,
   7044   1.7  christos 							 13, 15,
   7045   1.7  christos 							 22, 22);
   7046   1.7  christos   switch (matched_insn)
   7047   1.7  christos     {
   7048   1.7  christos     case MVE_VLD2:
   7049   1.7  christos     case MVE_VST2:
   7050   1.8  christos       if (q_reg_start <= 6)
   7051   1.8  christos 	{
   7052   1.8  christos 	  func (stream, dis_style_text, "{");
   7053   1.8  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start);
   7054   1.8  christos 	  func (stream, dis_style_text, ", ");
   7055   1.8  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 1);
   7056   1.8  christos 	  func (stream, dis_style_text, "}");
   7057   1.7  christos 	}
   7058   1.8  christos       else
   7059   1.7  christos 	func (stream, dis_style_text, "<illegal reg q%ld>", q_reg_start);
   7060   1.7  christos       break;
   7061   1.7  christos 
   7062   1.7  christos     case MVE_VLD4:
   7063   1.7  christos     case MVE_VST4:
   7064   1.8  christos       if (q_reg_start <= 4)
   7065   1.8  christos 	{
   7066   1.8  christos 	  func (stream, dis_style_text, "{");
   7067   1.8  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start);
   7068   1.8  christos 	  func (stream, dis_style_text, ", ");
   7069   1.8  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 1);
   7070   1.8  christos 	  func (stream, dis_style_text, ", ");
   7071   1.8  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 2);
   7072   1.8  christos 	  func (stream, dis_style_text, ", ");
   7073   1.8  christos 	  func (stream, dis_style_register, "q%ld", q_reg_start + 3);
   7074   1.8  christos 	  func (stream, dis_style_text, "}");
   7075   1.7  christos 	}
   7076   1.8  christos       else
   7077   1.7  christos 	func (stream, dis_style_text, "<illegal reg q%ld>", q_reg_start);
   7078   1.7  christos       break;
   7079   1.7  christos 
   7080   1.7  christos     default:
   7081   1.7  christos       break;
   7082   1.7  christos     }
   7083   1.7  christos }
   7084   1.7  christos 
   7085   1.7  christos static void
   7086   1.7  christos print_mve_rounding_mode (struct disassemble_info *info,
   7087   1.7  christos 			 unsigned long given,
   7088   1.7  christos 			 enum mve_instructions matched_insn)
   7089   1.7  christos {
   7090   1.8  christos   void *stream = info->stream;
   7091   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7092   1.7  christos 
   7093   1.7  christos   switch (matched_insn)
   7094   1.7  christos     {
   7095   1.7  christos     case MVE_VCVT_FROM_FP_TO_INT:
   7096   1.7  christos       {
   7097   1.7  christos 	switch (arm_decode_field (given, 8, 9))
   7098   1.7  christos 	  {
   7099   1.8  christos 	  case 0:
   7100   1.7  christos 	    func (stream, dis_style_mnemonic, "a");
   7101   1.7  christos 	    break;
   7102   1.7  christos 
   7103   1.8  christos 	  case 1:
   7104   1.7  christos 	    func (stream, dis_style_mnemonic, "n");
   7105   1.7  christos 	    break;
   7106   1.7  christos 
   7107   1.8  christos 	  case 2:
   7108   1.7  christos 	    func (stream, dis_style_mnemonic, "p");
   7109   1.7  christos 	    break;
   7110   1.7  christos 
   7111   1.8  christos 	  case 3:
   7112   1.7  christos 	    func (stream, dis_style_mnemonic, "m");
   7113   1.7  christos 	    break;
   7114   1.7  christos 
   7115   1.7  christos 	  default:
   7116   1.7  christos 	    break;
   7117   1.7  christos 	  }
   7118   1.7  christos       }
   7119   1.7  christos       break;
   7120   1.7  christos 
   7121   1.7  christos     case MVE_VRINT_FP:
   7122   1.7  christos       {
   7123   1.7  christos 	switch (arm_decode_field (given, 7, 9))
   7124   1.7  christos 	  {
   7125   1.8  christos 	  case 0:
   7126   1.7  christos 	    func (stream, dis_style_mnemonic, "n");
   7127   1.7  christos 	    break;
   7128   1.7  christos 
   7129   1.8  christos 	  case 1:
   7130   1.7  christos 	    func (stream, dis_style_mnemonic, "x");
   7131   1.7  christos 	    break;
   7132   1.7  christos 
   7133   1.8  christos 	  case 2:
   7134   1.7  christos 	    func (stream, dis_style_mnemonic, "a");
   7135   1.7  christos 	    break;
   7136   1.7  christos 
   7137   1.8  christos 	  case 3:
   7138   1.7  christos 	    func (stream, dis_style_mnemonic, "z");
   7139   1.7  christos 	    break;
   7140   1.7  christos 
   7141   1.8  christos 	  case 5:
   7142   1.7  christos 	    func (stream, dis_style_mnemonic, "m");
   7143   1.7  christos 	    break;
   7144   1.7  christos 
   7145   1.8  christos 	  case 7:
   7146   1.7  christos 	    func (stream, dis_style_mnemonic, "p");
   7147   1.7  christos 
   7148   1.7  christos 	  case 4:
   7149   1.7  christos 	  case 6:
   7150   1.7  christos 	  default:
   7151   1.7  christos 	    break;
   7152   1.7  christos 	  }
   7153   1.7  christos       }
   7154   1.7  christos       break;
   7155   1.7  christos 
   7156   1.7  christos     default:
   7157   1.7  christos       break;
   7158   1.7  christos     }
   7159   1.7  christos }
   7160   1.7  christos 
   7161   1.7  christos static void
   7162   1.7  christos print_mve_vcvt_size (struct disassemble_info *info,
   7163   1.7  christos 		     unsigned long given,
   7164   1.7  christos 		     enum mve_instructions matched_insn)
   7165   1.7  christos {
   7166   1.7  christos   unsigned long mode = 0;
   7167   1.8  christos   void *stream = info->stream;
   7168   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7169   1.7  christos 
   7170   1.7  christos   switch (matched_insn)
   7171   1.7  christos     {
   7172   1.7  christos     case MVE_VCVT_FP_FIX_VEC:
   7173   1.7  christos       {
   7174   1.7  christos 	mode = (((given & 0x200) >> 7)
   7175   1.7  christos 		| ((given & 0x10000000) >> 27)
   7176   1.7  christos 		| ((given & 0x100) >> 8));
   7177   1.7  christos 
   7178   1.7  christos 	switch (mode)
   7179   1.7  christos 	  {
   7180   1.8  christos 	  case 0:
   7181   1.7  christos 	    func (stream, dis_style_mnemonic, "f16.s16");
   7182   1.7  christos 	    break;
   7183   1.7  christos 
   7184   1.8  christos 	  case 1:
   7185   1.7  christos 	    func (stream, dis_style_mnemonic, "s16.f16");
   7186   1.7  christos 	    break;
   7187   1.7  christos 
   7188   1.8  christos 	  case 2:
   7189   1.7  christos 	    func (stream, dis_style_mnemonic, "f16.u16");
   7190   1.7  christos 	    break;
   7191   1.7  christos 
   7192   1.8  christos 	  case 3:
   7193   1.7  christos 	    func (stream, dis_style_mnemonic, "u16.f16");
   7194   1.7  christos 	    break;
   7195   1.7  christos 
   7196   1.8  christos 	  case 4:
   7197   1.7  christos 	    func (stream, dis_style_mnemonic, "f32.s32");
   7198   1.7  christos 	    break;
   7199   1.7  christos 
   7200   1.8  christos 	  case 5:
   7201   1.7  christos 	    func (stream, dis_style_mnemonic, "s32.f32");
   7202   1.7  christos 	    break;
   7203   1.7  christos 
   7204   1.8  christos 	  case 6:
   7205   1.7  christos 	    func (stream, dis_style_mnemonic, "f32.u32");
   7206   1.7  christos 	    break;
   7207   1.7  christos 
   7208   1.8  christos 	  case 7:
   7209   1.7  christos 	    func (stream, dis_style_mnemonic, "u32.f32");
   7210   1.7  christos 	    break;
   7211   1.7  christos 
   7212   1.7  christos 	  default:
   7213   1.7  christos 	    break;
   7214   1.7  christos 	  }
   7215   1.7  christos 	break;
   7216   1.7  christos       }
   7217   1.7  christos     case MVE_VCVT_BETWEEN_FP_INT:
   7218   1.7  christos       {
   7219   1.7  christos 	unsigned long size = arm_decode_field (given, 18, 19);
   7220   1.7  christos 	unsigned long op = arm_decode_field (given, 7, 8);
   7221   1.7  christos 
   7222   1.7  christos 	if (size == 1)
   7223   1.7  christos 	  {
   7224   1.7  christos 	    switch (op)
   7225   1.7  christos 	      {
   7226   1.8  christos 	      case 0:
   7227   1.7  christos 		func (stream, dis_style_mnemonic, "f16.s16");
   7228   1.7  christos 		break;
   7229   1.7  christos 
   7230   1.8  christos 	      case 1:
   7231   1.7  christos 		func (stream, dis_style_mnemonic, "f16.u16");
   7232   1.7  christos 		break;
   7233   1.7  christos 
   7234   1.8  christos 	      case 2:
   7235   1.7  christos 		func (stream, dis_style_mnemonic, "s16.f16");
   7236   1.7  christos 		break;
   7237   1.7  christos 
   7238   1.8  christos 	      case 3:
   7239   1.7  christos 		func (stream, dis_style_mnemonic, "u16.f16");
   7240   1.7  christos 		break;
   7241   1.7  christos 
   7242   1.7  christos 	      default:
   7243   1.7  christos 		break;
   7244   1.7  christos 	      }
   7245   1.7  christos 	  }
   7246   1.7  christos 	else if (size == 2)
   7247   1.7  christos 	  {
   7248   1.7  christos 	    switch (op)
   7249   1.7  christos 	      {
   7250   1.8  christos 	      case 0:
   7251   1.7  christos 		func (stream, dis_style_mnemonic, "f32.s32");
   7252   1.7  christos 		break;
   7253   1.7  christos 
   7254   1.8  christos 	      case 1:
   7255   1.7  christos 		func (stream, dis_style_mnemonic, "f32.u32");
   7256   1.7  christos 		break;
   7257   1.7  christos 
   7258   1.8  christos 	      case 2:
   7259   1.7  christos 		func (stream, dis_style_mnemonic, "s32.f32");
   7260   1.7  christos 		break;
   7261   1.7  christos 
   7262   1.8  christos 	      case 3:
   7263   1.7  christos 		func (stream, dis_style_mnemonic, "u32.f32");
   7264   1.7  christos 		break;
   7265   1.7  christos 	      }
   7266   1.7  christos 	  }
   7267   1.7  christos       }
   7268   1.7  christos       break;
   7269   1.7  christos 
   7270   1.7  christos     case MVE_VCVT_FP_HALF_FP:
   7271   1.7  christos       {
   7272   1.7  christos 	unsigned long op = arm_decode_field (given, 28, 28);
   7273   1.8  christos 	if (op == 0)
   7274   1.7  christos 	  func (stream, dis_style_mnemonic, "f16.f32");
   7275   1.8  christos 	else if (op == 1)
   7276   1.7  christos 	  func (stream, dis_style_mnemonic, "f32.f16");
   7277   1.7  christos       }
   7278   1.7  christos       break;
   7279   1.7  christos 
   7280   1.7  christos     case MVE_VCVT_FROM_FP_TO_INT:
   7281   1.7  christos       {
   7282   1.7  christos 	unsigned long size = arm_decode_field_multiple (given, 7, 7, 18, 19);
   7283   1.7  christos 
   7284   1.7  christos 	switch (size)
   7285   1.7  christos 	  {
   7286   1.8  christos 	  case 2:
   7287   1.7  christos 	    func (stream, dis_style_mnemonic, "s16.f16");
   7288   1.7  christos 	    break;
   7289   1.7  christos 
   7290   1.8  christos 	  case 3:
   7291   1.7  christos 	    func (stream, dis_style_mnemonic, "u16.f16");
   7292   1.7  christos 	    break;
   7293   1.7  christos 
   7294   1.8  christos 	  case 4:
   7295   1.7  christos 	    func (stream, dis_style_mnemonic, "s32.f32");
   7296   1.7  christos 	    break;
   7297   1.7  christos 
   7298   1.8  christos 	  case 5:
   7299   1.7  christos 	    func (stream, dis_style_mnemonic, "u32.f32");
   7300   1.7  christos 	    break;
   7301   1.7  christos 
   7302   1.7  christos 	  default:
   7303   1.7  christos 	    break;
   7304   1.7  christos 	  }
   7305   1.7  christos       }
   7306   1.7  christos       break;
   7307   1.7  christos 
   7308   1.7  christos     default:
   7309   1.7  christos       break;
   7310   1.7  christos     }
   7311   1.7  christos }
   7312   1.7  christos 
   7313   1.7  christos static void
   7314   1.7  christos print_mve_rotate (struct disassemble_info *info, unsigned long rot,
   7315   1.7  christos 		  unsigned long rot_width)
   7316   1.7  christos {
   7317   1.8  christos   void *stream = info->stream;
   7318   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7319   1.7  christos 
   7320   1.7  christos   if (rot_width == 1)
   7321   1.7  christos     {
   7322   1.7  christos       switch (rot)
   7323   1.7  christos 	{
   7324   1.8  christos 	case 0:
   7325   1.7  christos 	  func (stream, dis_style_immediate, "90");
   7326   1.7  christos 	  break;
   7327   1.8  christos 	case 1:
   7328   1.7  christos 	  func (stream, dis_style_immediate, "270");
   7329   1.7  christos 	  break;
   7330   1.7  christos 	default:
   7331   1.7  christos 	  break;
   7332   1.7  christos 	}
   7333   1.7  christos     }
   7334   1.1  christos   else if (rot_width == 2)
   7335   1.7  christos     {
   7336   1.7  christos       switch (rot)
   7337   1.7  christos 	{
   7338   1.8  christos 	case 0:
   7339   1.7  christos 	  func (stream, dis_style_immediate, "0");
   7340   1.7  christos 	  break;
   7341   1.8  christos 	case 1:
   7342   1.7  christos 	  func (stream, dis_style_immediate, "90");
   7343   1.7  christos 	  break;
   7344   1.8  christos 	case 2:
   7345   1.7  christos 	  func (stream, dis_style_immediate, "180");
   7346   1.7  christos 	  break;
   7347   1.8  christos 	case 3:
   7348   1.7  christos 	  func (stream, dis_style_immediate, "270");
   7349   1.7  christos 	  break;
   7350   1.7  christos 	default:
   7351   1.7  christos 	  break;
   7352   1.7  christos 	}
   7353   1.7  christos     }
   7354   1.7  christos }
   7355   1.7  christos 
   7356   1.7  christos static void
   7357   1.7  christos print_instruction_predicate (struct disassemble_info *info)
   7358   1.7  christos {
   7359   1.8  christos   void *stream = info->stream;
   7360   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7361   1.7  christos 
   7362   1.8  christos   if (vpt_block_state.next_pred_state == PRED_THEN)
   7363   1.7  christos     func (stream, dis_style_mnemonic, "t");
   7364   1.8  christos   else if (vpt_block_state.next_pred_state == PRED_ELSE)
   7365   1.7  christos     func (stream, dis_style_mnemonic, "e");
   7366   1.7  christos }
   7367   1.7  christos 
   7368   1.7  christos static void
   7369   1.7  christos print_mve_size (struct disassemble_info *info,
   7370   1.7  christos 		unsigned long size,
   7371   1.7  christos 		enum mve_instructions matched_insn)
   7372   1.7  christos {
   7373   1.8  christos   void *stream = info->stream;
   7374   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7375   1.7  christos 
   7376   1.7  christos   switch (matched_insn)
   7377   1.7  christos     {
   7378   1.7  christos     case MVE_VABAV:
   7379   1.7  christos     case MVE_VABD_VEC:
   7380   1.7  christos     case MVE_VABS_FP:
   7381   1.7  christos     case MVE_VABS_VEC:
   7382   1.7  christos     case MVE_VADD_VEC_T1:
   7383   1.7  christos     case MVE_VADD_VEC_T2:
   7384   1.7  christos     case MVE_VADDV:
   7385   1.7  christos     case MVE_VBRSR:
   7386   1.7  christos     case MVE_VCADD_VEC:
   7387   1.7  christos     case MVE_VCLS:
   7388   1.7  christos     case MVE_VCLZ:
   7389   1.7  christos     case MVE_VCMP_VEC_T1:
   7390   1.7  christos     case MVE_VCMP_VEC_T2:
   7391   1.7  christos     case MVE_VCMP_VEC_T3:
   7392   1.7  christos     case MVE_VCMP_VEC_T4:
   7393   1.7  christos     case MVE_VCMP_VEC_T5:
   7394   1.7  christos     case MVE_VCMP_VEC_T6:
   7395   1.7  christos     case MVE_VCTP:
   7396   1.7  christos     case MVE_VDDUP:
   7397   1.7  christos     case MVE_VDWDUP:
   7398   1.7  christos     case MVE_VHADD_T1:
   7399   1.7  christos     case MVE_VHADD_T2:
   7400   1.7  christos     case MVE_VHCADD:
   7401   1.7  christos     case MVE_VHSUB_T1:
   7402   1.7  christos     case MVE_VHSUB_T2:
   7403   1.7  christos     case MVE_VIDUP:
   7404   1.7  christos     case MVE_VIWDUP:
   7405   1.7  christos     case MVE_VLD2:
   7406   1.7  christos     case MVE_VLD4:
   7407   1.7  christos     case MVE_VLDRB_GATHER_T1:
   7408   1.7  christos     case MVE_VLDRH_GATHER_T2:
   7409   1.7  christos     case MVE_VLDRW_GATHER_T3:
   7410   1.7  christos     case MVE_VLDRD_GATHER_T4:
   7411   1.7  christos     case MVE_VLDRB_T1:
   7412   1.7  christos     case MVE_VLDRH_T2:
   7413   1.7  christos     case MVE_VMAX:
   7414   1.7  christos     case MVE_VMAXA:
   7415   1.7  christos     case MVE_VMAXV:
   7416   1.7  christos     case MVE_VMAXAV:
   7417   1.7  christos     case MVE_VMIN:
   7418   1.7  christos     case MVE_VMINA:
   7419   1.7  christos     case MVE_VMINV:
   7420   1.7  christos     case MVE_VMINAV:
   7421   1.7  christos     case MVE_VMLA:
   7422   1.7  christos     case MVE_VMLAS:
   7423   1.7  christos     case MVE_VMUL_VEC_T1:
   7424   1.7  christos     case MVE_VMUL_VEC_T2:
   7425   1.7  christos     case MVE_VMULH:
   7426   1.7  christos     case MVE_VRMULH:
   7427   1.7  christos     case MVE_VMULL_INT:
   7428   1.7  christos     case MVE_VNEG_FP:
   7429   1.7  christos     case MVE_VNEG_VEC:
   7430   1.7  christos     case MVE_VPT_VEC_T1:
   7431   1.7  christos     case MVE_VPT_VEC_T2:
   7432   1.7  christos     case MVE_VPT_VEC_T3:
   7433   1.7  christos     case MVE_VPT_VEC_T4:
   7434   1.7  christos     case MVE_VPT_VEC_T5:
   7435   1.7  christos     case MVE_VPT_VEC_T6:
   7436   1.7  christos     case MVE_VQABS:
   7437   1.7  christos     case MVE_VQADD_T1:
   7438   1.7  christos     case MVE_VQADD_T2:
   7439   1.7  christos     case MVE_VQDMLADH:
   7440   1.7  christos     case MVE_VQRDMLADH:
   7441   1.7  christos     case MVE_VQDMLAH:
   7442   1.7  christos     case MVE_VQRDMLAH:
   7443   1.7  christos     case MVE_VQDMLASH:
   7444   1.7  christos     case MVE_VQRDMLASH:
   7445   1.7  christos     case MVE_VQDMLSDH:
   7446   1.7  christos     case MVE_VQRDMLSDH:
   7447   1.7  christos     case MVE_VQDMULH_T1:
   7448   1.7  christos     case MVE_VQRDMULH_T2:
   7449   1.7  christos     case MVE_VQDMULH_T3:
   7450   1.7  christos     case MVE_VQRDMULH_T4:
   7451   1.7  christos     case MVE_VQNEG:
   7452   1.7  christos     case MVE_VQRSHL_T1:
   7453   1.7  christos     case MVE_VQRSHL_T2:
   7454   1.7  christos     case MVE_VQSHL_T1:
   7455   1.7  christos     case MVE_VQSHL_T4:
   7456   1.7  christos     case MVE_VQSUB_T1:
   7457   1.7  christos     case MVE_VQSUB_T2:
   7458   1.7  christos     case MVE_VREV32:
   7459   1.7  christos     case MVE_VREV64:
   7460   1.7  christos     case MVE_VRHADD:
   7461   1.7  christos     case MVE_VRINT_FP:
   7462   1.7  christos     case MVE_VRSHL_T1:
   7463   1.7  christos     case MVE_VRSHL_T2:
   7464   1.7  christos     case MVE_VSHL_T2:
   7465   1.7  christos     case MVE_VSHL_T3:
   7466   1.7  christos     case MVE_VSHLL_T2:
   7467   1.7  christos     case MVE_VST2:
   7468   1.7  christos     case MVE_VST4:
   7469   1.7  christos     case MVE_VSTRB_SCATTER_T1:
   7470   1.7  christos     case MVE_VSTRH_SCATTER_T2:
   7471   1.7  christos     case MVE_VSTRW_SCATTER_T3:
   7472   1.7  christos     case MVE_VSTRB_T1:
   7473   1.7  christos     case MVE_VSTRH_T2:
   7474   1.7  christos     case MVE_VSUB_VEC_T1:
   7475   1.7  christos     case MVE_VSUB_VEC_T2:
   7476   1.8  christos       if (size <= 3)
   7477   1.1  christos 	func (stream, dis_style_mnemonic, "%s", mve_vec_sizename[size]);
   7478   1.8  christos       else
   7479   1.7  christos 	func (stream, dis_style_text, "<undef size>");
   7480   1.7  christos       break;
   7481   1.7  christos 
   7482   1.7  christos     case MVE_VABD_FP:
   7483   1.7  christos     case MVE_VADD_FP_T1:
   7484   1.7  christos     case MVE_VADD_FP_T2:
   7485   1.7  christos     case MVE_VSUB_FP_T1:
   7486   1.7  christos     case MVE_VSUB_FP_T2:
   7487   1.7  christos     case MVE_VCMP_FP_T1:
   7488   1.7  christos     case MVE_VCMP_FP_T2:
   7489   1.7  christos     case MVE_VFMA_FP_SCALAR:
   7490   1.7  christos     case MVE_VFMA_FP:
   7491   1.7  christos     case MVE_VFMS_FP:
   7492   1.7  christos     case MVE_VFMAS_FP_SCALAR:
   7493   1.7  christos     case MVE_VMAXNM_FP:
   7494   1.7  christos     case MVE_VMAXNMA_FP:
   7495   1.7  christos     case MVE_VMAXNMV_FP:
   7496   1.7  christos     case MVE_VMAXNMAV_FP:
   7497   1.7  christos     case MVE_VMINNM_FP:
   7498   1.7  christos     case MVE_VMINNMA_FP:
   7499   1.7  christos     case MVE_VMINNMV_FP:
   7500   1.7  christos     case MVE_VMINNMAV_FP:
   7501   1.7  christos     case MVE_VMUL_FP_T1:
   7502   1.7  christos     case MVE_VMUL_FP_T2:
   7503   1.7  christos     case MVE_VPT_FP_T1:
   7504   1.7  christos     case MVE_VPT_FP_T2:
   7505   1.8  christos       if (size == 0)
   7506   1.7  christos 	func (stream, dis_style_mnemonic, "32");
   7507   1.8  christos       else if (size == 1)
   7508   1.7  christos 	func (stream, dis_style_mnemonic, "16");
   7509   1.7  christos       break;
   7510   1.7  christos 
   7511   1.7  christos     case MVE_VCADD_FP:
   7512   1.7  christos     case MVE_VCMLA_FP:
   7513   1.7  christos     case MVE_VCMUL_FP:
   7514   1.7  christos     case MVE_VMLADAV_T1:
   7515   1.7  christos     case MVE_VMLALDAV:
   7516   1.7  christos     case MVE_VMLSDAV_T1:
   7517   1.7  christos     case MVE_VMLSLDAV:
   7518   1.7  christos     case MVE_VMOVN:
   7519   1.7  christos     case MVE_VQDMULL_T1:
   7520   1.7  christos     case MVE_VQDMULL_T2:
   7521   1.7  christos     case MVE_VQMOVN:
   7522   1.7  christos     case MVE_VQMOVUN:
   7523   1.8  christos       if (size == 0)
   7524   1.7  christos 	func (stream, dis_style_mnemonic, "16");
   7525   1.8  christos       else if (size == 1)
   7526   1.7  christos 	func (stream, dis_style_mnemonic, "32");
   7527   1.7  christos       break;
   7528   1.7  christos 
   7529   1.7  christos     case MVE_VMOVL:
   7530   1.8  christos       if (size == 1)
   7531   1.7  christos 	func (stream, dis_style_mnemonic, "8");
   7532   1.8  christos       else if (size == 2)
   7533   1.7  christos 	func (stream, dis_style_mnemonic, "16");
   7534   1.7  christos       break;
   7535   1.7  christos 
   7536   1.7  christos     case MVE_VDUP:
   7537   1.7  christos       switch (size)
   7538   1.7  christos 	{
   7539   1.8  christos 	case 0:
   7540   1.7  christos 	  func (stream, dis_style_mnemonic, "32");
   7541   1.7  christos 	  break;
   7542   1.8  christos 	case 1:
   7543   1.7  christos 	  func (stream, dis_style_mnemonic, "16");
   7544   1.7  christos 	  break;
   7545   1.8  christos 	case 2:
   7546   1.7  christos 	  func (stream, dis_style_mnemonic, "8");
   7547   1.7  christos 	  break;
   7548   1.7  christos 	default:
   7549   1.7  christos 	  break;
   7550   1.7  christos 	}
   7551   1.7  christos       break;
   7552   1.7  christos 
   7553   1.7  christos     case MVE_VMOV_GP_TO_VEC_LANE:
   7554   1.7  christos     case MVE_VMOV_VEC_LANE_TO_GP:
   7555   1.7  christos       switch (size)
   7556   1.7  christos 	{
   7557   1.8  christos 	case 0: case 4:
   7558   1.7  christos 	  func (stream, dis_style_mnemonic, "32");
   7559   1.7  christos 	  break;
   7560   1.7  christos 
   7561   1.7  christos 	case 1: case 3:
   7562   1.8  christos 	case 5: case 7:
   7563   1.7  christos 	  func (stream, dis_style_mnemonic, "16");
   7564   1.7  christos 	  break;
   7565   1.7  christos 
   7566   1.7  christos 	case 8: case 9: case 10: case 11:
   7567   1.8  christos 	case 12: case 13: case 14: case 15:
   7568   1.7  christos 	  func (stream, dis_style_mnemonic, "8");
   7569   1.7  christos 	  break;
   7570   1.7  christos 
   7571   1.7  christos 	default:
   7572   1.7  christos 	  break;
   7573   1.7  christos 	}
   7574   1.7  christos       break;
   7575   1.7  christos 
   7576   1.7  christos     case MVE_VMOV_IMM_TO_VEC:
   7577   1.7  christos       switch (size)
   7578   1.7  christos 	{
   7579   1.7  christos 	case 0: case 4: case 8:
   7580   1.8  christos 	case 12: case 24: case 26:
   7581   1.7  christos 	  func (stream, dis_style_mnemonic, "i32");
   7582   1.7  christos 	  break;
   7583   1.8  christos 	case 16: case 20:
   7584   1.7  christos 	  func (stream, dis_style_mnemonic, "i16");
   7585   1.7  christos 	  break;
   7586   1.8  christos 	case 28:
   7587   1.7  christos 	  func (stream, dis_style_mnemonic, "i8");
   7588   1.7  christos 	  break;
   7589   1.8  christos 	case 29:
   7590   1.7  christos 	  func (stream, dis_style_mnemonic, "i64");
   7591   1.7  christos 	  break;
   7592   1.8  christos 	case 30:
   7593   1.7  christos 	  func (stream, dis_style_mnemonic, "f32");
   7594   1.7  christos 	  break;
   7595   1.7  christos 	default:
   7596   1.7  christos 	  break;
   7597   1.7  christos 	}
   7598   1.7  christos       break;
   7599   1.7  christos 
   7600   1.7  christos     case MVE_VMULL_POLY:
   7601   1.8  christos       if (size == 0)
   7602   1.7  christos 	func (stream, dis_style_mnemonic, "p8");
   7603   1.8  christos       else if (size == 1)
   7604   1.7  christos 	func (stream, dis_style_mnemonic, "p16");
   7605   1.7  christos       break;
   7606   1.7  christos 
   7607   1.7  christos     case MVE_VMVN_IMM:
   7608   1.7  christos       switch (size)
   7609   1.7  christos 	{
   7610   1.7  christos 	case 0: case 2: case 4:
   7611   1.8  christos 	case 6: case 12: case 13:
   7612   1.7  christos 	  func (stream, dis_style_mnemonic, "32");
   7613   1.7  christos 	  break;
   7614   1.7  christos 
   7615   1.8  christos 	case 8: case 10:
   7616   1.7  christos 	  func (stream, dis_style_mnemonic, "16");
   7617   1.7  christos 	  break;
   7618   1.7  christos 
   7619   1.7  christos 	default:
   7620   1.7  christos 	  break;
   7621   1.7  christos 	}
   7622   1.7  christos       break;
   7623   1.7  christos 
   7624   1.7  christos     case MVE_VBIC_IMM:
   7625   1.7  christos     case MVE_VORR_IMM:
   7626   1.7  christos       switch (size)
   7627   1.7  christos 	{
   7628   1.7  christos 	case 1: case 3:
   7629   1.8  christos 	case 5: case 7:
   7630   1.7  christos 	  func (stream, dis_style_mnemonic, "32");
   7631   1.7  christos 	  break;
   7632   1.7  christos 
   7633   1.8  christos 	case 9: case 11:
   7634   1.7  christos 	  func (stream, dis_style_mnemonic, "16");
   7635   1.7  christos 	  break;
   7636   1.7  christos 
   7637   1.7  christos 	default:
   7638   1.7  christos 	  break;
   7639   1.7  christos 	}
   7640   1.7  christos       break;
   7641   1.7  christos 
   7642   1.7  christos     case MVE_VQSHRN:
   7643   1.7  christos     case MVE_VQSHRUN:
   7644   1.7  christos     case MVE_VQRSHRN:
   7645   1.7  christos     case MVE_VQRSHRUN:
   7646   1.7  christos     case MVE_VRSHRN:
   7647   1.7  christos     case MVE_VSHRN:
   7648   1.7  christos       {
   7649   1.7  christos 	switch (size)
   7650   1.7  christos 	{
   7651   1.8  christos 	case 1:
   7652   1.7  christos 	  func (stream, dis_style_mnemonic, "16");
   7653   1.7  christos 	  break;
   7654   1.7  christos 
   7655   1.8  christos 	case 2: case 3:
   7656   1.7  christos 	  func (stream, dis_style_mnemonic, "32");
   7657   1.7  christos 	  break;
   7658   1.7  christos 
   7659   1.7  christos 	default:
   7660   1.7  christos 	  break;
   7661   1.7  christos 	}
   7662   1.7  christos       }
   7663   1.7  christos       break;
   7664   1.7  christos 
   7665   1.7  christos     case MVE_VQSHL_T2:
   7666   1.7  christos     case MVE_VQSHLU_T3:
   7667   1.7  christos     case MVE_VRSHR:
   7668   1.7  christos     case MVE_VSHL_T1:
   7669   1.7  christos     case MVE_VSHLL_T1:
   7670   1.7  christos     case MVE_VSHR:
   7671   1.7  christos     case MVE_VSLI:
   7672   1.7  christos     case MVE_VSRI:
   7673   1.7  christos       {
   7674   1.7  christos 	switch (size)
   7675   1.7  christos 	{
   7676   1.8  christos 	case 1:
   7677   1.7  christos 	  func (stream, dis_style_mnemonic, "8");
   7678   1.7  christos 	  break;
   7679   1.7  christos 
   7680   1.8  christos 	case 2: case 3:
   7681   1.7  christos 	  func (stream, dis_style_mnemonic, "16");
   7682   1.7  christos 	  break;
   7683   1.7  christos 
   7684   1.8  christos 	case 4: case 5: case 6: case 7:
   7685   1.7  christos 	  func (stream, dis_style_mnemonic, "32");
   7686   1.7  christos 	  break;
   7687   1.7  christos 
   7688   1.7  christos 	default:
   7689   1.7  christos 	  break;
   7690   1.7  christos 	}
   7691   1.7  christos       }
   7692   1.7  christos       break;
   7693   1.7  christos 
   7694   1.7  christos     default:
   7695   1.1  christos       break;
   7696   1.1  christos     }
   7697   1.1  christos }
   7698   1.9  christos 
   7699   1.9  christos /* Return true if INSN is a shift insn with an immediate shift amount
   7700   1.9  christos    which needs decoding as per print_mve_shift_n.  */
   7701   1.9  christos 
   7702   1.9  christos static bool
   7703   1.9  christos mve_shift_insn_p (enum mve_instructions insn)
   7704   1.9  christos {
   7705   1.9  christos   switch (insn)
   7706   1.9  christos     {
   7707   1.9  christos     case MVE_VQSHL_T2:
   7708   1.9  christos     case MVE_VQSHLU_T3:
   7709   1.9  christos     case MVE_VQSHRN:
   7710   1.9  christos     case MVE_VQSHRUN:
   7711   1.9  christos     case MVE_VQRSHRN:
   7712   1.9  christos     case MVE_VQRSHRUN:
   7713   1.9  christos     case MVE_VRSHR:
   7714   1.9  christos     case MVE_VRSHRN:
   7715   1.9  christos     case MVE_VSHL_T1:
   7716   1.9  christos     case MVE_VSHLL_T1:
   7717   1.9  christos     case MVE_VSHR:
   7718   1.9  christos     case MVE_VSHRN:
   7719   1.9  christos     case MVE_VSLI:
   7720   1.9  christos     case MVE_VSRI:
   7721   1.9  christos       return true;
   7722   1.9  christos     default:
   7723   1.9  christos       return false;
   7724   1.9  christos     }
   7725   1.9  christos }
   7726   1.1  christos 
   7727   1.7  christos static void
   7728   1.7  christos print_mve_shift_n (struct disassemble_info *info, long given,
   7729   1.7  christos 		   enum mve_instructions matched_insn)
   7730   1.7  christos {
   7731   1.8  christos   void *stream = info->stream;
   7732   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7733   1.7  christos 
   7734   1.7  christos   int startAt0
   7735   1.7  christos     = matched_insn == MVE_VQSHL_T2
   7736   1.7  christos       || matched_insn == MVE_VQSHLU_T3
   7737   1.7  christos       || matched_insn == MVE_VSHL_T1
   7738   1.7  christos       || matched_insn == MVE_VSHLL_T1
   7739   1.7  christos       || matched_insn == MVE_VSLI;
   7740   1.7  christos 
   7741   1.7  christos   unsigned imm6 = (given & 0x3f0000) >> 16;
   7742   1.7  christos 
   7743   1.7  christos   if (matched_insn == MVE_VSHLL_T1)
   7744   1.7  christos     imm6 &= 0x1f;
   7745   1.7  christos 
   7746   1.7  christos   unsigned shiftAmount = 0;
   7747   1.7  christos   if ((imm6 & 0x20) != 0)
   7748   1.7  christos     shiftAmount = startAt0 ? imm6 - 32 : 64 - imm6;
   7749   1.7  christos   else if ((imm6 & 0x10) != 0)
   7750   1.7  christos     shiftAmount = startAt0 ? imm6 - 16 : 32 - imm6;
   7751   1.7  christos   else if ((imm6 & 0x08) != 0)
   7752   1.7  christos     shiftAmount = startAt0 ? imm6 - 8 : 16 - imm6;
   7753   1.7  christos   else
   7754   1.7  christos     print_mve_undefined (info, UNDEF_SIZE_0);
   7755   1.8  christos 
   7756   1.7  christos   func (stream, dis_style_immediate, "%u", shiftAmount);
   7757   1.7  christos }
   7758   1.7  christos 
   7759   1.7  christos static void
   7760   1.7  christos print_vec_condition (struct disassemble_info *info, long given,
   7761   1.1  christos 		     enum mve_instructions matched_insn)
   7762   1.7  christos {
   7763   1.8  christos   void *stream = info->stream;
   7764   1.7  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7765   1.1  christos   long vec_cond = 0;
   7766   1.7  christos 
   7767   1.1  christos   switch (matched_insn)
   7768   1.7  christos     {
   7769   1.7  christos     case MVE_VPT_FP_T1:
   7770   1.7  christos     case MVE_VCMP_FP_T1:
   7771   1.7  christos       vec_cond = (((given & 0x1000) >> 10)
   7772   1.7  christos 		  | ((given & 1) << 1)
   7773   1.8  christos 		  | ((given & 0x0080) >> 7));
   7774   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7775   1.7  christos       break;
   7776   1.7  christos 
   7777   1.7  christos     case MVE_VPT_FP_T2:
   7778   1.7  christos     case MVE_VCMP_FP_T2:
   7779   1.7  christos       vec_cond = (((given & 0x1000) >> 10)
   7780   1.7  christos 		  | ((given & 0x0020) >> 4)
   7781   1.8  christos 		  | ((given & 0x0080) >> 7));
   7782   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7783   1.7  christos       break;
   7784   1.7  christos 
   7785   1.7  christos     case MVE_VPT_VEC_T1:
   7786   1.7  christos     case MVE_VCMP_VEC_T1:
   7787   1.8  christos       vec_cond = (given & 0x0080) >> 7;
   7788   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7789   1.7  christos       break;
   7790   1.7  christos 
   7791   1.7  christos     case MVE_VPT_VEC_T2:
   7792   1.7  christos     case MVE_VCMP_VEC_T2:
   7793   1.8  christos       vec_cond = 2 | ((given & 0x0080) >> 7);
   7794   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7795   1.7  christos       break;
   7796   1.7  christos 
   7797   1.7  christos     case MVE_VPT_VEC_T3:
   7798   1.7  christos     case MVE_VCMP_VEC_T3:
   7799   1.8  christos       vec_cond = 4 | ((given & 1) << 1) | ((given & 0x0080) >> 7);
   7800   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7801   1.7  christos       break;
   7802   1.7  christos 
   7803   1.7  christos     case MVE_VPT_VEC_T4:
   7804   1.7  christos     case MVE_VCMP_VEC_T4:
   7805   1.8  christos       vec_cond = (given & 0x0080) >> 7;
   7806   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7807   1.1  christos       break;
   7808   1.7  christos 
   7809   1.7  christos     case MVE_VPT_VEC_T5:
   7810   1.7  christos     case MVE_VCMP_VEC_T5:
   7811   1.8  christos       vec_cond = 2 | ((given & 0x0080) >> 7);
   7812   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7813   1.1  christos       break;
   7814   1.7  christos 
   7815   1.7  christos     case MVE_VPT_VEC_T6:
   7816   1.7  christos     case MVE_VCMP_VEC_T6:
   7817   1.8  christos       vec_cond = 4 | ((given & 0x0020) >> 4) | ((given & 0x0080) >> 7);
   7818   1.7  christos       func (stream, dis_style_sub_mnemonic, "%s", vec_condnames[vec_cond]);
   7819   1.1  christos       break;
   7820   1.7  christos 
   7821   1.7  christos     case MVE_NONE:
   7822   1.7  christos     case MVE_VPST:
   7823   1.7  christos     default:
   7824   1.1  christos       break;
   7825   1.1  christos     }
   7826   1.1  christos }
   7827   1.1  christos 
   7828   1.1  christos #define W_BIT 21
   7829   1.1  christos #define I_BIT 22
   7830   1.1  christos #define U_BIT 23
   7831   1.1  christos #define P_BIT 24
   7832   1.7  christos 
   7833   1.7  christos #define WRITEBACK_BIT_SET (given & (1 << W_BIT))
   7834   1.7  christos #define IMMEDIATE_BIT_SET (given & (1 << I_BIT))
   7835   1.7  christos #define NEGATIVE_BIT_SET  ((given & (1 << U_BIT)) == 0)
   7836   1.7  christos #define PRE_BIT_SET	  (given & (1 << P_BIT))
   7837   1.8  christos 
   7838   1.8  christos /* The assembler string for an instruction can include %{X:...%} patterns,
   7839   1.8  christos    where the 'X' is one of the characters understood by this function.
   7840   1.8  christos 
   7841   1.8  christos    This function takes the X character, and returns a new style.  This new
   7842   1.8  christos    style will be used by the caller to temporarily change the current base
   7843   1.8  christos    style.  */
   7844   1.8  christos 
   7845   1.8  christos static enum disassembler_style
   7846   1.8  christos decode_base_style (const char x)
   7847   1.8  christos {
   7848   1.8  christos   switch (x)
   7849   1.8  christos     {
   7850   1.8  christos     case 'A': return dis_style_address;
   7851   1.8  christos     case 'B': return dis_style_sub_mnemonic;
   7852   1.8  christos     case 'C': return dis_style_comment_start;
   7853   1.8  christos     case 'D': return dis_style_assembler_directive;
   7854   1.8  christos     case 'I': return dis_style_immediate;
   7855   1.8  christos     case 'M': return dis_style_mnemonic;
   7856   1.8  christos     case 'O': return dis_style_address_offset;
   7857   1.8  christos     case 'R': return dis_style_register;
   7858   1.8  christos     case 'S': return dis_style_symbol;
   7859   1.8  christos     case 'T': return dis_style_text;
   7860   1.8  christos     default:
   7861   1.8  christos       abort ();
   7862   1.8  christos     }
   7863   1.1  christos }
   7864   1.1  christos 
   7865   1.1  christos /* Print one coprocessor instruction on INFO->STREAM.
   7866   1.1  christos    Return TRUE if the instuction matched, FALSE if this is not a
   7867   1.1  christos    recognised coprocessor instruction.  */
   7868   1.8  christos 
   7869   1.7  christos static bool
   7870   1.7  christos print_insn_coprocessor_1 (const struct sopcode32 *opcodes,
   7871   1.7  christos 			  bfd_vma pc,
   7872   1.7  christos 			  struct disassemble_info *info,
   7873   1.8  christos 			  long given,
   7874   1.1  christos 			  bool thumb)
   7875   1.7  christos {
   7876   1.1  christos   const struct sopcode32 *insn;
   7877   1.8  christos   void *stream = info->stream;
   7878   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   7879   1.1  christos   unsigned long mask;
   7880   1.3  christos   unsigned long value = 0;
   7881   1.4  christos   int cond;
   7882   1.1  christos   int cp_num;
   7883   1.3  christos   struct arm_private_data *private_data = info->private_data;
   7884   1.7  christos   arm_feature_set allowed_arches = ARM_ARCH_NONE;
   7885   1.7  christos   arm_feature_set arm_ext_v8_1m_main =
   7886   1.8  christos     ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
   7887   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   7888   1.3  christos   enum disassembler_style old_base_style = base_style;
   7889   1.6  christos 
   7890   1.1  christos   allowed_arches = private_data->features;
   7891   1.7  christos 
   7892   1.1  christos   for (insn = opcodes; insn->assembler; insn++)
   7893   1.1  christos     {
   7894   1.8  christos       unsigned long u_reg = 16;
   7895   1.1  christos       bool is_unpredictable = false;
   7896   1.1  christos       signed long value_in_comment = 0;
   7897   1.1  christos       const char *c;
   7898   1.3  christos 
   7899   1.1  christos       if (ARM_FEATURE_ZERO (insn->arch))
   7900   1.1  christos 	switch (insn->value)
   7901   1.1  christos 	  {
   7902   1.1  christos 	  case SENTINEL_IWMMXT_START:
   7903   1.1  christos 	    if (info->mach != bfd_mach_arm_XScale
   7904   1.1  christos 		&& info->mach != bfd_mach_arm_iWMMXt
   7905   1.1  christos 		&& info->mach != bfd_mach_arm_iWMMXt2)
   7906   1.1  christos 	      do
   7907   1.3  christos 		insn++;
   7908   1.3  christos 	      while ((! ARM_FEATURE_ZERO (insn->arch))
   7909   1.1  christos 		     && insn->value != SENTINEL_IWMMXT_END);
   7910   1.1  christos 	    continue;
   7911   1.1  christos 
   7912   1.1  christos 	  case SENTINEL_IWMMXT_END:
   7913   1.1  christos 	    continue;
   7914   1.1  christos 
   7915   1.6  christos 	  case SENTINEL_GENERIC_START:
   7916   1.1  christos 	    allowed_arches = private_data->features;
   7917   1.1  christos 	    continue;
   7918   1.1  christos 
   7919   1.1  christos 	  default:
   7920   1.1  christos 	    abort ();
   7921   1.1  christos 	  }
   7922   1.1  christos 
   7923   1.1  christos       mask = insn->mask;
   7924   1.4  christos       value = insn->value;
   7925   1.4  christos       cp_num = (given >> 8) & 0xf;
   7926   1.1  christos 
   7927   1.1  christos       if (thumb)
   7928   1.1  christos 	{
   7929   1.1  christos 	  /* The high 4 bits are 0xe for Arm conditional instructions, and
   7930   1.1  christos 	     0xe for arm unconditional instructions.  The rest of the
   7931   1.1  christos 	     encoding is the same.  */
   7932   1.1  christos 	  mask |= 0xf0000000;
   7933   1.1  christos 	  value |= 0xe0000000;
   7934   1.1  christos 	  if (ifthen_state)
   7935   1.1  christos 	    cond = IFTHEN_COND;
   7936   1.2     joerg 	  else
   7937   1.1  christos 	    cond = COND_UNCOND;
   7938   1.1  christos 	}
   7939   1.1  christos       else
   7940   1.1  christos 	{
   7941   1.1  christos 	  /* Only match unconditional instuctions against unconditional
   7942   1.1  christos 	     patterns.  */
   7943   1.1  christos 	  if ((given & 0xf0000000) == 0xf0000000)
   7944   1.1  christos 	    {
   7945   1.2     joerg 	      mask |= 0xf0000000;
   7946   1.1  christos 	      cond = COND_UNCOND;
   7947   1.1  christos 	    }
   7948   1.1  christos 	  else
   7949   1.1  christos 	    {
   7950   1.1  christos 	      cond = (given >> 28) & 0xf;
   7951   1.2     joerg 	      if (cond == 0xe)
   7952   1.1  christos 		cond = COND_UNCOND;
   7953   1.1  christos 	    }
   7954   1.3  christos 	}
   7955   1.7  christos 
   7956   1.7  christos       if ((insn->isa == T32 && !thumb)
   7957   1.7  christos 	  || (insn->isa == ARM && thumb))
   7958   1.7  christos 	continue;
   7959   1.1  christos 
   7960   1.1  christos       if ((given & mask) != value)
   7961   1.1  christos 	continue;
   7962   1.3  christos 
   7963   1.1  christos       if (! ARM_CPU_HAS_FEATURE (insn->arch, allowed_arches))
   7964   1.1  christos 	continue;
   7965   1.4  christos 
   7966   1.4  christos       if (insn->value == 0xfe000010     /* mcr2  */
   7967   1.4  christos 	  || insn->value == 0xfe100010  /* mrc2  */
   7968   1.4  christos 	  || insn->value == 0xfc100000  /* ldc2  */
   7969   1.4  christos 	  || insn->value == 0xfc000000) /* stc2  */
   7970   1.4  christos 	{
   7971   1.8  christos 	  if (cp_num == 9 || cp_num == 10 || cp_num == 11)
   7972   1.7  christos 	    is_unpredictable = true;
   7973   1.7  christos 
   7974   1.7  christos 	  /* Armv8.1-M Mainline FP & MVE instructions.  */
   7975   1.7  christos 	  if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
   7976   1.7  christos 	      && !ARM_CPU_IS_ANY (allowed_arches)
   7977   1.7  christos 	      && (cp_num == 8 || cp_num == 14 || cp_num == 15))
   7978   1.7  christos 	    continue;
   7979   1.4  christos 
   7980   1.4  christos 	}
   7981   1.4  christos       else if (insn->value == 0x0e000000     /* cdp  */
   7982   1.4  christos 	       || insn->value == 0xfe000000  /* cdp2  */
   7983   1.4  christos 	       || insn->value == 0x0e000010  /* mcr  */
   7984   1.4  christos 	       || insn->value == 0x0e100010  /* mrc  */
   7985   1.4  christos 	       || insn->value == 0x0c100000  /* ldc  */
   7986   1.4  christos 	       || insn->value == 0x0c000000) /* stc  */
   7987   1.4  christos 	{
   7988   1.4  christos 	  /* Floating-point instructions.  */
   7989   1.4  christos 	  if (cp_num == 9 || cp_num == 10 || cp_num == 11)
   7990   1.7  christos 	    continue;
   7991   1.7  christos 
   7992   1.7  christos 	  /* Armv8.1-M Mainline FP & MVE instructions.  */
   7993   1.7  christos 	  if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
   7994   1.7  christos 	      && !ARM_CPU_IS_ANY (allowed_arches)
   7995   1.7  christos 	      && (cp_num == 8 || cp_num == 14 || cp_num == 15))
   7996   1.4  christos 	    continue;
   7997   1.7  christos 	}
   7998   1.7  christos       else if ((insn->value == 0xec100f80      /* vldr (system register) */
   7999   1.7  christos 		|| insn->value == 0xec000f80)  /* vstr (system register) */
   8000   1.7  christos 	       && arm_decode_field (given, 24, 24) == 0
   8001   1.7  christos 	       && arm_decode_field (given, 21, 21) == 0)
   8002   1.7  christos 	/* If the P and W bits are both 0 then these encodings match the MVE
   8003   1.7  christos 	   VLDR and VSTR instructions, these are in a different table, so we
   8004   1.7  christos 	   don't let it match here.  */
   8005   1.4  christos 	continue;
   8006   1.1  christos 
   8007   1.1  christos       for (c = insn->assembler; *c; c++)
   8008   1.1  christos 	{
   8009   1.1  christos 	  if (*c == '%')
   8010   1.7  christos 	    {
   8011   1.8  christos 	      const char mod = *++c;
   8012   1.7  christos 
   8013   1.1  christos 	      switch (mod)
   8014   1.8  christos 		{
   8015   1.8  christos 		case '{':
   8016   1.8  christos 		  ++c;
   8017   1.8  christos 		  if (*c == '\0')
   8018   1.8  christos 		    abort ();
   8019   1.8  christos 		  old_base_style = base_style;
   8020   1.8  christos 		  base_style = decode_base_style (*c);
   8021   1.8  christos 		  ++c;
   8022   1.8  christos 		  if (*c != ':')
   8023   1.8  christos 		    abort ();
   8024   1.8  christos 		  break;
   8025   1.8  christos 
   8026   1.8  christos 		case '}':
   8027   1.8  christos 		  base_style = old_base_style;
   8028   1.8  christos 		  break;
   8029   1.1  christos 
   8030   1.8  christos 		case '%':
   8031   1.1  christos 		  func (stream, base_style, "%%");
   8032   1.1  christos 		  break;
   8033   1.1  christos 
   8034   1.7  christos 		case 'A':
   8035   1.1  christos 		case 'K':
   8036   1.1  christos 		  {
   8037   1.4  christos 		    int rn = (given >> 16) & 0xf;
   8038   1.1  christos 		    bfd_vma offset = given & 0xff;
   8039   1.7  christos 
   8040   1.7  christos 		    if (mod == 'K')
   8041   1.7  christos 		      offset = given & 0x7f;
   8042   1.8  christos 
   8043   1.8  christos 		    func (stream, dis_style_text, "[");
   8044   1.8  christos 		    func (stream, dis_style_register, "%s",
   8045   1.1  christos 			  arm_regnames [(given >> 16) & 0xf]);
   8046   1.1  christos 
   8047   1.1  christos 		    if (PRE_BIT_SET || WRITEBACK_BIT_SET)
   8048   1.1  christos 		      {
   8049   1.4  christos 			/* Not unindexed.  The offset is scaled.  */
   8050   1.4  christos 			if (cp_num == 9)
   8051   1.4  christos 			  /* vldr.16/vstr.16 will shift the address
   8052   1.4  christos 			     left by 1 bit only.  */
   8053   1.4  christos 			  offset = offset * 2;
   8054   1.4  christos 			else
   8055   1.4  christos 			  offset = offset * 4;
   8056   1.1  christos 
   8057   1.1  christos 			if (NEGATIVE_BIT_SET)
   8058   1.1  christos 			  offset = - offset;
   8059   1.1  christos 			if (rn != 15)
   8060   1.1  christos 			  value_in_comment = offset;
   8061   1.1  christos 		      }
   8062   1.1  christos 
   8063   1.1  christos 		    if (PRE_BIT_SET)
   8064   1.1  christos 		      {
   8065   1.8  christos 			if (offset)
   8066   1.8  christos 			  {
   8067   1.8  christos 			    func (stream, dis_style_text, ", ");
   8068   1.8  christos 			    func (stream, dis_style_immediate, "#%d",
   8069   1.8  christos 				  (int) offset);
   8070   1.8  christos 			    func (stream, dis_style_text, "]%s",
   8071   1.8  christos 				  WRITEBACK_BIT_SET ? "!" : "");
   8072   1.2     joerg 			  }
   8073   1.8  christos 			else if (NEGATIVE_BIT_SET)
   8074   1.8  christos 			  {
   8075   1.8  christos 			    func (stream, dis_style_text, ", ");
   8076   1.8  christos 			    func (stream, dis_style_immediate, "#-0");
   8077   1.8  christos 			    func (stream, dis_style_text, "]");
   8078   1.1  christos 			  }
   8079   1.8  christos 			else
   8080   1.1  christos 			  func (stream, dis_style_text, "]");
   8081   1.1  christos 		      }
   8082   1.1  christos 		    else
   8083   1.8  christos 		      {
   8084   1.1  christos 			func (stream, dis_style_text, "]");
   8085   1.1  christos 
   8086   1.1  christos 			if (WRITEBACK_BIT_SET)
   8087   1.1  christos 			  {
   8088   1.8  christos 			    if (offset)
   8089   1.8  christos 			      {
   8090   1.8  christos 				func (stream, dis_style_text, ", ");
   8091   1.8  christos 				func (stream, dis_style_immediate,
   8092   1.8  christos 				      "#%d", (int) offset);
   8093   1.2     joerg 			      }
   8094   1.8  christos 			    else if (NEGATIVE_BIT_SET)
   8095   1.8  christos 			      {
   8096   1.8  christos 				func (stream, dis_style_text, ", ");
   8097   1.8  christos 				func (stream, dis_style_immediate, "#-0");
   8098   1.1  christos 			      }
   8099   1.1  christos 			  }
   8100   1.1  christos 			else
   8101   1.8  christos 			  {
   8102   1.8  christos 			    func (stream, dis_style_text, ", {");
   8103   1.2     joerg 			    func (stream, dis_style_immediate, "%s%d",
   8104   1.2     joerg 				  (NEGATIVE_BIT_SET && !offset) ? "-" : "",
   8105   1.8  christos 				  (int) offset);
   8106   1.1  christos 			    func (stream, dis_style_text, "}");
   8107   1.1  christos 			    value_in_comment = offset;
   8108   1.1  christos 			  }
   8109   1.1  christos 		      }
   8110   1.1  christos 		    if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
   8111   1.8  christos 		      {
   8112   1.1  christos 			func (stream, dis_style_comment_start, "\t@ ");
   8113   1.1  christos 			/* For unaligned PCs, apply off-by-alignment
   8114   1.4  christos 			   correction.  */
   8115   1.1  christos 			info->print_address_func (offset + pc
   8116   1.1  christos 						  + info->bytes_per_chunk * 2
   8117   1.7  christos 						  - (pc & 3),
   8118   1.1  christos 						  info);
   8119   1.1  christos 		      }
   8120   1.1  christos 		  }
   8121   1.1  christos 		  break;
   8122   1.1  christos 
   8123   1.1  christos 		case 'B':
   8124   1.1  christos 		  {
   8125   1.1  christos 		    int regno = ((given >> 12) & 0xf) | ((given >> (22 - 4)) & 0x10);
   8126   1.1  christos 		    int offset = (given >> 1) & 0x3f;
   8127   1.8  christos 
   8128   1.1  christos 		    func (stream, dis_style_text, "{");
   8129   1.8  christos 		    if (offset == 1)
   8130   1.1  christos 		      func (stream, dis_style_register, "d%d", regno);
   8131   1.8  christos 		    else if (regno + offset > 32)
   8132   1.8  christos 		      {
   8133   1.8  christos 			func (stream, dis_style_register, "d%d", regno);
   8134   1.8  christos 			func (stream, dis_style_text, "-<overflow reg d%d>",
   8135   1.8  christos 			      regno + offset - 1);
   8136   1.1  christos 		      }
   8137   1.8  christos 		    else
   8138   1.8  christos 		      {
   8139   1.8  christos 			func (stream, dis_style_register, "d%d", regno);
   8140   1.8  christos 			func (stream, dis_style_text, "-");
   8141   1.8  christos 			func (stream, dis_style_register, "d%d",
   8142   1.8  christos 			      regno + offset - 1);
   8143   1.8  christos 		      }
   8144   1.1  christos 		    func (stream, dis_style_text, "}");
   8145   1.1  christos 		  }
   8146   1.1  christos 		  break;
   8147   1.7  christos 
   8148   1.7  christos 		case 'C':
   8149   1.8  christos 		  {
   8150   1.7  christos 		    bool single = ((given >> 8) & 1) == 0;
   8151   1.7  christos 		    char reg_prefix = single ? 's' : 'd';
   8152   1.7  christos 		    int Dreg = (given >> 22) & 0x1;
   8153   1.7  christos 		    int Vdreg = (given >> 12) & 0xf;
   8154   1.7  christos 		    int reg = single ? ((Vdreg << 1) | Dreg)
   8155   1.7  christos 				     : ((Dreg << 4) | Vdreg);
   8156   1.7  christos 		    int num = (given >> (single ? 0 : 1)) & 0x7f;
   8157   1.7  christos 		    int maxreg = single ? 31 : 15;
   8158   1.7  christos 		    int topreg = reg + num - 1;
   8159   1.8  christos 
   8160   1.7  christos 		    func (stream, dis_style_text, "{");
   8161   1.8  christos 		    if (!num)
   8162   1.8  christos 		      {
   8163   1.8  christos 			/* Nothing.  */
   8164   1.7  christos 		      }
   8165   1.8  christos 		    else if (num == 1)
   8166   1.8  christos 		      {
   8167   1.8  christos 			func (stream, dis_style_register,
   8168   1.8  christos 			      "%c%d", reg_prefix, reg);
   8169   1.8  christos 			func (stream, dis_style_text, ", ");
   8170   1.7  christos 		      }
   8171   1.8  christos 		    else if (topreg > maxreg)
   8172   1.8  christos 		      {
   8173   1.8  christos 			func (stream, dis_style_register, "%c%d",
   8174   1.8  christos 			      reg_prefix, reg);
   8175   1.8  christos 			func (stream, dis_style_text, "-<overflow reg d%d, ",
   8176   1.8  christos 			      single ? topreg >> 1 : topreg);
   8177   1.7  christos 		      }
   8178   1.8  christos 		    else
   8179   1.8  christos 		      {
   8180   1.8  christos 			func (stream, dis_style_register,
   8181   1.8  christos 			      "%c%d", reg_prefix, reg);
   8182   1.8  christos 			func (stream, dis_style_text, "-");
   8183   1.8  christos 			func (stream, dis_style_register, "%c%d",
   8184   1.8  christos 			      reg_prefix, topreg);
   8185   1.8  christos 			func (stream, dis_style_text, ", ");
   8186   1.8  christos 		      }
   8187   1.8  christos 		    func (stream, dis_style_register, "VPR");
   8188   1.7  christos 		    func (stream, dis_style_text, "}");
   8189   1.7  christos 		  }
   8190   1.7  christos 		  break;
   8191   1.2     joerg 
   8192   1.2     joerg 		case 'u':
   8193   1.8  christos 		  if (cond != COND_UNCOND)
   8194   1.2     joerg 		    is_unpredictable = true;
   8195   1.2     joerg 
   8196   1.1  christos 		  /* Fall through.  */
   8197   1.4  christos 		case 'c':
   8198   1.8  christos 		  if (cond != COND_UNCOND && cp_num == 9)
   8199   1.4  christos 		    is_unpredictable = true;
   8200   1.7  christos 
   8201   1.7  christos 		  /* Fall through.  */
   8202   1.8  christos 		case 'b':
   8203   1.8  christos 		  func (stream, dis_style_mnemonic, "%s",
   8204   1.1  christos 			arm_conditional[cond]);
   8205   1.1  christos 		  break;
   8206   1.7  christos 
   8207   1.7  christos 		case 'J':
   8208   1.7  christos 		  {
   8209   1.7  christos 		    unsigned long regno
   8210   1.7  christos 		      = arm_decode_field_multiple (given, 13, 15, 22, 22);
   8211   1.7  christos 
   8212   1.7  christos 		    switch (regno)
   8213   1.7  christos 		      {
   8214   1.8  christos 		      case 0x1:
   8215   1.7  christos 			func (stream, dis_style_register, "FPSCR");
   8216   1.7  christos 			break;
   8217   1.8  christos 		      case 0x2:
   8218   1.7  christos 			func (stream, dis_style_register, "FPSCR_nzcvqc");
   8219   1.7  christos 			break;
   8220   1.8  christos 		      case 0xc:
   8221   1.7  christos 			func (stream, dis_style_register, "VPR");
   8222   1.7  christos 			break;
   8223   1.8  christos 		      case 0xd:
   8224   1.7  christos 			func (stream, dis_style_register, "P0");
   8225   1.7  christos 			break;
   8226   1.8  christos 		      case 0xe:
   8227   1.7  christos 			func (stream, dis_style_register, "FPCXTNS");
   8228   1.7  christos 			break;
   8229   1.8  christos 		      case 0xf:
   8230   1.7  christos 			func (stream, dis_style_register, "FPCXTS");
   8231   1.7  christos 			break;
   8232   1.8  christos 		      default:
   8233   1.8  christos 			func (stream, dis_style_text, "<invalid reg %lu>",
   8234   1.7  christos 			      regno);
   8235   1.7  christos 			break;
   8236   1.7  christos 		      }
   8237   1.7  christos 		  }
   8238   1.7  christos 		  break;
   8239   1.1  christos 
   8240   1.1  christos 		case '0': case '1': case '2': case '3': case '4':
   8241   1.1  christos 		case '5': case '6': case '7': case '8': case '9':
   8242   1.1  christos 		  {
   8243   1.1  christos 		    int width;
   8244   1.1  christos 
   8245   1.1  christos 		    c = arm_decode_bitfield (c, given, &value, &width);
   8246   1.1  christos 
   8247   1.1  christos 		    switch (*c)
   8248   1.1  christos 		      {
   8249   1.1  christos 		      case 'R':
   8250   1.8  christos 			if (value == 15)
   8251   1.1  christos 			  is_unpredictable = true;
   8252   1.1  christos 			/* Fall through.  */
   8253   1.1  christos 		      case 'r':
   8254   1.1  christos 			if (c[1] == 'u')
   8255   1.1  christos 			  {
   8256   1.1  christos 			    /* Eat the 'u' character.  */
   8257   1.1  christos 			    ++ c;
   8258   1.1  christos 
   8259   1.8  christos 			    if (u_reg == value)
   8260   1.1  christos 			      is_unpredictable = true;
   8261   1.1  christos 			    u_reg = value;
   8262   1.8  christos 			  }
   8263   1.8  christos 			func (stream, dis_style_register, "%s",
   8264   1.1  christos 			      arm_regnames[value]);
   8265   1.5  christos 			break;
   8266   1.5  christos 		      case 'V':
   8267   1.5  christos 			if (given & (1 << 6))
   8268   1.5  christos 			  goto Q;
   8269   1.1  christos 			/* FALLTHROUGH */
   8270   1.8  christos 		      case 'D':
   8271   1.1  christos 			func (stream, dis_style_register, "d%ld", value);
   8272   1.1  christos 			break;
   8273   1.5  christos 		      case 'Q':
   8274   1.1  christos 		      Q:
   8275   1.8  christos 			if (value & 1)
   8276   1.8  christos 			  func (stream, dis_style_text,
   8277   1.1  christos 				"<illegal reg q%ld.5>", value >> 1);
   8278   1.8  christos 			else
   8279   1.8  christos 			  func (stream, dis_style_register,
   8280   1.1  christos 				"q%ld", value >> 1);
   8281   1.1  christos 			break;
   8282   1.8  christos 		      case 'd':
   8283   1.1  christos 			func (stream, base_style, "%ld", value);
   8284   1.1  christos 			value_in_comment = value;
   8285   1.4  christos 			break;
   8286   1.4  christos 		      case 'E':
   8287   1.4  christos                         {
   8288   1.4  christos 			  /* Converts immediate 8 bit back to float value.  */
   8289   1.4  christos 			  unsigned floatVal = (value & 0x80) << 24
   8290   1.4  christos 			    | (value & 0x3F) << 19
   8291   1.4  christos 			    | ((value & 0x40) ? (0xF8 << 22) : (1 << 30));
   8292   1.4  christos 
   8293   1.4  christos 			  /* Quarter float have a maximum value of 31.0.
   8294   1.4  christos 			     Get floating point value multiplied by 1e7.
   8295   1.4  christos 			     The maximum value stays in limit of a 32-bit int.  */
   8296   1.4  christos 			  unsigned decVal =
   8297   1.4  christos 			    (78125 << (((floatVal >> 23) & 0xFF) - 124)) *
   8298   1.4  christos 			    (16 + (value & 0xF));
   8299   1.4  christos 
   8300   1.8  christos 			  if (!(decVal % 1000000))
   8301   1.8  christos 			    {
   8302   1.8  christos 			      func (stream, dis_style_immediate, "%ld", value);
   8303   1.8  christos 			      func (stream, dis_style_comment_start,
   8304   1.8  christos 				    "\t@ 0x%08x %c%u.%01u",
   8305   1.8  christos 				    floatVal, value & 0x80 ? '-' : ' ',
   8306   1.8  christos 				    decVal / 10000000,
   8307   1.8  christos 				    decVal % 10000000 / 1000000);
   8308   1.4  christos 			    }
   8309   1.8  christos 			  else if (!(decVal % 10000))
   8310   1.8  christos 			    {
   8311   1.8  christos 			      func (stream, dis_style_immediate, "%ld", value);
   8312   1.8  christos 			      func (stream, dis_style_comment_start,
   8313   1.8  christos 				    "\t@ 0x%08x %c%u.%03u",
   8314   1.8  christos 				    floatVal, value & 0x80 ? '-' : ' ',
   8315   1.8  christos 				    decVal / 10000000,
   8316   1.8  christos 				    decVal % 10000000 / 10000);
   8317   1.4  christos 			    }
   8318   1.8  christos 			  else
   8319   1.8  christos 			    {
   8320   1.8  christos 			      func (stream, dis_style_immediate, "%ld", value);
   8321   1.8  christos 			      func (stream, dis_style_comment_start,
   8322   1.8  christos 				    "\t@ 0x%08x %c%u.%07u",
   8323   1.8  christos 				    floatVal, value & 0x80 ? '-' : ' ',
   8324   1.8  christos 				    decVal / 10000000, decVal % 10000000);
   8325   1.4  christos 			    }
   8326   1.4  christos 			  break;
   8327   1.1  christos 			}
   8328   1.1  christos 		      case 'k':
   8329   1.1  christos 			{
   8330   1.8  christos 			  int from = (given & (1 << 7)) ? 32 : 16;
   8331   1.8  christos 			  func (stream, dis_style_immediate, "%ld",
   8332   1.1  christos 				from - value);
   8333   1.1  christos 			}
   8334   1.1  christos 			break;
   8335   1.1  christos 
   8336   1.1  christos 		      case 'w':
   8337   1.8  christos 			if (width == 2)
   8338   1.8  christos 			  func (stream, dis_style_mnemonic, "%s",
   8339   1.1  christos 				iwmmxt_wwnames[value]);
   8340   1.8  christos 			else
   8341   1.8  christos 			  func (stream, dis_style_mnemonic, "%s",
   8342   1.1  christos 				iwmmxt_wwssnames[value]);
   8343   1.1  christos 			break;
   8344   1.1  christos 
   8345   1.8  christos 		      case 'g':
   8346   1.8  christos 			func (stream, dis_style_register, "%s",
   8347   1.1  christos 			      iwmmxt_regnames[value]);
   8348   1.1  christos 			break;
   8349   1.8  christos 		      case 'G':
   8350   1.8  christos 			func (stream, dis_style_register, "%s",
   8351   1.1  christos 			      iwmmxt_cregnames[value]);
   8352   1.1  christos 			break;
   8353   1.1  christos 
   8354   1.8  christos 		      case 'x':
   8355   1.8  christos 			func (stream, dis_style_immediate, "0x%lx",
   8356   1.1  christos 			      (value & 0xffffffffUL));
   8357   1.1  christos 			break;
   8358   1.2     joerg 
   8359   1.2     joerg 		      case 'c':
   8360   1.2     joerg 			switch (value)
   8361   1.2     joerg 			  {
   8362   1.8  christos 			  case 0:
   8363   1.2     joerg 			    func (stream, dis_style_mnemonic, "eq");
   8364   1.2     joerg 			    break;
   8365   1.2     joerg 
   8366   1.8  christos 			  case 1:
   8367   1.2     joerg 			    func (stream, dis_style_mnemonic, "vs");
   8368   1.2     joerg 			    break;
   8369   1.2     joerg 
   8370   1.8  christos 			  case 2:
   8371   1.2     joerg 			    func (stream, dis_style_mnemonic, "ge");
   8372   1.2     joerg 			    break;
   8373   1.2     joerg 
   8374   1.8  christos 			  case 3:
   8375   1.2     joerg 			    func (stream, dis_style_mnemonic, "gt");
   8376   1.2     joerg 			    break;
   8377   1.2     joerg 
   8378   1.8  christos 			  default:
   8379   1.2     joerg 			    func (stream, dis_style_text, "??");
   8380   1.2     joerg 			    break;
   8381   1.2     joerg 			  }
   8382   1.2     joerg 			break;
   8383   1.1  christos 
   8384   1.1  christos 		      case '`':
   8385   1.1  christos 			c++;
   8386   1.8  christos 			if (value == 0)
   8387   1.1  christos 			  func (stream, dis_style_mnemonic, "%c", *c);
   8388   1.1  christos 			break;
   8389   1.1  christos 		      case '\'':
   8390   1.1  christos 			c++;
   8391   1.8  christos 			if (value == ((1ul << width) - 1))
   8392   1.1  christos 			  func (stream, base_style, "%c", *c);
   8393   1.1  christos 			break;
   8394   1.8  christos 		      case '?':
   8395   1.8  christos 			func (stream, base_style, "%c",
   8396   1.1  christos 			      c[(1 << width) - (int) value]);
   8397   1.1  christos 			c += 1 << width;
   8398   1.1  christos 			break;
   8399   1.1  christos 		      default:
   8400   1.1  christos 			abort ();
   8401   1.7  christos 		      }
   8402   1.7  christos 		  }
   8403   1.1  christos 		  break;
   8404   1.7  christos 
   8405   1.7  christos 		case 'y':
   8406   1.7  christos 		case 'z':
   8407   1.7  christos 		  {
   8408   1.7  christos 		    int single = *c++ == 'y';
   8409   1.1  christos 		    int regno;
   8410   1.7  christos 
   8411   1.7  christos 		    switch (*c)
   8412   1.7  christos 		      {
   8413   1.7  christos 		      case '4': /* Sm pair */
   8414   1.7  christos 		      case '0': /* Sm, Dm */
   8415   1.7  christos 			regno = given & 0x0000000f;
   8416   1.7  christos 			if (single)
   8417   1.7  christos 			  {
   8418   1.7  christos 			    regno <<= 1;
   8419   1.7  christos 			    regno += (given >> 5) & 1;
   8420   1.7  christos 			  }
   8421   1.7  christos 			else
   8422   1.7  christos 			  regno += ((given >> 5) & 1) << 4;
   8423   1.1  christos 			break;
   8424   1.7  christos 
   8425   1.7  christos 		      case '1': /* Sd, Dd */
   8426   1.7  christos 			regno = (given >> 12) & 0x0000000f;
   8427   1.7  christos 			if (single)
   8428   1.7  christos 			  {
   8429   1.7  christos 			    regno <<= 1;
   8430   1.7  christos 			    regno += (given >> 22) & 1;
   8431   1.7  christos 			  }
   8432   1.7  christos 			else
   8433   1.7  christos 			  regno += ((given >> 22) & 1) << 4;
   8434   1.1  christos 			break;
   8435   1.7  christos 
   8436   1.7  christos 		      case '2': /* Sn, Dn */
   8437   1.7  christos 			regno = (given >> 16) & 0x0000000f;
   8438   1.7  christos 			if (single)
   8439   1.7  christos 			  {
   8440   1.7  christos 			    regno <<= 1;
   8441   1.7  christos 			    regno += (given >> 7) & 1;
   8442   1.7  christos 			  }
   8443   1.7  christos 			else
   8444   1.7  christos 			  regno += ((given >> 7) & 1) << 4;
   8445   1.1  christos 			break;
   8446   1.7  christos 
   8447   1.8  christos 		      case '3': /* List */
   8448   1.7  christos 			func (stream, dis_style_text, "{");
   8449   1.7  christos 			regno = (given >> 12) & 0x0000000f;
   8450   1.7  christos 			if (single)
   8451   1.7  christos 			  {
   8452   1.7  christos 			    regno <<= 1;
   8453   1.7  christos 			    regno += (given >> 22) & 1;
   8454   1.7  christos 			  }
   8455   1.7  christos 			else
   8456   1.7  christos 			  regno += ((given >> 22) & 1) << 4;
   8457   1.1  christos 			break;
   8458   1.7  christos 
   8459   1.7  christos 		      default:
   8460   1.7  christos 			abort ();
   8461   1.1  christos 		      }
   8462   1.8  christos 
   8463   1.8  christos 		    func (stream, dis_style_register, "%c%d",
   8464   1.1  christos 			  single ? 's' : 'd', regno);
   8465   1.7  christos 
   8466   1.7  christos 		    if (*c == '3')
   8467   1.7  christos 		      {
   8468   1.1  christos 			int count = given & 0xff;
   8469   1.7  christos 
   8470   1.7  christos 			if (single == 0)
   8471   1.1  christos 			  count >>= 1;
   8472   1.7  christos 
   8473   1.7  christos 			if (--count)
   8474   1.8  christos 			  {
   8475   1.8  christos 			    func (stream, dis_style_text, "-");
   8476   1.7  christos 			    func (stream, dis_style_register, "%c%d",
   8477   1.7  christos 				  single ? 's' : 'd',
   8478   1.7  christos 				  regno + count);
   8479   1.1  christos 			  }
   8480   1.8  christos 
   8481   1.1  christos 			func (stream, dis_style_text, "}");
   8482   1.7  christos 		      }
   8483   1.8  christos 		    else if (*c == '4')
   8484   1.8  christos 		      {
   8485   1.8  christos 			func (stream, dis_style_text, ", ");
   8486   1.8  christos 			func (stream, dis_style_register, "%c%d",
   8487   1.8  christos 			      single ? 's' : 'd', regno + 1);
   8488   1.7  christos 		      }
   8489   1.7  christos 		  }
   8490   1.1  christos 		  break;
   8491   1.7  christos 
   8492   1.7  christos 		case 'L':
   8493   1.1  christos 		  switch (given & 0x00400100)
   8494   1.8  christos 		    {
   8495   1.8  christos 		    case 0x00000000:
   8496   1.8  christos 		      func (stream, dis_style_mnemonic, "b");
   8497   1.8  christos 		      break;
   8498   1.8  christos 		    case 0x00400000:
   8499   1.8  christos 		      func (stream, dis_style_mnemonic, "h");
   8500   1.8  christos 		      break;
   8501   1.8  christos 		    case 0x00000100:
   8502   1.8  christos 		      func (stream, dis_style_mnemonic, "w");
   8503   1.8  christos 		      break;
   8504   1.8  christos 		    case 0x00400100:
   8505   1.8  christos 		      func (stream, dis_style_mnemonic, "d");
   8506   1.7  christos 		      break;
   8507   1.7  christos 		    default:
   8508   1.1  christos 		      break;
   8509   1.7  christos 		    }
   8510   1.1  christos 		  break;
   8511   1.7  christos 
   8512   1.7  christos 		case 'Z':
   8513   1.7  christos 		  {
   8514   1.7  christos 		    /* given (20, 23) | given (0, 3) */
   8515   1.8  christos 		    value = ((given >> 16) & 0xf0) | (given & 0xf);
   8516   1.7  christos 		    func (stream, dis_style_immediate, "%d", (int) value);
   8517   1.7  christos 		  }
   8518   1.1  christos 		  break;
   8519   1.7  christos 
   8520   1.7  christos 		case 'l':
   8521   1.7  christos 		  /* This is like the 'A' operator, except that if
   8522   1.7  christos 		     the width field "M" is zero, then the offset is
   8523   1.7  christos 		     *not* multiplied by four.  */
   8524   1.7  christos 		  {
   8525   1.7  christos 		    int offset = given & 0xff;
   8526   1.1  christos 		    int multiplier = (given & 0x00000100) ? 4 : 1;
   8527   1.8  christos 
   8528   1.8  christos 		    func (stream, dis_style_text, "[");
   8529   1.8  christos 		    func (stream, dis_style_register, "%s",
   8530   1.1  christos 			  arm_regnames [(given >> 16) & 0xf]);
   8531   1.7  christos 
   8532   1.7  christos 		    if (multiplier > 1)
   8533   1.7  christos 		      {
   8534   1.7  christos 			value_in_comment = offset * multiplier;
   8535   1.7  christos 			if (NEGATIVE_BIT_SET)
   8536   1.7  christos 			  value_in_comment = - value_in_comment;
   8537   1.1  christos 		      }
   8538   1.7  christos 
   8539   1.7  christos 		    if (offset)
   8540   1.7  christos 		      {
   8541   1.8  christos 			if (PRE_BIT_SET)
   8542   1.8  christos 			  {
   8543   1.8  christos 			    func (stream, dis_style_text, ", ");
   8544   1.8  christos 			    func (stream, dis_style_immediate, "#%s%d",
   8545   1.8  christos 				  NEGATIVE_BIT_SET ? "-" : "",
   8546   1.8  christos 				  offset * multiplier);
   8547   1.8  christos 			    func (stream, dis_style_text, "]%s",
   8548   1.8  christos 				  WRITEBACK_BIT_SET ? "!" : "");
   8549   1.7  christos 			  }
   8550   1.8  christos 			else
   8551   1.8  christos 			  {
   8552   1.8  christos 			    func (stream, dis_style_text, "], ");
   8553   1.8  christos 			    func (stream, dis_style_immediate, "#%s%d",
   8554   1.8  christos 				  NEGATIVE_BIT_SET ? "-" : "",
   8555   1.8  christos 				  offset * multiplier);
   8556   1.7  christos 			  }
   8557   1.7  christos 		      }
   8558   1.8  christos 		    else
   8559   1.7  christos 		      func (stream, dis_style_text, "]");
   8560   1.7  christos 		  }
   8561   1.1  christos 		  break;
   8562   1.7  christos 
   8563   1.7  christos 		case 'r':
   8564   1.7  christos 		  {
   8565   1.7  christos 		    int imm4 = (given >> 4) & 0xf;
   8566   1.7  christos 		    int puw_bits = ((given >> 22) & 6) | ((given >> W_BIT) & 1);
   8567   1.7  christos 		    int ubit = ! NEGATIVE_BIT_SET;
   8568   1.7  christos 		    const char *rm = arm_regnames [given & 0xf];
   8569   1.1  christos 		    const char *rn = arm_regnames [(given >> 16) & 0xf];
   8570   1.7  christos 
   8571   1.7  christos 		    switch (puw_bits)
   8572   1.7  christos 		      {
   8573   1.7  christos 		      case 1:
   8574   1.8  christos 		      case 3:
   8575   1.8  christos 			func (stream, dis_style_text, "[");
   8576   1.8  christos 			func (stream, dis_style_register, "%s", rn);
   8577   1.8  christos 			func (stream, dis_style_text, "], ");
   8578   1.8  christos 			func (stream, dis_style_text, "%c", ubit ? '+' : '-');
   8579   1.7  christos 			func (stream, dis_style_register, "%s", rm);
   8580   1.8  christos 			if (imm4)
   8581   1.8  christos 			  {
   8582   1.8  christos 			    func (stream, dis_style_text, ", ");
   8583   1.8  christos 			    func (stream, dis_style_sub_mnemonic, "lsl ");
   8584   1.8  christos 			    func (stream, dis_style_immediate, "#%d", imm4);
   8585   1.7  christos 			  }
   8586   1.1  christos 			break;
   8587   1.7  christos 
   8588   1.7  christos 		      case 4:
   8589   1.7  christos 		      case 5:
   8590   1.7  christos 		      case 6:
   8591   1.8  christos 		      case 7:
   8592   1.8  christos 			func (stream, dis_style_text, "[");
   8593   1.8  christos 			func (stream, dis_style_register, "%s", rn);
   8594   1.8  christos 			func (stream, dis_style_text, ", ");
   8595   1.8  christos 			func (stream, dis_style_text, "%c", ubit ? '+' : '-');
   8596   1.7  christos 			func (stream, dis_style_register, "%s", rm);
   8597   1.8  christos 			if (imm4 > 0)
   8598   1.8  christos 			  {
   8599   1.8  christos 			    func (stream, dis_style_text, ", ");
   8600   1.8  christos 			    func (stream, dis_style_sub_mnemonic, "lsl ");
   8601   1.8  christos 			    func (stream, dis_style_immediate, "#%d", imm4);
   8602   1.8  christos 			  }
   8603   1.7  christos 			func (stream, dis_style_text, "]");
   8604   1.8  christos 			if (puw_bits == 5 || puw_bits == 7)
   8605   1.7  christos 			  func (stream, dis_style_text, "!");
   8606   1.1  christos 			break;
   8607   1.7  christos 
   8608   1.8  christos 		      default:
   8609   1.7  christos 			func (stream, dis_style_text, "INVALID");
   8610   1.7  christos 		      }
   8611   1.7  christos 		  }
   8612   1.1  christos 		  break;
   8613   1.7  christos 
   8614   1.7  christos 		case 'i':
   8615   1.7  christos 		  {
   8616   1.7  christos 		    long imm5;
   8617   1.8  christos 		    imm5 = ((given & 0x100) >> 4) | (given & 0xf);
   8618   1.8  christos 		    func (stream, dis_style_immediate, "%ld",
   8619   1.1  christos 			  (imm5 == 0) ? 32 : imm5);
   8620   1.7  christos 		  }
   8621   1.7  christos 		  break;
   8622   1.7  christos 
   8623   1.7  christos 		default:
   8624   1.1  christos 		  abort ();
   8625   1.1  christos 		}
   8626   1.1  christos 	    }
   8627   1.8  christos 	  else
   8628   1.8  christos 	    {
   8629   1.8  christos 	      if (*c == '@')
   8630   1.8  christos 		base_style = dis_style_comment_start;
   8631   1.8  christos 
   8632   1.8  christos 	      if (*c == '\t')
   8633   1.8  christos 		base_style = dis_style_text;
   8634   1.8  christos 
   8635   1.8  christos 	      func (stream, base_style, "%c", *c);
   8636   1.1  christos 	    }
   8637   1.1  christos 	}
   8638   1.1  christos 
   8639   1.8  christos       if (value_in_comment > 32 || value_in_comment < -16)
   8640   1.8  christos 	func (stream, dis_style_comment_start, "\t@ 0x%lx",
   8641   1.1  christos 	      (value_in_comment & 0xffffffffUL));
   8642   1.1  christos 
   8643   1.8  christos       if (is_unpredictable)
   8644   1.1  christos 	func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   8645   1.8  christos 
   8646   1.1  christos       return true;
   8647   1.8  christos     }
   8648   1.1  christos   return false;
   8649   1.1  christos }
   8650   1.8  christos 
   8651   1.7  christos static bool
   8652   1.7  christos print_insn_coprocessor (bfd_vma pc,
   8653   1.7  christos 			struct disassemble_info *info,
   8654   1.8  christos 			long given,
   8655   1.7  christos 			bool thumb)
   8656   1.7  christos {
   8657   1.7  christos   return print_insn_coprocessor_1 (coprocessor_opcodes,
   8658   1.7  christos 				   pc, info, given, thumb);
   8659   1.7  christos }
   8660   1.8  christos 
   8661   1.7  christos static bool
   8662   1.7  christos print_insn_generic_coprocessor (bfd_vma pc,
   8663   1.7  christos 				struct disassemble_info *info,
   8664   1.8  christos 				long given,
   8665   1.7  christos 				bool thumb)
   8666   1.7  christos {
   8667   1.7  christos   return print_insn_coprocessor_1 (generic_coprocessor_opcodes,
   8668   1.7  christos 				   pc, info, given, thumb);
   8669   1.7  christos }
   8670   1.1  christos 
   8671   1.1  christos /* Decodes and prints ARM addressing modes.  Returns the offset
   8672   1.1  christos    used in the address, if any, if it is worthwhile printing the
   8673   1.1  christos    offset as a hexadecimal value in a comment at the end of the
   8674   1.1  christos    line of disassembly.  */
   8675   1.1  christos 
   8676   1.1  christos static signed long
   8677   1.1  christos print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
   8678   1.1  christos {
   8679   1.8  christos   void *stream = info->stream;
   8680   1.2     joerg   fprintf_styled_ftype func = info->fprintf_styled_func;
   8681   1.1  christos   bfd_vma offset = 0;
   8682   1.1  christos 
   8683   1.1  christos   if (((given & 0x000f0000) == 0x000f0000)
   8684   1.1  christos       && ((given & 0x02000000) == 0))
   8685   1.1  christos     {
   8686   1.1  christos       offset = given & 0xfff;
   8687   1.8  christos 
   8688   1.8  christos       func (stream, dis_style_text, "[");
   8689   1.1  christos       func (stream, dis_style_register, "pc");
   8690   1.1  christos 
   8691   1.1  christos       if (PRE_BIT_SET)
   8692   1.2     joerg 	{
   8693   1.2     joerg 	  /* Pre-indexed.  Elide offset of positive zero when
   8694   1.2     joerg 	     non-writeback.  */
   8695   1.8  christos 	  if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
   8696   1.8  christos 	    {
   8697   1.8  christos 	      func (stream, dis_style_text, ", ");
   8698   1.8  christos 	      func (stream, dis_style_immediate, "#%s%d",
   8699   1.8  christos 		    NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8700   1.2     joerg 	    }
   8701   1.2     joerg 
   8702   1.2     joerg 	  if (NEGATIVE_BIT_SET)
   8703   1.1  christos 	    offset = -offset;
   8704   1.1  christos 
   8705   1.1  christos 	  offset += pc + 8;
   8706   1.1  christos 
   8707   1.1  christos 	  /* Cope with the possibility of write-back
   8708   1.1  christos 	     being used.  Probably a very dangerous thing
   8709   1.1  christos 	     for the programmer to do, but who are we to
   8710   1.8  christos 	     argue ?  */
   8711   1.1  christos 	  func (stream, dis_style_text, "]%s", WRITEBACK_BIT_SET ? "!" : "");
   8712   1.1  christos 	}
   8713   1.1  christos       else  /* Post indexed.  */
   8714   1.8  christos 	{
   8715   1.8  christos 	  func (stream, dis_style_text, "], ");
   8716   1.8  christos 	  func (stream, dis_style_immediate, "#%s%d",
   8717   1.1  christos 		NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8718   1.1  christos 
   8719   1.1  christos 	  /* Ie ignore the offset.  */
   8720   1.1  christos 	  offset = pc + 8;
   8721   1.1  christos 	}
   8722   1.8  christos 
   8723   1.1  christos       func (stream, dis_style_comment_start, "\t@ ");
   8724   1.1  christos       info->print_address_func (offset, info);
   8725   1.1  christos       offset = 0;
   8726   1.1  christos     }
   8727   1.1  christos   else
   8728   1.8  christos     {
   8729   1.8  christos       func (stream, dis_style_text, "[");
   8730   1.7  christos       func (stream, dis_style_register, "%s",
   8731   1.7  christos 	    arm_regnames[(given >> 16) & 0xf]);
   8732   1.7  christos 
   8733   1.7  christos       if (PRE_BIT_SET)
   8734   1.7  christos 	{
   8735   1.7  christos 	  if ((given & 0x02000000) == 0)
   8736   1.7  christos 	    {
   8737   1.7  christos 	      /* Elide offset of positive zero when non-writeback.  */
   8738   1.7  christos 	      offset = given & 0xfff;
   8739   1.8  christos 	      if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
   8740   1.8  christos 		{
   8741   1.8  christos 		  func (stream, dis_style_text, ", ");
   8742   1.8  christos 		  func (stream, dis_style_immediate, "#%s%d",
   8743   1.8  christos 			NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8744   1.7  christos 		}
   8745   1.7  christos 	    }
   8746   1.7  christos 	  else
   8747   1.8  christos 	    {
   8748   1.8  christos 	      func (stream, dis_style_text, ", %s",
   8749   1.8  christos 		    NEGATIVE_BIT_SET ? "-" : "");
   8750   1.7  christos 	      arm_decode_shift (given, func, stream, true);
   8751   1.7  christos 	    }
   8752   1.8  christos 
   8753   1.7  christos 	  func (stream, dis_style_text, "]%s",
   8754   1.7  christos 		WRITEBACK_BIT_SET ? "!" : "");
   8755   1.7  christos 	}
   8756   1.7  christos       else
   8757   1.7  christos 	{
   8758   1.7  christos 	  if ((given & 0x02000000) == 0)
   8759   1.7  christos 	    {
   8760   1.7  christos 	      /* Always show offset.  */
   8761   1.8  christos 	      offset = given & 0xfff;
   8762   1.8  christos 	      func (stream, dis_style_text, "], ");
   8763   1.7  christos 	      func (stream, dis_style_immediate, "#%s%d",
   8764   1.7  christos 		    NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   8765   1.7  christos 	    }
   8766   1.7  christos 	  else
   8767   1.8  christos 	    {
   8768   1.7  christos 	      func (stream, dis_style_text, "], %s",
   8769   1.8  christos 		    NEGATIVE_BIT_SET ? "-" : "");
   8770   1.7  christos 	      arm_decode_shift (given, func, stream, true);
   8771   1.7  christos 	    }
   8772   1.7  christos 	}
   8773   1.7  christos       if (NEGATIVE_BIT_SET)
   8774   1.7  christos 	offset = -offset;
   8775   1.7  christos     }
   8776   1.7  christos 
   8777   1.7  christos   return (signed long) offset;
   8778   1.7  christos }
   8779   1.7  christos 
   8780   1.7  christos 
   8781   1.7  christos /* Print one cde instruction on INFO->STREAM.
   8782   1.7  christos    Return TRUE if the instuction matched, FALSE if this is not a
   8783   1.8  christos    recognised cde instruction.  */
   8784   1.8  christos static bool
   8785   1.7  christos print_insn_cde (struct disassemble_info *info, long given, bool thumb)
   8786   1.7  christos {
   8787   1.7  christos   const struct cdeopcode32 *insn;
   8788   1.8  christos   void *stream = info->stream;
   8789   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   8790   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   8791   1.7  christos   enum disassembler_style old_base_style = base_style;
   8792   1.7  christos 
   8793   1.7  christos   if (thumb)
   8794   1.7  christos   {
   8795   1.7  christos     /* Manually extract the coprocessor code from a known point.
   8796   1.7  christos        This position is the same across all CDE instructions.  */
   8797   1.7  christos     for (insn = cde_opcodes; insn->assembler; insn++)
   8798   1.7  christos     {
   8799   1.7  christos       uint16_t coproc = (given >> insn->coproc_shift) & insn->coproc_mask;
   8800   1.7  christos       uint16_t coproc_mask = 1 << coproc;
   8801   1.7  christos       if (! (coproc_mask & cde_coprocs))
   8802   1.7  christos 	continue;
   8803   1.7  christos 
   8804   1.7  christos       if ((given & insn->mask) == insn->value)
   8805   1.8  christos       {
   8806   1.7  christos 	bool is_unpredictable = false;
   8807   1.7  christos 	const char *c;
   8808   1.7  christos 
   8809   1.7  christos 	for (c = insn->assembler; *c; c++)
   8810   1.7  christos 	{
   8811   1.7  christos 	  if (*c == '%')
   8812   1.7  christos 	  {
   8813   1.7  christos 	    switch (*++c)
   8814   1.8  christos 	    {
   8815   1.8  christos 	      case '{':
   8816   1.8  christos 		++c;
   8817   1.8  christos 		if (*c == '\0')
   8818   1.8  christos 		  abort ();
   8819   1.8  christos 		old_base_style = base_style;
   8820   1.8  christos 		base_style = decode_base_style (*c);
   8821   1.8  christos 		++c;
   8822   1.8  christos 		if (*c != ':')
   8823   1.8  christos 		  abort ();
   8824   1.8  christos 		break;
   8825   1.8  christos 
   8826   1.8  christos 	      case '}':
   8827   1.8  christos 		base_style = old_base_style;
   8828   1.8  christos 		break;
   8829   1.7  christos 
   8830   1.8  christos 	      case '%':
   8831   1.7  christos 		func (stream, base_style, "%%");
   8832   1.7  christos 		break;
   8833   1.7  christos 
   8834   1.7  christos 	      case '0': case '1': case '2': case '3': case '4':
   8835   1.7  christos 	      case '5': case '6': case '7': case '8': case '9':
   8836   1.7  christos 	      {
   8837   1.7  christos 		int width;
   8838   1.7  christos 		unsigned long value;
   8839   1.7  christos 
   8840   1.7  christos 		c = arm_decode_bitfield (c, given, &value, &width);
   8841   1.7  christos 
   8842   1.7  christos 		switch (*c)
   8843   1.7  christos 		{
   8844   1.7  christos 		  case 'S':
   8845   1.8  christos 		    if (value > 10)
   8846   1.7  christos 		      is_unpredictable = true;
   8847   1.7  christos 		    /* Fall through.  */
   8848   1.7  christos 		  case 'R':
   8849   1.8  christos 		    if (value == 13)
   8850   1.7  christos 		      is_unpredictable = true;
   8851   1.7  christos 		    /* Fall through.  */
   8852   1.8  christos 		  case 'r':
   8853   1.8  christos 		    func (stream, dis_style_register, "%s",
   8854   1.7  christos 			  arm_regnames[value]);
   8855   1.7  christos 		    break;
   8856   1.7  christos 
   8857   1.7  christos 		  case 'n':
   8858   1.8  christos 		    if (value == 15)
   8859   1.7  christos 		      func (stream, dis_style_register, "%s", "APSR_nzcv");
   8860   1.8  christos 		    else
   8861   1.8  christos 		      func (stream, dis_style_register, "%s",
   8862   1.7  christos 			    arm_regnames[value]);
   8863   1.7  christos 		    break;
   8864   1.7  christos 
   8865   1.8  christos 		  case 'T':
   8866   1.8  christos 		    func (stream, dis_style_register, "%s",
   8867   1.7  christos 			  arm_regnames[(value + 1) & 15]);
   8868   1.7  christos 		    break;
   8869   1.7  christos 
   8870   1.8  christos 		  case 'd':
   8871   1.7  christos 		    func (stream, dis_style_immediate, "%ld", value);
   8872   1.7  christos 		    break;
   8873   1.7  christos 
   8874   1.7  christos 		  case 'V':
   8875   1.8  christos 		    if (given & (1 << 6))
   8876   1.7  christos 		      func (stream, dis_style_register, "q%ld", value >> 1);
   8877   1.8  christos 		    else if (given & (1 << 24))
   8878   1.7  christos 		      func (stream, dis_style_register, "d%ld", value);
   8879   1.7  christos 		    else
   8880   1.7  christos 		      {
   8881   1.7  christos 			/* Encoding for S register is different than for D and
   8882   1.7  christos 			   Q registers.  S registers are encoded using the top
   8883   1.7  christos 			   single bit in position 22 as the lowest bit of the
   8884   1.7  christos 			   register number, while for Q and D it represents the
   8885   1.7  christos 			   highest bit of the register number.  */
   8886   1.7  christos 			uint8_t top_bit = (value >> 4) & 1;
   8887   1.7  christos 			uint8_t tmp = (value << 1) & 0x1e;
   8888   1.8  christos 			uint8_t res = tmp | top_bit;
   8889   1.7  christos 			func (stream, dis_style_register, "s%u", res);
   8890   1.7  christos 		      }
   8891   1.7  christos 		    break;
   8892   1.7  christos 
   8893   1.7  christos 		default:
   8894   1.7  christos 		  abort ();
   8895   1.7  christos 		}
   8896   1.7  christos 	      }
   8897   1.7  christos 	    break;
   8898   1.7  christos 
   8899   1.7  christos 	    case 'p':
   8900   1.7  christos 	      {
   8901   1.8  christos 		uint8_t proc_number = (given >> 8) & 0x7;
   8902   1.7  christos 		func (stream, dis_style_register, "p%u", proc_number);
   8903   1.7  christos 		break;
   8904   1.7  christos 	      }
   8905   1.7  christos 
   8906   1.7  christos 	    case 'a':
   8907   1.7  christos 	      {
   8908   1.7  christos 		uint8_t a_offset = 28;
   8909   1.8  christos 		if (given & (1 << a_offset))
   8910   1.7  christos 		  func (stream, dis_style_mnemonic, "a");
   8911   1.7  christos 		break;
   8912   1.7  christos 	      }
   8913   1.7  christos 	  default:
   8914   1.7  christos 	    abort ();
   8915   1.7  christos 	  }
   8916   1.7  christos 	}
   8917   1.8  christos 	else
   8918   1.8  christos 	  {
   8919   1.8  christos 	    if (*c == '@')
   8920   1.8  christos 	      base_style = dis_style_comment_start;
   8921   1.8  christos 	    if (*c == '\t')
   8922   1.8  christos 	      base_style = dis_style_text;
   8923   1.8  christos 
   8924   1.8  christos 	    func (stream, base_style, "%c", *c);
   8925   1.7  christos 	  }
   8926   1.1  christos       }
   8927   1.7  christos 
   8928   1.8  christos       if (is_unpredictable)
   8929   1.1  christos 	func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   8930   1.8  christos 
   8931   1.7  christos       return true;
   8932   1.1  christos       }
   8933   1.8  christos     }
   8934   1.7  christos     return false;
   8935   1.7  christos   }
   8936   1.8  christos   else
   8937   1.7  christos     return false;
   8938   1.1  christos }
   8939   1.1  christos 
   8940   1.1  christos 
   8941   1.1  christos /* Print one neon instruction on INFO->STREAM.
   8942   1.1  christos    Return TRUE if the instuction matched, FALSE if this is not a
   8943   1.1  christos    recognised neon instruction.  */
   8944   1.8  christos 
   8945   1.8  christos static bool
   8946   1.1  christos print_insn_neon (struct disassemble_info *info, long given, bool thumb)
   8947   1.1  christos {
   8948   1.1  christos   const struct opcode32 *insn;
   8949   1.8  christos   void *stream = info->stream;
   8950   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   8951   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   8952   1.1  christos   enum disassembler_style old_base_style = base_style;
   8953   1.1  christos 
   8954   1.1  christos   if (thumb)
   8955   1.1  christos     {
   8956   1.1  christos       if ((given & 0xef000000) == 0xef000000)
   8957   1.1  christos 	{
   8958   1.1  christos 	  /* Move bit 28 to bit 24 to translate Thumb2 to ARM encoding.  */
   8959   1.1  christos 	  unsigned long bit28 = given & (1 << 28);
   8960   1.1  christos 
   8961   1.1  christos 	  given &= 0x00ffffff;
   8962   1.1  christos 	  if (bit28)
   8963   1.1  christos             given |= 0xf3000000;
   8964   1.1  christos           else
   8965   1.1  christos 	    given |= 0xf2000000;
   8966   1.1  christos 	}
   8967   1.1  christos       else if ((given & 0xff000000) == 0xf9000000)
   8968   1.7  christos 	given ^= 0xf9000000 ^ 0xf4000000;
   8969   1.7  christos       /* BFloat16 neon instructions without special top byte handling.  */
   8970   1.7  christos       else if ((given & 0xff000000) == 0xfe000000
   8971   1.7  christos 	       || (given & 0xff000000) == 0xfc000000)
   8972   1.7  christos 	;
   8973   1.7  christos       /* vdup is also a valid neon instruction.  */
   8974   1.8  christos       else if ((given & 0xff900f5f) != 0xee800b10)
   8975   1.1  christos 	return false;
   8976   1.4  christos     }
   8977   1.1  christos 
   8978   1.1  christos   for (insn = neon_opcodes; insn->assembler; insn++)
   8979   1.7  christos     {
   8980   1.7  christos       unsigned long cond_mask = insn->mask;
   8981   1.7  christos       unsigned long cond_value = insn->value;
   8982   1.7  christos       int cond;
   8983   1.7  christos 
   8984   1.7  christos       if (thumb)
   8985   1.7  christos         {
   8986   1.7  christos           if ((cond_mask & 0xf0000000) == 0) {
   8987   1.7  christos               /* For the entries in neon_opcodes, an opcode mask/value with
   8988   1.7  christos                  the high 4 bits equal to 0 indicates a conditional
   8989   1.7  christos                  instruction. For thumb however, we need to include those
   8990   1.7  christos                  bits in the instruction matching.  */
   8991   1.7  christos               cond_mask |= 0xf0000000;
   8992   1.7  christos               /* Furthermore, the thumb encoding of a conditional instruction
   8993   1.7  christos                  will have the high 4 bits equal to 0xe.  */
   8994   1.7  christos               cond_value |= 0xe0000000;
   8995   1.7  christos           }
   8996   1.7  christos           if (ifthen_state)
   8997   1.7  christos             cond = IFTHEN_COND;
   8998   1.7  christos           else
   8999   1.7  christos             cond = COND_UNCOND;
   9000   1.7  christos         }
   9001   1.7  christos       else
   9002   1.7  christos         {
   9003   1.7  christos           if ((given & 0xf0000000) == 0xf0000000)
   9004   1.7  christos             {
   9005   1.7  christos               /* If the instruction is unconditional, update the mask to only
   9006   1.7  christos                  match against unconditional opcode values.  */
   9007   1.7  christos               cond_mask |= 0xf0000000;
   9008   1.7  christos               cond = COND_UNCOND;
   9009   1.7  christos             }
   9010   1.7  christos           else
   9011   1.7  christos             {
   9012   1.7  christos               cond = (given >> 28) & 0xf;
   9013   1.7  christos               if (cond == 0xe)
   9014   1.7  christos                 cond = COND_UNCOND;
   9015   1.7  christos             }
   9016   1.7  christos         }
   9017   1.7  christos 
   9018   1.1  christos       if ((given & cond_mask) == cond_value)
   9019   1.1  christos 	{
   9020   1.8  christos 	  signed long value_in_comment = 0;
   9021   1.1  christos 	  bool is_unpredictable = false;
   9022   1.1  christos 	  const char *c;
   9023   1.1  christos 
   9024   1.1  christos 	  for (c = insn->assembler; *c; c++)
   9025   1.1  christos 	    {
   9026   1.1  christos 	      if (*c == '%')
   9027   1.1  christos 		{
   9028   1.1  christos 		  switch (*++c)
   9029   1.8  christos 		    {
   9030   1.8  christos 		    case '{':
   9031   1.8  christos 		      ++c;
   9032   1.8  christos 		      if (*c == '\0')
   9033   1.8  christos 			abort ();
   9034   1.8  christos 		      old_base_style = base_style;
   9035   1.8  christos 		      base_style = decode_base_style (*c);
   9036   1.8  christos 		      ++c;
   9037   1.8  christos 		      if (*c != ':')
   9038   1.8  christos 			abort ();
   9039   1.8  christos 		      break;
   9040   1.8  christos 
   9041   1.8  christos 		    case '}':
   9042   1.8  christos 		      base_style = old_base_style;
   9043   1.8  christos 		      break;
   9044   1.1  christos 
   9045   1.8  christos 		    case '%':
   9046   1.1  christos 		      func (stream, base_style, "%%");
   9047   1.1  christos 		      break;
   9048   1.2     joerg 
   9049   1.2     joerg 		    case 'u':
   9050   1.8  christos 		      if (thumb && ifthen_state)
   9051   1.2     joerg 			is_unpredictable = true;
   9052   1.2     joerg 
   9053   1.1  christos 		      /* Fall through.  */
   9054   1.8  christos 		    case 'c':
   9055   1.8  christos 		      func (stream, dis_style_mnemonic, "%s",
   9056   1.1  christos 			    arm_conditional[cond]);
   9057   1.1  christos 		      break;
   9058   1.1  christos 
   9059   1.1  christos 		    case 'A':
   9060   1.4  christos 		      {
   9061   1.1  christos 			static const unsigned char enc[16] =
   9062   1.1  christos 			{
   9063   1.1  christos 			  0x4, 0x14, /* st4 0,1 */
   9064   1.1  christos 			  0x4, /* st1 2 */
   9065   1.1  christos 			  0x4, /* st2 3 */
   9066   1.1  christos 			  0x3, /* st3 4 */
   9067   1.1  christos 			  0x13, /* st3 5 */
   9068   1.1  christos 			  0x3, /* st1 6 */
   9069   1.1  christos 			  0x1, /* st1 7 */
   9070   1.1  christos 			  0x2, /* st2 8 */
   9071   1.1  christos 			  0x12, /* st2 9 */
   9072   1.1  christos 			  0x2, /* st1 10 */
   9073   1.1  christos 			  0, 0, 0, 0, 0
   9074   1.1  christos 			};
   9075   1.1  christos 			int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
   9076   1.1  christos 			int rn = ((given >> 16) & 0xf);
   9077   1.1  christos 			int rm = ((given >> 0) & 0xf);
   9078   1.1  christos 			int align = ((given >> 4) & 0x3);
   9079   1.1  christos 			int type = ((given >> 8) & 0xf);
   9080   1.1  christos 			int n = enc[type] & 0xf;
   9081   1.1  christos 			int stride = (enc[type] >> 4) + 1;
   9082   1.4  christos 			int ix;
   9083   1.8  christos 
   9084   1.1  christos 			func (stream, dis_style_text, "{");
   9085   1.1  christos 			if (stride > 1)
   9086   1.8  christos 			  for (ix = 0; ix != n; ix++)
   9087   1.8  christos 			    {
   9088   1.8  christos 			      if (ix > 0)
   9089   1.8  christos 				func (stream, dis_style_text, ",");
   9090   1.8  christos 			      func (stream, dis_style_register, "d%d",
   9091   1.8  christos 				    rd + ix * stride);
   9092   1.1  christos 			    }
   9093   1.8  christos 			else if (n == 1)
   9094   1.1  christos 			  func (stream, dis_style_register, "d%d", rd);
   9095   1.8  christos 			else
   9096   1.8  christos 			  {
   9097   1.8  christos 			    func (stream, dis_style_register, "d%d", rd);
   9098   1.8  christos 			    func (stream, dis_style_text, "-");
   9099   1.8  christos 			    func (stream, dis_style_register, "d%d",
   9100   1.8  christos 				  rd + n - 1);
   9101   1.8  christos 			  }
   9102   1.8  christos 			func (stream, dis_style_text, "}, [");
   9103   1.8  christos 			func (stream, dis_style_register, "%s",
   9104   1.1  christos 			      arm_regnames[rn]);
   9105   1.8  christos 			if (align)
   9106   1.8  christos 			  {
   9107   1.8  christos 			    func (stream, dis_style_text, " :");
   9108   1.8  christos 			    func (stream, dis_style_immediate, "%d",
   9109   1.8  christos 				  32 << align);
   9110   1.8  christos 			  }
   9111   1.1  christos 			func (stream, dis_style_text, "]");
   9112   1.8  christos 			if (rm == 0xd)
   9113   1.1  christos 			  func (stream, dis_style_text, "!");
   9114   1.8  christos 			else if (rm != 0xf)
   9115   1.8  christos 			  {
   9116   1.8  christos 			    func (stream, dis_style_text, ", ");
   9117   1.8  christos 			    func (stream, dis_style_register, "%s",
   9118   1.8  christos 				  arm_regnames[rm]);
   9119   1.1  christos 			  }
   9120   1.1  christos 		      }
   9121   1.4  christos 		      break;
   9122   1.1  christos 
   9123   1.1  christos 		    case 'B':
   9124   1.1  christos 		      {
   9125   1.1  christos 			int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
   9126   1.1  christos 			int rn = ((given >> 16) & 0xf);
   9127   1.1  christos 			int rm = ((given >> 0) & 0xf);
   9128   1.1  christos 			int idx_align = ((given >> 4) & 0xf);
   9129   1.1  christos                         int align = 0;
   9130   1.1  christos 			int size = ((given >> 10) & 0x3);
   9131   1.1  christos 			int idx = idx_align >> (size + 1);
   9132   1.1  christos                         int length = ((given >> 8) & 3) + 1;
   9133   1.1  christos                         int stride = 1;
   9134   1.1  christos                         int i;
   9135   1.1  christos 
   9136   1.1  christos                         if (length > 1 && size > 0)
   9137   1.4  christos                           stride = (idx_align & (1 << size)) ? 2 : 1;
   9138   1.1  christos 
   9139   1.1  christos                         switch (length)
   9140   1.1  christos                           {
   9141   1.1  christos                           case 1:
   9142   1.1  christos                             {
   9143   1.1  christos                               int amask = (1 << size) - 1;
   9144   1.8  christos                               if ((idx_align & (1 << size)) != 0)
   9145   1.1  christos                                 return false;
   9146   1.1  christos                               if (size > 0)
   9147   1.1  christos                                 {
   9148   1.1  christos                                   if ((idx_align & amask) == amask)
   9149   1.1  christos                                     align = 8 << size;
   9150   1.8  christos                                   else if ((idx_align & amask) != 0)
   9151   1.1  christos                                     return false;
   9152   1.1  christos                                 }
   9153   1.1  christos                               }
   9154   1.4  christos                             break;
   9155   1.1  christos 
   9156   1.1  christos                           case 2:
   9157   1.8  christos                             if (size == 2 && (idx_align & 2) != 0)
   9158   1.1  christos                               return false;
   9159   1.1  christos                             align = (idx_align & 1) ? 16 << size : 0;
   9160   1.4  christos                             break;
   9161   1.1  christos 
   9162   1.1  christos                           case 3:
   9163   1.1  christos                             if ((size == 2 && (idx_align & 3) != 0)
   9164   1.8  christos                                 || (idx_align & 1) != 0)
   9165   1.1  christos                               return false;
   9166   1.4  christos                             break;
   9167   1.1  christos 
   9168   1.1  christos                           case 4:
   9169   1.1  christos                             if (size == 2)
   9170   1.1  christos                               {
   9171   1.8  christos                                 if ((idx_align & 3) == 3)
   9172   1.1  christos                                   return false;
   9173   1.1  christos                                 align = (idx_align & 3) * 64;
   9174   1.1  christos                               }
   9175   1.1  christos                             else
   9176   1.1  christos                               align = (idx_align & 1) ? 32 << size : 0;
   9177   1.4  christos                             break;
   9178   1.1  christos 
   9179   1.1  christos                           default:
   9180   1.1  christos                             abort ();
   9181   1.4  christos                           }
   9182   1.8  christos 
   9183   1.1  christos 			func (stream, dis_style_text, "{");
   9184   1.8  christos                         for (i = 0; i < length; i++)
   9185   1.8  christos 			  {
   9186   1.8  christos 			    if (i > 0)
   9187   1.8  christos 			      func (stream, dis_style_text, ",");
   9188   1.8  christos 			    func (stream, dis_style_register, "d%d[%d]",
   9189   1.8  christos 				  rd + i * stride, idx);
   9190   1.8  christos 			  }
   9191   1.8  christos 			func (stream, dis_style_text, "}, [");
   9192   1.8  christos 			func (stream, dis_style_register, "%s",
   9193   1.1  christos 			      arm_regnames[rn]);
   9194   1.8  christos 			if (align)
   9195   1.8  christos 			  {
   9196   1.8  christos 			    func (stream, dis_style_text, " :");
   9197   1.8  christos 			    func (stream, dis_style_immediate, "%d", align);
   9198   1.8  christos 			  }
   9199   1.1  christos 			func (stream, dis_style_text, "]");
   9200   1.8  christos 			if (rm == 0xd)
   9201   1.1  christos 			  func (stream, dis_style_text, "!");
   9202   1.8  christos 			else if (rm != 0xf)
   9203   1.8  christos 			  {
   9204   1.8  christos 			    func (stream, dis_style_text, ", ");
   9205   1.8  christos 			    func (stream, dis_style_register, "%s",
   9206   1.8  christos 				  arm_regnames[rm]);
   9207   1.1  christos 			  }
   9208   1.1  christos 		      }
   9209   1.4  christos 		      break;
   9210   1.1  christos 
   9211   1.1  christos 		    case 'C':
   9212   1.1  christos 		      {
   9213   1.1  christos 			int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
   9214   1.1  christos 			int rn = ((given >> 16) & 0xf);
   9215   1.1  christos 			int rm = ((given >> 0) & 0xf);
   9216   1.1  christos 			int align = ((given >> 4) & 0x1);
   9217   1.1  christos 			int size = ((given >> 6) & 0x3);
   9218   1.1  christos 			int type = ((given >> 8) & 0x3);
   9219   1.1  christos 			int n = type + 1;
   9220   1.1  christos 			int stride = ((given >> 5) & 0x1);
   9221   1.4  christos 			int ix;
   9222   1.1  christos 
   9223   1.1  christos 			if (stride && (n == 1))
   9224   1.1  christos 			  n++;
   9225   1.1  christos 			else
   9226   1.4  christos 			  stride++;
   9227   1.8  christos 
   9228   1.1  christos 			func (stream, dis_style_text, "{");
   9229   1.1  christos 			if (stride > 1)
   9230   1.8  christos 			  for (ix = 0; ix != n; ix++)
   9231   1.8  christos 			    {
   9232   1.8  christos 			      if (ix > 0)
   9233   1.8  christos 				func (stream, dis_style_text, ",");
   9234   1.8  christos 			      func (stream, dis_style_register, "d%d[]",
   9235   1.8  christos 				    rd + ix * stride);
   9236   1.1  christos 			    }
   9237   1.8  christos 			else if (n == 1)
   9238   1.1  christos 			  func (stream, dis_style_register, "d%d[]", rd);
   9239   1.8  christos 			else
   9240   1.8  christos 			  {
   9241   1.8  christos 			    func (stream, dis_style_register, "d%d[]", rd);
   9242   1.8  christos 			    func (stream, dis_style_text, "-");
   9243   1.8  christos 			    func (stream, dis_style_register, "d%d[]",
   9244   1.8  christos 				  rd + n - 1);
   9245   1.8  christos 			  }
   9246   1.8  christos 			func (stream, dis_style_text, "}, [");
   9247   1.8  christos 			func (stream, dis_style_register, "%s",
   9248   1.1  christos 			      arm_regnames[rn]);
   9249   1.1  christos 			if (align)
   9250   1.1  christos 			  {
   9251   1.1  christos                             align = (8 * (type + 1)) << size;
   9252   1.1  christos                             if (type == 3)
   9253   1.1  christos                               align = (size > 1) ? align >> 1 : align;
   9254   1.8  christos 			    if (type == 2 || (type == 0 && !size))
   9255   1.8  christos 			      func (stream, dis_style_text,
   9256   1.1  christos 				    " :<bad align %d>", align);
   9257   1.8  christos 			    else
   9258   1.8  christos 			      {
   9259   1.8  christos 				func (stream, dis_style_text, " :");
   9260   1.8  christos 				func (stream, dis_style_immediate,
   9261   1.8  christos 				      "%d", align);
   9262   1.1  christos 			      }
   9263   1.8  christos 			  }
   9264   1.1  christos 			func (stream, dis_style_text, "]");
   9265   1.8  christos 			if (rm == 0xd)
   9266   1.1  christos 			  func (stream, dis_style_text, "!");
   9267   1.8  christos 			else if (rm != 0xf)
   9268   1.8  christos 			  {
   9269   1.8  christos 			    func (stream, dis_style_text, ", ");
   9270   1.8  christos 			    func (stream, dis_style_register, "%s",
   9271   1.8  christos 				  arm_regnames[rm]);
   9272   1.1  christos 			  }
   9273   1.1  christos 		      }
   9274   1.4  christos 		      break;
   9275   1.1  christos 
   9276   1.1  christos 		    case 'D':
   9277   1.1  christos 		      {
   9278   1.1  christos 			int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
   9279   1.1  christos 			int size = (given >> 20) & 3;
   9280   1.1  christos 			int reg = raw_reg & ((4 << size) - 1);
   9281   1.4  christos 			int ix = raw_reg >> size >> 2;
   9282   1.8  christos 
   9283   1.1  christos 			func (stream, dis_style_register, "d%d[%d]", reg, ix);
   9284   1.1  christos 		      }
   9285   1.4  christos 		      break;
   9286   1.1  christos 
   9287   1.1  christos 		    case 'E':
   9288   1.1  christos 		      /* Neon encoded constant for mov, mvn, vorr, vbic.  */
   9289   1.1  christos 		      {
   9290   1.1  christos 			int bits = 0;
   9291   1.1  christos 			int cmode = (given >> 8) & 0xf;
   9292   1.1  christos 			int op = (given >> 5) & 0x1;
   9293   1.1  christos 			unsigned long value = 0, hival = 0;
   9294   1.1  christos 			unsigned shift;
   9295   1.1  christos                         int size = 0;
   9296   1.4  christos                         int isfloat = 0;
   9297   1.1  christos 
   9298   1.1  christos 			bits |= ((given >> 24) & 1) << 7;
   9299   1.1  christos 			bits |= ((given >> 16) & 7) << 4;
   9300   1.4  christos 			bits |= ((given >> 0) & 15) << 0;
   9301   1.1  christos 
   9302   1.1  christos 			if (cmode < 8)
   9303   1.1  christos 			  {
   9304   1.1  christos 			    shift = (cmode >> 1) & 3;
   9305   1.1  christos 			    value = (unsigned long) bits << (8 * shift);
   9306   1.1  christos                             size = 32;
   9307   1.1  christos 			  }
   9308   1.1  christos 			else if (cmode < 12)
   9309   1.1  christos 			  {
   9310   1.1  christos 			    shift = (cmode >> 1) & 1;
   9311   1.1  christos 			    value = (unsigned long) bits << (8 * shift);
   9312   1.1  christos                             size = 16;
   9313   1.1  christos 			  }
   9314   1.1  christos 			else if (cmode < 14)
   9315   1.1  christos 			  {
   9316   1.1  christos 			    shift = (cmode & 1) + 1;
   9317   1.1  christos 			    value = (unsigned long) bits << (8 * shift);
   9318   1.1  christos 			    value |= (1ul << (8 * shift)) - 1;
   9319   1.1  christos                             size = 32;
   9320   1.1  christos 			  }
   9321   1.1  christos 			else if (cmode == 14)
   9322   1.1  christos 			  {
   9323   1.1  christos 			    if (op)
   9324   1.1  christos 			      {
   9325   1.1  christos 				/* Bit replication into bytes.  */
   9326   1.1  christos 				int ix;
   9327   1.4  christos 				unsigned long mask;
   9328   1.1  christos 
   9329   1.1  christos 				value = 0;
   9330   1.1  christos                                 hival = 0;
   9331   1.1  christos 				for (ix = 7; ix >= 0; ix--)
   9332   1.1  christos 				  {
   9333   1.1  christos 				    mask = ((bits >> ix) & 1) ? 0xff : 0;
   9334   1.1  christos                                     if (ix <= 3)
   9335   1.1  christos 				      value = (value << 8) | mask;
   9336   1.1  christos                                     else
   9337   1.1  christos                                       hival = (hival << 8) | mask;
   9338   1.1  christos 				  }
   9339   1.1  christos                                 size = 64;
   9340   1.1  christos 			      }
   9341   1.1  christos                             else
   9342   1.1  christos                               {
   9343   1.1  christos                                 /* Byte replication.  */
   9344   1.1  christos                                 value = (unsigned long) bits;
   9345   1.1  christos                                 size = 8;
   9346   1.1  christos                               }
   9347   1.1  christos 			  }
   9348   1.1  christos 			else if (!op)
   9349   1.1  christos 			  {
   9350   1.1  christos 			    /* Floating point encoding.  */
   9351   1.4  christos 			    int tmp;
   9352   1.1  christos 
   9353   1.1  christos 			    value = (unsigned long)  (bits & 0x7f) << 19;
   9354   1.1  christos 			    value |= (unsigned long) (bits & 0x80) << 24;
   9355   1.1  christos 			    tmp = bits & 0x40 ? 0x3c : 0x40;
   9356   1.1  christos 			    value |= (unsigned long) tmp << 24;
   9357   1.1  christos                             size = 32;
   9358   1.1  christos                             isfloat = 1;
   9359   1.1  christos 			  }
   9360   1.1  christos 			else
   9361   1.8  christos 			  {
   9362   1.8  christos 			    func (stream, dis_style_text,
   9363   1.1  christos 				  "<illegal constant %.8x:%x:%x>",
   9364   1.1  christos                                   bits, cmode, op);
   9365   1.1  christos                             size = 32;
   9366   1.1  christos 			    break;
   9367   1.1  christos 			  }
   9368   1.1  christos                         switch (size)
   9369   1.1  christos                           {
   9370   1.8  christos                           case 8:
   9371   1.8  christos 			    func (stream, dis_style_immediate, "#%ld", value);
   9372   1.8  christos 			    func (stream, dis_style_comment_start,
   9373   1.1  christos 				  "\t@ 0x%.2lx", value);
   9374   1.4  christos                             break;
   9375   1.1  christos 
   9376   1.8  christos                           case 16:
   9377   1.8  christos 			    func (stream, dis_style_immediate, "#%ld", value);
   9378   1.8  christos 			    func (stream, dis_style_comment_start,
   9379   1.1  christos 				  "\t@ 0x%.4lx", value);
   9380   1.1  christos                             break;
   9381   1.1  christos 
   9382   1.1  christos                           case 32:
   9383   1.1  christos                             if (isfloat)
   9384   1.1  christos                               {
   9385   1.1  christos                                 unsigned char valbytes[4];
   9386   1.4  christos                                 double fvalue;
   9387   1.1  christos 
   9388   1.1  christos                                 /* Do this a byte at a time so we don't have to
   9389   1.1  christos                                    worry about the host's endianness.  */
   9390   1.1  christos                                 valbytes[0] = value & 0xff;
   9391   1.1  christos                                 valbytes[1] = (value >> 8) & 0xff;
   9392   1.1  christos                                 valbytes[2] = (value >> 16) & 0xff;
   9393   1.4  christos                                 valbytes[3] = (value >> 24) & 0xff;
   9394   1.4  christos 
   9395   1.1  christos                                 floatformat_to_double
   9396   1.1  christos                                   (& floatformat_ieee_single_little, valbytes,
   9397   1.4  christos                                   & fvalue);
   9398   1.8  christos 
   9399   1.8  christos 				func (stream, dis_style_immediate,
   9400   1.8  christos 				      "#%.7g", fvalue);
   9401   1.8  christos 				func (stream, dis_style_comment_start,
   9402   1.1  christos 				      "\t@ 0x%.8lx", value);
   9403   1.1  christos                               }
   9404   1.8  christos                             else
   9405   1.8  christos 			      {
   9406   1.8  christos 				func (stream, dis_style_immediate, "#%ld",
   9407   1.8  christos 				      (long) (((value & 0x80000000L) != 0)
   9408   1.8  christos 					      ? value | ~0xffffffffL : value));
   9409   1.8  christos 				func (stream, dis_style_comment_start,
   9410   1.8  christos 				      "\t@ 0x%.8lx", value);
   9411   1.1  christos 			      }
   9412   1.1  christos                             break;
   9413   1.1  christos 
   9414   1.8  christos                           case 64:
   9415   1.8  christos 			    func (stream, dis_style_immediate,
   9416   1.1  christos 				  "#0x%.8lx%.8lx", hival, value);
   9417   1.4  christos                             break;
   9418   1.1  christos 
   9419   1.1  christos                           default:
   9420   1.1  christos                             abort ();
   9421   1.1  christos                           }
   9422   1.1  christos 		      }
   9423   1.4  christos 		      break;
   9424   1.1  christos 
   9425   1.1  christos 		    case 'F':
   9426   1.1  christos 		      {
   9427   1.1  christos 			int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
   9428   1.4  christos 			int num = (given >> 8) & 0x3;
   9429   1.8  christos 
   9430   1.1  christos 			func (stream, dis_style_text, "{");
   9431   1.8  christos 			if (!num)
   9432   1.1  christos 			  func (stream, dis_style_register, "d%d", regno);
   9433   1.8  christos 			else if (num + regno >= 32)
   9434   1.8  christos 			  {
   9435   1.8  christos 			    func (stream, dis_style_register, "d%d", regno);
   9436   1.8  christos 			    func (stream, dis_style_text, "-<overflow reg d%d",
   9437   1.8  christos 				  regno + num);
   9438   1.1  christos 			  }
   9439   1.8  christos 			else
   9440   1.8  christos 			  {
   9441   1.8  christos 			    func (stream, dis_style_register, "d%d", regno);
   9442   1.8  christos 			    func (stream, dis_style_text, "-");
   9443   1.8  christos 			    func (stream, dis_style_register, "d%d",
   9444   1.8  christos 				  regno + num);
   9445   1.8  christos 			  }
   9446   1.1  christos 			func (stream, dis_style_text, "}");
   9447   1.1  christos 		      }
   9448   1.2     joerg 		      break;
   9449   1.1  christos 
   9450   1.1  christos 
   9451   1.1  christos 		    case '0': case '1': case '2': case '3': case '4':
   9452   1.1  christos 		    case '5': case '6': case '7': case '8': case '9':
   9453   1.1  christos 		      {
   9454   1.1  christos 			int width;
   9455   1.1  christos 			unsigned long value;
   9456   1.1  christos 
   9457   1.4  christos 			c = arm_decode_bitfield (c, given, &value, &width);
   9458   1.1  christos 
   9459   1.1  christos 			switch (*c)
   9460   1.1  christos 			  {
   9461   1.8  christos 			  case 'r':
   9462   1.8  christos 			    func (stream, dis_style_register, "%s",
   9463   1.1  christos 				  arm_regnames[value]);
   9464   1.1  christos 			    break;
   9465   1.8  christos 			  case 'd':
   9466   1.1  christos 			    func (stream, base_style, "%ld", value);
   9467   1.1  christos 			    value_in_comment = value;
   9468   1.1  christos 			    break;
   9469   1.8  christos 			  case 'e':
   9470   1.8  christos 			    func (stream, dis_style_immediate, "%ld",
   9471   1.1  christos 				  (1ul << width) - value);
   9472   1.4  christos 			    break;
   9473   1.1  christos 
   9474   1.1  christos 			  case 'S':
   9475   1.1  christos 			  case 'T':
   9476   1.1  christos 			  case 'U':
   9477   1.1  christos 			    /* Various width encodings.  */
   9478   1.1  christos 			    {
   9479   1.1  christos 			      int base = 8 << (*c - 'S'); /* 8,16 or 32 */
   9480   1.1  christos 			      int limit;
   9481   1.1  christos 			      unsigned low, high;
   9482   1.1  christos 
   9483   1.1  christos 			      c++;
   9484   1.1  christos 			      if (*c >= '0' && *c <= '9')
   9485   1.1  christos 				limit = *c - '0';
   9486   1.1  christos 			      else if (*c >= 'a' && *c <= 'f')
   9487   1.1  christos 				limit = *c - 'a' + 10;
   9488   1.1  christos 			      else
   9489   1.7  christos 				abort ();
   9490   1.7  christos 			      low = limit >> 2;
   9491   1.7  christos 			      high = limit & 3;
   9492   1.7  christos 
   9493   1.8  christos 			      if (value < low || value > high)
   9494   1.8  christos 				func (stream, dis_style_text,
   9495   1.7  christos 				      "<illegal width %d>", base << value);
   9496   1.8  christos 			      else
   9497   1.8  christos 				func (stream, base_style, "%d",
   9498   1.7  christos 				      base << value);
   9499   1.7  christos 			    }
   9500   1.7  christos 			    break;
   9501   1.7  christos 			  case 'R':
   9502   1.7  christos 			    if (given & (1 << 6))
   9503   1.7  christos 			      goto Q;
   9504   1.7  christos 			    /* FALLTHROUGH */
   9505   1.8  christos 			  case 'D':
   9506   1.7  christos 			    func (stream, dis_style_register, "d%ld", value);
   9507   1.7  christos 			    break;
   9508   1.7  christos 			  case 'Q':
   9509   1.7  christos 			  Q:
   9510   1.8  christos 			    if (value & 1)
   9511   1.8  christos 			      func (stream, dis_style_text,
   9512   1.7  christos 				    "<illegal reg q%ld.5>", value >> 1);
   9513   1.8  christos 			    else
   9514   1.8  christos 			      func (stream, dis_style_register,
   9515   1.7  christos 				    "q%ld", value >> 1);
   9516   1.7  christos 			    break;
   9517   1.7  christos 
   9518   1.7  christos 			  case '`':
   9519   1.7  christos 			    c++;
   9520   1.8  christos 			    if (value == 0)
   9521   1.7  christos 			      func (stream, dis_style_text, "%c", *c);
   9522   1.7  christos 			    break;
   9523   1.7  christos 			  case '\'':
   9524   1.7  christos 			    c++;
   9525   1.8  christos 			    if (value == ((1ul << width) - 1))
   9526   1.7  christos 			      func (stream, dis_style_text, "%c", *c);
   9527   1.7  christos 			    break;
   9528   1.8  christos 			  case '?':
   9529   1.8  christos 			    func (stream, dis_style_mnemonic, "%c",
   9530   1.7  christos 				  c[(1 << width) - (int) value]);
   9531   1.7  christos 			    c += 1 << width;
   9532   1.7  christos 			    break;
   9533   1.7  christos 			  default:
   9534   1.7  christos 			    abort ();
   9535   1.7  christos 			  }
   9536   1.7  christos 		      }
   9537   1.7  christos 		      break;
   9538   1.7  christos 
   9539   1.7  christos 		    default:
   9540   1.7  christos 		      abort ();
   9541   1.7  christos 		    }
   9542   1.7  christos 		}
   9543   1.8  christos 	      else
   9544   1.8  christos 		{
   9545   1.8  christos 		  if (*c == '@')
   9546   1.8  christos 		    base_style = dis_style_comment_start;
   9547   1.8  christos 
   9548   1.8  christos 		  if (*c == '\t')
   9549   1.8  christos 		    base_style = dis_style_text;
   9550   1.8  christos 
   9551   1.8  christos 		  func (stream, base_style, "%c", *c);
   9552   1.8  christos 
   9553   1.7  christos 		}
   9554   1.7  christos 	    }
   9555   1.7  christos 
   9556   1.8  christos 	  if (value_in_comment > 32 || value_in_comment < -16)
   9557   1.8  christos 	    func (stream, dis_style_comment_start, "\t@ 0x%lx",
   9558   1.7  christos 		  value_in_comment);
   9559   1.7  christos 
   9560   1.8  christos 	  if (is_unpredictable)
   9561   1.7  christos 	    func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   9562   1.8  christos 
   9563   1.7  christos 	  return true;
   9564   1.7  christos 	}
   9565   1.8  christos     }
   9566   1.7  christos   return false;
   9567   1.7  christos }
   9568   1.7  christos 
   9569   1.7  christos /* Print one mve instruction on INFO->STREAM.
   9570   1.7  christos    Return TRUE if the instuction matched, FALSE if this is not a
   9571   1.7  christos    recognised mve instruction.  */
   9572   1.8  christos 
   9573   1.7  christos static bool
   9574   1.7  christos print_insn_mve (struct disassemble_info *info, long given)
   9575   1.7  christos {
   9576   1.7  christos   const struct mopcode32 *insn;
   9577   1.8  christos   void *stream = info->stream;
   9578   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   9579   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   9580   1.7  christos   enum disassembler_style old_base_style = base_style;
   9581   1.7  christos 
   9582   1.7  christos   for (insn = mve_opcodes; insn->assembler; insn++)
   9583   1.7  christos     {
   9584   1.7  christos       if (((given & insn->mask) == insn->value)
   9585   1.7  christos 	  && !is_mve_encoding_conflict (given, insn->mve_op))
   9586   1.7  christos 	{
   9587   1.8  christos 	  signed long value_in_comment = 0;
   9588   1.8  christos 	  bool is_unpredictable = false;
   9589   1.7  christos 	  bool is_undefined = false;
   9590   1.7  christos 	  const char *c;
   9591   1.7  christos 	  enum mve_unpredictable unpredictable_cond = UNPRED_NONE;
   9592   1.7  christos 	  enum mve_undefined undefined_cond = UNDEF_NONE;
   9593   1.7  christos 
   9594   1.7  christos 	  /* Most vector mve instruction are illegal in a it block.
   9595   1.7  christos 	     There are a few exceptions; check for them.  */
   9596   1.7  christos 	  if (ifthen_state && !is_mve_okay_in_it (insn->mve_op))
   9597   1.8  christos 	    {
   9598   1.7  christos 	      is_unpredictable = true;
   9599   1.7  christos 	      unpredictable_cond = UNPRED_IT_BLOCK;
   9600   1.7  christos 	    }
   9601   1.7  christos 	  else if (is_mve_unpredictable (given, insn->mve_op,
   9602   1.8  christos 					 &unpredictable_cond))
   9603   1.7  christos 	    is_unpredictable = true;
   9604   1.7  christos 
   9605   1.8  christos 	  if (is_mve_undefined (given, insn->mve_op, &undefined_cond))
   9606   1.7  christos 	    is_undefined = true;
   9607   1.7  christos 
   9608   1.7  christos 	  /* In "VORR Qd, Qm, Qn", if Qm==Qn, VORR is nothing but VMOV,
   9609   1.7  christos 	     i.e "VMOV Qd, Qm".  */
   9610   1.7  christos 	  if ((insn->mve_op == MVE_VORR_REG)
   9611   1.7  christos 	      && (arm_decode_field (given, 1, 3)
   9612   1.7  christos 		  == arm_decode_field (given, 17, 19)))
   9613   1.7  christos 	    continue;
   9614   1.7  christos 
   9615   1.7  christos 	  for (c = insn->assembler; *c; c++)
   9616   1.7  christos 	    {
   9617   1.7  christos 	      if (*c == '%')
   9618   1.7  christos 		{
   9619   1.7  christos 		  switch (*++c)
   9620   1.8  christos 		    {
   9621   1.8  christos 		    case '{':
   9622   1.8  christos 		      ++c;
   9623   1.8  christos 		      if (*c == '\0')
   9624   1.8  christos 			abort ();
   9625   1.8  christos 		      old_base_style = base_style;
   9626   1.8  christos 		      base_style = decode_base_style (*c);
   9627   1.8  christos 		      ++c;
   9628   1.8  christos 		      if (*c != ':')
   9629   1.8  christos 			abort ();
   9630   1.8  christos 		      break;
   9631   1.8  christos 
   9632   1.8  christos 		    case '}':
   9633   1.8  christos 		      base_style = old_base_style;
   9634   1.8  christos 		      break;
   9635   1.7  christos 
   9636   1.8  christos 		    case '%':
   9637   1.7  christos 		      func (stream, base_style, "%%");
   9638   1.7  christos 		      break;
   9639   1.7  christos 
   9640   1.7  christos 		    case 'a':
   9641   1.7  christos 		      /* Don't print anything for '+' as it is implied.  */
   9642   1.8  christos 		      if (arm_decode_field (given, 23, 23) == 0)
   9643   1.7  christos 			func (stream, dis_style_immediate, "-");
   9644   1.7  christos 		      break;
   9645   1.7  christos 
   9646   1.7  christos 		    case 'c':
   9647   1.8  christos 		      if (ifthen_state)
   9648   1.8  christos 			func (stream, dis_style_mnemonic, "%s",
   9649   1.7  christos 			      arm_conditional[IFTHEN_COND]);
   9650   1.7  christos 		      break;
   9651   1.7  christos 
   9652   1.7  christos 		    case 'd':
   9653   1.7  christos 		      print_mve_vld_str_addr (info, given, insn->mve_op);
   9654   1.7  christos 		      break;
   9655   1.7  christos 
   9656   1.7  christos 		    case 'i':
   9657   1.7  christos 		      {
   9658   1.8  christos 			long mve_mask = mve_extract_pred_mask (given);
   9659   1.8  christos 			func (stream, dis_style_mnemonic, "%s",
   9660   1.7  christos 			      mve_predicatenames[mve_mask]);
   9661   1.7  christos 		      }
   9662   1.7  christos 		      break;
   9663   1.7  christos 
   9664   1.7  christos 		    case 'j':
   9665   1.7  christos 		      {
   9666   1.7  christos 			unsigned int imm5 = 0;
   9667   1.7  christos 			imm5 |= arm_decode_field (given, 6, 7);
   9668   1.8  christos 			imm5 |= (arm_decode_field (given, 12, 14) << 2);
   9669   1.8  christos 			func (stream, dis_style_immediate, "#%u",
   9670   1.7  christos 			      (imm5 == 0) ? 32 : imm5);
   9671   1.7  christos 		      }
   9672   1.7  christos 		      break;
   9673   1.7  christos 
   9674   1.8  christos 		    case 'k':
   9675   1.7  christos 		      func (stream, dis_style_immediate, "#%u",
   9676   1.7  christos 			    (arm_decode_field (given, 7, 7) == 0) ? 64 : 48);
   9677   1.7  christos 		      break;
   9678   1.7  christos 
   9679   1.7  christos 		    case 'n':
   9680   1.7  christos 		      print_vec_condition (info, given, insn->mve_op);
   9681   1.7  christos 		      break;
   9682   1.7  christos 
   9683   1.7  christos 		    case 'o':
   9684   1.7  christos 		      if (arm_decode_field (given, 0, 0) == 1)
   9685   1.7  christos 			{
   9686   1.7  christos 			  unsigned long size
   9687   1.7  christos 			    = arm_decode_field (given, 4, 4)
   9688   1.7  christos 			      | (arm_decode_field (given, 6, 6) << 1);
   9689   1.8  christos 
   9690   1.8  christos 			  func (stream, dis_style_text, ", ");
   9691   1.8  christos 			  func (stream, dis_style_sub_mnemonic, "uxtw ");
   9692   1.7  christos 			  func (stream, dis_style_immediate, "#%lu", size);
   9693   1.7  christos 			}
   9694   1.7  christos 		      break;
   9695   1.7  christos 
   9696   1.7  christos 		    case 'm':
   9697   1.7  christos 		      print_mve_rounding_mode (info, given, insn->mve_op);
   9698   1.7  christos 		      break;
   9699   1.7  christos 
   9700   1.7  christos 		    case 's':
   9701   1.7  christos 		      print_mve_vcvt_size (info, given, insn->mve_op);
   9702   1.7  christos 		      break;
   9703   1.7  christos 
   9704   1.7  christos 		    case 'u':
   9705   1.7  christos 		      {
   9706   1.7  christos 			unsigned long op1 = arm_decode_field (given, 21, 22);
   9707   1.7  christos 
   9708   1.7  christos 			if ((insn->mve_op == MVE_VMOV_VEC_LANE_TO_GP))
   9709   1.7  christos 			  {
   9710   1.7  christos 			    /* Check for signed.  */
   9711   1.7  christos 			    if (arm_decode_field (given, 23, 23) == 0)
   9712   1.7  christos 			      {
   9713   1.7  christos 				/* We don't print 's' for S32.  */
   9714   1.7  christos 				if ((arm_decode_field (given, 5, 6) == 0)
   9715   1.7  christos 				    && ((op1 == 0) || (op1 == 1)))
   9716   1.7  christos 				  ;
   9717   1.8  christos 				else
   9718   1.7  christos 				  func (stream, dis_style_mnemonic, "s");
   9719   1.7  christos 			      }
   9720   1.8  christos 			    else
   9721   1.7  christos 			      func (stream, dis_style_mnemonic, "u");
   9722   1.7  christos 			  }
   9723   1.7  christos 			else
   9724   1.7  christos 			  {
   9725   1.8  christos 			    if (arm_decode_field (given, 28, 28) == 0)
   9726   1.7  christos 			      func (stream, dis_style_mnemonic, "s");
   9727   1.8  christos 			    else
   9728   1.7  christos 			      func (stream, dis_style_mnemonic, "u");
   9729   1.7  christos 			  }
   9730   1.7  christos 		      }
   9731   1.7  christos 		      break;
   9732   1.7  christos 
   9733   1.7  christos 		    case 'v':
   9734   1.7  christos 		      print_instruction_predicate (info);
   9735   1.7  christos 		      break;
   9736   1.7  christos 
   9737   1.7  christos 		    case 'w':
   9738   1.8  christos 		      if (arm_decode_field (given, 21, 21) == 1)
   9739   1.7  christos 			func (stream, dis_style_text, "!");
   9740   1.7  christos 		      break;
   9741   1.7  christos 
   9742   1.7  christos 		    case 'B':
   9743   1.7  christos 		      print_mve_register_blocks (info, given, insn->mve_op);
   9744   1.7  christos 		      break;
   9745   1.7  christos 
   9746   1.7  christos 		    case 'E':
   9747   1.7  christos 		      /* SIMD encoded constant for mov, mvn, vorr, vbic.  */
   9748   1.7  christos 
   9749   1.7  christos 		      print_simd_imm8 (info, given, 28, insn);
   9750   1.7  christos 		      break;
   9751   1.7  christos 
   9752   1.7  christos 		    case 'N':
   9753   1.7  christos 		      print_mve_vmov_index (info, given);
   9754   1.7  christos 		      break;
   9755   1.7  christos 
   9756   1.7  christos 		    case 'T':
   9757   1.8  christos 		      if (arm_decode_field (given, 12, 12) == 0)
   9758   1.7  christos 			func (stream, dis_style_mnemonic, "b");
   9759   1.8  christos 		      else
   9760   1.7  christos 			func (stream, dis_style_mnemonic, "t");
   9761   1.7  christos 		      break;
   9762   1.7  christos 
   9763   1.7  christos 		    case 'X':
   9764   1.8  christos 		      if (arm_decode_field (given, 12, 12) == 1)
   9765   1.7  christos 			func (stream, dis_style_mnemonic, "x");
   9766   1.7  christos 		      break;
   9767   1.7  christos 
   9768   1.7  christos 		    case '0': case '1': case '2': case '3': case '4':
   9769   1.7  christos 		    case '5': case '6': case '7': case '8': case '9':
   9770   1.7  christos 		      {
   9771   1.7  christos 			int width;
   9772   1.7  christos 			unsigned long value;
   9773   1.7  christos 
   9774   1.7  christos 			c = arm_decode_bitfield (c, given, &value, &width);
   9775   1.7  christos 
   9776   1.7  christos 			switch (*c)
   9777   1.7  christos 			  {
   9778   1.7  christos 			  case 'Z':
   9779   1.8  christos 			    if (value == 13)
   9780   1.7  christos 			      is_unpredictable = true;
   9781   1.8  christos 			    else if (value == 15)
   9782   1.7  christos 			      func (stream, dis_style_register, "zr");
   9783   1.8  christos 			    else
   9784   1.8  christos 			      func (stream, dis_style_register, "%s",
   9785   1.7  christos 				    arm_regnames[value]);
   9786   1.7  christos 			    break;
   9787   1.7  christos 
   9788   1.8  christos 			  case 'c':
   9789   1.8  christos 			    func (stream, dis_style_sub_mnemonic, "%s",
   9790   1.7  christos 				  arm_conditional[value]);
   9791   1.7  christos 			    break;
   9792   1.7  christos 
   9793   1.7  christos 			  case 'C':
   9794   1.8  christos 			    value ^= 1;
   9795   1.8  christos 			    func (stream, dis_style_sub_mnemonic, "%s",
   9796   1.7  christos 				  arm_conditional[value]);
   9797   1.7  christos 			    break;
   9798   1.7  christos 
   9799   1.7  christos 			  case 'S':
   9800   1.8  christos 			    if (value == 13 || value == 15)
   9801   1.7  christos 			      is_unpredictable = true;
   9802   1.8  christos 			    else
   9803   1.8  christos 			      func (stream, dis_style_register, "%s",
   9804   1.7  christos 				    arm_regnames[value]);
   9805   1.7  christos 			    break;
   9806   1.7  christos 
   9807   1.7  christos 			  case 's':
   9808   1.7  christos 			    print_mve_size (info,
   9809   1.7  christos 					    value,
   9810   1.7  christos 					    insn->mve_op);
   9811   1.7  christos 			    break;
   9812   1.7  christos 			  case 'I':
   9813   1.8  christos 			    if (value == 1)
   9814   1.7  christos 			      func (stream, dis_style_mnemonic, "i");
   9815   1.7  christos 			    break;
   9816   1.7  christos 			  case 'A':
   9817   1.8  christos 			    if (value == 1)
   9818   1.7  christos 			      func (stream, dis_style_mnemonic, "a");
   9819   1.7  christos 			    break;
   9820   1.7  christos 			  case 'h':
   9821   1.7  christos 			    {
   9822   1.8  christos 			      unsigned int odd_reg = (value << 1) | 1;
   9823   1.8  christos 			      func (stream, dis_style_register, "%s",
   9824   1.7  christos 				    arm_regnames[odd_reg]);
   9825   1.7  christos 			    }
   9826   1.7  christos 			    break;
   9827   1.7  christos 			  case 'i':
   9828   1.7  christos 			    {
   9829   1.7  christos 			      unsigned long imm
   9830   1.7  christos 				= arm_decode_field (given, 0, 6);
   9831   1.7  christos 			      unsigned long mod_imm = imm;
   9832   1.7  christos 
   9833   1.7  christos 			      switch (insn->mve_op)
   9834   1.7  christos 				{
   9835   1.7  christos 				case MVE_VLDRW_GATHER_T5:
   9836   1.7  christos 				case MVE_VSTRW_SCATTER_T5:
   9837   1.7  christos 				  mod_imm = mod_imm << 2;
   9838   1.7  christos 				  break;
   9839   1.7  christos 				case MVE_VSTRD_SCATTER_T6:
   9840   1.7  christos 				case MVE_VLDRD_GATHER_T6:
   9841   1.7  christos 				  mod_imm = mod_imm << 3;
   9842   1.7  christos 				  break;
   9843   1.7  christos 
   9844   1.7  christos 				default:
   9845   1.7  christos 				  break;
   9846   1.1  christos 				}
   9847   1.8  christos 
   9848   1.8  christos 			      func (stream, dis_style_immediate, "%lu",
   9849   1.7  christos 				    mod_imm);
   9850   1.7  christos 			    }
   9851   1.7  christos 			    break;
   9852   1.8  christos 			  case 'k':
   9853   1.8  christos 			    func (stream, dis_style_immediate, "%lu",
   9854   1.7  christos 				  64 - value);
   9855   1.7  christos 			    break;
   9856   1.7  christos 			  case 'l':
   9857   1.7  christos 			    {
   9858   1.8  christos 			      unsigned int even_reg = value << 1;
   9859   1.8  christos 			      func (stream, dis_style_register, "%s",
   9860   1.1  christos 				    arm_regnames[even_reg]);
   9861   1.1  christos 			    }
   9862   1.7  christos 			    break;
   9863   1.7  christos 			  case 'u':
   9864   1.7  christos 			    switch (value)
   9865   1.7  christos 			      {
   9866   1.8  christos 			      case 0:
   9867   1.7  christos 				func (stream, dis_style_immediate, "1");
   9868   1.7  christos 				break;
   9869   1.8  christos 			      case 1:
   9870   1.7  christos 				func (stream, dis_style_immediate, "2");
   9871   1.7  christos 				break;
   9872   1.8  christos 			      case 2:
   9873   1.7  christos 				func (stream, dis_style_immediate, "4");
   9874   1.7  christos 				break;
   9875   1.8  christos 			      case 3:
   9876   1.7  christos 				func (stream, dis_style_immediate, "8");
   9877   1.7  christos 				break;
   9878   1.7  christos 			      default:
   9879   1.7  christos 				break;
   9880   1.7  christos 			      }
   9881   1.7  christos 			    break;
   9882   1.7  christos 			  case 'o':
   9883   1.7  christos 			    print_mve_rotate (info, value, width);
   9884   1.7  christos 			    break;
   9885   1.8  christos 			  case 'r':
   9886   1.8  christos 			    func (stream, dis_style_register, "%s",
   9887   1.1  christos 				  arm_regnames[value]);
   9888   1.7  christos 			    break;
   9889   1.9  christos 			  case 'd':
   9890   1.7  christos 			    if (mve_shift_insn_p (insn->mve_op))
   9891   1.7  christos 			      print_mve_shift_n (info, given, insn->mve_op);
   9892  1.10  christos 			    else if (insn->mve_op == MVE_VSHLL_T2)
   9893  1.10  christos 			      func (stream, dis_style_immediate, "%s",
   9894   1.1  christos 				    mve_vec_sizename[value]);
   9895   1.7  christos 			    else
   9896   1.7  christos 			      {
   9897   1.7  christos 				if (insn->mve_op == MVE_VSHLC && value == 0)
   9898   1.8  christos 				  value = 32;
   9899   1.7  christos 				func (stream, base_style, "%ld", value);
   9900   1.7  christos 				value_in_comment = value;
   9901   1.1  christos 			      }
   9902   1.7  christos 			    break;
   9903   1.8  christos 			  case 'F':
   9904   1.1  christos 			    func (stream, dis_style_register, "s%ld", value);
   9905   1.7  christos 			    break;
   9906   1.7  christos 			  case 'Q':
   9907   1.8  christos 			    if (value & 0x8)
   9908   1.8  christos 			      func (stream, dis_style_text,
   9909   1.7  christos 				    "<illegal reg q%ld.5>", value);
   9910   1.8  christos 			    else
   9911   1.1  christos 			      func (stream, dis_style_register, "q%ld", value);
   9912   1.7  christos 			    break;
   9913   1.8  christos 			  case 'x':
   9914   1.8  christos 			    func (stream, dis_style_immediate,
   9915   1.1  christos 				  "0x%08lx", value);
   9916   1.1  christos 			    break;
   9917   1.1  christos 			  default:
   9918   1.1  christos 			    abort ();
   9919   1.1  christos 			  }
   9920   1.1  christos 			break;
   9921   1.1  christos 		      default:
   9922   1.1  christos 			abort ();
   9923   1.1  christos 		      }
   9924   1.1  christos 		    }
   9925   1.1  christos 		}
   9926   1.8  christos 	      else
   9927   1.8  christos 		{
   9928   1.8  christos 		  if (*c == '@')
   9929   1.8  christos 		    base_style = dis_style_comment_start;
   9930   1.8  christos 
   9931   1.8  christos 		  if (*c == '\t')
   9932   1.8  christos 		    base_style = dis_style_text;
   9933   1.8  christos 
   9934   1.8  christos 		  func (stream, base_style, "%c", *c);
   9935   1.1  christos 		}
   9936   1.1  christos 	    }
   9937   1.1  christos 
   9938   1.8  christos 	  if (value_in_comment > 32 || value_in_comment < -16)
   9939   1.8  christos 	    func (stream, dis_style_comment_start, "\t@ 0x%lx",
   9940   1.1  christos 		  value_in_comment);
   9941   1.2     joerg 
   9942   1.7  christos 	  if (is_unpredictable)
   9943   1.7  christos 	    print_mve_unpredictable (info, unpredictable_cond);
   9944   1.7  christos 
   9945   1.7  christos 	  if (is_undefined)
   9946   1.7  christos 	    print_mve_undefined (info, undefined_cond);
   9947   1.8  christos 
   9948   1.7  christos 	  if (!vpt_block_state.in_vpt_block
   9949   1.8  christos 	      && !ifthen_state
   9950   1.7  christos 	      && is_vpt_instruction (given))
   9951   1.8  christos 	    mark_inside_vpt_block (given);
   9952   1.7  christos 	  else if (vpt_block_state.in_vpt_block)
   9953   1.2     joerg 	    update_vpt_block_state ();
   9954   1.8  christos 
   9955   1.1  christos 	  return true;
   9956   1.1  christos 	}
   9957   1.8  christos     }
   9958   1.1  christos   return false;
   9959   1.1  christos }
   9960   1.7  christos 
   9961   1.1  christos 
   9962   1.1  christos /* Return the name of a v7A special register.  */
   9963   1.4  christos 
   9964   1.1  christos static const char *
   9965   1.1  christos banked_regname (unsigned reg)
   9966   1.1  christos {
   9967   1.1  christos   switch (reg)
   9968   1.1  christos     {
   9969   1.4  christos       case 15: return "CPSR";
   9970   1.1  christos       case 32: return "R8_usr";
   9971   1.1  christos       case 33: return "R9_usr";
   9972   1.1  christos       case 34: return "R10_usr";
   9973   1.1  christos       case 35: return "R11_usr";
   9974   1.1  christos       case 36: return "R12_usr";
   9975   1.1  christos       case 37: return "SP_usr";
   9976   1.4  christos       case 38: return "LR_usr";
   9977   1.1  christos       case 40: return "R8_fiq";
   9978   1.1  christos       case 41: return "R9_fiq";
   9979   1.1  christos       case 42: return "R10_fiq";
   9980   1.1  christos       case 43: return "R11_fiq";
   9981   1.1  christos       case 44: return "R12_fiq";
   9982   1.1  christos       case 45: return "SP_fiq";
   9983   1.1  christos       case 46: return "LR_fiq";
   9984   1.1  christos       case 48: return "LR_irq";
   9985   1.1  christos       case 49: return "SP_irq";
   9986   1.1  christos       case 50: return "LR_svc";
   9987   1.1  christos       case 51: return "SP_svc";
   9988   1.1  christos       case 52: return "LR_abt";
   9989   1.1  christos       case 53: return "SP_abt";
   9990   1.1  christos       case 54: return "LR_und";
   9991   1.1  christos       case 55: return "SP_und";
   9992   1.1  christos       case 60: return "LR_mon";
   9993   1.1  christos       case 61: return "SP_mon";
   9994   1.1  christos       case 62: return "ELR_hyp";
   9995   1.1  christos       case 63: return "SP_hyp";
   9996   1.1  christos       case 79: return "SPSR";
   9997   1.1  christos       case 110: return "SPSR_fiq";
   9998   1.1  christos       case 112: return "SPSR_irq";
   9999   1.1  christos       case 114: return "SPSR_svc";
   10000   1.1  christos       case 116: return "SPSR_abt";
   10001   1.1  christos       case 118: return "SPSR_und";
   10002   1.1  christos       case 124: return "SPSR_mon";
   10003   1.1  christos       case 126: return "SPSR_hyp";
   10004   1.1  christos       default: return NULL;
   10005   1.1  christos     }
   10006   1.1  christos }
   10007   1.2     joerg 
   10008   1.2     joerg /* Return the name of the DMB/DSB option.  */
   10009   1.2     joerg static const char *
   10010   1.2     joerg data_barrier_option (unsigned option)
   10011   1.2     joerg {
   10012   1.2     joerg   switch (option & 0xf)
   10013   1.2     joerg     {
   10014   1.2     joerg     case 0xf: return "sy";
   10015   1.2     joerg     case 0xe: return "st";
   10016   1.2     joerg     case 0xd: return "ld";
   10017   1.2     joerg     case 0xb: return "ish";
   10018   1.2     joerg     case 0xa: return "ishst";
   10019   1.2     joerg     case 0x9: return "ishld";
   10020   1.2     joerg     case 0x7: return "un";
   10021   1.2     joerg     case 0x6: return "unst";
   10022   1.2     joerg     case 0x5: return "nshld";
   10023   1.2     joerg     case 0x3: return "osh";
   10024   1.2     joerg     case 0x2: return "oshst";
   10025   1.2     joerg     case 0x1: return "oshld";
   10026   1.2     joerg     default:  return NULL;
   10027   1.2     joerg     }
   10028   1.2     joerg }
   10029   1.1  christos 
   10030   1.1  christos /* Print one ARM instruction from PC on INFO->STREAM.  */
   10031   1.1  christos 
   10032   1.1  christos static void
   10033   1.1  christos print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
   10034   1.1  christos {
   10035   1.1  christos   const struct opcode32 *insn;
   10036   1.8  christos   void *stream = info->stream;
   10037   1.1  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   10038   1.8  christos   struct arm_private_data *private_data = info->private_data;
   10039   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   10040   1.1  christos   enum disassembler_style old_base_style = base_style;
   10041   1.8  christos 
   10042   1.1  christos   if (print_insn_coprocessor (pc, info, given, false))
   10043   1.1  christos     return;
   10044   1.8  christos 
   10045   1.1  christos   if (print_insn_neon (info, given, false))
   10046   1.1  christos     return;
   10047   1.8  christos 
   10048   1.7  christos   if (print_insn_generic_coprocessor (pc, info, given, false))
   10049   1.7  christos     return;
   10050   1.1  christos 
   10051   1.1  christos   for (insn = arm_opcodes; insn->assembler; insn++)
   10052   1.1  christos     {
   10053   1.1  christos       if ((given & insn->mask) != insn->value)
   10054   1.3  christos 	continue;
   10055   1.3  christos 
   10056   1.1  christos       if (! ARM_CPU_HAS_FEATURE (insn->arch, private_data->features))
   10057   1.1  christos 	continue;
   10058   1.1  christos 
   10059   1.1  christos       /* Special case: an instruction with all bits set in the condition field
   10060   1.1  christos 	 (0xFnnn_nnnn) is only matched if all those bits are set in insn->mask,
   10061   1.1  christos 	 or by the catchall at the end of the table.  */
   10062   1.1  christos       if ((given & 0xF0000000) != 0xF0000000
   10063   1.1  christos 	  || (insn->mask & 0xF0000000) == 0xF0000000
   10064   1.1  christos 	  || (insn->mask == 0 && insn->value == 0))
   10065   1.1  christos 	{
   10066   1.1  christos 	  unsigned long u_reg = 16;
   10067   1.8  christos 	  unsigned long U_reg = 16;
   10068   1.1  christos 	  bool is_unpredictable = false;
   10069   1.1  christos 	  signed long value_in_comment = 0;
   10070   1.1  christos 	  const char *c;
   10071   1.1  christos 
   10072   1.1  christos 	  for (c = insn->assembler; *c; c++)
   10073   1.1  christos 	    {
   10074   1.1  christos 	      if (*c == '%')
   10075   1.8  christos 		{
   10076   1.1  christos 		  bool allow_unpredictable = false;
   10077   1.1  christos 
   10078   1.1  christos 		  switch (*++c)
   10079   1.8  christos 		    {
   10080   1.8  christos 		    case '{':
   10081   1.8  christos 		      ++c;
   10082   1.8  christos 		      if (*c == '\0')
   10083   1.8  christos 			abort ();
   10084   1.8  christos 		      old_base_style = base_style;
   10085   1.8  christos 		      base_style = decode_base_style (*c);
   10086   1.8  christos 		      ++c;
   10087   1.8  christos 		      if (*c != ':')
   10088   1.8  christos 			abort ();
   10089   1.8  christos 		      break;
   10090   1.8  christos 
   10091   1.8  christos 		    case '}':
   10092   1.8  christos 		      base_style = old_base_style;
   10093   1.8  christos 		      break;
   10094   1.1  christos 
   10095   1.8  christos 		    case '%':
   10096   1.1  christos 		      func (stream, base_style, "%%");
   10097   1.1  christos 		      break;
   10098   1.1  christos 
   10099   1.1  christos 		    case 'a':
   10100   1.1  christos 		      value_in_comment = print_arm_address (pc, info, given);
   10101   1.1  christos 		      break;
   10102   1.1  christos 
   10103   1.1  christos 		    case 'P':
   10104   1.1  christos 		      /* Set P address bit and use normal address
   10105   1.1  christos 			 printing routine.  */
   10106   1.1  christos 		      value_in_comment = print_arm_address (pc, info, given | (1 << P_BIT));
   10107   1.1  christos 		      break;
   10108  1.10  christos 
   10109  1.10  christos 		    case 'T':
   10110  1.10  christos 		      /* Armv4 does not have a BX instruction, however, when
   10111  1.10  christos 			 assembled with the --fix-v4bx option GAS will accept
   10112  1.10  christos 			 and assemble a BX instruction when assembling for
   10113  1.10  christos 			 Armv4.  When disassembling we also disassemble it as a
   10114  1.10  christos 			 BX instruction, but do make the user aware that this
   10115  1.10  christos 			 instruction is only supported on HW from Armv4T
   10116  1.10  christos 			 onwards.  */
   10117  1.10  christos 		      if (info->mach == bfd_mach_arm_4)
   10118  1.10  christos 			func (stream, dis_style_text, "\t@ from Armv4T onwards");
   10119  1.10  christos 		      break;
   10120   1.1  christos 
   10121   1.8  christos 		    case 'S':
   10122   1.5  christos 		      allow_unpredictable = true;
   10123   1.1  christos 		      /* Fall through.  */
   10124   1.1  christos 		    case 's':
   10125   1.1  christos                       if ((given & 0x004f0000) == 0x004f0000)
   10126   1.1  christos 			{
   10127   1.2     joerg                           /* PC relative with immediate offset.  */
   10128   1.1  christos 			  bfd_vma offset = ((given & 0xf00) >> 4) | (given & 0xf);
   10129   1.1  christos 
   10130   1.1  christos 			  if (PRE_BIT_SET)
   10131   1.2     joerg 			    {
   10132   1.2     joerg 			      /* Elide positive zero offset.  */
   10133   1.8  christos 			      if (offset || NEGATIVE_BIT_SET)
   10134   1.8  christos 				{
   10135   1.8  christos 				  func (stream, dis_style_text, "[");
   10136   1.8  christos 				  func (stream, dis_style_register, "pc");
   10137   1.8  christos 				  func (stream, dis_style_text, ", ");
   10138   1.8  christos 				  func (stream, dis_style_immediate, "#%s%d",
   10139   1.8  christos 					(NEGATIVE_BIT_SET ? "-" : ""),
   10140   1.8  christos 					(int) offset);
   10141   1.8  christos 				  func (stream, dis_style_text, "]");
   10142   1.1  christos 				}
   10143   1.8  christos 			      else
   10144   1.8  christos 				{
   10145   1.8  christos 				  func (stream, dis_style_text, "[");
   10146   1.8  christos 				  func (stream, dis_style_register, "pc");
   10147   1.8  christos 				  func (stream, dis_style_text, "]");
   10148   1.2     joerg 				}
   10149   1.2     joerg 			      if (NEGATIVE_BIT_SET)
   10150   1.8  christos 				offset = -offset;
   10151   1.1  christos 			      func (stream, dis_style_comment_start, "\t@ ");
   10152   1.1  christos 			      info->print_address_func (offset + pc + 8, info);
   10153   1.1  christos 			    }
   10154   1.1  christos 			  else
   10155   1.2     joerg 			    {
   10156   1.8  christos 			      /* Always show the offset.  */
   10157   1.8  christos 			      func (stream, dis_style_text, "[");
   10158   1.8  christos 			      func (stream, dis_style_register, "pc");
   10159   1.8  christos 			      func (stream, dis_style_text, "], ");
   10160   1.2     joerg 			      func (stream, dis_style_immediate, "#%s%d",
   10161   1.1  christos 				    NEGATIVE_BIT_SET ? "-" : "", (int) offset);
   10162   1.8  christos 			      if (! allow_unpredictable)
   10163   1.1  christos 				is_unpredictable = true;
   10164   1.1  christos 			    }
   10165   1.1  christos 			}
   10166   1.1  christos 		      else
   10167   1.1  christos 			{
   10168   1.1  christos 			  int offset = ((given & 0xf00) >> 4) | (given & 0xf);
   10169   1.8  christos 
   10170   1.8  christos 			  func (stream, dis_style_text, "[");
   10171   1.1  christos 			  func (stream, dis_style_register, "%s",
   10172   1.1  christos 				arm_regnames[(given >> 16) & 0xf]);
   10173   1.1  christos 
   10174   1.1  christos 			  if (PRE_BIT_SET)
   10175   1.1  christos 			    {
   10176   1.1  christos 			      if (IMMEDIATE_BIT_SET)
   10177   1.2     joerg 				{
   10178   1.2     joerg 				  /* Elide offset for non-writeback
   10179   1.2     joerg 				     positive zero.  */
   10180   1.2     joerg 				  if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET
   10181   1.8  christos 				      || offset)
   10182   1.8  christos 				    {
   10183   1.8  christos 				      func (stream, dis_style_text, ", ");
   10184   1.8  christos 				      func (stream, dis_style_immediate,
   10185   1.8  christos 					    "#%s%d",
   10186   1.8  christos 					    (NEGATIVE_BIT_SET ? "-" : ""),
   10187   1.8  christos 					    offset);
   10188   1.2     joerg 				    }
   10189   1.2     joerg 
   10190   1.2     joerg 				  if (NEGATIVE_BIT_SET)
   10191   1.1  christos 				    offset = -offset;
   10192   1.1  christos 
   10193   1.1  christos 				  value_in_comment = offset;
   10194   1.1  christos 				}
   10195   1.1  christos 			      else
   10196   1.1  christos 				{
   10197   1.8  christos 				  /* Register Offset or Register Pre-Indexed.  */
   10198   1.8  christos 				  func (stream, dis_style_text, ", %s",
   10199   1.8  christos 					NEGATIVE_BIT_SET ? "-" : "");
   10200   1.1  christos 				  func (stream, dis_style_register, "%s",
   10201   1.1  christos 					arm_regnames[given & 0xf]);
   10202   1.1  christos 
   10203   1.1  christos 				  /* Writing back to the register that is the source/
   10204   1.1  christos 				     destination of the load/store is unpredictable.  */
   10205   1.1  christos 				  if (! allow_unpredictable
   10206   1.1  christos 				      && WRITEBACK_BIT_SET
   10207   1.8  christos 				      && ((given & 0xf) == ((given >> 12) & 0xf)))
   10208   1.1  christos 				    is_unpredictable = true;
   10209   1.1  christos 				}
   10210   1.8  christos 
   10211   1.1  christos 			      func (stream, dis_style_text, "]%s",
   10212   1.1  christos 				    WRITEBACK_BIT_SET ? "!" : "");
   10213   1.1  christos 			    }
   10214   1.1  christos 			  else
   10215   1.1  christos 			    {
   10216   1.1  christos 			      if (IMMEDIATE_BIT_SET)
   10217   1.1  christos 				{
   10218   1.1  christos 				  /* Immediate Post-indexed.  */
   10219   1.8  christos 				  /* PR 10924: Offset must be printed, even if it is zero.  */
   10220   1.8  christos 				  func (stream, dis_style_text, "], ");
   10221   1.2     joerg 				  func (stream, dis_style_immediate, "#%s%d",
   10222   1.2     joerg 					NEGATIVE_BIT_SET ? "-" : "", offset);
   10223   1.2     joerg 				  if (NEGATIVE_BIT_SET)
   10224   1.1  christos 				    offset = -offset;
   10225   1.1  christos 				  value_in_comment = offset;
   10226   1.1  christos 				}
   10227   1.1  christos 			      else
   10228   1.1  christos 				{
   10229   1.8  christos 				  /* Register Post-indexed.  */
   10230   1.8  christos 				  func (stream, dis_style_text, "], %s",
   10231   1.8  christos 					NEGATIVE_BIT_SET ? "-" : "");
   10232   1.1  christos 				  func (stream, dis_style_register, "%s",
   10233   1.1  christos 					arm_regnames[given & 0xf]);
   10234   1.1  christos 
   10235   1.1  christos 				  /* Writing back to the register that is the source/
   10236   1.1  christos 				     destination of the load/store is unpredictable.  */
   10237   1.1  christos 				  if (! allow_unpredictable
   10238   1.8  christos 				      && (given & 0xf) == ((given >> 12) & 0xf))
   10239   1.1  christos 				    is_unpredictable = true;
   10240   1.1  christos 				}
   10241   1.1  christos 
   10242   1.1  christos 			      if (! allow_unpredictable)
   10243   1.1  christos 				{
   10244   1.1  christos 				  /* Writeback is automatically implied by post- addressing.
   10245   1.1  christos 				     Setting the W bit is unnecessary and ARM specify it as
   10246   1.1  christos 				     being unpredictable.  */
   10247   1.1  christos 				  if (WRITEBACK_BIT_SET
   10248   1.1  christos 				      /* Specifying the PC register as the post-indexed
   10249   1.1  christos 					 registers is also unpredictable.  */
   10250   1.8  christos 				      || (! IMMEDIATE_BIT_SET && ((given & 0xf) == 0xf)))
   10251   1.1  christos 				    is_unpredictable = true;
   10252   1.1  christos 				}
   10253   1.1  christos 			    }
   10254   1.1  christos 			}
   10255   1.1  christos 		      break;
   10256   1.1  christos 
   10257   1.1  christos 		    case 'b':
   10258   1.2     joerg 		      {
   10259   1.7  christos 			bfd_vma disp = (((given & 0xffffff) ^ 0x800000) - 0x800000);
   10260   1.7  christos 			bfd_vma target = disp * 4 + pc + 8;
   10261   1.7  christos 			info->print_address_func (target, info);
   10262   1.7  christos 
   10263   1.7  christos 			/* Fill in instruction information.  */
   10264   1.7  christos 			info->insn_info_valid = 1;
   10265   1.7  christos 			info->insn_type = dis_branch;
   10266   1.1  christos 			info->target = target;
   10267   1.1  christos 		      }
   10268   1.1  christos 		      break;
   10269   1.1  christos 
   10270   1.1  christos 		    case 'c':
   10271   1.8  christos 		      if (((given >> 28) & 0xf) != 0xe)
   10272   1.1  christos 			func (stream, dis_style_mnemonic, "%s",
   10273   1.1  christos 			      arm_conditional [(given >> 28) & 0xf]);
   10274   1.1  christos 		      break;
   10275   1.1  christos 
   10276   1.1  christos 		    case 'm':
   10277   1.1  christos 		      {
   10278   1.1  christos 			int started = 0;
   10279   1.1  christos 			int reg;
   10280   1.8  christos 
   10281   1.1  christos 			func (stream, dis_style_text, "{");
   10282   1.1  christos 			for (reg = 0; reg < 16; reg++)
   10283   1.1  christos 			  if ((given & (1 << reg)) != 0)
   10284   1.1  christos 			    {
   10285   1.8  christos 			      if (started)
   10286   1.1  christos 				func (stream, dis_style_text, ", ");
   10287   1.8  christos 			      started = 1;
   10288   1.8  christos 			      func (stream, dis_style_register, "%s",
   10289   1.1  christos 				    arm_regnames[reg]);
   10290   1.8  christos 			    }
   10291   1.1  christos 			func (stream, dis_style_text, "}");
   10292   1.8  christos 			if (! started)
   10293   1.1  christos 			  is_unpredictable = true;
   10294   1.1  christos 		      }
   10295   1.1  christos 		      break;
   10296   1.1  christos 
   10297   1.8  christos 		    case 'q':
   10298   1.1  christos 		      arm_decode_shift (given, func, stream, false);
   10299   1.1  christos 		      break;
   10300   1.1  christos 
   10301   1.1  christos 		    case 'o':
   10302   1.1  christos 		      if ((given & 0x02000000) != 0)
   10303   1.2     joerg 			{
   10304   1.2     joerg 			  unsigned int rotate = (given & 0xf00) >> 7;
   10305   1.2     joerg 			  unsigned int immed = (given & 0xff);
   10306   1.2     joerg 			  unsigned int a, i;
   10307   1.7  christos 
   10308   1.7  christos 			  a = (immed << ((32 - rotate) & 31)
   10309   1.2     joerg 			       | immed >> rotate) & 0xffffffff;
   10310   1.2     joerg 			  /* If there is another encoding with smaller rotate,
   10311   1.2     joerg 			     the rotate should be specified directly.  */
   10312   1.7  christos 			  for (i = 0; i < 32; i += 2)
   10313   1.2     joerg 			    if ((a << i | a >> ((32 - i) & 31)) <= 0xff)
   10314   1.1  christos 			      break;
   10315   1.2     joerg 
   10316   1.8  christos 			  if (i != rotate)
   10317   1.8  christos 			    {
   10318   1.8  christos 			      func (stream, dis_style_immediate, "#%d", immed);
   10319   1.8  christos 			      func (stream, dis_style_text, ", ");
   10320   1.8  christos 			      func (stream, dis_style_immediate, "%d", rotate);
   10321   1.2     joerg 			    }
   10322   1.8  christos 			  else
   10323   1.2     joerg 			    func (stream, dis_style_immediate, "#%d", a);
   10324   1.1  christos 			  value_in_comment = a;
   10325   1.1  christos 			}
   10326   1.8  christos 		      else
   10327   1.1  christos 			arm_decode_shift (given, func, stream, true);
   10328   1.1  christos 		      break;
   10329   1.1  christos 
   10330   1.1  christos 		    case 'p':
   10331  1.10  christos 		      if ((given & 0x0000f000) == 0x0000f000)
   10332  1.10  christos 			func (stream, dis_style_mnemonic, "p");
   10333  1.10  christos 		      break;
   10334  1.10  christos 		    case 'O':
   10335  1.10  christos 		      if ((given & 0x0000f000) == 0x0000f000)
   10336  1.10  christos 			func (stream, dis_style_text,
   10337   1.1  christos 			      "\t@ p-variant is OBSOLETE");
   10338   1.1  christos 		      break;
   10339   1.1  christos 
   10340   1.1  christos 		    case 't':
   10341   1.8  christos 		      if ((given & 0x01200000) == 0x00200000)
   10342   1.1  christos 			func (stream, dis_style_mnemonic, "t");
   10343   1.1  christos 		      break;
   10344   1.1  christos 
   10345   1.1  christos 		    case 'A':
   10346   1.1  christos 		      {
   10347   1.1  christos 			int offset = given & 0xff;
   10348   1.1  christos 
   10349   1.1  christos 			value_in_comment = offset * 4;
   10350   1.1  christos 			if (NEGATIVE_BIT_SET)
   10351   1.1  christos 			  value_in_comment = - value_in_comment;
   10352   1.8  christos 
   10353   1.8  christos 			func (stream, dis_style_text, "[%s",
   10354   1.1  christos 			      arm_regnames [(given >> 16) & 0xf]);
   10355   1.1  christos 
   10356   1.1  christos 			if (PRE_BIT_SET)
   10357   1.1  christos 			  {
   10358   1.8  christos 			    if (offset)
   10359   1.2     joerg 			      func (stream, dis_style_text, ", #%d]%s",
   10360   1.1  christos 				    (int) value_in_comment,
   10361   1.1  christos 				    WRITEBACK_BIT_SET ? "!" : "");
   10362   1.8  christos 			    else
   10363   1.1  christos 			      func (stream, dis_style_text, "]");
   10364   1.1  christos 			  }
   10365   1.1  christos 			else
   10366   1.8  christos 			  {
   10367   1.1  christos 			    func (stream, dis_style_text, "]");
   10368   1.1  christos 
   10369   1.1  christos 			    if (WRITEBACK_BIT_SET)
   10370   1.1  christos 			      {
   10371   1.8  christos 				if (offset)
   10372   1.8  christos 				  func (stream, dis_style_text,
   10373   1.1  christos 					", #%d", (int) value_in_comment);
   10374   1.1  christos 			      }
   10375   1.1  christos 			    else
   10376   1.8  christos 			      {
   10377   1.8  christos 				func (stream, dis_style_text,
   10378   1.1  christos 				      ", {%d}", (int) offset);
   10379   1.1  christos 				value_in_comment = offset;
   10380   1.1  christos 			      }
   10381   1.1  christos 			  }
   10382   1.1  christos 		      }
   10383   1.1  christos 		      break;
   10384   1.1  christos 
   10385   1.1  christos 		    case 'B':
   10386   1.1  christos 		      /* Print ARM V5 BLX(1) address: pc+25 bits.  */
   10387   1.1  christos 		      {
   10388   1.1  christos 			bfd_vma address;
   10389   1.1  christos 			bfd_vma offset = 0;
   10390   1.1  christos 
   10391   1.1  christos 			if (! NEGATIVE_BIT_SET)
   10392   1.1  christos 			  /* Is signed, hi bits should be ones.  */
   10393   1.1  christos 			  offset = (-1) ^ 0x00ffffff;
   10394   1.1  christos 
   10395   1.1  christos 			/* Offset is (SignExtend(offset field)<<2).  */
   10396   1.1  christos 			offset += given & 0x00ffffff;
   10397   1.1  christos 			offset <<= 2;
   10398   1.1  christos 			address = offset + pc + 8;
   10399   1.1  christos 
   10400   1.1  christos 			if (given & 0x01000000)
   10401   1.1  christos 			  /* H bit allows addressing to 2-byte boundaries.  */
   10402   1.1  christos 			  address += 2;
   10403   1.1  christos 
   10404   1.7  christos 		        info->print_address_func (address, info);
   10405   1.7  christos 
   10406   1.7  christos 			/* Fill in instruction information.  */
   10407   1.7  christos 			info->insn_info_valid = 1;
   10408   1.7  christos 			info->insn_type = dis_branch;
   10409   1.1  christos 			info->target = address;
   10410   1.1  christos 		      }
   10411   1.1  christos 		      break;
   10412   1.1  christos 
   10413   1.1  christos 		    case 'C':
   10414   1.1  christos 		      if ((given & 0x02000200) == 0x200)
   10415   1.1  christos 			{
   10416   1.1  christos 			  const char * name;
   10417   1.1  christos 			  unsigned sysm = (given & 0x004f0000) >> 16;
   10418   1.1  christos 
   10419   1.1  christos 			  sysm |= (given & 0x300) >> 4;
   10420   1.1  christos 			  name = banked_regname (sysm);
   10421   1.1  christos 
   10422   1.8  christos 			  if (name != NULL)
   10423   1.1  christos 			    func (stream, dis_style_register, "%s", name);
   10424   1.8  christos 			  else
   10425   1.8  christos 			    func (stream, dis_style_text,
   10426   1.1  christos 				  "(UNDEF: %lu)", (unsigned long) sysm);
   10427   1.1  christos 			}
   10428   1.1  christos 		      else
   10429   1.8  christos 			{
   10430   1.1  christos 			  func (stream, dis_style_register, "%cPSR_",
   10431   1.8  christos 				(given & 0x00400000) ? 'S' : 'C');
   10432   1.1  christos 
   10433   1.8  christos 			  if (given & 0x80000)
   10434   1.1  christos 			    func (stream, dis_style_register, "f");
   10435   1.8  christos 			  if (given & 0x40000)
   10436   1.1  christos 			    func (stream, dis_style_register, "s");
   10437   1.8  christos 			  if (given & 0x20000)
   10438   1.1  christos 			    func (stream, dis_style_register, "x");
   10439   1.8  christos 			  if (given & 0x10000)
   10440   1.1  christos 			    func (stream, dis_style_register, "c");
   10441   1.1  christos 			}
   10442   1.1  christos 		      break;
   10443   1.1  christos 
   10444   1.4  christos 		    case 'U':
   10445   1.1  christos 		      if ((given & 0xf0) == 0x60)
   10446   1.1  christos 			{
   10447   1.1  christos 			  switch (given & 0xf)
   10448   1.8  christos 			    {
   10449   1.8  christos 			    case 0xf:
   10450   1.8  christos 			      func (stream, dis_style_sub_mnemonic, "sy");
   10451   1.1  christos 			      break;
   10452   1.8  christos 			    default:
   10453   1.8  christos 			      func (stream, dis_style_immediate, "#%d",
   10454   1.1  christos 				    (int) given & 0xf);
   10455   1.1  christos 			      break;
   10456   1.4  christos 			    }
   10457   1.4  christos 			}
   10458   1.1  christos 		      else
   10459   1.2     joerg 			{
   10460   1.2     joerg 			  const char * opt = data_barrier_option (given & 0xf);
   10461   1.8  christos 			  if (opt != NULL)
   10462   1.2     joerg 			    func (stream, dis_style_sub_mnemonic, "%s", opt);
   10463   1.8  christos 			  else
   10464   1.8  christos 			    func (stream, dis_style_immediate,
   10465   1.1  christos 				  "#%d", (int) given & 0xf);
   10466   1.1  christos 			}
   10467   1.1  christos 		      break;
   10468   1.1  christos 
   10469   1.1  christos 		    case '0': case '1': case '2': case '3': case '4':
   10470   1.1  christos 		    case '5': case '6': case '7': case '8': case '9':
   10471   1.1  christos 		      {
   10472   1.1  christos 			int width;
   10473   1.1  christos 			unsigned long value;
   10474   1.1  christos 
   10475   1.4  christos 			c = arm_decode_bitfield (c, given, &value, &width);
   10476   1.1  christos 
   10477   1.1  christos 			switch (*c)
   10478   1.1  christos 			  {
   10479   1.1  christos 			  case 'R':
   10480   1.8  christos 			    if (value == 15)
   10481   1.1  christos 			      is_unpredictable = true;
   10482   1.1  christos 			    /* Fall through.  */
   10483   1.2     joerg 			  case 'r':
   10484   1.2     joerg 			  case 'T':
   10485   1.2     joerg 			    /* We want register + 1 when decoding T.  */
   10486   1.7  christos 			    if (*c == 'T')
   10487   1.2     joerg 			      value = (value + 1) & 0xf;
   10488   1.1  christos 
   10489   1.1  christos 			    if (c[1] == 'u')
   10490   1.1  christos 			      {
   10491   1.1  christos 				/* Eat the 'u' character.  */
   10492   1.1  christos 				++ c;
   10493   1.1  christos 
   10494   1.8  christos 				if (u_reg == value)
   10495   1.1  christos 				  is_unpredictable = true;
   10496   1.1  christos 				u_reg = value;
   10497   1.1  christos 			      }
   10498   1.1  christos 			    if (c[1] == 'U')
   10499   1.1  christos 			      {
   10500   1.1  christos 				/* Eat the 'U' character.  */
   10501   1.1  christos 				++ c;
   10502   1.1  christos 
   10503   1.8  christos 				if (U_reg == value)
   10504   1.1  christos 				  is_unpredictable = true;
   10505   1.1  christos 				U_reg = value;
   10506   1.8  christos 			      }
   10507   1.8  christos 			    func (stream, dis_style_register, "%s",
   10508   1.1  christos 				  arm_regnames[value]);
   10509   1.1  christos 			    break;
   10510   1.8  christos 			  case 'd':
   10511   1.1  christos 			    func (stream, base_style, "%ld", value);
   10512   1.1  christos 			    value_in_comment = value;
   10513   1.1  christos 			    break;
   10514   1.8  christos 			  case 'b':
   10515   1.8  christos 			    func (stream, dis_style_immediate,
   10516   1.1  christos 				  "%ld", value * 8);
   10517   1.1  christos 			    value_in_comment = value * 8;
   10518   1.1  christos 			    break;
   10519   1.8  christos 			  case 'W':
   10520   1.8  christos 			    func (stream, dis_style_immediate,
   10521   1.1  christos 				  "%ld", value + 1);
   10522   1.1  christos 			    value_in_comment = value + 1;
   10523   1.1  christos 			    break;
   10524   1.8  christos 			  case 'x':
   10525   1.8  christos 			    func (stream, dis_style_immediate,
   10526   1.1  christos 				  "0x%08lx", value);
   10527   1.1  christos 
   10528   1.1  christos 			    /* Some SWI instructions have special
   10529   1.1  christos 			       meanings.  */
   10530   1.8  christos 			    if ((given & 0x0fffffff) == 0x0FF00000)
   10531   1.8  christos 			      func (stream, dis_style_comment_start,
   10532   1.1  christos 				    "\t@ IMB");
   10533   1.8  christos 			    else if ((given & 0x0fffffff) == 0x0FF00001)
   10534   1.8  christos 			      func (stream, dis_style_comment_start,
   10535   1.1  christos 				    "\t@ IMBRange");
   10536   1.1  christos 			    break;
   10537   1.8  christos 			  case 'X':
   10538   1.8  christos 			    func (stream, dis_style_immediate,
   10539   1.1  christos 				  "%01lx", value & 0xf);
   10540   1.1  christos 			    value_in_comment = value;
   10541   1.1  christos 			    break;
   10542   1.1  christos 			  case '`':
   10543   1.1  christos 			    c++;
   10544   1.8  christos 			    if (value == 0)
   10545   1.1  christos 			      func (stream, dis_style_text, "%c", *c);
   10546   1.1  christos 			    break;
   10547   1.1  christos 			  case '\'':
   10548   1.1  christos 			    c++;
   10549   1.8  christos 			    if (value == ((1ul << width) - 1))
   10550   1.1  christos 			      func (stream, base_style, "%c", *c);
   10551   1.1  christos 			    break;
   10552   1.8  christos 			  case '?':
   10553   1.8  christos 			    func (stream, base_style, "%c",
   10554   1.1  christos 				  c[(1 << width) - (int) value]);
   10555   1.1  christos 			    c += 1 << width;
   10556   1.1  christos 			    break;
   10557   1.1  christos 			  default:
   10558   1.1  christos 			    abort ();
   10559   1.7  christos 			  }
   10560   1.7  christos 		      }
   10561   1.1  christos 		      break;
   10562   1.7  christos 
   10563   1.7  christos 		    case 'e':
   10564   1.7  christos 		      {
   10565   1.1  christos 			int imm;
   10566   1.7  christos 
   10567   1.8  christos 			imm = (given & 0xf) | ((given & 0xfff00) >> 4);
   10568   1.7  christos 			func (stream, dis_style_immediate, "%d", imm);
   10569   1.7  christos 			value_in_comment = imm;
   10570   1.7  christos 		      }
   10571   1.1  christos 		      break;
   10572   1.7  christos 
   10573   1.7  christos 		    case 'E':
   10574   1.7  christos 		      /* LSB and WIDTH fields of BFI or BFC.  The machine-
   10575   1.7  christos 			 language instruction encodes LSB and MSB.  */
   10576   1.7  christos 		      {
   10577   1.7  christos 			long msb = (given & 0x001f0000) >> 16;
   10578   1.7  christos 			long lsb = (given & 0x00000f80) >> 7;
   10579   1.1  christos 			long w = msb - lsb + 1;
   10580   1.7  christos 
   10581   1.8  christos 			if (w > 0)
   10582   1.8  christos 			  {
   10583   1.8  christos 			    func (stream, dis_style_immediate, "#%lu", lsb);
   10584   1.8  christos 			    func (stream, dis_style_text, ", ");
   10585   1.8  christos 			    func (stream, dis_style_immediate, "#%lu", w);
   10586   1.7  christos 			  }
   10587   1.8  christos 			else
   10588   1.8  christos 			  func (stream, dis_style_text,
   10589   1.7  christos 				"(invalid: %lu:%lu)", lsb, msb);
   10590   1.7  christos 		      }
   10591   1.1  christos 		      break;
   10592   1.7  christos 
   10593   1.7  christos 		    case 'R':
   10594   1.7  christos 		      /* Get the PSR/banked register name.  */
   10595   1.7  christos 		      {
   10596   1.7  christos 			const char * name;
   10597   1.1  christos 			unsigned sysm = (given & 0x004f0000) >> 16;
   10598   1.7  christos 
   10599   1.7  christos 			sysm |= (given & 0x300) >> 4;
   10600   1.1  christos 			name = banked_regname (sysm);
   10601   1.7  christos 
   10602   1.8  christos 			if (name != NULL)
   10603   1.7  christos 			  func (stream, dis_style_register, "%s", name);
   10604   1.8  christos 			else
   10605   1.8  christos 			  func (stream, dis_style_text,
   10606   1.7  christos 				"(UNDEF: %lu)", (unsigned long) sysm);
   10607   1.7  christos 		      }
   10608   1.1  christos 		      break;
   10609   1.7  christos 
   10610   1.7  christos 		    case 'V':
   10611   1.7  christos 		      /* 16-bit unsigned immediate from a MOVT or MOVW
   10612   1.7  christos 			 instruction, encoded in bits 0:11 and 15:19.  */
   10613   1.7  christos 		      {
   10614   1.7  christos 			long hi = (given & 0x000f0000) >> 4;
   10615   1.7  christos 			long lo = (given & 0x00000fff);
   10616   1.1  christos 			long imm16 = hi | lo;
   10617   1.8  christos 
   10618   1.7  christos 			func (stream, dis_style_immediate, "#%lu", imm16);
   10619   1.7  christos 			value_in_comment = imm16;
   10620   1.7  christos 		      }
   10621   1.1  christos 		      break;
   10622   1.7  christos 
   10623   1.7  christos 		    default:
   10624   1.1  christos 		      abort ();
   10625   1.1  christos 		    }
   10626   1.1  christos 		}
   10627   1.8  christos 	      else
   10628   1.8  christos 		{
   10629   1.8  christos 
   10630   1.8  christos 		  if (*c == '@')
   10631   1.8  christos 		    base_style = dis_style_comment_start;
   10632   1.8  christos 
   10633   1.8  christos 		  if (*c == '\t')
   10634   1.8  christos 		    base_style = dis_style_text;
   10635   1.8  christos 
   10636   1.8  christos 		  func (stream, base_style, "%c", *c);
   10637   1.1  christos 		}
   10638   1.1  christos 	    }
   10639   1.1  christos 
   10640   1.8  christos 	  if (value_in_comment > 32 || value_in_comment < -16)
   10641   1.8  christos 	    func (stream, dis_style_comment_start, "\t@ 0x%lx",
   10642   1.1  christos 		  (value_in_comment & 0xffffffffUL));
   10643   1.1  christos 
   10644   1.8  christos 	  if (is_unpredictable)
   10645   1.1  christos 	    func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   10646   1.1  christos 
   10647   1.1  christos 	  return;
   10648   1.1  christos 	}
   10649   1.8  christos     }
   10650   1.8  christos   func (stream, dis_style_comment_start, UNKNOWN_INSTRUCTION_32BIT,
   10651   1.6  christos 	(unsigned) given);
   10652   1.1  christos   return;
   10653   1.1  christos }
   10654   1.1  christos 
   10655   1.1  christos /* Print one 16-bit Thumb instruction from PC on INFO->STREAM.  */
   10656   1.1  christos 
   10657   1.1  christos static void
   10658   1.1  christos print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
   10659   1.1  christos {
   10660   1.1  christos   const struct opcode16 *insn;
   10661   1.8  christos   void *stream = info->stream;
   10662   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   10663   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   10664   1.1  christos   enum disassembler_style old_base_style = base_style;
   10665   1.1  christos 
   10666   1.1  christos   for (insn = thumb_opcodes; insn->assembler; insn++)
   10667   1.1  christos     if ((given & insn->mask) == insn->value)
   10668   1.1  christos       {
   10669   1.1  christos 	signed long value_in_comment = 0;
   10670   1.1  christos 	const char *c = insn->assembler;
   10671   1.1  christos 
   10672   1.1  christos 	for (; *c; c++)
   10673   1.1  christos 	  {
   10674   1.1  christos 	    int domaskpc = 0;
   10675   1.1  christos 	    int domasklr = 0;
   10676   1.1  christos 
   10677   1.1  christos 	    if (*c != '%')
   10678   1.8  christos 	      {
   10679   1.8  christos 		if (*c == '@')
   10680   1.8  christos 		  base_style = dis_style_comment_start;
   10681   1.8  christos 
   10682   1.8  christos 		if (*c == '\t')
   10683   1.8  christos 		  base_style = dis_style_text;
   10684   1.8  christos 
   10685   1.8  christos 		func (stream, base_style, "%c", *c);
   10686   1.1  christos 
   10687   1.1  christos 		continue;
   10688   1.1  christos 	      }
   10689   1.1  christos 
   10690   1.1  christos 	    switch (*++c)
   10691   1.8  christos 	      {
   10692   1.8  christos 		case '{':
   10693   1.8  christos 		  ++c;
   10694   1.8  christos 		  if (*c == '\0')
   10695   1.8  christos 		    abort ();
   10696   1.8  christos 		  old_base_style = base_style;
   10697   1.8  christos 		  base_style = decode_base_style (*c);
   10698   1.8  christos 		  ++c;
   10699   1.8  christos 		  if (*c != ':')
   10700   1.8  christos 		    abort ();
   10701   1.8  christos 		  break;
   10702   1.8  christos 
   10703   1.8  christos 		case '}':
   10704   1.8  christos 		  base_style = old_base_style;
   10705   1.8  christos 		  break;
   10706   1.1  christos 
   10707   1.8  christos 	      case '%':
   10708   1.1  christos 		func (stream, base_style, "%%");
   10709   1.1  christos 		break;
   10710   1.1  christos 
   10711   1.1  christos 	      case 'c':
   10712   1.8  christos 		if (ifthen_state)
   10713   1.8  christos 		  func (stream, dis_style_mnemonic, "%s",
   10714   1.1  christos 			arm_conditional[IFTHEN_COND]);
   10715   1.1  christos 		break;
   10716   1.1  christos 
   10717   1.1  christos 	      case 'C':
   10718   1.8  christos 		if (ifthen_state)
   10719   1.8  christos 		  func (stream, dis_style_mnemonic, "%s",
   10720   1.1  christos 			arm_conditional[IFTHEN_COND]);
   10721   1.8  christos 		else
   10722   1.1  christos 		  func (stream, dis_style_mnemonic, "s");
   10723   1.1  christos 		break;
   10724   1.1  christos 
   10725   1.1  christos 	      case 'I':
   10726   1.1  christos 		{
   10727   1.1  christos 		  unsigned int tmp;
   10728   1.1  christos 
   10729   1.1  christos 		  ifthen_next_state = given & 0xff;
   10730   1.8  christos 		  for (tmp = given << 1; tmp & 0xf; tmp <<= 1)
   10731   1.8  christos 		    func (stream, dis_style_mnemonic,
   10732   1.8  christos 			  ((given ^ tmp) & 0x10) ? "e" : "t");
   10733   1.8  christos 		  func (stream, dis_style_text, "\t");
   10734   1.8  christos 		  func (stream, dis_style_sub_mnemonic, "%s",
   10735   1.1  christos 			arm_conditional[(given >> 4) & 0xf]);
   10736   1.1  christos 		}
   10737   1.1  christos 		break;
   10738   1.1  christos 
   10739   1.1  christos 	      case 'x':
   10740   1.8  christos 		if (ifthen_next_state)
   10741   1.8  christos 		  func (stream, dis_style_comment_start,
   10742   1.1  christos 			"\t@ unpredictable branch in IT block\n");
   10743   1.1  christos 		break;
   10744   1.1  christos 
   10745   1.1  christos 	      case 'X':
   10746   1.8  christos 		if (ifthen_state)
   10747   1.8  christos 		  func (stream, dis_style_comment_start,
   10748   1.1  christos 			"\t@ unpredictable <IT:%s>",
   10749   1.1  christos 			arm_conditional[IFTHEN_COND]);
   10750   1.1  christos 		break;
   10751   1.1  christos 
   10752   1.1  christos 	      case 'S':
   10753   1.1  christos 		{
   10754   1.1  christos 		  long reg;
   10755   1.1  christos 
   10756   1.1  christos 		  reg = (given >> 3) & 0x7;
   10757   1.1  christos 		  if (given & (1 << 6))
   10758   1.1  christos 		    reg += 8;
   10759   1.8  christos 
   10760   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[reg]);
   10761   1.1  christos 		}
   10762   1.1  christos 		break;
   10763   1.1  christos 
   10764   1.1  christos 	      case 'D':
   10765   1.1  christos 		{
   10766   1.1  christos 		  long reg;
   10767   1.1  christos 
   10768   1.1  christos 		  reg = given & 0x7;
   10769   1.1  christos 		  if (given & (1 << 7))
   10770   1.1  christos 		    reg += 8;
   10771   1.8  christos 
   10772   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[reg]);
   10773   1.1  christos 		}
   10774   1.1  christos 		break;
   10775   1.1  christos 
   10776   1.1  christos 	      case 'N':
   10777   1.1  christos 		if (given & (1 << 8))
   10778   1.1  christos 		  domasklr = 1;
   10779   1.1  christos 		/* Fall through.  */
   10780   1.1  christos 	      case 'O':
   10781   1.1  christos 		if (*c == 'O' && (given & (1 << 8)))
   10782   1.1  christos 		  domaskpc = 1;
   10783   1.1  christos 		/* Fall through.  */
   10784   1.1  christos 	      case 'M':
   10785   1.1  christos 		{
   10786   1.1  christos 		  int started = 0;
   10787   1.1  christos 		  int reg;
   10788   1.8  christos 
   10789   1.1  christos 		  func (stream, dis_style_text, "{");
   10790   1.1  christos 
   10791   1.1  christos 		  /* It would be nice if we could spot
   10792   1.1  christos 		     ranges, and generate the rS-rE format: */
   10793   1.1  christos 		  for (reg = 0; (reg < 8); reg++)
   10794   1.1  christos 		    if ((given & (1 << reg)) != 0)
   10795   1.1  christos 		      {
   10796   1.8  christos 			if (started)
   10797   1.1  christos 			  func (stream, dis_style_text, ", ");
   10798   1.8  christos 			started = 1;
   10799   1.8  christos 			func (stream, dis_style_register, "%s",
   10800   1.1  christos 			      arm_regnames[reg]);
   10801   1.1  christos 		      }
   10802   1.1  christos 
   10803   1.1  christos 		  if (domasklr)
   10804   1.1  christos 		    {
   10805   1.8  christos 		      if (started)
   10806   1.1  christos 			func (stream, dis_style_text, ", ");
   10807   1.8  christos 		      started = 1;
   10808   1.8  christos 		      func (stream, dis_style_register, "%s",
   10809   1.1  christos 			    arm_regnames[14] /* "lr" */);
   10810   1.1  christos 		    }
   10811   1.1  christos 
   10812   1.1  christos 		  if (domaskpc)
   10813   1.1  christos 		    {
   10814   1.8  christos 		      if (started)
   10815   1.8  christos 			func (stream, dis_style_text, ", ");
   10816   1.8  christos 		      func (stream, dis_style_register, "%s",
   10817   1.1  christos 			    arm_regnames[15] /* "pc" */);
   10818   1.1  christos 		    }
   10819   1.8  christos 
   10820   1.1  christos 		  func (stream, dis_style_text, "}");
   10821   1.1  christos 		}
   10822   1.1  christos 		break;
   10823   1.1  christos 
   10824   1.1  christos 	      case 'W':
   10825   1.1  christos 		/* Print writeback indicator for a LDMIA.  We are doing a
   10826   1.1  christos 		   writeback if the base register is not in the register
   10827   1.1  christos 		   mask.  */
   10828   1.8  christos 		if ((given & (1 << ((given & 0x0700) >> 8))) == 0)
   10829   1.7  christos 		  func (stream, dis_style_text, "!");
   10830   1.1  christos 		break;
   10831   1.1  christos 
   10832   1.1  christos 	      case 'b':
   10833   1.1  christos 		/* Print ARM V6T2 CZB address: pc+4+6 bits.  */
   10834   1.1  christos 		{
   10835   1.1  christos 		  bfd_vma address = (pc + 4
   10836   1.1  christos 				     + ((given & 0x00f8) >> 2)
   10837   1.1  christos 				     + ((given & 0x0200) >> 3));
   10838   1.7  christos 		  info->print_address_func (address, info);
   10839   1.7  christos 
   10840   1.7  christos 		  /* Fill in instruction information.  */
   10841   1.7  christos 		  info->insn_info_valid = 1;
   10842   1.7  christos 		  info->insn_type = dis_branch;
   10843   1.1  christos 		  info->target = address;
   10844   1.1  christos 		}
   10845   1.1  christos 		break;
   10846   1.1  christos 
   10847   1.1  christos 	      case 's':
   10848   1.1  christos 		/* Right shift immediate -- bits 6..10; 1-31 print
   10849   1.1  christos 		   as themselves, 0 prints as 32.  */
   10850   1.1  christos 		{
   10851   1.1  christos 		  long imm = (given & 0x07c0) >> 6;
   10852   1.1  christos 		  if (imm == 0)
   10853   1.8  christos 		    imm = 32;
   10854   1.1  christos 		  func (stream, dis_style_immediate, "#%ld", imm);
   10855   1.1  christos 		}
   10856   1.1  christos 		break;
   10857   1.1  christos 
   10858   1.1  christos 	      case '0': case '1': case '2': case '3': case '4':
   10859   1.1  christos 	      case '5': case '6': case '7': case '8': case '9':
   10860   1.1  christos 		{
   10861   1.1  christos 		  int bitstart = *c++ - '0';
   10862   1.1  christos 		  int bitend = 0;
   10863   1.1  christos 
   10864   1.1  christos 		  while (*c >= '0' && *c <= '9')
   10865   1.1  christos 		    bitstart = (bitstart * 10) + *c++ - '0';
   10866   1.1  christos 
   10867   1.1  christos 		  switch (*c)
   10868   1.1  christos 		    {
   10869   1.1  christos 		    case '-':
   10870   1.2     joerg 		      {
   10871   1.1  christos 			bfd_vma reg;
   10872   1.1  christos 
   10873   1.1  christos 			c++;
   10874   1.1  christos 			while (*c >= '0' && *c <= '9')
   10875   1.1  christos 			  bitend = (bitend * 10) + *c++ - '0';
   10876   1.1  christos 			if (!bitend)
   10877   1.1  christos 			  abort ();
   10878   1.8  christos 			reg = given >> bitstart;
   10879   1.1  christos 			reg &= ((bfd_vma) 2 << (bitend - bitstart)) - 1;
   10880   1.1  christos 
   10881   1.1  christos 			switch (*c)
   10882   1.1  christos 			  {
   10883   1.8  christos 			  case 'r':
   10884   1.8  christos 			    func (stream, dis_style_register, "%s",
   10885   1.1  christos 				  arm_regnames[reg]);
   10886   1.1  christos 			    break;
   10887   1.1  christos 
   10888   1.8  christos 			  case 'd':
   10889   1.8  christos 			    func (stream, dis_style_immediate, "%ld",
   10890   1.1  christos 				  (long) reg);
   10891   1.1  christos 			    value_in_comment = reg;
   10892   1.1  christos 			    break;
   10893   1.1  christos 
   10894   1.8  christos 			  case 'H':
   10895   1.8  christos 			    func (stream, dis_style_immediate, "%ld",
   10896   1.1  christos 				  (long) (reg << 1));
   10897   1.1  christos 			    value_in_comment = reg << 1;
   10898   1.1  christos 			    break;
   10899   1.1  christos 
   10900   1.8  christos 			  case 'W':
   10901   1.8  christos 			    func (stream, dis_style_immediate, "%ld",
   10902   1.1  christos 				  (long) (reg << 2));
   10903   1.1  christos 			    value_in_comment = reg << 2;
   10904   1.1  christos 			    break;
   10905   1.1  christos 
   10906   1.1  christos 			  case 'a':
   10907   1.1  christos 			    /* PC-relative address -- the bottom two
   10908   1.1  christos 			       bits of the address are dropped
   10909   1.1  christos 			       before the calculation.  */
   10910   1.1  christos 			    info->print_address_func
   10911   1.1  christos 			      (((pc + 4) & ~3) + (reg << 2), info);
   10912   1.1  christos 			    value_in_comment = 0;
   10913   1.1  christos 			    break;
   10914   1.1  christos 
   10915   1.8  christos 			  case 'x':
   10916   1.8  christos 			    func (stream, dis_style_immediate, "0x%04lx",
   10917   1.1  christos 				  (long) reg);
   10918   1.1  christos 			    break;
   10919   1.1  christos 
   10920   1.1  christos 			  case 'B':
   10921   1.7  christos 			    reg = ((reg ^ (1 << bitend)) - (1 << bitend));
   10922   1.7  christos 			    bfd_vma target = reg * 2 + pc + 4;
   10923   1.1  christos 			    info->print_address_func (target, info);
   10924   1.7  christos 			    value_in_comment = 0;
   10925   1.7  christos 
   10926   1.7  christos 			    /* Fill in instruction information.  */
   10927   1.7  christos 			    info->insn_info_valid = 1;
   10928   1.7  christos 			    info->insn_type = dis_branch;
   10929   1.1  christos 			    info->target = target;
   10930   1.1  christos 			    break;
   10931   1.1  christos 
   10932   1.8  christos 			  case 'c':
   10933   1.8  christos 			    func (stream, dis_style_mnemonic, "%s",
   10934   1.1  christos 				  arm_conditional [reg]);
   10935   1.1  christos 			    break;
   10936   1.1  christos 
   10937   1.1  christos 			  default:
   10938   1.1  christos 			    abort ();
   10939   1.1  christos 			  }
   10940   1.1  christos 		      }
   10941   1.1  christos 		      break;
   10942   1.1  christos 
   10943   1.1  christos 		    case '\'':
   10944   1.1  christos 		      c++;
   10945   1.8  christos 		      if ((given & (1 << bitstart)) != 0)
   10946   1.1  christos 			func (stream, base_style, "%c", *c);
   10947   1.1  christos 		      break;
   10948   1.1  christos 
   10949   1.1  christos 		    case '?':
   10950   1.1  christos 		      ++c;
   10951   1.8  christos 		      if ((given & (1 << bitstart)) != 0)
   10952   1.1  christos 			func (stream, base_style, "%c", *c++);
   10953   1.8  christos 		      else
   10954   1.1  christos 			func (stream, base_style, "%c", *++c);
   10955   1.1  christos 		      break;
   10956   1.1  christos 
   10957   1.1  christos 		    default:
   10958   1.1  christos 		      abort ();
   10959   1.1  christos 		    }
   10960   1.1  christos 		}
   10961   1.1  christos 		break;
   10962   1.1  christos 
   10963   1.1  christos 	      default:
   10964   1.1  christos 		abort ();
   10965   1.1  christos 	      }
   10966   1.1  christos 	  }
   10967   1.1  christos 
   10968   1.8  christos 	if (value_in_comment > 32 || value_in_comment < -16)
   10969   1.8  christos 	  func (stream, dis_style_comment_start,
   10970   1.1  christos 		"\t@ 0x%lx", value_in_comment);
   10971   1.1  christos 	return;
   10972   1.1  christos       }
   10973   1.1  christos 
   10974   1.8  christos   /* No match.  */
   10975   1.8  christos   func (stream, dis_style_comment_start, UNKNOWN_INSTRUCTION_16BIT,
   10976   1.6  christos 	(unsigned) given);
   10977   1.1  christos   return;
   10978   1.1  christos }
   10979   1.1  christos 
   10980   1.1  christos /* Return the name of an V7M special register.  */
   10981   1.1  christos 
   10982   1.1  christos static const char *
   10983   1.1  christos psr_name (int regno)
   10984   1.1  christos {
   10985   1.1  christos   switch (regno)
   10986   1.5  christos     {
   10987   1.5  christos     case 0x0: return "APSR";
   10988   1.5  christos     case 0x1: return "IAPSR";
   10989   1.5  christos     case 0x2: return "EAPSR";
   10990   1.5  christos     case 0x3: return "PSR";
   10991   1.5  christos     case 0x5: return "IPSR";
   10992   1.5  christos     case 0x6: return "EPSR";
   10993   1.5  christos     case 0x7: return "IEPSR";
   10994   1.5  christos     case 0x8: return "MSP";
   10995   1.5  christos     case 0x9: return "PSP";
   10996   1.5  christos     case 0xa: return "MSPLIM";
   10997   1.5  christos     case 0xb: return "PSPLIM";
   10998   1.5  christos     case 0x10: return "PRIMASK";
   10999   1.5  christos     case 0x11: return "BASEPRI";
   11000   1.5  christos     case 0x12: return "BASEPRI_MAX";
   11001   1.5  christos     case 0x13: return "FAULTMASK";
   11002  1.10  christos     case 0x14: return "CONTROL";
   11003  1.10  christos     case 0x20: return "PAC_KEY_P_0";
   11004  1.10  christos     case 0x21: return "PAC_KEY_P_1";
   11005  1.10  christos     case 0x22: return "PAC_KEY_P_2";
   11006  1.10  christos     case 0x23: return "PAC_KEY_P_3";
   11007  1.10  christos     case 0x24: return "PAC_KEY_U_0";
   11008  1.10  christos     case 0x25: return "PAC_KEY_U_1";
   11009  1.10  christos     case 0x26: return "PAC_KEY_U_2";
   11010   1.4  christos     case 0x27: return "PAC_KEY_U_3";
   11011   1.4  christos     case 0x88: return "MSP_NS";
   11012   1.5  christos     case 0x89: return "PSP_NS";
   11013   1.5  christos     case 0x8a: return "MSPLIM_NS";
   11014   1.5  christos     case 0x8b: return "PSPLIM_NS";
   11015   1.5  christos     case 0x90: return "PRIMASK_NS";
   11016   1.5  christos     case 0x91: return "BASEPRI_NS";
   11017   1.5  christos     case 0x93: return "FAULTMASK_NS";
   11018   1.5  christos     case 0x94: return "CONTROL_NS";
   11019  1.10  christos     case 0x98: return "SP_NS";
   11020  1.10  christos     case 0xa0: return "PAC_KEY_P_0_NS";
   11021  1.10  christos     case 0xa1: return "PAC_KEY_P_1_NS";
   11022  1.10  christos     case 0xa2: return "PAC_KEY_P_2_NS";
   11023  1.10  christos     case 0xa3: return "PAC_KEY_P_3_NS";
   11024  1.10  christos     case 0xa4: return "PAC_KEY_U_0_NS";
   11025  1.10  christos     case 0xa5: return "PAC_KEY_U_1_NS";
   11026  1.10  christos     case 0xa6: return "PAC_KEY_U_2_NS";
   11027   1.1  christos     case 0xa7: return "PAC_KEY_U_3_NS";
   11028   1.1  christos     default: return "<unknown>";
   11029   1.1  christos     }
   11030   1.1  christos }
   11031   1.1  christos 
   11032   1.1  christos /* Print one 32-bit Thumb instruction from PC on INFO->STREAM.  */
   11033   1.1  christos 
   11034   1.1  christos static void
   11035   1.1  christos print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
   11036   1.1  christos {
   11037   1.1  christos   const struct opcode32 *insn;
   11038   1.8  christos   void *stream = info->stream;
   11039  1.10  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   11040   1.8  christos   bool is_mve = is_v81m_architecture (info);
   11041   1.8  christos   enum disassembler_style base_style = dis_style_mnemonic;
   11042   1.1  christos   enum disassembler_style old_base_style = base_style;
   11043   1.8  christos 
   11044   1.1  christos   if (print_insn_coprocessor (pc, info, given, true))
   11045   1.1  christos     return;
   11046   1.8  christos 
   11047   1.7  christos   if (!is_mve && print_insn_neon (info, given, true))
   11048   1.7  christos     return;
   11049   1.7  christos 
   11050   1.7  christos   if (is_mve && print_insn_mve (info, given))
   11051   1.7  christos     return;
   11052   1.8  christos 
   11053   1.7  christos   if (print_insn_cde (info, given, true))
   11054   1.7  christos     return;
   11055   1.8  christos 
   11056   1.1  christos   if (print_insn_generic_coprocessor (pc, info, given, true))
   11057   1.1  christos     return;
   11058   1.1  christos 
   11059   1.1  christos   for (insn = thumb32_opcodes; insn->assembler; insn++)
   11060   1.1  christos     if ((given & insn->mask) == insn->value)
   11061   1.8  christos       {
   11062   1.8  christos 	bool is_clrm = false;
   11063   1.1  christos 	bool is_unpredictable = false;
   11064   1.1  christos 	signed long value_in_comment = 0;
   11065   1.1  christos 	const char *c = insn->assembler;
   11066   1.1  christos 
   11067   1.1  christos 	for (; *c; c++)
   11068   1.1  christos 	  {
   11069   1.1  christos 	    if (*c != '%')
   11070   1.8  christos 	      {
   11071   1.8  christos 		if (*c == '@')
   11072   1.8  christos 		  base_style = dis_style_comment_start;
   11073   1.8  christos 		if (*c == '\t')
   11074   1.8  christos 		  base_style = dis_style_text;
   11075   1.1  christos 		func (stream, base_style, "%c", *c);
   11076   1.1  christos 		continue;
   11077   1.1  christos 	      }
   11078   1.1  christos 
   11079   1.1  christos 	    switch (*++c)
   11080   1.8  christos 	      {
   11081   1.8  christos 	      case '{':
   11082   1.8  christos 		++c;
   11083   1.8  christos 		if (*c == '\0')
   11084   1.8  christos 		  abort ();
   11085   1.8  christos 		old_base_style = base_style;
   11086   1.8  christos 		base_style = decode_base_style (*c);
   11087   1.8  christos 		++c;
   11088   1.8  christos 		if (*c != ':')
   11089   1.8  christos 		  abort ();
   11090   1.8  christos 		break;
   11091   1.8  christos 
   11092   1.8  christos 	      case '}':
   11093   1.8  christos 		base_style = old_base_style;
   11094   1.8  christos 		break;
   11095   1.1  christos 
   11096   1.8  christos 	      case '%':
   11097   1.1  christos 		func (stream, base_style, "%%");
   11098   1.1  christos 		break;
   11099   1.1  christos 
   11100   1.1  christos 	      case 'c':
   11101   1.8  christos 		if (ifthen_state)
   11102   1.8  christos 		  func (stream, dis_style_mnemonic, "%s",
   11103   1.1  christos 			arm_conditional[IFTHEN_COND]);
   11104   1.1  christos 		break;
   11105   1.1  christos 
   11106   1.1  christos 	      case 'x':
   11107   1.8  christos 		if (ifthen_next_state)
   11108   1.8  christos 		  func (stream, dis_style_comment_start,
   11109   1.1  christos 			"\t@ unpredictable branch in IT block\n");
   11110   1.1  christos 		break;
   11111   1.1  christos 
   11112   1.1  christos 	      case 'X':
   11113   1.8  christos 		if (ifthen_state)
   11114   1.8  christos 		  func (stream, dis_style_comment_start,
   11115   1.1  christos 			"\t@ unpredictable <IT:%s>",
   11116   1.1  christos 			arm_conditional[IFTHEN_COND]);
   11117   1.1  christos 		break;
   11118   1.1  christos 
   11119   1.1  christos 	      case 'I':
   11120   1.1  christos 		{
   11121   1.1  christos 		  unsigned int imm12 = 0;
   11122   1.1  christos 
   11123   1.1  christos 		  imm12 |= (given & 0x000000ffu);
   11124   1.1  christos 		  imm12 |= (given & 0x00007000u) >> 4;
   11125   1.8  christos 		  imm12 |= (given & 0x04000000u) >> 15;
   11126   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm12);
   11127   1.1  christos 		  value_in_comment = imm12;
   11128   1.1  christos 		}
   11129   1.1  christos 		break;
   11130   1.1  christos 
   11131   1.1  christos 	      case 'M':
   11132   1.1  christos 		{
   11133   1.1  christos 		  unsigned int bits = 0, imm, imm8, mod;
   11134   1.1  christos 
   11135   1.1  christos 		  bits |= (given & 0x000000ffu);
   11136   1.1  christos 		  bits |= (given & 0x00007000u) >> 4;
   11137   1.1  christos 		  bits |= (given & 0x04000000u) >> 15;
   11138   1.1  christos 		  imm8 = (bits & 0x0ff);
   11139   1.1  christos 		  mod = (bits & 0xf00) >> 8;
   11140   1.1  christos 		  switch (mod)
   11141   1.1  christos 		    {
   11142   1.1  christos 		    case 0: imm = imm8; break;
   11143   1.1  christos 		    case 1: imm = ((imm8 << 16) | imm8); break;
   11144   1.1  christos 		    case 2: imm = ((imm8 << 24) | (imm8 << 8)); break;
   11145   1.1  christos 		    case 3: imm = ((imm8 << 24) | (imm8 << 16) | (imm8 << 8) | imm8); break;
   11146   1.1  christos 		    default:
   11147   1.1  christos 		      mod  = (bits & 0xf80) >> 7;
   11148   1.1  christos 		      imm8 = (bits & 0x07f) | 0x80;
   11149   1.1  christos 		      imm  = (((imm8 << (32 - mod)) | (imm8 >> mod)) & 0xffffffff);
   11150   1.8  christos 		    }
   11151   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11152   1.1  christos 		  value_in_comment = imm;
   11153   1.1  christos 		}
   11154   1.4  christos 		break;
   11155   1.1  christos 
   11156   1.1  christos 	      case 'J':
   11157   1.1  christos 		{
   11158   1.1  christos 		  unsigned int imm = 0;
   11159   1.1  christos 
   11160   1.1  christos 		  imm |= (given & 0x000000ffu);
   11161   1.1  christos 		  imm |= (given & 0x00007000u) >> 4;
   11162   1.1  christos 		  imm |= (given & 0x04000000u) >> 15;
   11163   1.8  christos 		  imm |= (given & 0x000f0000u) >> 4;
   11164   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11165   1.1  christos 		  value_in_comment = imm;
   11166   1.1  christos 		}
   11167   1.1  christos 		break;
   11168   1.1  christos 
   11169   1.1  christos 	      case 'K':
   11170   1.1  christos 		{
   11171   1.1  christos 		  unsigned int imm = 0;
   11172   1.1  christos 
   11173   1.1  christos 		  imm |= (given & 0x000f0000u) >> 16;
   11174   1.1  christos 		  imm |= (given & 0x00000ff0u) >> 0;
   11175   1.8  christos 		  imm |= (given & 0x0000000fu) << 12;
   11176   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11177   1.1  christos 		  value_in_comment = imm;
   11178   1.1  christos 		}
   11179   1.1  christos 		break;
   11180   1.2     joerg 
   11181   1.2     joerg 	      case 'H':
   11182   1.2     joerg 		{
   11183   1.2     joerg 		  unsigned int imm = 0;
   11184   1.2     joerg 
   11185   1.2     joerg 		  imm |= (given & 0x000f0000u) >> 4;
   11186   1.8  christos 		  imm |= (given & 0x00000fffu) >> 0;
   11187   1.2     joerg 		  func (stream, dis_style_immediate, "#%u", imm);
   11188   1.2     joerg 		  value_in_comment = imm;
   11189   1.2     joerg 		}
   11190   1.2     joerg 		break;
   11191   1.1  christos 
   11192   1.1  christos 	      case 'V':
   11193   1.1  christos 		{
   11194   1.1  christos 		  unsigned int imm = 0;
   11195   1.1  christos 
   11196   1.1  christos 		  imm |= (given & 0x00000fffu);
   11197   1.8  christos 		  imm |= (given & 0x000f0000u) >> 4;
   11198   1.1  christos 		  func (stream, dis_style_immediate, "#%u", imm);
   11199   1.1  christos 		  value_in_comment = imm;
   11200   1.1  christos 		}
   11201   1.1  christos 		break;
   11202   1.1  christos 
   11203   1.1  christos 	      case 'S':
   11204   1.1  christos 		{
   11205   1.1  christos 		  unsigned int reg = (given & 0x0000000fu);
   11206   1.1  christos 		  unsigned int stp = (given & 0x00000030u) >> 4;
   11207   1.1  christos 		  unsigned int imm = 0;
   11208   1.1  christos 		  imm |= (given & 0x000000c0u) >> 6;
   11209   1.1  christos 		  imm |= (given & 0x00007000u) >> 10;
   11210   1.8  christos 
   11211   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[reg]);
   11212   1.1  christos 		  switch (stp)
   11213   1.1  christos 		    {
   11214   1.1  christos 		    case 0:
   11215   1.8  christos 		      if (imm > 0)
   11216   1.8  christos 			{
   11217   1.8  christos 			  func (stream, dis_style_text, ", ");
   11218   1.8  christos 			  func (stream, dis_style_sub_mnemonic, "lsl ");
   11219   1.8  christos 			  func (stream, dis_style_immediate, "#%u", imm);
   11220   1.1  christos 			}
   11221   1.1  christos 		      break;
   11222   1.1  christos 
   11223   1.1  christos 		    case 1:
   11224   1.1  christos 		      if (imm == 0)
   11225   1.8  christos 			imm = 32;
   11226   1.8  christos 		      func (stream, dis_style_text, ", ");
   11227   1.8  christos 		      func (stream, dis_style_sub_mnemonic, "lsr ");
   11228   1.1  christos 		      func (stream, dis_style_immediate, "#%u", imm);
   11229   1.1  christos 		      break;
   11230   1.1  christos 
   11231   1.1  christos 		    case 2:
   11232   1.1  christos 		      if (imm == 0)
   11233   1.8  christos 			imm = 32;
   11234   1.8  christos 		      func (stream, dis_style_text, ", ");
   11235   1.8  christos 		      func (stream, dis_style_sub_mnemonic, "asr ");
   11236   1.1  christos 		      func (stream, dis_style_immediate, "#%u", imm);
   11237   1.1  christos 		      break;
   11238   1.1  christos 
   11239   1.1  christos 		    case 3:
   11240   1.8  christos 		      if (imm == 0)
   11241   1.8  christos 			{
   11242   1.8  christos 			  func (stream, dis_style_text, ", ");
   11243   1.8  christos 			  func (stream, dis_style_sub_mnemonic, "rrx");
   11244   1.1  christos 			}
   11245   1.8  christos 		      else
   11246   1.8  christos 			{
   11247   1.8  christos 			  func (stream, dis_style_text, ", ");
   11248   1.8  christos 			  func (stream, dis_style_sub_mnemonic, "ror ");
   11249   1.8  christos 			  func (stream, dis_style_immediate, "#%u", imm);
   11250   1.1  christos 			}
   11251   1.1  christos 		    }
   11252   1.1  christos 		}
   11253   1.1  christos 		break;
   11254   1.1  christos 
   11255   1.1  christos 	      case 'a':
   11256   1.1  christos 		{
   11257   1.1  christos 		  unsigned int Rn  = (given & 0x000f0000) >> 16;
   11258   1.1  christos 		  unsigned int U   = ! NEGATIVE_BIT_SET;
   11259   1.1  christos 		  unsigned int op  = (given & 0x00000f00) >> 8;
   11260   1.1  christos 		  unsigned int i12 = (given & 0x00000fff);
   11261   1.8  christos 		  unsigned int i8  = (given & 0x000000ff);
   11262   1.2     joerg 		  bool writeback = false, postind = false;
   11263   1.1  christos 		  bfd_vma offset = 0;
   11264   1.8  christos 
   11265   1.8  christos 		  func (stream, dis_style_text, "[");
   11266   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[Rn]);
   11267   1.1  christos 		  if (U) /* 12-bit positive immediate offset.  */
   11268   1.1  christos 		    {
   11269   1.1  christos 		      offset = i12;
   11270   1.1  christos 		      if (Rn != 15)
   11271   1.1  christos 			value_in_comment = offset;
   11272   1.1  christos 		    }
   11273   1.1  christos 		  else if (Rn == 15) /* 12-bit negative immediate offset.  */
   11274   1.1  christos 		    offset = - (int) i12;
   11275   1.1  christos 		  else if (op == 0x0) /* Shifted register offset.  */
   11276   1.1  christos 		    {
   11277   1.1  christos 		      unsigned int Rm = (i8 & 0x0f);
   11278   1.1  christos 		      unsigned int sh = (i8 & 0x30) >> 4;
   11279   1.8  christos 
   11280   1.8  christos 		      func (stream, dis_style_text, ", ");
   11281   1.8  christos 		      func (stream, dis_style_register, "%s",
   11282   1.1  christos 			    arm_regnames[Rm]);
   11283   1.8  christos 		      if (sh)
   11284   1.8  christos 			{
   11285   1.8  christos 			  func (stream, dis_style_text, ", ");
   11286   1.8  christos 			  func (stream, dis_style_sub_mnemonic, "lsl ");
   11287   1.8  christos 			  func (stream, dis_style_immediate, "#%u", sh);
   11288   1.8  christos 			}
   11289   1.1  christos 		      func (stream, dis_style_text, "]");
   11290   1.1  christos 		      break;
   11291   1.1  christos 		    }
   11292   1.1  christos 		  else switch (op)
   11293   1.1  christos 		    {
   11294   1.1  christos 		    case 0xE:  /* 8-bit positive immediate offset.  */
   11295   1.1  christos 		      offset = i8;
   11296   1.1  christos 		      break;
   11297   1.1  christos 
   11298   1.1  christos 		    case 0xC:  /* 8-bit negative immediate offset.  */
   11299   1.1  christos 		      offset = -i8;
   11300   1.1  christos 		      break;
   11301   1.1  christos 
   11302   1.1  christos 		    case 0xF:  /* 8-bit + preindex with wb.  */
   11303   1.8  christos 		      offset = i8;
   11304   1.1  christos 		      writeback = true;
   11305   1.1  christos 		      break;
   11306   1.1  christos 
   11307   1.1  christos 		    case 0xD:  /* 8-bit - preindex with wb.  */
   11308   1.8  christos 		      offset = -i8;
   11309   1.1  christos 		      writeback = true;
   11310   1.1  christos 		      break;
   11311   1.1  christos 
   11312   1.1  christos 		    case 0xB:  /* 8-bit + postindex.  */
   11313   1.8  christos 		      offset = i8;
   11314   1.1  christos 		      postind = true;
   11315   1.1  christos 		      break;
   11316   1.1  christos 
   11317   1.1  christos 		    case 0x9:  /* 8-bit - postindex.  */
   11318   1.8  christos 		      offset = -i8;
   11319   1.1  christos 		      postind = true;
   11320   1.1  christos 		      break;
   11321   1.1  christos 
   11322   1.8  christos 		    default:
   11323   1.1  christos 		      func (stream, dis_style_text, ", <undefined>]");
   11324   1.1  christos 		      goto skip;
   11325   1.1  christos 		    }
   11326   1.1  christos 
   11327   1.8  christos 		  if (postind)
   11328   1.8  christos 		    {
   11329   1.8  christos 		      func (stream, dis_style_text, "], ");
   11330   1.8  christos 		      func (stream, dis_style_immediate, "#%d", (int) offset);
   11331   1.1  christos 		    }
   11332   1.1  christos 		  else
   11333   1.1  christos 		    {
   11334   1.8  christos 		      if (offset)
   11335   1.8  christos 			{
   11336   1.8  christos 			  func (stream, dis_style_text, ", ");
   11337   1.8  christos 			  func (stream, dis_style_immediate, "#%d",
   11338   1.8  christos 				(int) offset);
   11339   1.8  christos 			}
   11340   1.1  christos 		      func (stream, dis_style_text, writeback ? "]!" : "]");
   11341   1.1  christos 		    }
   11342   1.1  christos 
   11343   1.1  christos 		  if (Rn == 15)
   11344   1.8  christos 		    {
   11345   1.1  christos 		      func (stream, dis_style_comment_start, "\t@ ");
   11346   1.1  christos 		      info->print_address_func (((pc + 4) & ~3) + offset, info);
   11347   1.1  christos 		    }
   11348   1.1  christos 		}
   11349   1.1  christos 	      skip:
   11350   1.1  christos 		break;
   11351   1.1  christos 
   11352   1.1  christos 	      case 'A':
   11353   1.1  christos 		{
   11354   1.1  christos 		  unsigned int U   = ! NEGATIVE_BIT_SET;
   11355   1.1  christos 		  unsigned int W   = WRITEBACK_BIT_SET;
   11356   1.1  christos 		  unsigned int Rn  = (given & 0x000f0000) >> 16;
   11357   1.1  christos 		  unsigned int off = (given & 0x000000ff);
   11358   1.8  christos 
   11359   1.8  christos 		  func (stream, dis_style_text, "[");
   11360   1.1  christos 		  func (stream, dis_style_register, "%s", arm_regnames[Rn]);
   11361   1.1  christos 
   11362   1.1  christos 		  if (PRE_BIT_SET)
   11363   1.1  christos 		    {
   11364   1.1  christos 		      if (off || !U)
   11365   1.8  christos 			{
   11366   1.8  christos 			  func (stream, dis_style_text, ", ");
   11367   1.8  christos 			  func (stream, dis_style_immediate, "#%c%u",
   11368   1.6  christos 				U ? '+' : '-', off * 4);
   11369   1.1  christos 			  value_in_comment = off * 4 * (U ? 1 : -1);
   11370   1.8  christos 			}
   11371   1.1  christos 		      func (stream, dis_style_text, "]");
   11372   1.8  christos 		      if (W)
   11373   1.1  christos 			func (stream, dis_style_text, "!");
   11374   1.1  christos 		    }
   11375   1.1  christos 		  else
   11376   1.8  christos 		    {
   11377   1.1  christos 		      func (stream, dis_style_text, "], ");
   11378   1.1  christos 		      if (W)
   11379   1.8  christos 			{
   11380   1.8  christos 			  func (stream, dis_style_immediate, "#%c%u",
   11381   1.6  christos 				U ? '+' : '-', off * 4);
   11382   1.1  christos 			  value_in_comment = off * 4 * (U ? 1 : -1);
   11383   1.1  christos 			}
   11384   1.1  christos 		      else
   11385   1.8  christos 			{
   11386   1.8  christos 			  func (stream, dis_style_text, "{");
   11387   1.8  christos 			  func (stream, dis_style_immediate, "%u", off);
   11388   1.1  christos 			  func (stream, dis_style_text, "}");
   11389   1.1  christos 			  value_in_comment = off;
   11390   1.1  christos 			}
   11391   1.1  christos 		    }
   11392   1.1  christos 		}
   11393   1.1  christos 		break;
   11394   1.1  christos 
   11395   1.1  christos 	      case 'w':
   11396   1.1  christos 		{
   11397   1.1  christos 		  unsigned int Sbit = (given & 0x01000000) >> 24;
   11398   1.1  christos 		  unsigned int type = (given & 0x00600000) >> 21;
   11399   1.1  christos 
   11400   1.1  christos 		  switch (type)
   11401   1.8  christos 		    {
   11402   1.8  christos 		    case 0:
   11403   1.8  christos 		      func (stream, dis_style_mnemonic, Sbit ? "sb" : "b");
   11404   1.8  christos 		      break;
   11405   1.8  christos 		    case 1:
   11406   1.8  christos 		      func (stream, dis_style_mnemonic, Sbit ? "sh" : "h");
   11407   1.1  christos 		      break;
   11408   1.1  christos 		    case 2:
   11409   1.8  christos 		      if (Sbit)
   11410   1.1  christos 			func (stream, dis_style_text, "??");
   11411   1.1  christos 		      break;
   11412   1.8  christos 		    case 3:
   11413   1.1  christos 		      func (stream, dis_style_text, "??");
   11414   1.1  christos 		      break;
   11415   1.1  christos 		    }
   11416   1.1  christos 		}
   11417   1.1  christos 		break;
   11418   1.7  christos 
   11419   1.8  christos 	      case 'n':
   11420   1.7  christos 		is_clrm = true;
   11421   1.1  christos 		/* Fall through.  */
   11422   1.1  christos 	      case 'm':
   11423   1.1  christos 		{
   11424   1.1  christos 		  int started = 0;
   11425   1.1  christos 		  int reg;
   11426   1.8  christos 
   11427   1.1  christos 		  func (stream, dis_style_text, "{");
   11428   1.1  christos 		  for (reg = 0; reg < 16; reg++)
   11429   1.1  christos 		    if ((given & (1 << reg)) != 0)
   11430   1.1  christos 		      {
   11431   1.8  christos 			if (started)
   11432   1.1  christos 			  func (stream, dis_style_text, ", ");
   11433   1.7  christos 			started = 1;
   11434   1.8  christos 			if (is_clrm && reg == 13)
   11435   1.8  christos 			  func (stream, dis_style_text, "(invalid: %s)",
   11436   1.7  christos 				arm_regnames[reg]);
   11437   1.8  christos 			else if (is_clrm && reg == 15)
   11438   1.7  christos 			  func (stream, dis_style_register, "%s", "APSR");
   11439   1.8  christos 			else
   11440   1.8  christos 			  func (stream, dis_style_register, "%s",
   11441   1.1  christos 				arm_regnames[reg]);
   11442   1.8  christos 		      }
   11443   1.1  christos 		  func (stream, dis_style_text, "}");
   11444   1.1  christos 		}
   11445   1.1  christos 		break;
   11446   1.1  christos 
   11447   1.1  christos 	      case 'E':
   11448   1.1  christos 		{
   11449   1.1  christos 		  unsigned int msb = (given & 0x0000001f);
   11450   1.1  christos 		  unsigned int lsb = 0;
   11451   1.1  christos 
   11452   1.1  christos 		  lsb |= (given & 0x000000c0u) >> 6;
   11453   1.8  christos 		  lsb |= (given & 0x00007000u) >> 10;
   11454   1.8  christos 		  func (stream, dis_style_immediate, "#%u", lsb);
   11455   1.8  christos 		  func (stream, dis_style_text, ", ");
   11456   1.1  christos 		  func (stream, dis_style_immediate, "#%u", msb - lsb + 1);
   11457   1.1  christos 		}
   11458   1.1  christos 		break;
   11459   1.1  christos 
   11460   1.1  christos 	      case 'F':
   11461   1.1  christos 		{
   11462   1.1  christos 		  unsigned int width = (given & 0x0000001f) + 1;
   11463   1.1  christos 		  unsigned int lsb = 0;
   11464   1.1  christos 
   11465   1.1  christos 		  lsb |= (given & 0x000000c0u) >> 6;
   11466   1.8  christos 		  lsb |= (given & 0x00007000u) >> 10;
   11467   1.8  christos 		  func (stream, dis_style_immediate, "#%u", lsb);
   11468   1.8  christos 		  func (stream, dis_style_text, ", ");
   11469   1.1  christos 		  func (stream, dis_style_immediate, "#%u", width);
   11470   1.1  christos 		}
   11471   1.1  christos 		break;
   11472   1.7  christos 
   11473   1.7  christos 	      case 'G':
   11474   1.7  christos 		{
   11475   1.8  christos 		  unsigned int boff = (((given & 0x07800000) >> 23) << 1);
   11476   1.7  christos 		  func (stream, dis_style_immediate, "%x", boff);
   11477   1.7  christos 		}
   11478   1.7  christos 		break;
   11479   1.7  christos 
   11480   1.7  christos 	      case 'W':
   11481   1.7  christos 		{
   11482   1.7  christos 		  unsigned int immA = (given & 0x001f0000u) >> 16;
   11483   1.7  christos 		  unsigned int immB = (given & 0x000007feu) >> 1;
   11484   1.7  christos 		  unsigned int immC = (given & 0x00000800u) >> 11;
   11485   1.7  christos 		  bfd_vma offset = 0;
   11486   1.7  christos 
   11487   1.7  christos 		  offset |= immA << 12;
   11488   1.7  christos 		  offset |= immB << 2;
   11489   1.7  christos 		  offset |= immC << 1;
   11490   1.7  christos 		  /* Sign extend.  */
   11491   1.7  christos 		  offset = (offset & 0x10000) ? offset - (1 << 17) : offset;
   11492   1.7  christos 
   11493   1.7  christos 		  info->print_address_func (pc + 4 + offset, info);
   11494   1.7  christos 		}
   11495   1.7  christos 		break;
   11496   1.7  christos 
   11497   1.7  christos 	      case 'Y':
   11498   1.7  christos 		{
   11499   1.7  christos 		  unsigned int immA = (given & 0x007f0000u) >> 16;
   11500   1.7  christos 		  unsigned int immB = (given & 0x000007feu) >> 1;
   11501   1.7  christos 		  unsigned int immC = (given & 0x00000800u) >> 11;
   11502   1.7  christos 		  bfd_vma offset = 0;
   11503   1.7  christos 
   11504   1.7  christos 		  offset |= immA << 12;
   11505   1.7  christos 		  offset |= immB << 2;
   11506   1.7  christos 		  offset |= immC << 1;
   11507   1.7  christos 		  /* Sign extend.  */
   11508   1.7  christos 		  offset = (offset & 0x40000) ? offset - (1 << 19) : offset;
   11509   1.7  christos 
   11510   1.7  christos 		  info->print_address_func (pc + 4 + offset, info);
   11511   1.7  christos 		}
   11512   1.7  christos 		break;
   11513   1.7  christos 
   11514   1.7  christos 	      case 'Z':
   11515   1.7  christos 		{
   11516   1.7  christos 		  unsigned int immA = (given & 0x00010000u) >> 16;
   11517   1.7  christos 		  unsigned int immB = (given & 0x000007feu) >> 1;
   11518   1.7  christos 		  unsigned int immC = (given & 0x00000800u) >> 11;
   11519   1.7  christos 		  bfd_vma offset = 0;
   11520   1.7  christos 
   11521   1.7  christos 		  offset |= immA << 12;
   11522   1.7  christos 		  offset |= immB << 2;
   11523   1.7  christos 		  offset |= immC << 1;
   11524   1.7  christos 		  /* Sign extend.  */
   11525   1.7  christos 		  offset = (offset & 0x1000) ? offset - (1 << 13) : offset;
   11526   1.7  christos 
   11527   1.7  christos 		  info->print_address_func (pc + 4 + offset, info);
   11528   1.7  christos 
   11529   1.7  christos 		  unsigned int T    = (given & 0x00020000u) >> 17;
   11530   1.7  christos 		  unsigned int endoffset = (((given & 0x07800000) >> 23) << 1);
   11531   1.8  christos 		  unsigned int boffset   = (T == 1) ? 4 : 2;
   11532   1.8  christos 		  func (stream, dis_style_text, ", ");
   11533   1.8  christos 		  func (stream, dis_style_immediate, "%x",
   11534   1.7  christos 			endoffset + boffset);
   11535   1.7  christos 		}
   11536   1.7  christos 		break;
   11537   1.7  christos 
   11538   1.7  christos 	      case 'Q':
   11539   1.7  christos 		{
   11540   1.7  christos 		  unsigned int immh = (given & 0x000007feu) >> 1;
   11541   1.7  christos 		  unsigned int imml = (given & 0x00000800u) >> 11;
   11542   1.7  christos 		  bfd_vma imm32 = 0;
   11543   1.7  christos 
   11544   1.7  christos 		  imm32 |= immh << 2;
   11545   1.7  christos 		  imm32 |= imml << 1;
   11546   1.7  christos 
   11547   1.7  christos 		  info->print_address_func (pc + 4 + imm32, info);
   11548   1.7  christos 		}
   11549   1.7  christos 		break;
   11550   1.7  christos 
   11551   1.7  christos 	      case 'P':
   11552   1.7  christos 		{
   11553   1.7  christos 		  unsigned int immh = (given & 0x000007feu) >> 1;
   11554   1.7  christos 		  unsigned int imml = (given & 0x00000800u) >> 11;
   11555   1.7  christos 		  bfd_vma imm32 = 0;
   11556   1.7  christos 
   11557   1.7  christos 		  imm32 |= immh << 2;
   11558   1.7  christos 		  imm32 |= imml << 1;
   11559   1.7  christos 
   11560   1.7  christos 		  info->print_address_func (pc + 4 - imm32, info);
   11561   1.7  christos 		}
   11562   1.7  christos 		break;
   11563   1.1  christos 
   11564   1.1  christos 	      case 'b':
   11565   1.1  christos 		{
   11566   1.1  christos 		  unsigned int S = (given & 0x04000000u) >> 26;
   11567   1.1  christos 		  unsigned int J1 = (given & 0x00002000u) >> 13;
   11568   1.2     joerg 		  unsigned int J2 = (given & 0x00000800u) >> 11;
   11569   1.1  christos 		  bfd_vma offset = 0;
   11570   1.1  christos 
   11571   1.1  christos 		  offset |= !S << 20;
   11572   1.1  christos 		  offset |= J2 << 19;
   11573   1.1  christos 		  offset |= J1 << 18;
   11574   1.1  christos 		  offset |= (given & 0x003f0000) >> 4;
   11575   1.1  christos 		  offset |= (given & 0x000007ff) << 1;
   11576   1.1  christos 		  offset -= (1 << 20);
   11577   1.7  christos 
   11578   1.7  christos 		  bfd_vma target = pc + 4 + offset;
   11579   1.7  christos 		  info->print_address_func (target, info);
   11580   1.7  christos 
   11581   1.7  christos 		  /* Fill in instruction information.  */
   11582   1.7  christos 		  info->insn_info_valid = 1;
   11583   1.7  christos 		  info->insn_type = dis_branch;
   11584   1.1  christos 		  info->target = target;
   11585   1.1  christos 		}
   11586   1.1  christos 		break;
   11587   1.1  christos 
   11588   1.1  christos 	      case 'B':
   11589   1.1  christos 		{
   11590   1.1  christos 		  unsigned int S = (given & 0x04000000u) >> 26;
   11591   1.1  christos 		  unsigned int I1 = (given & 0x00002000u) >> 13;
   11592   1.2     joerg 		  unsigned int I2 = (given & 0x00000800u) >> 11;
   11593   1.1  christos 		  bfd_vma offset = 0;
   11594   1.1  christos 
   11595   1.1  christos 		  offset |= !S << 24;
   11596   1.1  christos 		  offset |= !(I1 ^ S) << 23;
   11597   1.1  christos 		  offset |= !(I2 ^ S) << 22;
   11598   1.1  christos 		  offset |= (given & 0x03ff0000u) >> 4;
   11599   1.1  christos 		  offset |= (given & 0x000007ffu) << 1;
   11600   1.1  christos 		  offset -= (1 << 24);
   11601   1.1  christos 		  offset += pc + 4;
   11602   1.1  christos 
   11603   1.1  christos 		  /* BLX target addresses are always word aligned.  */
   11604   1.1  christos 		  if ((given & 0x00001000u) == 0)
   11605   1.1  christos 		      offset &= ~2u;
   11606   1.1  christos 
   11607   1.7  christos 		  info->print_address_func (offset, info);
   11608   1.7  christos 
   11609   1.7  christos 		  /* Fill in instruction information.  */
   11610   1.7  christos 		  info->insn_info_valid = 1;
   11611   1.7  christos 		  info->insn_type = dis_branch;
   11612   1.1  christos 		  info->target = offset;
   11613   1.1  christos 		}
   11614   1.1  christos 		break;
   11615   1.1  christos 
   11616   1.1  christos 	      case 's':
   11617   1.1  christos 		{
   11618   1.1  christos 		  unsigned int shift = 0;
   11619   1.1  christos 
   11620   1.1  christos 		  shift |= (given & 0x000000c0u) >> 6;
   11621   1.1  christos 		  shift |= (given & 0x00007000u) >> 10;
   11622   1.8  christos 		  if (WRITEBACK_BIT_SET)
   11623   1.8  christos 		    {
   11624   1.8  christos 		      func (stream, dis_style_text, ", ");
   11625   1.8  christos 		      func (stream, dis_style_sub_mnemonic, "asr ");
   11626   1.8  christos 		      func (stream, dis_style_immediate, "#%u", shift);
   11627   1.1  christos 		    }
   11628   1.8  christos 		  else if (shift)
   11629   1.8  christos 		    {
   11630   1.8  christos 		      func (stream, dis_style_text, ", ");
   11631   1.8  christos 		      func (stream, dis_style_sub_mnemonic, "lsl ");
   11632   1.8  christos 		      func (stream, dis_style_immediate, "#%u", shift);
   11633   1.1  christos 		    }
   11634   1.1  christos 		  /* else print nothing - lsl #0 */
   11635   1.1  christos 		}
   11636   1.1  christos 		break;
   11637   1.1  christos 
   11638   1.1  christos 	      case 'R':
   11639   1.1  christos 		{
   11640   1.1  christos 		  unsigned int rot = (given & 0x00000030) >> 4;
   11641   1.1  christos 
   11642   1.8  christos 		  if (rot)
   11643   1.8  christos 		    {
   11644   1.8  christos 		      func (stream, dis_style_text, ", ");
   11645   1.8  christos 		      func (stream, dis_style_sub_mnemonic, "ror ");
   11646   1.8  christos 		      func (stream, dis_style_immediate, "#%u", rot * 8);
   11647   1.1  christos 		    }
   11648   1.1  christos 		}
   11649   1.1  christos 		break;
   11650   1.1  christos 
   11651   1.4  christos 	      case 'U':
   11652   1.1  christos 		if ((given & 0xf0) == 0x60)
   11653   1.1  christos 		  {
   11654   1.1  christos 		    switch (given & 0xf)
   11655   1.8  christos 		      {
   11656   1.8  christos 		      case 0xf:
   11657   1.8  christos 			func (stream, dis_style_sub_mnemonic, "sy");
   11658   1.8  christos 			break;
   11659   1.8  christos 		      default:
   11660   1.8  christos 			func (stream, dis_style_immediate, "#%d",
   11661   1.8  christos 			      (int) given & 0xf);
   11662   1.1  christos 			break;
   11663   1.1  christos 		      }
   11664   1.4  christos 		  }
   11665   1.1  christos 		else
   11666   1.2     joerg 		  {
   11667   1.2     joerg 		    const char * opt = data_barrier_option (given & 0xf);
   11668   1.8  christos 		    if (opt != NULL)
   11669   1.2     joerg 		      func (stream, dis_style_sub_mnemonic, "%s", opt);
   11670   1.8  christos 		    else
   11671   1.8  christos 		      func (stream, dis_style_immediate, "#%d",
   11672   1.1  christos 			    (int) given & 0xf);
   11673   1.1  christos 		   }
   11674   1.1  christos 		break;
   11675   1.1  christos 
   11676   1.1  christos 	      case 'C':
   11677   1.1  christos 		if ((given & 0xff) == 0)
   11678   1.8  christos 		  {
   11679   1.8  christos 		    func (stream, dis_style_register, "%cPSR_",
   11680   1.8  christos 			  (given & 0x100000) ? 'S' : 'C');
   11681   1.1  christos 
   11682   1.8  christos 		    if (given & 0x800)
   11683   1.1  christos 		      func (stream, dis_style_register, "f");
   11684   1.8  christos 		    if (given & 0x400)
   11685   1.1  christos 		      func (stream, dis_style_register, "s");
   11686   1.8  christos 		    if (given & 0x200)
   11687   1.1  christos 		      func (stream, dis_style_register, "x");
   11688   1.8  christos 		    if (given & 0x100)
   11689   1.1  christos 		      func (stream, dis_style_register, "c");
   11690  1.10  christos 		  }
   11691  1.10  christos 		else if (is_v81m_architecture (info))
   11692  1.10  christos 		  func (stream, dis_style_register, "%s",
   11693  1.10  christos 			psr_name (given & 0xff));
   11694   1.1  christos 
   11695   1.1  christos 		else if ((given & 0x20) == 0x20)
   11696   1.1  christos 		  {
   11697   1.1  christos 		    char const* name;
   11698   1.1  christos 		    unsigned sysm = (given & 0xf00) >> 8;
   11699   1.1  christos 
   11700   1.1  christos 		    sysm |= (given & 0x30);
   11701   1.1  christos 		    sysm |= (given & 0x00100000) >> 14;
   11702   1.4  christos 		    name = banked_regname (sysm);
   11703   1.1  christos 
   11704   1.8  christos 		    if (name != NULL)
   11705   1.1  christos 		      func (stream, dis_style_register, "%s", name);
   11706   1.8  christos 		    else
   11707   1.8  christos 		      func (stream, dis_style_text,
   11708   1.1  christos 			    "(UNDEF: %lu)", (unsigned long) sysm);
   11709   1.1  christos 		  }
   11710   1.1  christos 		else
   11711   1.8  christos 		  {
   11712   1.8  christos 		    func (stream, dis_style_register, "%s",
   11713   1.1  christos 			  psr_name (given & 0xff));
   11714   1.1  christos 		  }
   11715   1.1  christos 		break;
   11716   1.1  christos 
   11717  1.10  christos 	      case 'D':
   11718  1.10  christos 		if (is_v81m_architecture (info))
   11719  1.10  christos 		  func (stream, dis_style_register, "%s",
   11720  1.10  christos 			psr_name (given & 0xff));
   11721  1.10  christos 		else if (((given & 0xff) == 0)
   11722   1.1  christos 			 || ((given & 0x20) == 0x20))
   11723   1.1  christos 		  {
   11724   1.1  christos 		    char const* name;
   11725   1.1  christos 		    unsigned sm = (given & 0xf0000) >> 16;
   11726   1.1  christos 
   11727   1.1  christos 		    sm |= (given & 0x30);
   11728   1.1  christos 		    sm |= (given & 0x00100000) >> 14;
   11729   1.1  christos 		    name = banked_regname (sm);
   11730   1.1  christos 
   11731   1.8  christos 		    if (name != NULL)
   11732   1.1  christos 		      func (stream, dis_style_register, "%s", name);
   11733   1.8  christos 		    else
   11734   1.8  christos 		      func (stream, dis_style_text,
   11735   1.1  christos 			    "(UNDEF: %lu)", (unsigned long) sm);
   11736   1.1  christos 		  }
   11737   1.8  christos 		else
   11738   1.8  christos 		  func (stream, dis_style_register, "%s",
   11739   1.1  christos 			psr_name (given & 0xff));
   11740   1.1  christos 		break;
   11741   1.1  christos 
   11742   1.1  christos 	      case '0': case '1': case '2': case '3': case '4':
   11743   1.1  christos 	      case '5': case '6': case '7': case '8': case '9':
   11744   1.1  christos 		{
   11745   1.1  christos 		  int width;
   11746   1.1  christos 		  unsigned long val;
   11747   1.1  christos 
   11748   1.4  christos 		  c = arm_decode_bitfield (c, given, &val, &width);
   11749   1.1  christos 
   11750   1.1  christos 		  switch (*c)
   11751   1.7  christos 		    {
   11752   1.7  christos 		    case 's':
   11753   1.8  christos 		      if (val <= 3)
   11754   1.8  christos 			func (stream, dis_style_mnemonic, "%s",
   11755   1.7  christos 			      mve_vec_sizename[val]);
   11756   1.8  christos 		      else
   11757   1.7  christos 			func (stream, dis_style_text, "<undef size>");
   11758   1.7  christos 		      break;
   11759   1.1  christos 
   11760   1.8  christos 		    case 'd':
   11761   1.1  christos 		      func (stream, base_style, "%lu", val);
   11762   1.1  christos 		      value_in_comment = val;
   11763   1.1  christos 		      break;
   11764   1.3  christos 
   11765   1.8  christos 		    case 'D':
   11766   1.3  christos 		      func (stream, dis_style_immediate, "%lu", val + 1);
   11767   1.3  christos 		      value_in_comment = val + 1;
   11768   1.3  christos 		      break;
   11769   1.1  christos 
   11770   1.8  christos 		    case 'W':
   11771   1.1  christos 		      func (stream, dis_style_immediate, "%lu", val * 4);
   11772   1.1  christos 		      value_in_comment = val * 4;
   11773   1.1  christos 		      break;
   11774   1.7  christos 
   11775   1.7  christos 		    case 'S':
   11776   1.8  christos 		      if (val == 13)
   11777   1.7  christos 			is_unpredictable = true;
   11778   1.1  christos 		      /* Fall through.  */
   11779   1.1  christos 		    case 'R':
   11780   1.8  christos 		      if (val == 15)
   11781   1.1  christos 			is_unpredictable = true;
   11782   1.1  christos 		      /* Fall through.  */
   11783   1.8  christos 		    case 'r':
   11784   1.8  christos 		      func (stream, dis_style_register, "%s",
   11785   1.1  christos 			    arm_regnames[val]);
   11786   1.1  christos 		      break;
   11787   1.1  christos 
   11788   1.8  christos 		    case 'c':
   11789   1.1  christos 		      func (stream, base_style, "%s", arm_conditional[val]);
   11790   1.1  christos 		      break;
   11791   1.1  christos 
   11792   1.1  christos 		    case '\'':
   11793   1.1  christos 		      c++;
   11794   1.8  christos 		      if (val == ((1ul << width) - 1))
   11795   1.1  christos 			func (stream, base_style, "%c", *c);
   11796   1.4  christos 		      break;
   11797   1.1  christos 
   11798   1.1  christos 		    case '`':
   11799   1.1  christos 		      c++;
   11800   1.8  christos 		      if (val == 0)
   11801   1.1  christos 			func (stream, dis_style_immediate, "%c", *c);
   11802   1.1  christos 		      break;
   11803   1.1  christos 
   11804   1.8  christos 		    case '?':
   11805   1.8  christos 		      func (stream, dis_style_mnemonic, "%c",
   11806   1.1  christos 			    c[(1 << width) - (int) val]);
   11807   1.1  christos 		      c += 1 << width;
   11808   1.4  christos 		      break;
   11809   1.1  christos 
   11810   1.8  christos 		    case 'x':
   11811   1.8  christos 		      func (stream, dis_style_immediate, "0x%lx",
   11812   1.1  christos 			    val & 0xffffffffUL);
   11813   1.1  christos 		      break;
   11814   1.1  christos 
   11815   1.1  christos 		    default:
   11816   1.1  christos 		      abort ();
   11817   1.1  christos 		    }
   11818   1.1  christos 		}
   11819   1.1  christos 		break;
   11820   1.2     joerg 
   11821   1.2     joerg 	      case 'L':
   11822   1.2     joerg 		/* PR binutils/12534
   11823   1.2     joerg 		   If we have a PC relative offset in an LDRD or STRD
   11824   1.2     joerg 		   instructions then display the decoded address.  */
   11825   1.2     joerg 		if (((given >> 16) & 0xf) == 0xf)
   11826   1.2     joerg 		  {
   11827   1.2     joerg 		    bfd_vma offset = (given & 0xff) * 4;
   11828   1.2     joerg 
   11829   1.2     joerg 		    if ((given & (1 << 23)) == 0)
   11830   1.8  christos 		      offset = - offset;
   11831   1.2     joerg 		    func (stream, dis_style_comment_start, "\t@ ");
   11832   1.2     joerg 		    info->print_address_func ((pc & ~3) + 4 + offset, info);
   11833   1.2     joerg 		  }
   11834   1.2     joerg 		break;
   11835   1.1  christos 
   11836   1.1  christos 	      default:
   11837   1.1  christos 		abort ();
   11838   1.1  christos 	      }
   11839   1.1  christos 	  }
   11840   1.1  christos 
   11841   1.8  christos 	if (value_in_comment > 32 || value_in_comment < -16)
   11842   1.8  christos 	  func (stream, dis_style_comment_start, "\t@ 0x%lx",
   11843   1.1  christos 		value_in_comment);
   11844   1.1  christos 
   11845   1.8  christos 	if (is_unpredictable)
   11846   1.1  christos 	  func (stream, dis_style_comment_start, UNPREDICTABLE_INSTRUCTION);
   11847   1.1  christos 
   11848   1.1  christos 	return;
   11849   1.1  christos       }
   11850   1.1  christos 
   11851   1.8  christos   /* No match.  */
   11852   1.8  christos   func (stream, dis_style_comment_start, UNKNOWN_INSTRUCTION_32BIT,
   11853   1.6  christos 	(unsigned) given);
   11854   1.1  christos   return;
   11855   1.1  christos }
   11856   1.1  christos 
   11857   1.1  christos /* Print data bytes on INFO->STREAM.  */
   11858   1.1  christos 
   11859   1.1  christos static void
   11860   1.1  christos print_insn_data (bfd_vma pc ATTRIBUTE_UNUSED,
   11861   1.1  christos 		 struct disassemble_info *info,
   11862   1.1  christos 		 long given)
   11863   1.8  christos {
   11864   1.8  christos   fprintf_styled_ftype func = info->fprintf_styled_func;
   11865   1.1  christos 
   11866   1.1  christos   switch (info->bytes_per_chunk)
   11867   1.1  christos     {
   11868   1.8  christos     case 1:
   11869   1.8  christos       func (info->stream, dis_style_assembler_directive, ".byte");
   11870   1.8  christos       func (info->stream, dis_style_text, "\t");
   11871   1.1  christos       func (info->stream, dis_style_immediate, "0x%02lx", given);
   11872   1.1  christos       break;
   11873   1.8  christos     case 2:
   11874   1.8  christos       func (info->stream, dis_style_assembler_directive, ".short");
   11875   1.8  christos       func (info->stream, dis_style_text, "\t");
   11876   1.1  christos       func (info->stream, dis_style_immediate, "0x%04lx", given);
   11877   1.1  christos       break;
   11878   1.8  christos     case 4:
   11879   1.8  christos       func (info->stream, dis_style_assembler_directive, ".word");
   11880   1.8  christos       func (info->stream, dis_style_text, "\t");
   11881   1.1  christos       func (info->stream, dis_style_immediate, "0x%08lx", given);
   11882   1.1  christos       break;
   11883   1.1  christos     default:
   11884   1.1  christos       abort ();
   11885   1.1  christos     }
   11886   1.1  christos }
   11887   1.1  christos 
   11888   1.3  christos /* Disallow mapping symbols ($a, $b, $d, $t etc) from
   11889   1.3  christos    being displayed in symbol relative addresses.
   11890   1.3  christos 
   11891   1.3  christos    Also disallow private symbol, with __tagsym$$ prefix,
   11892   1.1  christos    from ARM RVCT toolchain being displayed.  */
   11893   1.8  christos 
   11894   1.1  christos bool
   11895   1.1  christos arm_symbol_is_valid (asymbol * sym,
   11896   1.1  christos 		     struct disassemble_info * info ATTRIBUTE_UNUSED)
   11897   1.1  christos {
   11898   1.4  christos   const char * name;
   11899   1.1  christos 
   11900   1.8  christos   if (sym == NULL)
   11901   1.1  christos     return false;
   11902   1.1  christos 
   11903   1.1  christos   name = bfd_asymbol_name (sym);
   11904   1.3  christos 
   11905   1.1  christos   return (name && *name != '$' && strncmp (name, "__tagsym$$", 10));
   11906   1.1  christos }
   11907   1.5  christos 
   11908   1.1  christos /* Parse the string of disassembler options.  */
   11909   1.5  christos 
   11910   1.5  christos static void
   11911   1.1  christos parse_arm_disassembler_options (const char *options)
   11912   1.5  christos {
   11913   1.1  christos   const char *opt;
   11914   1.8  christos 
   11915   1.5  christos   force_thumb = false;
   11916   1.1  christos   FOR_EACH_DISASSEMBLER_OPTION (opt, options)
   11917   1.8  christos     {
   11918   1.5  christos       if (startswith (opt, "reg-names-"))
   11919   1.5  christos 	{
   11920   1.5  christos 	  unsigned int i;
   11921   1.5  christos 	  for (i = 0; i < NUM_ARM_OPTIONS; i++)
   11922   1.5  christos 	    if (disassembler_options_cmp (opt, regnames[i].name) == 0)
   11923   1.5  christos 	      {
   11924   1.5  christos 		regname_selected = i;
   11925   1.5  christos 		break;
   11926   1.1  christos 	      }
   11927   1.5  christos 
   11928   1.6  christos 	  if (i >= NUM_ARM_OPTIONS)
   11929   1.6  christos 	    /* xgettext: c-format */
   11930   1.6  christos 	    opcodes_error_handler (_("unrecognised register name set: %s"),
   11931   1.5  christos 				   opt);
   11932   1.8  christos 	}
   11933   1.5  christos       else if (startswith (opt, "force-thumb"))
   11934   1.8  christos 	force_thumb = 1;
   11935   1.5  christos       else if (startswith (opt, "no-force-thumb"))
   11936   1.8  christos 	force_thumb = 0;
   11937   1.7  christos       else if (startswith (opt, "coproc"))
   11938   1.7  christos 	{
   11939   1.7  christos 	  const char *procptr = opt + sizeof ("coproc") - 1;
   11940   1.7  christos 	  char *endptr;
   11941   1.7  christos 	  uint8_t coproc_number = strtol (procptr, &endptr, 10);
   11942   1.7  christos 	  if (endptr != procptr + 1 || coproc_number > 7)
   11943   1.7  christos 	    {
   11944   1.7  christos 	      opcodes_error_handler (_("cde coprocessor not between 0-7: %s"),
   11945   1.7  christos 				     opt);
   11946   1.7  christos 	      continue;
   11947   1.7  christos 	    }
   11948   1.7  christos 	  if (*endptr != '=')
   11949   1.7  christos 	    {
   11950   1.7  christos 	      opcodes_error_handler (_("coproc must have an argument: %s"),
   11951   1.7  christos 				     opt);
   11952   1.7  christos 	      continue;
   11953   1.7  christos 	    }
   11954   1.8  christos 	  endptr += 1;
   11955   1.7  christos 	  if (startswith (endptr, "generic"))
   11956   1.8  christos 	    cde_coprocs &= ~(1 << coproc_number);
   11957   1.8  christos 	  else if (startswith (endptr, "cde")
   11958   1.7  christos 		   || startswith (endptr, "CDE"))
   11959   1.7  christos 	    cde_coprocs |= (1 << coproc_number);
   11960   1.7  christos 	  else
   11961   1.7  christos 	    {
   11962   1.7  christos 	      opcodes_error_handler (
   11963   1.7  christos 		  _("coprocN argument takes options \"generic\","
   11964   1.7  christos 		    " \"cde\", or \"CDE\": %s"), opt);
   11965   1.7  christos 	    }
   11966   1.5  christos 	}
   11967   1.6  christos       else
   11968   1.6  christos 	/* xgettext: c-format */
   11969   1.1  christos 	opcodes_error_handler (_("unrecognised disassembler option: %s"), opt);
   11970   1.1  christos     }
   11971   1.1  christos 
   11972   1.1  christos   return;
   11973   1.1  christos }
   11974   1.8  christos 
   11975   1.4  christos static bool
   11976   1.4  christos mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
   11977   1.4  christos 			 enum map_type *map_symbol);
   11978   1.1  christos 
   11979   1.1  christos /* Search back through the insn stream to determine if this instruction is
   11980   1.1  christos    conditionally executed.  */
   11981   1.1  christos 
   11982   1.1  christos static void
   11983   1.1  christos find_ifthen_state (bfd_vma pc,
   11984   1.8  christos 		   struct disassemble_info *info,
   11985   1.1  christos 		   bool little)
   11986   1.1  christos {
   11987   1.1  christos   unsigned char b[2];
   11988   1.1  christos   unsigned int insn;
   11989   1.1  christos   int status;
   11990   1.1  christos   /* COUNT is twice the number of instructions seen.  It will be odd if we
   11991   1.1  christos      just crossed an instruction boundary.  */
   11992   1.1  christos   int count;
   11993   1.1  christos   int it_count;
   11994   1.1  christos   unsigned int seen_it;
   11995   1.1  christos   bfd_vma addr;
   11996   1.1  christos 
   11997   1.1  christos   ifthen_address = pc;
   11998   1.1  christos   ifthen_state = 0;
   11999   1.1  christos 
   12000   1.1  christos   addr = pc;
   12001   1.1  christos   count = 1;
   12002   1.1  christos   it_count = 0;
   12003   1.1  christos   seen_it = 0;
   12004   1.1  christos   /* Scan backwards looking for IT instructions, keeping track of where
   12005   1.1  christos      instruction boundaries are.  We don't know if something is actually an
   12006   1.1  christos      IT instruction until we find a definite instruction boundary.  */
   12007   1.1  christos   for (;;)
   12008   1.1  christos     {
   12009   1.1  christos       if (addr == 0 || info->symbol_at_address_func (addr, info))
   12010   1.1  christos 	{
   12011   1.1  christos 	  /* A symbol must be on an instruction boundary, and will not
   12012   1.1  christos 	     be within an IT block.  */
   12013   1.1  christos 	  if (seen_it && (count & 1))
   12014   1.1  christos 	    break;
   12015   1.1  christos 
   12016   1.1  christos 	  return;
   12017   1.1  christos 	}
   12018   1.1  christos       addr -= 2;
   12019   1.1  christos       status = info->read_memory_func (addr, (bfd_byte *) b, 2, info);
   12020   1.1  christos       if (status)
   12021   1.1  christos 	return;
   12022   1.1  christos 
   12023   1.1  christos       if (little)
   12024   1.1  christos 	insn = (b[0]) | (b[1] << 8);
   12025   1.1  christos       else
   12026   1.1  christos 	insn = (b[1]) | (b[0] << 8);
   12027   1.1  christos       if (seen_it)
   12028   1.1  christos 	{
   12029   1.1  christos 	  if ((insn & 0xf800) < 0xe800)
   12030   1.1  christos 	    {
   12031   1.1  christos 	      /* Addr + 2 is an instruction boundary.  See if this matches
   12032   1.1  christos 	         the expected boundary based on the position of the last
   12033   1.1  christos 		 IT candidate.  */
   12034   1.1  christos 	      if (count & 1)
   12035   1.1  christos 		break;
   12036   1.1  christos 	      seen_it = 0;
   12037   1.1  christos 	    }
   12038   1.1  christos 	}
   12039   1.1  christos       if ((insn & 0xff00) == 0xbf00 && (insn & 0xf) != 0)
   12040   1.4  christos 	{
   12041   1.8  christos 	  enum map_type type = MAP_ARM;
   12042   1.4  christos 	  bool found = mapping_symbol_for_insn (addr, info, &type);
   12043   1.4  christos 
   12044   1.4  christos 	  if (!found || (found && type == MAP_THUMB))
   12045   1.4  christos 	    {
   12046   1.4  christos 	      /* This could be an IT instruction.  */
   12047   1.4  christos 	      seen_it = insn;
   12048   1.4  christos 	      it_count = count >> 1;
   12049   1.1  christos 	    }
   12050   1.1  christos 	}
   12051   1.1  christos       if ((insn & 0xf800) >= 0xe800)
   12052   1.1  christos 	count++;
   12053   1.1  christos       else
   12054   1.1  christos 	count = (count + 2) | 1;
   12055   1.1  christos       /* IT blocks contain at most 4 instructions.  */
   12056   1.1  christos       if (count >= 8 && !seen_it)
   12057   1.1  christos 	return;
   12058   1.1  christos     }
   12059   1.1  christos   /* We found an IT instruction.  */
   12060   1.1  christos   ifthen_state = (seen_it & 0xe0) | ((seen_it << it_count) & 0x1f);
   12061   1.1  christos   if ((ifthen_state & 0xf) == 0)
   12062   1.1  christos     ifthen_state = 0;
   12063   1.1  christos }
   12064   1.1  christos 
   12065   1.1  christos /* Returns nonzero and sets *MAP_TYPE if the N'th symbol is a
   12066   1.1  christos    mapping symbol.  */
   12067   1.1  christos 
   12068   1.9  christos static int
   12069   1.9  christos is_mapping_symbol (struct disassemble_info *info,
   12070   1.1  christos 		   int n,
   12071   1.1  christos 		   enum map_type *map_type)
   12072   1.9  christos {
   12073   1.1  christos   const char *name = bfd_asymbol_name (info->symtab[n]);
   12074   1.9  christos 
   12075   1.9  christos   if (name[0] == '$'
   12076   1.1  christos       && (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
   12077   1.1  christos       && (name[2] == 0 || name[2] == '.'))
   12078   1.1  christos     {
   12079   1.1  christos       *map_type = ((name[1] == 'a') ? MAP_ARM
   12080   1.1  christos 		   : (name[1] == 't') ? MAP_THUMB
   12081   1.8  christos 		   : MAP_DATA);
   12082   1.1  christos       return true;
   12083   1.1  christos     }
   12084   1.8  christos 
   12085   1.1  christos   return false;
   12086   1.1  christos }
   12087   1.1  christos 
   12088   1.1  christos /* Try to infer the code type (ARM or Thumb) from a mapping symbol.
   12089   1.1  christos    Returns nonzero if *MAP_TYPE was set.  */
   12090   1.1  christos 
   12091   1.1  christos static int
   12092   1.1  christos get_map_sym_type (struct disassemble_info *info,
   12093   1.1  christos 		  int n,
   12094   1.1  christos 		  enum map_type *map_type)
   12095   1.1  christos {
   12096   1.1  christos   /* If the symbol is in a different section, ignore it.  */
   12097   1.8  christos   if (info->section != NULL && info->section != info->symtab[n]->section)
   12098   1.1  christos     return false;
   12099   1.1  christos 
   12100   1.1  christos   return is_mapping_symbol (info, n, map_type);
   12101   1.1  christos }
   12102   1.1  christos 
   12103   1.1  christos /* Try to infer the code type (ARM or Thumb) from a non-mapping symbol.
   12104   1.1  christos    Returns nonzero if *MAP_TYPE was set.  */
   12105   1.1  christos 
   12106   1.1  christos static int
   12107   1.1  christos get_sym_code_type (struct disassemble_info *info,
   12108   1.1  christos 		   int n,
   12109   1.1  christos 		   enum map_type *map_type)
   12110   1.1  christos {
   12111   1.1  christos   elf_symbol_type *es;
   12112   1.9  christos   unsigned int type;
   12113   1.1  christos   asymbol * sym;
   12114   1.1  christos 
   12115   1.1  christos   /* If the symbol is in a different section, ignore it.  */
   12116   1.8  christos   if (info->section != NULL && info->section != info->symtab[n]->section)
   12117   1.1  christos     return false;
   12118   1.9  christos 
   12119   1.9  christos   /* PR 30230: Reject non-ELF symbols, eg synthetic ones.  */
   12120   1.9  christos   sym = info->symtab[n];
   12121   1.9  christos   if (bfd_asymbol_flavour (sym) != bfd_target_elf_flavour)
   12122   1.9  christos     return false;
   12123   1.9  christos 
   12124   1.1  christos   es = (elf_symbol_type *) sym;
   12125   1.1  christos   type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
   12126   1.1  christos 
   12127   1.1  christos   /* If the symbol has function type then use that.  */
   12128   1.1  christos   if (type == STT_FUNC || type == STT_GNU_IFUNC)
   12129   1.4  christos     {
   12130   1.4  christos       if (ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
   12131   1.1  christos 	  == ST_BRANCH_TO_THUMB)
   12132   1.1  christos 	*map_type = MAP_THUMB;
   12133   1.1  christos       else
   12134   1.8  christos 	*map_type = MAP_ARM;
   12135   1.1  christos       return true;
   12136   1.1  christos     }
   12137   1.8  christos 
   12138   1.1  christos   return false;
   12139   1.1  christos }
   12140   1.4  christos 
   12141   1.4  christos /* Search the mapping symbol state for instruction at pc.  This is only
   12142   1.4  christos    applicable for elf target.
   12143   1.4  christos 
   12144   1.4  christos    There is an assumption Here, info->private_data contains the correct AND
   12145   1.4  christos    up-to-date information about current scan process.  The information will be
   12146   1.4  christos    used to speed this search process.
   12147   1.4  christos 
   12148   1.4  christos    Return TRUE if the mapping state can be determined, and map_symbol
   12149   1.4  christos    will be updated accordingly.  Otherwise, return FALSE.  */
   12150   1.8  christos 
   12151   1.4  christos static bool
   12152   1.4  christos mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
   12153   1.4  christos 			 enum map_type *map_symbol)
   12154   1.7  christos {
   12155   1.7  christos   bfd_vma addr, section_vma = 0;
   12156   1.8  christos   int n, last_sym = -1;
   12157   1.8  christos   bool found = false;
   12158   1.8  christos   bool can_use_search_opt_p = false;
   12159   1.8  christos 
   12160   1.8  christos   /* Sanity check.  */
   12161   1.8  christos   if (info == NULL)
   12162   1.7  christos     return false;
   12163   1.7  christos 
   12164   1.7  christos   /* Default to DATA.  A text section is required by the ABI to contain an
   12165   1.7  christos      INSN mapping symbol at the start.  A data section has no such
   12166   1.7  christos      requirement, hence if no mapping symbol is found the section must
   12167   1.7  christos      contain only data.  This however isn't very useful if the user has
   12168   1.7  christos      fully stripped the binaries.  If this is the case use the section
   12169   1.7  christos      attributes to determine the default.  If we have no section default to
   12170   1.7  christos      INSN as well, as we may be disassembling some raw bytes on a baremetal
   12171   1.7  christos      HEX file or similar.  */
   12172   1.7  christos   enum map_type type = MAP_DATA;
   12173   1.7  christos   if ((info->section && info->section->flags & SEC_CODE) || !info->section)
   12174   1.4  christos     type = MAP_ARM;
   12175   1.4  christos   struct arm_private_data *private_data;
   12176   1.8  christos 
   12177   1.8  christos   if (info->private_data == NULL || info->symtab == NULL
   12178   1.4  christos       || info->symtab_size == 0
   12179   1.8  christos       || bfd_asymbol_flavour (*info->symtab) != bfd_target_elf_flavour)
   12180   1.4  christos     return false;
   12181   1.4  christos 
   12182   1.4  christos   private_data = info->private_data;
   12183   1.7  christos 
   12184   1.8  christos   /* First, look for mapping symbols.  */
   12185   1.8  christos   if (pc <= private_data->last_mapping_addr)
   12186   1.8  christos     private_data->last_mapping_sym = -1;
   12187   1.8  christos 
   12188   1.8  christos   /* Start scanning at the start of the function, or wherever
   12189   1.8  christos      we finished last time.  */
   12190   1.8  christos   n = info->symtab_pos + 1;
   12191   1.8  christos 
   12192   1.8  christos   /* If the last stop offset is different from the current one it means we
   12193   1.8  christos      are disassembling a different glob of bytes.  As such the optimization
   12194   1.8  christos      would not be safe and we should start over.  */
   12195   1.8  christos   can_use_search_opt_p
   12196   1.8  christos     = (private_data->last_mapping_sym >= 0
   12197   1.8  christos        && info->stop_offset == private_data->last_stop_offset);
   12198   1.8  christos 
   12199   1.8  christos   if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
   12200   1.8  christos     n = private_data->last_mapping_sym;
   12201   1.8  christos 
   12202   1.8  christos   /* Look down while we haven't passed the location being disassembled.
   12203   1.8  christos      The reason for this is that there's no defined order between a symbol
   12204   1.8  christos      and an mapping symbol that may be at the same address.  We may have to
   12205   1.8  christos      look at least one position ahead.  */
   12206   1.8  christos   for (; n < info->symtab_size; n++)
   12207   1.8  christos     {
   12208   1.8  christos       addr = bfd_asymbol_value (info->symtab[n]);
   12209   1.8  christos       if (addr > pc)
   12210   1.8  christos 	break;
   12211   1.8  christos       if (get_map_sym_type (info, n, &type))
   12212   1.8  christos 	{
   12213   1.8  christos 	  last_sym = n;
   12214   1.8  christos 	  found = true;
   12215   1.8  christos 	}
   12216   1.8  christos     }
   12217   1.8  christos 
   12218   1.8  christos   if (!found)
   12219   1.8  christos     {
   12220   1.8  christos       n = info->symtab_pos;
   12221   1.8  christos       if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
   12222   1.7  christos 	n = private_data->last_mapping_sym;
   12223   1.8  christos 
   12224   1.8  christos       /* No mapping symbol found at this address.  Look backwards
   12225   1.8  christos 	 for a preceeding one, but don't go pass the section start
   12226   1.8  christos 	 otherwise a data section with no mapping symbol can pick up
   12227   1.8  christos 	 a text mapping symbol of a preceeding section.  The documentation
   12228   1.8  christos 	 says section can be NULL, in which case we will seek up all the
   12229   1.8  christos 	 way to the top.  */
   12230   1.8  christos       if (info->section)
   12231   1.7  christos 	section_vma = info->section->vma;
   12232   1.8  christos 
   12233   1.8  christos       for (; n >= 0; n--)
   12234   1.8  christos 	{
   12235   1.8  christos 	  addr = bfd_asymbol_value (info->symtab[n]);
   12236   1.8  christos 	  if (addr < section_vma)
   12237   1.7  christos 	    break;
   12238   1.8  christos 
   12239   1.8  christos 	  if (get_map_sym_type (info, n, &type))
   12240   1.8  christos 	    {
   12241   1.8  christos 	      last_sym = n;
   12242   1.7  christos 	      found = true;
   12243   1.8  christos 	      break;
   12244   1.8  christos 	    }
   12245   1.8  christos 	}
   12246   1.4  christos     }
   12247   1.7  christos 
   12248   1.7  christos   /* If no mapping symbol was found, try looking up without a mapping
   12249   1.7  christos      symbol.  This is done by walking up from the current PC to the nearest
   12250   1.7  christos      symbol.  We don't actually have to loop here since symtab_pos will
   12251   1.7  christos      contain the nearest symbol already.  */
   12252   1.4  christos   if (!found)
   12253   1.7  christos     {
   12254   1.7  christos       n = info->symtab_pos;
   12255   1.4  christos       if (n >= 0 && get_sym_code_type (info, n, &type))
   12256   1.7  christos 	{
   12257   1.8  christos 	  last_sym = n;
   12258   1.4  christos 	  found = true;
   12259   1.4  christos 	}
   12260   1.4  christos     }
   12261   1.7  christos 
   12262   1.7  christos   private_data->last_mapping_sym = last_sym;
   12263   1.7  christos   private_data->last_type = type;
   12264   1.4  christos   private_data->last_stop_offset = info->stop_offset;
   12265   1.4  christos 
   12266   1.4  christos   *map_symbol = type;
   12267   1.4  christos   return found;
   12268   1.4  christos }
   12269   1.1  christos 
   12270   1.1  christos /* Given a bfd_mach_arm_XXX value, this function fills in the fields
   12271   1.6  christos    of the supplied arm_feature_set structure with bitmasks indicating
   12272   1.1  christos    the supported base architectures and coprocessor extensions.
   12273   1.1  christos 
   12274   1.1  christos    FIXME: This could more efficiently implemented as a constant array,
   12275   1.1  christos    although it would also be less robust.  */
   12276   1.1  christos 
   12277   1.1  christos static void
   12278   1.1  christos select_arm_features (unsigned long mach,
   12279   1.1  christos 		     arm_feature_set * features)
   12280   1.6  christos {
   12281   1.6  christos   arm_feature_set arch_fset;
   12282   1.6  christos   const arm_feature_set fpu_any = FPU_ANY;
   12283   1.3  christos 
   12284   1.3  christos #undef ARM_SET_FEATURES
   12285   1.3  christos #define ARM_SET_FEATURES(FSET) \
   12286   1.3  christos   {							\
   12287   1.6  christos     const arm_feature_set fset = FSET;			\
   12288   1.3  christos     arch_fset = fset;					\
   12289   1.1  christos   }
   12290   1.6  christos 
   12291   1.6  christos   /* When several architecture versions share the same bfd_mach_arm_XXX value
   12292   1.1  christos      the most featureful is chosen.  */
   12293   1.1  christos   switch (mach)
   12294   1.6  christos     {
   12295   1.6  christos     case bfd_mach_arm_2:	 ARM_SET_FEATURES (ARM_ARCH_V2); break;
   12296   1.6  christos     case bfd_mach_arm_2a:	 ARM_SET_FEATURES (ARM_ARCH_V2S); break;
   12297   1.6  christos     case bfd_mach_arm_3:	 ARM_SET_FEATURES (ARM_ARCH_V3); break;
   12298   1.6  christos     case bfd_mach_arm_3M:	 ARM_SET_FEATURES (ARM_ARCH_V3M); break;
   12299   1.9  christos     case bfd_mach_arm_4:	 ARM_SET_FEATURES (ARM_ARCH_V4); break;
   12300   1.6  christos     case bfd_mach_arm_ep9312:
   12301   1.6  christos     case bfd_mach_arm_4T:	 ARM_SET_FEATURES (ARM_ARCH_V4T); break;
   12302   1.6  christos     case bfd_mach_arm_5:	 ARM_SET_FEATURES (ARM_ARCH_V5); break;
   12303   1.6  christos     case bfd_mach_arm_5T:	 ARM_SET_FEATURES (ARM_ARCH_V5T); break;
   12304   1.6  christos     case bfd_mach_arm_5TE:	 ARM_SET_FEATURES (ARM_ARCH_V5TE); break;
   12305   1.6  christos     case bfd_mach_arm_XScale:	 ARM_SET_FEATURES (ARM_ARCH_XSCALE); break;
   12306   1.6  christos     case bfd_mach_arm_iWMMXt:	 ARM_SET_FEATURES (ARM_ARCH_IWMMXT); break;
   12307   1.6  christos     case bfd_mach_arm_iWMMXt2:	 ARM_SET_FEATURES (ARM_ARCH_IWMMXT2); break;
   12308   1.6  christos     case bfd_mach_arm_5TEJ:	 ARM_SET_FEATURES (ARM_ARCH_V5TEJ); break;
   12309   1.6  christos     case bfd_mach_arm_6:	 ARM_SET_FEATURES (ARM_ARCH_V6); break;
   12310   1.6  christos     case bfd_mach_arm_6KZ:	 ARM_SET_FEATURES (ARM_ARCH_V6KZ); break;
   12311   1.6  christos     case bfd_mach_arm_6T2:	 ARM_SET_FEATURES (ARM_ARCH_V6KZT2); break;
   12312   1.6  christos     case bfd_mach_arm_6K:	 ARM_SET_FEATURES (ARM_ARCH_V6K); break;
   12313   1.6  christos     case bfd_mach_arm_7:	 ARM_SET_FEATURES (ARM_ARCH_V7VE); break;
   12314   1.6  christos     case bfd_mach_arm_6M:	 ARM_SET_FEATURES (ARM_ARCH_V6M); break;
   12315   1.6  christos     case bfd_mach_arm_6SM:	 ARM_SET_FEATURES (ARM_ARCH_V6SM); break;
   12316   1.6  christos     case bfd_mach_arm_7EM:	 ARM_SET_FEATURES (ARM_ARCH_V7EM); break;
   12317   1.6  christos     case bfd_mach_arm_8:
   12318   1.7  christos 	{
   12319   1.7  christos 	  /* Add bits for extensions that Armv8.6-A recognizes.  */
   12320   1.6  christos 	  arm_feature_set armv8_6_ext_fset
   12321   1.7  christos 	    = ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST);
   12322   1.7  christos 	  ARM_SET_FEATURES (ARM_ARCH_V8_6A);
   12323   1.6  christos 	  ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, armv8_6_ext_fset);
   12324   1.6  christos 	  break;
   12325  1.10  christos 	}
   12326   1.6  christos     case bfd_mach_arm_8R:	 ARM_SET_FEATURES (ARM_ARCH_V8R_CRC); break;
   12327   1.6  christos     case bfd_mach_arm_8M_BASE:	 ARM_SET_FEATURES (ARM_ARCH_V8M_BASE); break;
   12328   1.7  christos     case bfd_mach_arm_8M_MAIN:	 ARM_SET_FEATURES (ARM_ARCH_V8M_MAIN); break;
   12329   1.7  christos     case bfd_mach_arm_8_1M_MAIN:
   12330   1.7  christos       ARM_SET_FEATURES (ARM_ARCH_V8_1M_MAIN);
   12331   1.7  christos       arm_feature_set mve_all
   12332   1.7  christos 	= ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE | ARM_EXT2_MVE_FP);
   12333   1.7  christos       ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, mve_all);
   12334   1.7  christos       force_thumb = 1;
   12335   1.8  christos       break;
   12336   1.6  christos     case bfd_mach_arm_9:         ARM_SET_FEATURES (ARM_ARCH_V9A); break;
   12337   1.7  christos       /* If the machine type is unknown allow all architecture types and all
   12338   1.7  christos 	 extensions, with the exception of MVE as that clashes with NEON.  */
   12339   1.8  christos     case bfd_mach_arm_unknown:
   12340   1.7  christos       ARM_SET_FEATURES (ARM_ARCH_UNKNOWN);
   12341   1.1  christos       break;
   12342   1.1  christos     default:
   12343   1.1  christos       abort ();
   12344   1.6  christos     }
   12345   1.3  christos #undef ARM_SET_FEATURES
   12346   1.6  christos 
   12347   1.6  christos   /* None of the feature bits related to -mfpu have an impact on Tag_CPU_arch
   12348   1.6  christos      and thus on bfd_mach_arm_XXX value.  Therefore for a given
   12349   1.6  christos      bfd_mach_arm_XXX value all coprocessor feature bits should be allowed.  */
   12350   1.1  christos   ARM_MERGE_FEATURE_SETS (*features, arch_fset, fpu_any);
   12351   1.1  christos }
   12352   1.1  christos 
   12353   1.1  christos 
   12354   1.1  christos /* NOTE: There are no checks in these routines that
   12355   1.1  christos    the relevant number of data bytes exist.  */
   12356   1.1  christos 
   12357   1.8  christos static int
   12358   1.1  christos print_insn (bfd_vma pc, struct disassemble_info *info, bool little)
   12359   1.1  christos {
   12360   1.7  christos   unsigned char b[4];
   12361   1.8  christos   unsigned long given;
   12362   1.8  christos   int status;
   12363   1.8  christos   int is_thumb = false;
   12364   1.8  christos   int is_data = false;
   12365   1.1  christos   int little_code;
   12366   1.8  christos   unsigned int	size = 4;
   12367   1.8  christos   void (*printer) (bfd_vma, struct disassemble_info *, long);
   12368   1.1  christos   bool found = false;
   12369   1.1  christos   struct arm_private_data *private_data;
   12370   1.7  christos 
   12371   1.7  christos   /* Clear instruction information field.  */
   12372   1.7  christos   info->insn_info_valid = 0;
   12373   1.7  christos   info->branch_delay_insns = 0;
   12374   1.7  christos   info->data_size = 0;
   12375   1.7  christos   info->insn_type = dis_noninsn;
   12376   1.7  christos   info->target = 0;
   12377   1.7  christos   info->target2 = 0;
   12378   1.1  christos 
   12379   1.1  christos   if (info->disassembler_options)
   12380   1.5  christos     {
   12381   1.1  christos       parse_arm_disassembler_options (info->disassembler_options);
   12382   1.1  christos 
   12383   1.1  christos       /* To avoid repeated parsing of these options, we remove them here.  */
   12384   1.1  christos       info->disassembler_options = NULL;
   12385   1.1  christos     }
   12386   1.1  christos 
   12387   1.1  christos   /* PR 10288: Control which instructions will be disassembled.  */
   12388   1.1  christos   if (info->private_data == NULL)
   12389   1.1  christos     {
   12390   1.1  christos       static struct arm_private_data private;
   12391  1.10  christos 
   12392  1.10  christos       if (info->flavour != bfd_target_elf_flavour
   12393   1.1  christos 	  && (info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
   12394   1.1  christos 	/* If the user did not use the -m command line switch then default to
   12395   1.4  christos 	   disassembling all types of ARM instruction.
   12396  1.10  christos 
   12397  1.10  christos 	   If this is an arm elf target, build attributes will be used to
   12398  1.10  christos 	   determine info->mach, which enable us to be more accurate when
   12399  1.10  christos 	   disassembling since we know what the target architecture version is.
   12400  1.10  christos 	   For any other target see the comment below:
   12401   1.1  christos 
   12402   1.1  christos 	   The info->mach value has to be ignored as this will be based on
   12403   1.1  christos 	   the default archictecture for the target and/or hints in the notes
   12404   1.1  christos 	   section, but it will never be greater than the current largest arm
   12405   1.1  christos 	   machine value (iWMMXt2), which is only equivalent to the V5TE
   12406   1.1  christos 	   architecture.  ARM architectures have advanced beyond the machine
   12407   1.1  christos 	   value encoding, and these newer architectures would be ignored if
   12408   1.1  christos 	   the machine value was used.
   12409   1.1  christos 
   12410   1.1  christos 	   Ie the -m switch is used to restrict which instructions will be
   12411   1.1  christos 	   disassembled.  If it is necessary to use the -m switch to tell
   12412   1.1  christos 	   objdump that an ARM binary is being disassembled, eg because the
   12413   1.1  christos 	   input is a raw binary file, but it is also desired to disassemble
   12414   1.1  christos 	   all ARM instructions then use "-marm".  This will select the
   12415   1.1  christos 	   "unknown" arm architecture which is compatible with any ARM
   12416   1.1  christos 	   instruction.  */
   12417   1.1  christos 	  info->mach = bfd_mach_arm_unknown;
   12418   1.1  christos 
   12419   1.1  christos       /* Compute the architecture bitmask from the machine number.
   12420   1.1  christos 	 Note: This assumes that the machine number will not change
   12421   1.1  christos 	 during disassembly....  */
   12422   1.1  christos       select_arm_features (info->mach, & private.features);
   12423   1.2     joerg 
   12424   1.2     joerg       private.last_mapping_sym = -1;
   12425   1.7  christos       private.last_mapping_addr = 0;
   12426   1.1  christos       private.last_stop_offset = 0;
   12427   1.1  christos 
   12428   1.1  christos       info->private_data = & private;
   12429   1.1  christos     }
   12430   1.1  christos 
   12431   1.1  christos   private_data = info->private_data;
   12432   1.1  christos 
   12433   1.1  christos   /* Decide if our code is going to be little-endian, despite what the
   12434   1.1  christos      function argument might say.  */
   12435   1.1  christos   little_code = ((info->endian_code == BFD_ENDIAN_LITTLE) || little);
   12436   1.1  christos 
   12437   1.1  christos   /* For ELF, consult the symbol table to determine what kind of code
   12438   1.1  christos      or data we have.  */
   12439   1.1  christos   if (info->symtab_size != 0
   12440   1.1  christos       && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
   12441   1.1  christos     {
   12442   1.7  christos       bfd_vma addr;
   12443   1.1  christos       int n;
   12444   1.1  christos       int last_sym = -1;
   12445   1.1  christos       enum map_type type = MAP_ARM;
   12446   1.7  christos 
   12447   1.7  christos       found = mapping_symbol_for_insn (pc, info, &type);
   12448   1.1  christos       last_sym = private_data->last_mapping_sym;
   12449   1.2     joerg 
   12450   1.2     joerg       is_thumb = (private_data->last_type == MAP_THUMB);
   12451   1.1  christos       is_data = (private_data->last_type == MAP_DATA);
   12452   1.1  christos 
   12453   1.1  christos       /* Look a little bit ahead to see if we should print out
   12454   1.1  christos 	 two or four bytes of data.  If there's a symbol,
   12455   1.1  christos 	 mapping or otherwise, after two bytes then don't
   12456   1.1  christos 	 print more.  */
   12457   1.1  christos       if (is_data)
   12458   1.1  christos 	{
   12459   1.1  christos 	  size = 4 - (pc & 3);
   12460   1.1  christos 	  for (n = last_sym + 1; n < info->symtab_size; n++)
   12461   1.1  christos 	    {
   12462   1.1  christos 	      addr = bfd_asymbol_value (info->symtab[n]);
   12463   1.1  christos 	      if (addr > pc
   12464   1.1  christos 		  && (info->section == NULL
   12465   1.1  christos 		      || info->section == info->symtab[n]->section))
   12466   1.1  christos 		{
   12467   1.1  christos 		  if (addr - pc < size)
   12468   1.1  christos 		    size = addr - pc;
   12469   1.1  christos 		  break;
   12470   1.1  christos 		}
   12471   1.1  christos 	    }
   12472   1.1  christos 	  /* If the next symbol is after three bytes, we need to
   12473   1.1  christos 	     print only part of the data, so that we can use either
   12474   1.1  christos 	     .byte or .short.  */
   12475   1.1  christos 	  if (size == 3)
   12476   1.1  christos 	    size = (pc & 1) ? 1 : 2;
   12477   1.1  christos 	}
   12478   1.1  christos     }
   12479   1.1  christos 
   12480   1.1  christos   if (info->symbols != NULL)
   12481   1.1  christos     {
   12482   1.1  christos       if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
   12483   1.1  christos 	{
   12484   1.1  christos 	  coff_symbol_type * cs;
   12485   1.1  christos 
   12486   1.1  christos 	  cs = coffsymbol (*info->symbols);
   12487   1.1  christos 	  is_thumb = (   cs->native->u.syment.n_sclass == C_THUMBEXT
   12488   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBSTAT
   12489   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBLABEL
   12490   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
   12491   1.1  christos 		      || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
   12492   1.1  christos 	}
   12493   1.1  christos       else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
   12494   1.1  christos 	       && !found)
   12495   1.1  christos 	{
   12496   1.1  christos 	  /* If no mapping symbol has been found then fall back to the type
   12497   1.1  christos 	     of the function symbol.  */
   12498   1.1  christos 	  elf_symbol_type *  es;
   12499   1.1  christos 	  unsigned int       type;
   12500   1.1  christos 
   12501   1.1  christos 	  es = *(elf_symbol_type **)(info->symbols);
   12502   1.1  christos 	  type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
   12503   1.4  christos 
   12504   1.4  christos 	  is_thumb =
   12505   1.4  christos 	    ((ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
   12506   1.4  christos 	      == ST_BRANCH_TO_THUMB) || type == STT_ARM_16BIT);
   12507   1.4  christos 	}
   12508   1.4  christos       else if (bfd_asymbol_flavour (*info->symbols)
   12509   1.4  christos 	       == bfd_target_mach_o_flavour)
   12510   1.4  christos 	{
   12511   1.4  christos 	  bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols;
   12512   1.4  christos 
   12513   1.1  christos 	  is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF);
   12514   1.1  christos 	}
   12515   1.1  christos     }
   12516   1.1  christos 
   12517   1.8  christos   if (force_thumb)
   12518   1.1  christos     is_thumb = true;
   12519   1.1  christos 
   12520   1.1  christos   if (is_data)
   12521   1.1  christos     info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
   12522   1.1  christos   else
   12523   1.1  christos     info->display_endian = little_code ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
   12524   1.1  christos 
   12525   1.1  christos   info->bytes_per_line = 4;
   12526   1.1  christos 
   12527   1.1  christos   /* PR 10263: Disassemble data if requested to do so by the user.  */
   12528   1.1  christos   if (is_data && ((info->flags & DISASSEMBLE_DATA) == 0))
   12529   1.1  christos     {
   12530   1.1  christos       int i;
   12531   1.1  christos 
   12532   1.1  christos       /* Size was already set above.  */
   12533   1.1  christos       info->bytes_per_chunk = size;
   12534   1.1  christos       printer = print_insn_data;
   12535   1.1  christos 
   12536   1.1  christos       status = info->read_memory_func (pc, (bfd_byte *) b, size, info);
   12537   1.1  christos       given = 0;
   12538   1.1  christos       if (little)
   12539   1.1  christos 	for (i = size - 1; i >= 0; i--)
   12540   1.1  christos 	  given = b[i] | (given << 8);
   12541   1.1  christos       else
   12542   1.1  christos 	for (i = 0; i < (int) size; i++)
   12543   1.1  christos 	  given = b[i] | (given << 8);
   12544   1.1  christos     }
   12545   1.1  christos   else if (!is_thumb)
   12546   1.1  christos     {
   12547   1.1  christos       /* In ARM mode endianness is a straightforward issue: the instruction
   12548   1.1  christos 	 is four bytes long and is either ordered 0123 or 3210.  */
   12549   1.1  christos       printer = print_insn_arm;
   12550   1.1  christos       info->bytes_per_chunk = 4;
   12551   1.1  christos       size = 4;
   12552   1.1  christos 
   12553   1.1  christos       status = info->read_memory_func (pc, (bfd_byte *) b, 4, info);
   12554   1.7  christos       if (little_code)
   12555   1.1  christos 	given = (b[0]) | (b[1] << 8) | (b[2] << 16) | ((unsigned) b[3] << 24);
   12556   1.7  christos       else
   12557   1.1  christos 	given = (b[3]) | (b[2] << 8) | (b[1] << 16) | ((unsigned) b[0] << 24);
   12558   1.1  christos     }
   12559   1.1  christos   else
   12560   1.1  christos     {
   12561   1.1  christos       /* In Thumb mode we have the additional wrinkle of two
   12562   1.1  christos 	 instruction lengths.  Fortunately, the bits that determine
   12563   1.1  christos 	 the length of the current instruction are always to be found
   12564   1.1  christos 	 in the first two bytes.  */
   12565   1.1  christos       printer = print_insn_thumb16;
   12566   1.1  christos       info->bytes_per_chunk = 2;
   12567   1.1  christos       size = 2;
   12568   1.1  christos 
   12569   1.1  christos       status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
   12570   1.1  christos       if (little_code)
   12571   1.1  christos 	given = (b[0]) | (b[1] << 8);
   12572   1.1  christos       else
   12573   1.1  christos 	given = (b[1]) | (b[0] << 8);
   12574   1.1  christos 
   12575   1.1  christos       if (!status)
   12576   1.1  christos 	{
   12577   1.1  christos 	  /* These bit patterns signal a four-byte Thumb
   12578   1.1  christos 	     instruction.  */
   12579   1.1  christos 	  if ((given & 0xF800) == 0xF800
   12580   1.1  christos 	      || (given & 0xF800) == 0xF000
   12581   1.1  christos 	      || (given & 0xF800) == 0xE800)
   12582   1.1  christos 	    {
   12583   1.1  christos 	      status = info->read_memory_func (pc + 2, (bfd_byte *) b, 2, info);
   12584   1.1  christos 	      if (little_code)
   12585   1.1  christos 		given = (b[0]) | (b[1] << 8) | (given << 16);
   12586   1.1  christos 	      else
   12587   1.1  christos 		given = (b[1]) | (b[0] << 8) | (given << 16);
   12588   1.1  christos 
   12589   1.1  christos 	      printer = print_insn_thumb32;
   12590   1.1  christos 	      size = 4;
   12591   1.1  christos 	    }
   12592   1.1  christos 	}
   12593   1.1  christos 
   12594   1.1  christos       if (ifthen_address != pc)
   12595   1.1  christos 	find_ifthen_state (pc, info, little_code);
   12596   1.1  christos 
   12597   1.1  christos       if (ifthen_state)
   12598   1.1  christos 	{
   12599   1.1  christos 	  if ((ifthen_state & 0xf) == 0x8)
   12600   1.1  christos 	    ifthen_next_state = 0;
   12601   1.1  christos 	  else
   12602   1.1  christos 	    ifthen_next_state = (ifthen_state & 0xe0)
   12603   1.1  christos 				| ((ifthen_state & 0xf) << 1);
   12604   1.1  christos 	}
   12605   1.1  christos     }
   12606   1.1  christos 
   12607   1.1  christos   if (status)
   12608   1.1  christos     {
   12609   1.1  christos       info->memory_error_func (status, pc, info);
   12610   1.1  christos       return -1;
   12611   1.1  christos     }
   12612   1.1  christos   if (info->flags & INSN_HAS_RELOC)
   12613   1.1  christos     /* If the instruction has a reloc associated with it, then
   12614   1.1  christos        the offset field in the instruction will actually be the
   12615   1.1  christos        addend for the reloc.  (We are using REL type relocs).
   12616   1.1  christos        In such cases, we can ignore the pc when computing
   12617   1.1  christos        addresses, since the addend is not currently pc-relative.  */
   12618   1.1  christos     pc = 0;
   12619   1.1  christos 
   12620   1.1  christos   printer (pc, info, given);
   12621   1.1  christos 
   12622   1.1  christos   if (is_thumb)
   12623   1.1  christos     {
   12624   1.1  christos       ifthen_state = ifthen_next_state;
   12625   1.1  christos       ifthen_address += size;
   12626   1.1  christos     }
   12627   1.1  christos   return size;
   12628   1.1  christos }
   12629   1.1  christos 
   12630   1.1  christos int
   12631   1.1  christos print_insn_big_arm (bfd_vma pc, struct disassemble_info *info)
   12632   1.1  christos {
   12633   1.1  christos   /* Detect BE8-ness and record it in the disassembler info.  */
   12634   1.1  christos   if (info->flavour == bfd_target_elf_flavour
   12635   1.1  christos       && info->section != NULL
   12636   1.1  christos       && (elf_elfheader (info->section->owner)->e_flags & EF_ARM_BE8))
   12637   1.1  christos     info->endian_code = BFD_ENDIAN_LITTLE;
   12638   1.8  christos 
   12639   1.1  christos   return print_insn (pc, info, false);
   12640   1.1  christos }
   12641   1.1  christos 
   12642   1.1  christos int
   12643   1.1  christos print_insn_little_arm (bfd_vma pc, struct disassemble_info *info)
   12644   1.8  christos {
   12645   1.1  christos   return print_insn (pc, info, true);
   12646   1.1  christos }
   12647   1.6  christos 
   12648   1.5  christos const disasm_options_and_args_t *
   12649   1.5  christos disassembler_options_arm (void)
   12650   1.6  christos {
   12651   1.5  christos   static disasm_options_and_args_t *opts_and_args;
   12652   1.6  christos 
   12653   1.5  christos   if (opts_and_args == NULL)
   12654   1.6  christos     {
   12655   1.5  christos       disasm_options_t *opts;
   12656   1.6  christos       unsigned int i;
   12657   1.6  christos 
   12658   1.6  christos       opts_and_args = XNEW (disasm_options_and_args_t);
   12659   1.6  christos       opts_and_args->args = NULL;
   12660   1.6  christos 
   12661   1.5  christos       opts = &opts_and_args->options;
   12662   1.5  christos       opts->name = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
   12663   1.6  christos       opts->description = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
   12664   1.5  christos       opts->arg = NULL;
   12665   1.5  christos       for (i = 0; i < NUM_ARM_OPTIONS; i++)
   12666   1.5  christos 	{
   12667   1.5  christos 	  opts->name[i] = regnames[i].name;
   12668   1.5  christos 	  if (regnames[i].description != NULL)
   12669   1.5  christos 	    opts->description[i] = _(regnames[i].description);
   12670   1.5  christos 	  else
   12671   1.5  christos 	    opts->description[i] = NULL;
   12672   1.5  christos 	}
   12673   1.5  christos       /* The array we return must be NULL terminated.  */
   12674   1.5  christos       opts->name[i] = NULL;
   12675   1.5  christos       opts->description[i] = NULL;
   12676   1.5  christos     }
   12677   1.6  christos 
   12678   1.5  christos   return opts_and_args;
   12679   1.5  christos }
   12680   1.1  christos 
   12681   1.1  christos void
   12682   1.1  christos print_arm_disassembler_options (FILE *stream)
   12683   1.5  christos {
   12684   1.1  christos   unsigned int i, max_len = 0;
   12685   1.1  christos   fprintf (stream, _("\n\
   12686   1.1  christos The following ARM specific disassembler options are supported for use with\n\
   12687   1.1  christos the -M switch:\n"));
   12688   1.5  christos 
   12689   1.5  christos   for (i = 0; i < NUM_ARM_OPTIONS; i++)
   12690   1.5  christos     {
   12691   1.5  christos       unsigned int len = strlen (regnames[i].name);
   12692   1.5  christos       if (max_len < len)
   12693   1.5  christos 	max_len = len;
   12694   1.5  christos     }
   12695   1.5  christos 
   12696   1.5  christos   for (i = 0, max_len++; i < NUM_ARM_OPTIONS; i++)
   12697   1.1  christos     fprintf (stream, "  %s%*c %s\n",
   12698   1.5  christos 	     regnames[i].name,
   12699   1.5  christos 	     (int)(max_len - strlen (regnames[i].name)), ' ',
   12700   1.1  christos 	     _(regnames[i].description));
   12701                 }
   12702