x86: Pass -O0 to assembler for some tests

Message ID 20190318012117.14512-1-hjl.tools@gmail.com
State New
Headers show
Series
  • x86: Pass -O0 to assembler for some tests
Related show

Commit Message

H.J. Lu March 18, 2019, 1:21 a.m.
* testsuite/gas/i386/att-regs.d: Pass -O0 to assembler.
	* testsuite/gas/i386/avx512bw-intel.d: Likewise.
	* testsuite/gas/i386/avx512bw.d: Likewise.
	* testsuite/gas/i386/avx512f-intel.d: Likewise.
	* testsuite/gas/i386/avx512f.d: Likewise.
	* testsuite/gas/i386/disp32.d: Likewise.
	* testsuite/gas/i386/intel-regs.d: Likewise.
	* testsuite/gas/i386/pseudos.d: Likewise.
	* testsuite/gas/i386/x86-64-disp32.d: Likewise.
	* testsuite/gas/i386/x86-64-pseudos.d: Likewise.
---
 gas/ChangeLog                           | 13 +++++++++++++
 gas/testsuite/gas/i386/att-regs.d       |  1 +
 gas/testsuite/gas/i386/avx512bw-intel.d |  2 +-
 gas/testsuite/gas/i386/avx512bw.d       |  2 +-
 gas/testsuite/gas/i386/avx512f-intel.d  |  2 +-
 gas/testsuite/gas/i386/avx512f.d        |  2 +-
 gas/testsuite/gas/i386/disp32.d         |  2 +-
 gas/testsuite/gas/i386/intel-regs.d     |  1 +
 gas/testsuite/gas/i386/pseudos.d        |  1 +
 gas/testsuite/gas/i386/x86-64-disp32.d  |  2 +-
 gas/testsuite/gas/i386/x86-64-pseudos.d |  1 +
 11 files changed, 23 insertions(+), 6 deletions(-)

-- 
2.20.1

Comments

Jan Beulich March 18, 2019, 11:37 a.m. | #1
>>> On 18.03.19 at 02:21, <hjl.tools@gmail.com> wrote:

> 	* testsuite/gas/i386/att-regs.d: Pass -O0 to assembler.

> 	* testsuite/gas/i386/avx512bw-intel.d: Likewise.

> 	* testsuite/gas/i386/avx512bw.d: Likewise.

> 	* testsuite/gas/i386/avx512f-intel.d: Likewise.

> 	* testsuite/gas/i386/avx512f.d: Likewise.

> 	* testsuite/gas/i386/disp32.d: Likewise.

> 	* testsuite/gas/i386/intel-regs.d: Likewise.

> 	* testsuite/gas/i386/pseudos.d: Likewise.

> 	* testsuite/gas/i386/x86-64-disp32.d: Likewise.

> 	* testsuite/gas/i386/x86-64-pseudos.d: Likewise.


It would be pretty nice if there was at least one sentence here as
to why this change is needed and/or wanted. Repeating only what
goes into the ChangeLog is not very useful.

Fundamentally my question is: Isn't -O0 the default anyway? Why
would it be necessary to specify this on the command line of any
test case?

Jan
H.J. Lu March 19, 2019, 1:45 a.m. | #2
On Mon, Mar 18, 2019 at 7:37 PM Jan Beulich <JBeulich@suse.com> wrote:
>

> >>> On 18.03.19 at 02:21, <hjl.tools@gmail.com> wrote:

> >       * testsuite/gas/i386/att-regs.d: Pass -O0 to assembler.

> >       * testsuite/gas/i386/avx512bw-intel.d: Likewise.

> >       * testsuite/gas/i386/avx512bw.d: Likewise.

> >       * testsuite/gas/i386/avx512f-intel.d: Likewise.

> >       * testsuite/gas/i386/avx512f.d: Likewise.

> >       * testsuite/gas/i386/disp32.d: Likewise.

> >       * testsuite/gas/i386/intel-regs.d: Likewise.

> >       * testsuite/gas/i386/pseudos.d: Likewise.

> >       * testsuite/gas/i386/x86-64-disp32.d: Likewise.

> >       * testsuite/gas/i386/x86-64-pseudos.d: Likewise.

>

> It would be pretty nice if there was at least one sentence here as

> to why this change is needed and/or wanted. Repeating only what

> goes into the ChangeLog is not very useful.

>

> Fundamentally my question is: Isn't -O0 the default anyway? Why

> would it be necessary to specify this on the command line of any

> test case?

>


I have a patch to enable optimization by default via a configure
switch.

-- 
H.J.

Patch

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7c098621c4..0f0c5e5655 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,16 @@ 
+2019-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/gas/i386/att-regs.d: Pass -O0 to assembler.
+	* testsuite/gas/i386/avx512bw-intel.d: Likewise.
+	* testsuite/gas/i386/avx512bw.d: Likewise.
+	* testsuite/gas/i386/avx512f-intel.d: Likewise.
+	* testsuite/gas/i386/avx512f.d: Likewise.
+	* testsuite/gas/i386/disp32.d: Likewise.
+	* testsuite/gas/i386/intel-regs.d: Likewise.
+	* testsuite/gas/i386/pseudos.d: Likewise.
+	* testsuite/gas/i386/x86-64-disp32.d: Likewise.
+	* testsuite/gas/i386/x86-64-pseudos.d: Likewise.
+
 2019-03-18  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR gas/24348
