From 77b63882047925261fa7e251d524fbc06bf315f3 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Wed, 22 May 2002 13:31:43 +0000 Subject: * gas/sh/pcrel-coff.s: New file. * gas/sh/pcrel-coff.d: Likewise. * gas/sh/basic.exp: For coff, don't do dsp test, and a modified pcrel test. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/sh/basic.exp | 15 +++++++++++---- gas/testsuite/gas/sh/pcrel-coff.d | 27 +++++++++++++++++++++++++++ gas/testsuite/gas/sh/pcrel-coff.s | 14 ++++++++++++++ 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 gas/testsuite/gas/sh/pcrel-coff.d create mode 100644 gas/testsuite/gas/sh/pcrel-coff.s (limited to 'gas') diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 08c864d..0233342 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +Wed May 22 14:26:07 2002 J"orn Rennecke + + * gas/sh/pcrel-coff.s: New file. + * gas/sh/pcrel-coff.d: Likewise. + * gas/sh/basic.exp: For coff, don't do dsp test, + and a modified pcrel test. + 2002-05-22 Thiemo Seufer * gas/mips/rol64.s: New file, test of drol, dror macros. diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp index 1f96086..e3b4d90 100644 --- a/gas/testsuite/gas/sh/basic.exp +++ b/gas/testsuite/gas/sh/basic.exp @@ -88,12 +88,19 @@ proc do_fp {} { if [istarget sh*-*-*] then { # Test the basic instruction parser. do_fp - # Test DSP instructions - run_dump_test "dsp" + + # coff is missing information about the machine type, so everything is + # dumped as sh4. + if {[istarget sh*-*coff] || [istarget sh*-hms]} then { + run_dump_test "pcrel-coff" + } else { + # Test DSP instructions + run_dump_test "dsp" + + run_dump_test "pcrel" + } if {[istarget sh*-*elf] || [istarget sh*-linux*]} then { run_dump_test "pic" } - - run_dump_test "pcrel" } diff --git a/gas/testsuite/gas/sh/pcrel-coff.d b/gas/testsuite/gas/sh/pcrel-coff.d new file mode 100644 index 0000000..4255392 --- /dev/null +++ b/gas/testsuite/gas/sh/pcrel-coff.d @@ -0,0 +1,27 @@ +#as: -big +#objdump: -d +#name: PC-relative loads + +.*: file format .*sh.* + +Disassembly of section .text: + +00000000 : + 0: d1 03 mov\.l 10 ,r1 ! 0xfffffff0 + 2: d1 03 mov\.l 10 ,r1 ! 0xfffffff0 + 4: c7 02 mova 10 ,r0 + 6: 61 02 mov\.l @r0,r1 + 8: d1 01 mov\.l 10 ,r1 ! 0xfffffff0 + a: 01 03 bsrf r1 + c: 00 09 nop + e: 00 09 nop + +00000010 : + 10: ff ff \.word 0xffff + 12: ff f0 fadd fr15,fr15 + 14: 00 09 nop + 16: 00 09 nop + 18: 00 09 nop + 1a: 00 09 nop + 1c: 00 09 nop + 1e: 00 09 nop diff --git a/gas/testsuite/gas/sh/pcrel-coff.s b/gas/testsuite/gas/sh/pcrel-coff.s new file mode 100644 index 0000000..d2df07a --- /dev/null +++ b/gas/testsuite/gas/sh/pcrel-coff.s @@ -0,0 +1,14 @@ + .text + + .p2align 2 +code: + mov.l litpool, r1 + mov.l @(14,pc), r1 + mova @(litpool-.,pc), r0 + mov.l @r0,r1 + mov.l @(litpool-.,pc), r1 + bsrf r1 + nop + nop +litpool: + .long code - . -- cgit v1.1