From 5d1268c689fd5b9f05d217392a04dc8cf4ff881a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 19 Oct 2010 17:13:30 +0000 Subject: [PATCH] Add testcase for PR gas/12049. 2010-10-19 H.J. Lu 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 | 10 ++++++++++ gas/testsuite/gas/i386/i386.exp | 2 ++ gas/testsuite/gas/i386/relax-1.d | 16 ++++++++++++++++ gas/testsuite/gas/i386/relax-1.s | 10 ++++++++++ gas/testsuite/gas/i386/relax-2.d | 16 ++++++++++++++++ gas/testsuite/gas/i386/relax-2.s | 10 ++++++++++ 6 files changed, 64 insertions(+) create mode 100644 gas/testsuite/gas/i386/relax-1.d create mode 100644 gas/testsuite/gas/i386/relax-1.s create mode 100644 gas/testsuite/gas/i386/relax-2.d create mode 100644 gas/testsuite/gas/i386/relax-2.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 9f0755fb0e4..89ea6b2106c 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2010-10-19 H.J. Lu + + 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 * 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 f4465c2839d..18710f934b8 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 00000000000..9075d760fbc --- /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 00000000000..9bae8d9b282 --- /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 00000000000..f04e71d99d3 --- /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 00000000000..f01aea4759a --- /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 -- 2.30.2