diff options
author | Alan Modra <amodra@gmail.com> | 2011-02-07 00:04:09 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-02-07 00:04:09 +0000 |
commit | 32a96f364b9e54a5f42d8367ef770efead63cd50 (patch) | |
tree | 3f7ebe5c23c45e76aa0c656852491ccf612b4f15 /gas | |
parent | 66ab83dd8a1cf1004c2e64d9846872eb38995989 (diff) | |
download | gdb-32a96f364b9e54a5f42d8367ef770efead63cd50.zip gdb-32a96f364b9e54a5f42d8367ef770efead63cd50.tar.gz gdb-32a96f364b9e54a5f42d8367ef770efead63cd50.tar.bz2 |
PR gas/3041
* gas/m68k/p3041pcrel.s, * gas/m68k/p3041pcrel.d: New test.
* gas/m68k/all.exp: Add "p3041pcrel" and enable p3041 tests for
all m68k-aout targets.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/m68k/all.exp | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/m68k/p3041pcrel.d | 38 | ||||
-rw-r--r-- | gas/testsuite/gas/m68k/p3041pcrel.s | 28 |
4 files changed, 75 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 412fbc0..166d8db 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-02-07 Vincent Riviere <vincent.riviere@freesbee.fr> + + PR gas/3041 + * gas/m68k/p3041pcrel.s, * gas/m68k/p3041pcrel.d: New test. + * gas/m68k/all.exp: Add "p3041pcrel" and enable p3041 tests for + all m68k-aout targets. + 2011-02-04 Bernd Schmidt <bernds@codesourcery.com> * gas/tic6x/dir-junk.l: Remove tests for .atomic and .noatomic. diff --git a/gas/testsuite/gas/m68k/all.exp b/gas/testsuite/gas/m68k/all.exp index f4bdfa7..b3db085 100644 --- a/gas/testsuite/gas/m68k/all.exp +++ b/gas/testsuite/gas/m68k/all.exp @@ -71,9 +71,10 @@ if { [istarget m68*-*-*] || [istarget fido*-*-*] } then { gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab" - if { [istarget *-*-netbsd] } then { + if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then { run_dump_test p3041 run_dump_test p3041data + run_dump_test p3041pcrel } set testname "68000 operands" diff --git a/gas/testsuite/gas/m68k/p3041pcrel.d b/gas/testsuite/gas/m68k/p3041pcrel.d new file mode 100644 index 0000000..91168cc --- /dev/null +++ b/gas/testsuite/gas/m68k/p3041pcrel.d @@ -0,0 +1,38 @@ +#name: PR 3041 pcrel +#as: -m68000 +#objdump: -tdr + +.*: file format .* + +SYMBOL TABLE: +00000024 w \.text 0000 00 0f mytext +0000002e w \.data 0000 00 10 mydata +0000003a w \.bss 0000 00 11 mybss + +Disassembly of section \.text: + +00000000 <.*>: + 0: 41fa fffe lea %pc@\(0 <.*>\),%a0 + 2: DISP16 mytext + 4: 41fa fffc lea %pc@\(2 <.*>\),%a0 + 6: DISP16 mytext + 8: 41fa fff2 lea %pc@\(fffffffc <.*>\),%a0 + a: DISP16 mytext + c: 41fa fff2 lea %pc@\(0 <.*>\),%a0 + e: DISP16 mydata + 10: 41fa fff1 lea %pc@\(3 <.*>\),%a0 + 12: DISP16 mydata + 14: 41fa ffe9 lea %pc@\(ffffffff <.*>\),%a0 + 16: DISP16 mydata + 18: 41fa ffe6 lea %pc@\(0 <.*>\),%a0 + 1a: DISP16 mybss + 1c: 41fa ffe3 lea %pc@\(1 <.*>\),%a0 + 1e: DISP16 mybss + 20: 41fa ffdc lea %pc@\(fffffffe <.*>\),%a0 + 22: DISP16 mybss + +00000024 <mytext>: + 24: 4e71 nop + 26: 4e71 nop + 28: 4e71 nop + 2a: 4e71 nop diff --git a/gas/testsuite/gas/m68k/p3041pcrel.s b/gas/testsuite/gas/m68k/p3041pcrel.s new file mode 100644 index 0000000..59d61ea --- /dev/null +++ b/gas/testsuite/gas/m68k/p3041pcrel.s @@ -0,0 +1,28 @@ + lea mytext(%pc),%a0 + lea mytext+2(%pc),%a0 + lea mytext-4(%pc),%a0 + lea mydata(%pc),%a0 + lea mydata+3(%pc),%a0 + lea mydata-1(%pc),%a0 + lea mybss(%pc),%a0 + lea mybss+1(%pc),%a0 + lea mybss-2(%pc),%a0 + .weak mytext +mytext: + nop + nop + nop + nop + + .data + .word 0x8081 + .weak mydata +mydata: + .word 0x8283 + .word 0x8485 + + .bss + .skip 6 + .weak mybss +mybss: + .skip 2 |