x86: Update assembler tests for non-ELF targets

Message ID 20180805170917.9826-1-hjl.tools@gmail.com
State New
Headers show
Series
  • x86: Update assembler tests for non-ELF targets
Related show

Commit Message

H.J. Lu Aug. 5, 2018, 5:09 p.m.
evex-no-scale.s has ELF directive:

.section .probe, "", @progbits

and non-ELF targets may pad text sections.

	* testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and
	evex-no-scale-64 only for ELF targets.
	* testsuite/gas/i386/prefix32.s: Append ".p2align 4,0".
	* testsuite/gas/i386/prefix64.s: Likewise.
	* testsuite/gas/i386/prefix32.l: Updated.
	* testsuite/gas/i386/prefix64.l: Likewise.
---
 gas/ChangeLog                     | 9 +++++++++
 gas/testsuite/gas/i386/i386.exp   | 6 ++++--
 gas/testsuite/gas/i386/prefix32.l | 2 ++
 gas/testsuite/gas/i386/prefix32.s | 2 ++
 gas/testsuite/gas/i386/prefix64.l | 2 ++
 gas/testsuite/gas/i386/prefix64.s | 2 ++
 6 files changed, 21 insertions(+), 2 deletions(-)

-- 
2.17.1

Comments

H.J. Lu Aug. 10, 2018, 6:30 p.m. | #1
On Sun, Aug 5, 2018 at 10:09 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> evex-no-scale.s has ELF directive:

>

> .section .probe, "", @progbits

>

> and non-ELF targets may pad text sections.

>

>         * testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and

>         evex-no-scale-64 only for ELF targets.

>         * testsuite/gas/i386/prefix32.s: Append ".p2align 4,0".

>         * testsuite/gas/i386/prefix64.s: Likewise.

>         * testsuite/gas/i386/prefix32.l: Updated.

>         * testsuite/gas/i386/prefix64.l: Likewise.

> ---

>  gas/ChangeLog                     | 9 +++++++++

>  gas/testsuite/gas/i386/i386.exp   | 6 ++++--

>  gas/testsuite/gas/i386/prefix32.l | 2 ++

>  gas/testsuite/gas/i386/prefix32.s | 2 ++

>  gas/testsuite/gas/i386/prefix64.l | 2 ++

>  gas/testsuite/gas/i386/prefix64.s | 2 ++

>  6 files changed, 21 insertions(+), 2 deletions(-)

>

> diff --git a/gas/ChangeLog b/gas/ChangeLog

> index 94b496bce9..5959b11f15 100644

> --- a/gas/ChangeLog

> +++ b/gas/ChangeLog

> @@ -1,3 +1,12 @@

> +2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>

> +

> +       * testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and

> +       evex-no-scale-64 only for ELF targets.

> +       * testsuite/gas/i386/prefix32.s: Append ".p2align 4,0".

> +       * testsuite/gas/i386/prefix64.s: Likewise.

> +       * testsuite/gas/i386/prefix32.l: Updated.

> +       * testsuite/gas/i386/prefix64.l: Likewise.

> +

>  2018-08-05  Alan Modra  <amodra@gmail.com>

>

>         * config/tc-ppc.c (ppc_elf_suffix): Support @notoc.

> diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp

> index 3cf1aa33fc..6ea4deef34 100644

> --- a/gas/testsuite/gas/i386/i386.exp

> +++ b/gas/testsuite/gas/i386/i386.exp

> @@ -225,7 +225,6 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]

>      run_dump_test "evex-lig512-intel"

>      run_dump_test "evex-wig1"

>      run_dump_test "evex-wig1-intel"

> -    run_dump_test "evex-no-scale-32"

>      run_dump_test "sse2avx"

>      run_list_test "inval-avx" "-al"

>      run_list_test "inval-avx512f" "-al"

> @@ -528,6 +527,8 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]

>         run_dump_test "nop-5"

>         run_dump_test "nop-6"

>

> +       run_dump_test "evex-no-scale-32"

> +

>         if { [gas_64_check] } then {

>             run_dump_test "att-regs"

>             run_dump_test "intel-regs"

> @@ -738,7 +739,6 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t

>      run_dump_test "x86-64-evex-lig512-intel"

>      run_dump_test "x86-64-evex-wig1"

>      run_dump_test "x86-64-evex-wig1-intel"

> -    run_dump_test "evex-no-scale-64"

>      run_dump_test "x86-64-sse2avx"

>      run_list_test "x86-64-inval-avx" "-al"

>      run_list_test "x86-64-inval-avx512f" "-al"

> @@ -1023,6 +1023,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t

>         run_dump_test "x86-64-nop-4"

>         run_dump_test "x86-64-nop-5"

>         run_dump_test "x86-64-nop-6"

> +

> +       run_dump_test "evex-no-scale-64"

>      }

>

