Add testcase for PR gas/12049.
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Oct 2010 17:13:30 +0000 (17:13 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Oct 2010 17:13:30 +0000 (17:13 +0000)
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.

gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/relax-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/relax-1.s [new file with mode: 0644]
gas/testsuite/gas/i386/relax-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/relax-2.s [new file with mode: 0644]

index 9f0755f..89ea6b2 100644 (file)
@@ -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.
index f4465c2..18710f9 100644 (file)
@@ -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 (file)
index 0000000..9075d76
--- /dev/null
@@ -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 (file)
index 0000000..9bae8d9
--- /dev/null
@@ -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 (file)
index 0000000..f04e71d
--- /dev/null
@@ -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 (file)
index 0000000..f01aea4
--- /dev/null
@@ -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