PR 11136
authorNick Clifton <nickc@redhat.com>
Fri, 29 Jan 2010 16:02:41 +0000 (16:02 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 29 Jan 2010 16:02:41 +0000 (16:02 +0000)
        * config/tc-arm.c (neon_check_type): Handle a neon_shape value of
        NS_NULL.
        * gas/arm/neon-omit.s: Add instruction that causes crash.
        * gas/arm/neon-omit.d: Add expected disassembly.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/neon-omit.d
gas/testsuite/gas/arm/neon-omit.s

index 685e69983a783b19a5aa329bfe5c0330acf53c1f..358f47074acb4781003c9d744031c858b39251f8 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-29  Nick Clifton  <nickc@redhat.com>
+
+       PR 11136
+       * config/tc-arm.c (neon_check_type): Handle a neon_shape value of
+       NS_NULL.
+
 2010-01-27  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        * NEWS: Mention new feature.
@@ -42,7 +48,7 @@
        Include obj-format.h earlier.
 
 2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-       
+
        * config/tc-s390.c (s390_elf_final_processing): New function.
        * config/tc-s390.h (elf_tc_final_processing): New macro definition.
        (s390_elf_final_processing): Added prototype.
index d5a0ec4b12b4efc50859ea0e0d22386f8b61bf5b..7bf5416c99356809fe2de9db355216b618aa5f49 100644 (file)
@@ -12043,8 +12043,17 @@ neon_check_type (unsigned els, enum neon_shape ns, ...)
             {
               if ((thisarg & N_VFP) != 0)
                 {
-                  enum neon_shape_el regshape = neon_shape_tab[ns].el[i];
-                  unsigned regwidth = neon_shape_el_size[regshape], match;
+                  enum neon_shape_el regshape;
+                  unsigned regwidth, match;
+
+                 /* PR 11136: Catch the case where we are passed a shape of NS_NULL.  */
+                 if (ns == NS_NULL)
+                   {
+                     first_error (_("invalid instruction shape"));
+                     return badtype;
+                   }
+                  regshape = neon_shape_tab[ns].el[i];
+                  regwidth = neon_shape_el_size[regshape];
 
                   /* In VFP mode, operands must match register widths. If we
                      have a key operand, use its width, else use the width of
@@ -12193,9 +12202,8 @@ try_vfp_nsyn (int args, void (*pfn) (enum neon_shape))
       pfn (rs);
       return SUCCESS;
     }
-  else
-    inst.error = NULL;
 
+  inst.error = NULL;
   return FAIL;
 }
 
index 8c87e5e34fa1821b9941438375791e5e776e73f3..ffd0c49e69251d7d7c38b32e5734a1ecb78450d1 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-29  Nick Clifton  <nickc@redhat.com>
+
+       PR 11136
+       * gas/arm/neon-omit.s: Add instruction that causes crash.
+       * gas/arm/neon-omit.d: Add expected disassembly.
+
 2010-01-28  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        * gas/pe/section-align-1.d: Don't test section flags.
index 20017077bca0f4a279d3d72f9c9a7a5b3d04eb6c..3a1eeab2ac80f3910da63317d977e9bd6e5340af 100644 (file)
@@ -93,3 +93,4 @@ Disassembly of section .text:
 0[0-9a-f]+ <[^>]+> f3954556    vsli\.16        q2, q3, #5
 0[0-9a-f]+ <[^>]+> f3bff6b7    vqshlu\.s64     d15, d23, #63.*
 0[0-9a-f]+ <[^>]+> f2b25386    vext\.8 d5, d18, d6, #3
+0[0-9a-f]+ <[^>]+> f3020d54    vmul\.f32       q0, q1, q2
index 42a7e8903b16eb4db43def149fc8c3936c28b2e9..35490a5fbbd4973e961af741c04540af7a6d2ba4 100644 (file)
@@ -95,3 +95,6 @@
        vsli.16 q2,q3,#5
        vqshlu.s64 d15,d23,#63
        vext.8 d5,d18,d6,#3
+
+@ PR 11136 - this used to crash the assembler.
+       vmul.f32   q0,q1,q2