>      set ASFLAGS "$old_ASFLAGS"


I backported the 386.exp change to 2.31 branch.

-- 
H.J.

Patch

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 94b496bce9..5959b11f15 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@ 
+2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and
+	evex-no-scale-64 only for ELF targets.
+	* testsuite/gas/i386/prefix32.s: Append ".p2align 4,0".
+	* testsuite/gas/i386/prefix64.s: Likewise.
+	* testsuite/gas/i386/prefix32.l: Updated.
+	* testsuite/gas/i386/prefix64.l: Likewise.
+
 2018-08-05  Alan Modra  <amodra@gmail.com>
 
 	* config/tc-ppc.c (ppc_elf_suffix): Support @notoc.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 3cf1aa33fc..6ea4deef34 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -225,7 +225,6 @@  if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
     run_dump_test "evex-lig512-intel"
     run_dump_test "evex-wig1"
     run_dump_test "evex-wig1-intel"
-    run_dump_test "evex-no-scale-32"
     run_dump_test "sse2avx"
     run_list_test "inval-avx" "-al"
     run_list_test "inval-avx512f" "-al"
@@ -528,6 +527,8 @@  if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
 	run_dump_test "nop-5"
 	run_dump_test "nop-6"
 
+	run_dump_test "evex-no-scale-32"
+
 	if { [gas_64_check] } then {
 	    run_dump_test "att-regs"
 	    run_dump_test "intel-regs"
@@ -738,7 +739,6 @@  if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
     run_dump_test "x86-64-evex-lig512-intel"
     run_dump_test "x86-64-evex-wig1"
     run_dump_test "x86-64-evex-wig1-intel"
-    run_dump_test "evex-no-scale-64"
     run_dump_test "x86-64-sse2avx"
     run_list_test "x86-64-inval-avx" "-al"
     run_list_test "x86-64-inval-avx512f" "-al"
@@ -1023,6 +1023,8 @@  if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
 	run_dump_test "x86-64-nop-4"
 	run_dump_test "x86-64-nop-5"
 	run_dump_test "x86-64-nop-6"
+
+	run_dump_test "evex-no-scale-64"
     }
 
     set ASFLAGS "$old_ASFLAGS"
diff --git a/gas/testsuite/gas/i386/prefix32.l b/gas/testsuite/gas/i386/prefix32.l
index ea7f304e98..41c8d8801c 100644
--- a/gas/testsuite/gas/i386/prefix32.l
+++ b/gas/testsuite/gas/i386/prefix32.l
@@ -32,3 +32,5 @@  GAS LISTING .*
 \*\*\*\*  Error: .*
 [ 	]*20[ 	]+data16 vaddps	%xmm0, %xmm0, %xmm0
 [ 	]*21[ 	]+data16 vaddpd	%xmm0, %xmm0, %xmm0
+[ 	]*22[ 	]*
+[ 	]*23[ 	]*[\?]+ 0+[ \t]+\.p2align	4,0
diff --git a/gas/testsuite/gas/i386/prefix32.s b/gas/testsuite/gas/i386/prefix32.s
index d20cb472a4..1ffdff1325 100644
--- a/gas/testsuite/gas/i386/prefix32.s
+++ b/gas/testsuite/gas/i386/prefix32.s
@@ -19,3 +19,5 @@  prefix:
 	data16 addpd	%xmm0, %xmm0
 	data16 vaddps	%xmm0, %xmm0, %xmm0
 	data16 vaddpd	%xmm0, %xmm0, %xmm0
+
+	.p2align	4,0
diff --git a/gas/testsuite/gas/i386/prefix64.l b/gas/testsuite/gas/i386/prefix64.l
index 0a5615acef..0659d9c04d 100644
--- a/gas/testsuite/gas/i386/prefix64.l
+++ b/gas/testsuite/gas/i386/prefix64.l
@@ -32,3 +32,5 @@  GAS LISTING .*
 \*\*\*\*  Error: .*
 [ 	]*20[ 	]+data16 vaddps	%xmm0, %xmm0, %xmm0
 [ 	]*21[ 	]+data16 vaddpd	%xmm0, %xmm0, %xmm0
+[ 	]*22[ 	]*
+[ 	]*23[ 	]*[\?]+ 0+[ \t]+\.p2align	4,0
diff --git a/gas/testsuite/gas/i386/prefix64.s b/gas/testsuite/gas/i386/prefix64.s
index ca79f49ccd..39fb477435 100644
--- a/gas/testsuite/gas/i386/prefix64.s
+++ b/gas/testsuite/gas/i386/prefix64.s
@@ -19,3 +19,5 @@  prefix:
 	data16 addpd	%xmm0, %xmm0
 	data16 vaddps	%xmm0, %xmm0, %xmm0
 	data16 vaddpd	%xmm0, %xmm0, %xmm0
+
+	.p2align	4,0