From 1cccfb31f5ba0dbc1cd3c679daf2f5b40252c6e0 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 6 Mar 2017 15:00:52 -0800 Subject: [PATCH] Update x86-64-mpx-inval-2 test for COFF Assembler displays upper case hex numbers and we need to force a good alignment to avoid matching NOPs at the end. * testsuite/gas/i386/x86-64-mpx-inval-2.s: Force a good alignment. * testsuite/gas/i386/x86-64-mpx-inval-2.l: Expect [0-9A-F]+. --- gas/ChangeLog | 5 +++++ gas/testsuite/gas/i386/x86-64-mpx-inval-2.l | 8 ++++---- gas/testsuite/gas/i386/x86-64-mpx-inval-2.s | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 9b1849dc4ed..654b3cb8bdd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2017-03-06 H.J. Lu + + * testsuite/gas/i386/x86-64-mpx-inval-2.s: Force a good alignment. + * testsuite/gas/i386/x86-64-mpx-inval-2.l: Expect [0-9A-F]+. + 2017-03-06 Alan Modra * dw2gencfi.c (encoding_size): Return unsigned int. diff --git a/gas/testsuite/gas/i386/x86-64-mpx-inval-2.l b/gas/testsuite/gas/i386/x86-64-mpx-inval-2.l index ed69fe5b035..e4feae90f3a 100644 --- a/gas/testsuite/gas/i386/x86-64-mpx-inval-2.l +++ b/gas/testsuite/gas/i386/x86-64-mpx-inval-2.l @@ -143,7 +143,7 @@ GAS LISTING .* [ ]*[1-9][0-9]*[ ]+bndstx %bnd3, base\(%rip\) [ ]*[1-9][0-9]*[ ]+\?\?\?\? 670F1B0D bndstx %bnd1, base\(%eip\) .* Error: 32-bit address isn't allowed in 64-bit MPX instructions\. -[ ]*[1-9][0-9]*[ ]+[0-9a-f][0-9a-f][0-9a-f]00000 +[ ]*[1-9][0-9]*[ ]+[0-9A-F]+ [ ]*[1-9][0-9]*[ ]+ [ ]*[1-9][0-9]*[ ]+\#\#\# bndldx [ ]*[1-9][0-9]*[ ]+\?\?\?\? 670F1A44 bndldx 0x3\(%eax,%ebx,1\), %bnd0 @@ -158,7 +158,7 @@ GAS LISTING .* [ ]*[1-9][0-9]*[ ]*bndldx base\(%rip\), %bnd1 [ ]*[1-9][0-9]*[ ]*\?\?\?\? 670F1A1D bndldx base\(%eip\), %bnd3 .* Error: 32-bit address isn't allowed in 64-bit MPX instructions\. -[ ]*[1-9][0-9]*[ ]+[0-9a-f][0-9a-f][0-9a-f]00000 +[ ]*[1-9][0-9]*[ ]+[0-9A-F]+ [ ]*[1-9][0-9]*[ ]+ [ ]*[1-9][0-9]*[ ]+\.intel_syntax noprefix [ ]*[1-9][0-9]*[ ]+\?\?\?\? 67F30F1B bndmk bnd1, \[eax\] @@ -236,7 +236,7 @@ GAS LISTING .* [ ]*[1-9][0-9]*[ ]+bndstx \[rip\+base\], bnd1 [ ]*[1-9][0-9]*[ ]+\?\?\?\? 670F1B1D bndstx \[eip\+base\], bnd3 .* Error: 32-bit address isn't allowed in 64-bit MPX instructions\. -[ ]*[1-9][0-9]*[ ]+[0-9a-f][0-9a-f][0-9a-f]00000 +[ ]*[1-9][0-9]*[ ]+[0-9A-F]+ [ ]*[1-9][0-9]*[ ]+bndstx \[rax\+rsp\], bnd3 [ ]*[1-9][0-9]*[ ]+ [ ]*[1-9][0-9]*[ ]+\#\#\# bndldx @@ -256,6 +256,6 @@ GAS LISTING .* [ ]*[1-9][0-9]*[ ]+bndldx bnd1, \[rip\+base\] [ ]*[1-9][0-9]*[ ]+\?\?\?\? 670F1A1D bndldx bnd3, \[eip\+base\] .* Error: 32-bit address isn't allowed in 64-bit MPX instructions\. -[ ]*[1-9][0-9]*[ ]+[0-9a-f][0-9a-f][0-9a-f]00000 +[ ]*[1-9][0-9]*[ ]+[0-9A-F]+ [ ]*[1-9][0-9]*[ ]+bndldx bnd3, \[rax\+rsp\] #pass diff --git a/gas/testsuite/gas/i386/x86-64-mpx-inval-2.s b/gas/testsuite/gas/i386/x86-64-mpx-inval-2.s index 0ff0e782497..dc555eb3bac 100644 --- a/gas/testsuite/gas/i386/x86-64-mpx-inval-2.s +++ b/gas/testsuite/gas/i386/x86-64-mpx-inval-2.s @@ -94,3 +94,6 @@ bndldx bnd1, [rip+base] bndldx bnd3, [eip+base] bndldx bnd3, [rax+rsp] + + # Force a good alignment. + .p2align 4,0 -- 2.30.2