]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[ARM] Backport vcmp/vcmpe should accept #0x0 as an operand
authorJiong Wang <jiong.wang@arm.com>
Wed, 28 Jan 2015 09:55:51 +0000 (09:55 +0000)
committerJiong Wang <jiong.wang@arm.com>
Wed, 28 Jan 2015 09:55:51 +0000 (09:55 +0000)
  gas/
  2015-01-28  Matthew Wahab  <matthew.wahab@arm.com>

    * config/tc-arm.c (parse_ifimm_zero): Accept #0x0 as a synonym for
    #0, restoring previous behaviour.

  testsuite/
  2015-01-28  Matthew Wahab  <matthew.wahab@arm.com>

    * gas/arm/ual-vcmp.s: Add vcmp, vcmpe with #0x0 operand.
    * gas/ual/vcmp.d: Update expected output.
    * gas/ual/vcmp-zero-bad.l: Likewise

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/ual-vcmp.d
gas/testsuite/gas/arm/ual-vcmp.s
gas/testsuite/gas/arm/vcmp-zero-bad.l

index 627940a381467dbb7d387d2e5c61904179078f6b..b4f0eea4c0f3b7c0772612bf755fdea88048bfd8 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-28  Matthew Wahab  <matthew.wahab@arm.com>
+
+       * config/tc-arm.c (parse_ifimm_zero): Accept #0x0 as a synonym for #0,
+       restoring previous behaviour.
+
 2014-12-23  Tristan Gingold  <gingold@adacore.com>
 
        * configure: Regenerate.
index 5077f87ea4f2e5403524e6823f5da938d0ffbfca..2db6c2d2481af47da65634bf1b4318d4e2b20132 100644 (file)
@@ -4959,6 +4959,16 @@ parse_ifimm_zero (char **in)
     return FALSE;
 
   ++*in;
+
+  /* Accept #0x0 as a synonym for #0.  */
+  if (strncmp (*in, "0x", 2) == 0)
+    {
+      int val;
+      if (parse_immediate (in, &val, 0, 0, TRUE) == FAIL)
+       return FALSE;
+      return TRUE;
+    }
+
   error_code = atof_generic (in, ".", EXP_CHARS,
                              &generic_floating_point_number);
 
index d53d5181e442214e340dd28b4160f83ae3caec19..cea61aa2cb083888557e98bd865e6cf482446c17 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-28  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * gas/arm/ual-vcmp.s: Add vcmp, vcmpe with #0x0 operand.
+       * gas/ual/vcmp.d: Update expected output.
+       * gas/ual/vcmp-zero-bad.l: Likewise
+
 2014-12-19  Matthew Fortune  <matthew.fortune@imgtec.com>
 
        * gas/mips/r6-64.s: Remove .align directives from LDPC
index 2e9fb3d5076cec69105b13dbf1d9787ab494de50..5b1b6ce5954bd7e6e5ad121408724fc081e19cc6 100644 (file)
@@ -14,11 +14,15 @@ Disassembly of section .text:
 0+014 <[^>]*> eeb53a40         vcmp.f32        s6, #0.0
 0+018 <[^>]*> eef53ac0         vcmpe.f32       s7, #0.0
 0+01c <[^>]*> eeb54ac0         vcmpe.f32       s8, #0.0
-0+020 <[^>]*> eeb50b40         vcmp.f64        d0, #0.0
-0+024 <[^>]*> eeb51b40         vcmp.f64        d1, #0.0
-0+028 <[^>]*> eeb52bc0         vcmpe.f64       d2, #0.0
-0+02c <[^>]*> eeb53bc0         vcmpe.f64       d3, #0.0
-0+030 <[^>]*> eeb54b40         vcmp.f64        d4, #0.0
-0+034 <[^>]*> eeb55b40         vcmp.f64        d5, #0.0
-0+038 <[^>]*> eeb56bc0         vcmpe.f64       d6, #0.0
-0+03c <[^>]*> eeb57bc0         vcmpe.f64       d7, #0.0
\ No newline at end of file
+0+020 <[^>]*> eef54a40         vcmp.f32        s9, #0.0
+0+024 <[^>]*> eeb55ac0         vcmpe.f32       s10, #0.0
+0+028 <[^>]*> eeb50b40         vcmp.f64        d0, #0.0
+0+02c <[^>]*> eeb51b40         vcmp.f64        d1, #0.0
+0+030 <[^>]*> eeb52bc0         vcmpe.f64       d2, #0.0
+0+034 <[^>]*> eeb53bc0         vcmpe.f64       d3, #0.0
+0+038 <[^>]*> eeb54b40         vcmp.f64        d4, #0.0
+0+03c <[^>]*> eeb55b40         vcmp.f64        d5, #0.0
+0+040 <[^>]*> eeb56bc0         vcmpe.f64       d6, #0.0
+0+044 <[^>]*> eeb57bc0         vcmpe.f64       d7, #0.0
+0+048 <[^>]*> eeb58b40         vcmp.f64        d8, #0.0
+0+04c <[^>]*> eeb59bc0         vcmpe.f64       d9, #0.0
\ No newline at end of file
index 79efa4e79a52eabb64d8336879be0ff8a59804ec..1b9ffa68442bba60d9a3734f22168a2c10359948 100644 (file)
@@ -10,6 +10,8 @@ vcmp.f32      s5, #0.0e2
 vcmp.f32       s6, #0e-3
 vcmpe.f32      s7, #0.0000
 vcmpe.f32      s8, #.0
+vcmp.f32       s9, #0x0
+vcmpe.f32      s10, #0x0
 
 vcmp.f64       d0, #0.0
 vcmp.f64       d1, #0
@@ -19,3 +21,5 @@ vcmp.f64      d4, #0.0e5
 vcmp.f64       d5, #0e-2
 vcmpe.f64      d6, #0.00
 vcmpe.f64      d7, #.0
+vcmp.f64       d8, #0x0
+vcmpe.f64      d9, #0x0
index 975d02b8c071b85d04c54ab37c5de772bbc9217e..bce8e4ac4ef2c4da62c04e1f1c3149c0e0296b24 100644 (file)
@@ -4,5 +4,5 @@
 [^:]*:7: Error: only floating point zero is allowed as immediate value -- `vcmpe.f32 s3,5'
 [^:]*:8: Error: only floating point zero is allowed as immediate value -- `vcmpe.f32 s4,#-0.0'
 [^:]*:10: Error: only floating point zero is allowed as immediate value -- `vcmp.f64 d0,#-1'
-[^:]*:11: Error: garbage following instruction -- `vcmpe.f64 d3,#0x35'
+[^:]*:11: Error: only floating point zero is allowed as immediate value -- `vcmpe.f64 d3,#0x35'
 [^:]*:12: Error: only floating point zero is allowed as immediate value -- `vcmpe.f64 d4,0xf'