[ARM] Allow immediate without prefix in unified syntax for VCMP
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Mon, 13 Feb 2017 17:46:59 +0000 (17:46 +0000)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Mon, 13 Feb 2017 17:47:21 +0000 (17:47 +0000)
2017-02-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
* 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.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/vcmp-noprefix-imm.d [new file with mode: 0644]
gas/testsuite/gas/arm/vcmp-noprefix-imm.s [new file with mode: 0644]

index 5fb48dc148320b82f4d4fbf7b44098e69bb2cf76..27e5885b808d198ac98e6bc957b03a0cc0605568 100644 (file)
@@ -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.
index 7947035e53ad7621bd2555333b05c2da3a505862..a433929ce94b515c71764c96f2df2b43b600cf98 100644 (file)
@@ -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 (file)
index 0000000..2e4f6ba
--- /dev/null
@@ -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 (file)
index 0000000..114ddad
--- /dev/null
@@ -0,0 +1,7 @@
+.syntax unified
+.arch armv7e-m
+.fpu fpv5-d16
+.thumb
+.thumb_func
+
+vcmp.f32 s0, 0.0
This page took 0.044388 seconds and 4 git commands to generate.