gdb: Rename structures within ctfread.c
[deliverable/binutils-gdb.git] / opcodes / arm-dis.c
index 0503d9365d19633d0dacce367ba4acaf2beb6f6a..8ff86bf4d62ff69ed9a4a5f3f5bc5c81b3abbe85 100644 (file)
@@ -2073,6 +2073,7 @@ static const struct opcode32 neon_opcodes[] =
    %u                  print 'U' (unsigned) or 'S' for various mve instructions
    %i                  print MVE predicate(s) for vpt and vpst
    %j                  print a 5-bit immediate from hw2[14:12,7:6]
+   %k                  print 48 if the 7th position bit is set else print 64.
    %m                  print rounding mode for vcvt and vrint
    %n                  print vector comparison code for predicated instruction
    %s                  print size for various vcvt instructions
@@ -2950,6 +2951,16 @@ static const struct mopcode32 mve_opcodes[] =
    0xef200150, 0xffb11f51,
    "vorr%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
 
+  /* Vector VMOV, vector to vector move. While decoding MVE_VORR_REG if
+     "Qm==Qn", VORR should replaced by its alias VMOV. For that to happen
+     MVE_VMOV_VEC_TO_VEC need to placed after MVE_VORR_REG in this mve_opcodes
+     array.  */
+
+  {ARM_FEATURE_COPROC (FPU_MVE),
+   MVE_VMOV_VEC_TO_VEC,
+   0xef200150, 0xffb11f51,
+   "vmov%v\t%13-15,22Q, %17-19,7Q"},
+
   /* Vector VQDMULL T1 variant.  */
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_VQDMULL_T1,
@@ -3019,25 +3030,25 @@ static const struct mopcode32 mve_opcodes[] =
   /* Vector VQDMLAH.  */
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_VQDMLAH,
-   0xee000e60, 0xef811f70,
+   0xee000e60, 0xff811f70,
    "vqdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
 
   /* Vector VQRDMLAH.  */
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_VQRDMLAH,
-   0xee000e40, 0xef811f70,
+   0xee000e40, 0xff811f70,
    "vqrdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
 
   /* Vector VQDMLASH.  */
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_VQDMLASH,
-   0xee001e60, 0xef811f70,
+   0xee001e60, 0xff811f70,
    "vqdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
 
   /* Vector VQRDMLASH.  */
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_VQRDMLASH,
-   0xee001e40, 0xef811f70,
+   0xee001e40, 0xff811f70,
    "vqrdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
 
   /* Vector VQDMLSDH.  */
@@ -3373,8 +3384,8 @@ static const struct mopcode32 mve_opcodes[] =
 
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_SQRSHRL,
-   0xea51012d, 0xfff101ff,
-   "sqrshrl%c\t%17-19l, %9-11h, %12-15S"},
+   0xea51012d, 0xfff1017f,
+   "sqrshrl%c\t%17-19l, %9-11h, %k, %12-15S"},
 
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_SQRSHR,
@@ -3403,8 +3414,8 @@ static const struct mopcode32 mve_opcodes[] =
 
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_UQRSHLL,
-   0xea51010d, 0xfff101ff,
-   "uqrshll%c\t%17-19l, %9-11h, %12-15S"},
+   0xea51010d, 0xfff1017f,
+   "uqrshll%c\t%17-19l, %9-11h, %k, %12-15S"},
 
   {ARM_FEATURE_COPROC (FPU_MVE),
    MVE_UQRSHL,
@@ -6103,6 +6114,12 @@ is_mve_undefined (unsigned long given, enum mve_instructions matched_insn,
       else
        return FALSE;
 
+    case MVE_VMOV_VEC_TO_VEC:
+      if ((arm_decode_field (given, 5, 5) == 1)
+         || (arm_decode_field (given, 22, 22) == 1))
+         return TRUE;
+      return FALSE;
+
     case MVE_VMOV_IMM_TO_VEC:
       if (arm_decode_field (given, 5, 5) == 0)
       {
@@ -6546,10 +6563,6 @@ is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
        return FALSE;
       }
 
-    case MVE_VQRDMLADH:
-    case MVE_VQDMLSDH:
-    case MVE_VQRDMLSDH:
-    case MVE_VQDMLADH:
     case MVE_VMULL_INT:
       {
        unsigned long Qd;
@@ -6619,7 +6632,7 @@ is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
              = arm_decode_field_multiple (given, 13, 15, 22, 22);
            unsigned long Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
 
-           if ((Qd == Qn))
+           if (Qd == Qn)
              {
                *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
                return TRUE;
@@ -6767,23 +6780,23 @@ print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
   unsigned long op1 = arm_decode_field (given, 21, 22);
   unsigned long op2 = arm_decode_field (given, 5, 6);
   unsigned long h = arm_decode_field (given, 16, 16);
-  unsigned long index, esize, targetBeat, idx;
+  unsigned long index_operand, esize, targetBeat, idx;
   void *stream = info->stream;
   fprintf_ftype func = info->fprintf_func;
 
   if ((op1 & 0x2) == 0x2)
     {
-      index = op2;
+      index_operand = op2;
       esize = 8;
     }
   else if (((op1 & 0x2) == 0x0) && ((op2 & 0x1) == 0x1))
     {
-      index = op2  >> 1;
+      index_operand = op2  >> 1;
       esize = 16;
     }
   else if (((op1 & 0x2) == 0) && ((op2 & 0x3) == 0))
     {
-      index = 0;
+      index_operand = 0;
       esize = 32;
     }
   else
@@ -6793,7 +6806,7 @@ print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
     }
 
   targetBeat =  (op1 & 0x1) | (h << 1);
-  idx = index + targetBeat * (32/esize);
+  idx = index_operand + targetBeat * (32/esize);
 
   func (stream, "%lu", idx);
 }
@@ -9217,6 +9230,13 @@ print_insn_mve (struct disassemble_info *info, long given)
          if (is_mve_undefined (given, insn->mve_op, &undefined_cond))
            is_undefined = TRUE;
 
+         /* In "VORR Qd, Qm, Qn", if Qm==Qn, VORR is nothing but VMOV,
+            i.e "VMOV Qd, Qm".  */
+         if ((insn->mve_op == MVE_VORR_REG)
+             && (arm_decode_field (given, 1, 3)
+                 == arm_decode_field (given, 17, 19)))
+           continue;
+
          for (c = insn->assembler; *c; c++)
            {
              if (*c == '%')
@@ -9258,6 +9278,11 @@ print_insn_mve (struct disassemble_info *info, long given)
                      }
                      break;
 
+                   case 'k':
+                     func (stream, "#%u",
+                           (arm_decode_field (given, 7, 7) == 0) ? 64 : 48);
+                     break;
+
                    case 'n':
                      print_vec_condition (info, given, insn->mve_op);
                      break;
This page took 0.026631 seconds and 4 git commands to generate.