aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-10-19 17:13:30 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-10-19 17:13:30 +0000
commit5d1268c689fd5b9f05d217392a04dc8cf4ff881a (patch)
tree60e88090056ab970e2d778980ec67fa138fd79ad /gas
parent026ffab798b81c8b752a5b277361efec7b96b564 (diff)
downloadfsf-binutils-gdb-5d1268c689fd5b9f05d217392a04dc8cf4ff881a.zip
fsf-binutils-gdb-5d1268c689fd5b9f05d217392a04dc8cf4ff881a.tar.gz
fsf-binutils-gdb-5d1268c689fd5b9f05d217392a04dc8cf4ff881a.tar.bz2
Add testcase for PR gas/12049.
2010-10-19 H.J. Lu <hongjiu.lu@intel.com> PR gas/12049 * gas/i386/i386.exp: Run relax-1 and relax-2. * gas/i386/relax-1.d: New. * gas/i386/relax-1.s: Likewise. * gas/i386/relax-2.d: Likewise. * gas/i386/relax-2.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog10
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/relax-1.d16
-rw-r--r--gas/testsuite/gas/i386/relax-1.s10
-rw-r--r--gas/testsuite/gas/i386/relax-2.d16
-rw-r--r--gas/testsuite/gas/i386/relax-2.s10
6 files changed, 64 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 9f0755f..89ea6b2 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/12049
+ * gas/i386/i386.exp: Run relax-1 and relax-2.
+
+ * gas/i386/relax-1.d: New.
+ * gas/i386/relax-1.s: Likewise.
+ * gas/i386/relax-2.d: Likewise.
+ * gas/i386/relax-2.s: Likewise.
+
2010-10-18 Kai Tietz <kaI.tietz@onevision.com>
* gas/i386/disp32.d: Adjust initial symbol check.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index f4465c28..18710f9 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -199,6 +199,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "intelpic"
run_dump_test "relax"
+ run_dump_test "relax-1"
+ run_dump_test "relax-2"
run_dump_test "gotpc"
run_dump_test "tlsd"
run_dump_test "tlspic"
diff --git a/gas/testsuite/gas/i386/relax-1.d b/gas/testsuite/gas/i386/relax-1.d
new file mode 100644
index 0000000..9075d76
--- /dev/null
+++ b/gas/testsuite/gas/i386/relax-1.d
@@ -0,0 +1,16 @@
+#name: i386 relax 1
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <.text>:
+#...
+ e: e9 8d 00 00 00 jmp 0xa0
+#...
+ 21: eb 7d jmp 0xa0
+#...
+ a0: 90 nop
+#pass
diff --git a/gas/testsuite/gas/i386/relax-1.s b/gas/testsuite/gas/i386/relax-1.s
new file mode 100644
index 0000000..9bae8d9
--- /dev/null
+++ b/gas/testsuite/gas/i386/relax-1.s
@@ -0,0 +1,10 @@
+ .text
+ .fill 14, 1, 0x90
+ jmp .LBB1_23
+ .fill 14, 1, 0x90
+ jmp .LBB1_23
+ .fill 18, 1, 0x90
+ .align 16, 0x90
+ .fill 96, 1, 0x90
+.LBB1_23:
+ nop
diff --git a/gas/testsuite/gas/i386/relax-2.d b/gas/testsuite/gas/i386/relax-2.d
new file mode 100644
index 0000000..f04e71d
--- /dev/null
+++ b/gas/testsuite/gas/i386/relax-2.d
@@ -0,0 +1,16 @@
+#name: i386 relax 3
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <.text>:
+#...
+ 38: 0f 85 88 00 00 00 jne 0xc6
+#...
+ 48: 75 7c jne 0xc6
+#...
+ c6: 90 nop
+#pass
diff --git a/gas/testsuite/gas/i386/relax-2.s b/gas/testsuite/gas/i386/relax-2.s
new file mode 100644
index 0000000..f01aea4
--- /dev/null
+++ b/gas/testsuite/gas/i386/relax-2.s
@@ -0,0 +1,10 @@
+ .text
+ .fill 56, 1, 0x90
+ jne .LBB0_43
+ .fill 10, 1, 0x90
+ jne .LBB0_43
+ .fill 5, 1, 0x90
+ .align 16, 0x90
+ .fill 118, 1, 0x90
+.LBB0_43:
+ nop