diff --git a/gas/testsuite/gas/i386/att-regs.d b/gas/testsuite/gas/i386/att-regs.d
index 8b6c14fb0c..81bec44ea0 100644
--- a/gas/testsuite/gas/i386/att-regs.d
+++ b/gas/testsuite/gas/i386/att-regs.d
@@ -1,3 +1,4 @@ 
+#as: -O0
 #objdump: -drw
 #name: i386 AT&T register names
 
diff --git a/gas/testsuite/gas/i386/avx512bw-intel.d b/gas/testsuite/gas/i386/avx512bw-intel.d
index 635458d4d2..9ef82d31c1 100644
--- a/gas/testsuite/gas/i386/avx512bw-intel.d
+++ b/gas/testsuite/gas/i386/avx512bw-intel.d
@@ -1,4 +1,4 @@ 
-#as:
+#as: -O0
 #objdump: -dw -Mintel
 #name: i386 AVX512BW insns (Intel disassembly)
 #source: avx512bw.s
diff --git a/gas/testsuite/gas/i386/avx512bw.d b/gas/testsuite/gas/i386/avx512bw.d
index 51967bcca7..2b4c04a86d 100644
--- a/gas/testsuite/gas/i386/avx512bw.d
+++ b/gas/testsuite/gas/i386/avx512bw.d
@@ -1,4 +1,4 @@ 
-#as:
+#as: -O0
 #objdump: -dw
 #name: i386 AVX512BW insns
 #source: avx512bw.s
diff --git a/gas/testsuite/gas/i386/avx512f-intel.d b/gas/testsuite/gas/i386/avx512f-intel.d
index 27cea5eadc..de7a0c293a 100644
--- a/gas/testsuite/gas/i386/avx512f-intel.d
+++ b/gas/testsuite/gas/i386/avx512f-intel.d
@@ -1,4 +1,4 @@ 
-#as:
+#as: -O0
 #objdump: -dwMintel
 #name: i386 AVX512F insns (Intel disassembly)
 #source: avx512f.s
diff --git a/gas/testsuite/gas/i386/avx512f.d b/gas/testsuite/gas/i386/avx512f.d
index 01f4e83ce6..1f520934d3 100644
--- a/gas/testsuite/gas/i386/avx512f.d
+++ b/gas/testsuite/gas/i386/avx512f.d
@@ -1,4 +1,4 @@ 
-#as:
+#as: -O0
 #objdump: -dw
 #name: i386 AVX512F insns
 
diff --git a/gas/testsuite/gas/i386/disp32.d b/gas/testsuite/gas/i386/disp32.d
index 24ada8151a..9059f56c56 100644
--- a/gas/testsuite/gas/i386/disp32.d
+++ b/gas/testsuite/gas/i386/disp32.d
@@ -1,4 +1,4 @@ 
-#as:
+#as: -O0
 #objdump: -drw
 #name: i386 32bit displacement
 
diff --git a/gas/testsuite/gas/i386/intel-regs.d b/gas/testsuite/gas/i386/intel-regs.d
index 93a7feef24..65bcb6ca7d 100644
--- a/gas/testsuite/gas/i386/intel-regs.d
+++ b/gas/testsuite/gas/i386/intel-regs.d
@@ -1,3 +1,4 @@ 
+#as: -O0
 #objdump: -drw
 #name: i386 Intel register names
 
diff --git a/gas/testsuite/gas/i386/pseudos.d b/gas/testsuite/gas/i386/pseudos.d
index 18804b294c..00c10a520b 100644
--- a/gas/testsuite/gas/i386/pseudos.d
+++ b/gas/testsuite/gas/i386/pseudos.d
@@ -1,3 +1,4 @@ 
+#as: -O0
 #objdump: -drw
 #name: pseudo prefixes
 
diff --git a/gas/testsuite/gas/i386/x86-64-disp32.d b/gas/testsuite/gas/i386/x86-64-disp32.d
index da5dcb0db7..d6397bfeb7 100644
--- a/gas/testsuite/gas/i386/x86-64-disp32.d
+++ b/gas/testsuite/gas/i386/x86-64-disp32.d
@@ -1,4 +1,4 @@ 
-#as:
+#as: -O0
 #objdump: -drw
 #name: x86-64 32bit displacement
 
diff --git a/gas/testsuite/gas/i386/x86-64-pseudos.d b/gas/testsuite/gas/i386/x86-64-pseudos.d
index 55c42a06d1..e0074af843 100644
--- a/gas/testsuite/gas/i386/x86-64-pseudos.d
+++ b/gas/testsuite/gas/i386/x86-64-pseudos.d
@@ -1,3 +1,4 @@ 
+#as: -O0
 #objdump: -drw
 #name: x86-64 pseudo prefixes