From 0ba3a73180afa69e6920ba8c220f0323cb4fb896 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 9 Mar 2018 03:51:19 -0800 Subject: [PATCH] x86: Strip whitespace in check_VecOperations 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 | 7 +++++++ gas/config/tc-i386.c | 6 ++++++ gas/testsuite/gas/i386/optimize-1.s | 2 +- gas/testsuite/gas/i386/x86-64-optimize-2.s | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 0cf0108..2fe224c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2018-03-09 H.J. Lu + + * 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 * config/tc-i386.c (set_cpu_arch): Set cpu_arch_isa_flags. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index ef7b64b..7243760 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -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: diff --git a/gas/testsuite/gas/i386/optimize-1.s b/gas/testsuite/gas/i386/optimize-1.s index f875f92..21b9594 100644 --- a/gas/testsuite/gas/i386/optimize-1.s +++ b/gas/testsuite/gas/i386/optimize-1.s @@ -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 diff --git a/gas/testsuite/gas/i386/x86-64-optimize-2.s b/gas/testsuite/gas/i386/x86-64-optimize-2.s index 4461c09..10ce788 100644 --- a/gas/testsuite/gas/i386/x86-64-optimize-2.s +++ b/gas/testsuite/gas/i386/x86-64-optimize-2.s @@ -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 -- 2.7.4