From a5f21126be4081334129fb251980d8825f872bdb Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 17 Mar 2011 13:16:44 +0000 Subject: [PATCH] Add a testase for PR gas/12589. 2011-03-17 H.J. Lu PR gas/12589 * gas/i386/pr12589-1.d: New. * gas/i386/pr12589-1.s: Likewise. * gas/i386/i386.exp: Run pr12589-1. --- gas/testsuite/ChangeLog | 8 ++++++++ gas/testsuite/gas/i386/i386.exp | 3 +++ gas/testsuite/gas/i386/pr12589-1.d | 16 ++++++++++++++++ gas/testsuite/gas/i386/pr12589-1.s | 9 +++++++++ 4 files changed, 36 insertions(+) create mode 100644 gas/testsuite/gas/i386/pr12589-1.d create mode 100644 gas/testsuite/gas/i386/pr12589-1.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 66347819ccc..155f1a97b5e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-03-17 H.J. Lu + + PR gas/12589 + * gas/i386/pr12589-1.d: New. + * gas/i386/pr12589-1.s: Likewise. + + * gas/i386/i386.exp: Run pr12589-1. + 2011-03-16 H.J. Lu * gas/i386/bad-size.d: New. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index ea5cdac2ac5..0eb151fca04 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -239,6 +239,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "secrel" } + # Miscellaneous tests. + run_dump_test "pr12589-1" + set ASFLAGS "$old_ASFLAGS" } diff --git a/gas/testsuite/gas/i386/pr12589-1.d b/gas/testsuite/gas/i386/pr12589-1.d new file mode 100644 index 00000000000..a89f2253074 --- /dev/null +++ b/gas/testsuite/gas/i386/pr12589-1.d @@ -0,0 +1,16 @@ +#name: i386 jump +#objdump: -drw + +.*: +file format .*i386.* + +Disassembly of section .text: + +0+ <_start>: +[ ]*[a-f0-9]+: eb 02 jmp 4 + +0+2 : + ... + +0+4 : +[ ]*[a-f0-9]+: 89 c0 mov %eax,%eax +#pass diff --git a/gas/testsuite/gas/i386/pr12589-1.s b/gas/testsuite/gas/i386/pr12589-1.s new file mode 100644 index 00000000000..19a37ccbab6 --- /dev/null +++ b/gas/testsuite/gas/i386/pr12589-1.s @@ -0,0 +1,9 @@ + .text + .globl _start +_start: + jmp scn_pnp +zerob: + zeroln = zerob - _start + .=.+zeroln +scn_pnp: + mov %eax,%eax -- 2.30.2