x86: Strip whitespace in check_VecOperations
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Mar 2018 11:51:19 +0000 (03:51 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Mar 2018 11:51:31 +0000 (03:51 -0800)
Since the addition of pseudo prefixes changed how the scrubber treats
'{', we need to explicitly strip whitespace in check_VecOperations ().

* config/tc-i386.c (check_VecOperations): Strip whitespace.
* testsuite/gas/i386/optimize-1.s: Add whitespaces before
{%k7} and {z},
* testsuite/gas/i386/x86-64-optimize-2.s: Likewise.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/optimize-1.s
gas/testsuite/gas/i386/x86-64-optimize-2.s

index 0cf01085f0fa8ede2926cbe18691294f79e54722..2fe224c65fd067d519604d2c06b5d4ca9567614d 100644 (file)
@@ -1,3 +1,10 @@
+2018-03-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (check_VecOperations): Strip whitespace.
+       * testsuite/gas/i386/optimize-1.s: Add whitespaces before
+       {%k7} and {z},
+       * testsuite/gas/i386/x86-64-optimize-2.s: Likewise.
+
 2018-03-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (set_cpu_arch): Set cpu_arch_isa_flags.
index ef7b64b40bb26c3b182c45f5ad1d43de2baa67d8..724376096f836be1f4bc2579004ca1b25680f524 100644 (file)
@@ -8524,6 +8524,12 @@ check_VecOperations (char *op_string, char *op_end)
              return NULL;
            }
          op_string++;
+
+         /* Strip whitespace since the addition of pseudo prefixes
+            changed how the scrubber treats '{'.  */
+         if (is_space_char (*op_string))
+           ++op_string;
+
          continue;
        }
     unknown_vec_op:
index f875f92db8d604bbaa8c2370047de6ede099e6ae..21b9594034538c1d2c9d68b724b20e6ef91a0dc7 100644 (file)
@@ -4,7 +4,7 @@
        .text
 _start:
        vandnpd %zmm1, %zmm1, %zmm5{%k7}
-       vandnpd %ymm1, %ymm1, %ymm5{z}{%k7}
+       vandnpd %ymm1, %ymm1, %ymm5      {%k7}          {z}
        vandnpd %zmm1, %zmm1, %zmm5
        vandnpd %ymm1, %ymm1, %ymm5
 
index 4461c099ea82b6ad2926a24df214e1d544423dd1..10ce788ffbf8acf7401afe13b5c9bb0ed9610e63 100644 (file)
@@ -4,7 +4,7 @@
        .text
 _start:
        vandnpd %zmm1, %zmm1, %zmm15{%k7}
-       vandnpd %ymm1, %ymm1, %ymm15{z}{%k7}
+       vandnpd %ymm1, %ymm1, %ymm15     {%k7}          {z}
        vandnpd %zmm1, %zmm1, %zmm15
        vandnpd %ymm1, %ymm1, %ymm15
        vandnpd %zmm1, %zmm1, %zmm16
This page took 0.040953 seconds and 4 git commands to generate.