aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arm.c10
-rw-r--r--gas/testsuite/gas/arm/vcmp-noprefix-imm.d8
-rw-r--r--gas/testsuite/gas/arm/vcmp-noprefix-imm.s7
4 files changed, 29 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5fb48dc..27e5885 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2017-02-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * config/tc-arm.c (parse_ifimm_zero): Make prefix optional in unified
+ syntax.
+ * testsuite/gas/arm/vcmp-noprefix-imm.d: New file.
+ * testsuite/gas/arm/vcmp-noprefix-imm.s: New file.
+
2017-02-10 Nicholas Piggin <npiggin@gmail.com>
* testsuite/gas/ppc/power9.d <scv, rfscv>: New tests.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 7947035..a433929 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -4969,9 +4969,13 @@ parse_ifimm_zero (char **in)
int error_code;
if (!is_immediate_prefix (**in))
- return FALSE;
-
- ++*in;
+ {
+ /* In unified syntax, all prefixes are optional. */
+ if (!unified_syntax)
+ return FALSE;
+ }
+ else
+ ++*in;
/* Accept #0x0 as a synonym for #0. */
if (strncmp (*in, "0x", 2) == 0)
diff --git a/gas/testsuite/gas/arm/vcmp-noprefix-imm.d b/gas/testsuite/gas/arm/vcmp-noprefix-imm.d
new file mode 100644
index 0000000..2e4f6ba
--- /dev/null
+++ b/gas/testsuite/gas/arm/vcmp-noprefix-imm.d
@@ -0,0 +1,8 @@
+#name: VCMP immediate without prefix
+#as:
+#objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0[0-9a-f]+ <[^>]+> eeb5 0a40 vcmp.f32 s0, #0.0
diff --git a/gas/testsuite/gas/arm/vcmp-noprefix-imm.s b/gas/testsuite/gas/arm/vcmp-noprefix-imm.s
new file mode 100644
index 0000000..114ddad
--- /dev/null
+++ b/gas/testsuite/gas/arm/vcmp-noprefix-imm.s
@@ -0,0 +1,7 @@
+.syntax unified
+.arch armv7e-m
+.fpu fpv5-d16
+.thumb
+.thumb_func
+
+vcmp.f32 s0, 0.0