aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-02-14 14:03:19 +0100
committerJan Beulich <jbeulich@suse.com>2020-02-14 14:03:19 +0100
commit92334ad2c6ad3aef4f78894c4d0f2794255317b3 (patch)
tree96c8e60b4c9261a439d9aea06ba7b123bda9d281 /gas/testsuite
parent514a8bb031f64fc31a4d534249b9e3dfad171b28 (diff)
downloadgdb-92334ad2c6ad3aef4f78894c4d0f2794255317b3.zip
gdb-92334ad2c6ad3aef4f78894c4d0f2794255317b3.tar.gz
gdb-92334ad2c6ad3aef4f78894c4d0f2794255317b3.tar.bz2
x86: optimize away pointless segment overrides
When optimizing there's no point keeping the segment overrides when we warn about their presence in the first place.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/lea-optimize.d13
2 files changed, 14 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 147297e..258fb76 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -502,6 +502,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_list_test "optimize-6a" "-I${srcdir}/$subdir -march=+noavx -al"
run_dump_test "optimize-6b"
run_list_test "optimize-7" "-I${srcdir}/$subdir -march=+noavx2 -al"
+ run_dump_test "lea-optimize"
run_dump_test "align-branch-1a"
run_dump_test "align-branch-1b"
run_dump_test "align-branch-1c"
diff --git a/gas/testsuite/gas/i386/lea-optimize.d b/gas/testsuite/gas/i386/lea-optimize.d
new file mode 100644
index 0000000..16e5b82
--- /dev/null
+++ b/gas/testsuite/gas/i386/lea-optimize.d
@@ -0,0 +1,13 @@
+#as: -O -q
+#objdump: -dw
+#name: i386 LEA-like segment overrride dropping
+#source: lea.s
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <start>:
+[ ]*[0-9a-f]+:[ ]+8d 00[ ]+lea[ ]+\(%eax\),%eax
+[ ]*[0-9a-f]+:[ ]+8d 00[ ]+lea[ ]+\(%eax\),%eax
+#pass