This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[ARM][gas][2.25] Backport "vcmp/vcmpe should accept #0x0 as an operand."
- From: Matthew Wahab <matthew dot wahab at arm dot com>
- To: binutils at sourceware dot org
- Date: Thu, 15 Jan 2015 09:41:29 +0000
- Subject: [ARM][gas][2.25] Backport "vcmp/vcmpe should accept #0x0 as an operand."
- Authentication-results: sourceware.org; auth=none
Hello,
This is a backport to binutils-2.25 to fix an inadvertant behaviour
change in GAS.
The trunk change is here:
https://sourceware.org/ml/binutils/2015-01/msg00077.html
The commit log is here:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0900a05b4ce11a11fafbb691d94745bb65ac4980
arm-none-linux-gnueabihf tested with make check-gas.
Ok for the branch?
Matthew
gas/
2015-01-15 Matthew Wahab <matthew.wahab@arm.com>
* config/tc-arm.c (parse_ifimm_zero): Accept #0x0 as a synonym for
#0, restoring previous behaviour.
gas/testsuite/
2015-01-15 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
diff --git a/bfd/version.h b/bfd/version.h
index 25e92f5..174d5a4 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150115
+#define BFD_VERSION_DATE 20150114
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 5077f87..2db6c2d 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -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);
diff --git a/gas/testsuite/gas/arm/ual-vcmp.d b/gas/testsuite/gas/arm/ual-vcmp.d
index 2e9fb3d..5b1b6ce 100644
--- a/gas/testsuite/gas/arm/ual-vcmp.d
+++ b/gas/testsuite/gas/arm/ual-vcmp.d
@@ -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
diff --git a/gas/testsuite/gas/arm/ual-vcmp.s b/gas/testsuite/gas/arm/ual-vcmp.s
index 79efa4e..5fc5ebe 100644
--- a/gas/testsuite/gas/arm/ual-vcmp.s
+++ b/gas/testsuite/gas/arm/ual-vcmp.s
@@ -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
diff --git a/gas/testsuite/gas/arm/vcmp-zero-bad.l b/gas/testsuite/gas/arm/vcmp-zero-bad.l
index 975d02b..bce8e4a 100644
--- a/gas/testsuite/gas/arm/vcmp-zero-bad.l
+++ b/gas/testsuite/gas/arm/vcmp-zero-bad.l
@@ -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'