From: aoliva Date: Mon, 4 Feb 2002 12:29:31 +0000 (+0000) Subject: * gas/testsuite/gas/sh/pcrel.d: New test. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=9dc5501a5a62f7f5aa1ab06f7edb10d7c2677bd7;p=pf3gnuchains%2Fsourceware.git * gas/testsuite/gas/sh/pcrel.d: New test. * gas/testsuite/gas/sh/pcrel.s: Sources for new test. * gas/testsuite/gas/sh/basic.exp: Run it. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index c7edba1542..26f820ddc7 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-02-04 Alexandre Oliva + + * gas/testsuite/gas/sh/pcrel.d: New test. + * gas/testsuite/gas/sh/pcrel.s: Sources for new test. + * gas/testsuite/gas/sh/basic.exp: Run it. + 2002-02-04 Hans-Peter Nilsson * gas/mmix/basep-8.d, gas/mmix/basep-9.s, gas/mmix/basep-9.d, diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp index 905a3d27c1..c606dea6ac 100644 --- a/gas/testsuite/gas/sh/basic.exp +++ b/gas/testsuite/gas/sh/basic.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -90,4 +90,6 @@ if [istarget sh*-*-*] then { do_fp # Test DSP instructions run_dump_test "dsp" + + run_dump_test "pcrel" } diff --git a/gas/testsuite/gas/sh/pcrel.d b/gas/testsuite/gas/sh/pcrel.d new file mode 100644 index 0000000000..2501fbe1d2 --- /dev/null +++ b/gas/testsuite/gas/sh/pcrel.d @@ -0,0 +1,21 @@ +#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 \.word 0xfff0 diff --git a/gas/testsuite/gas/sh/pcrel.s b/gas/testsuite/gas/sh/pcrel.s new file mode 100644 index 0000000000..d2df07a93b --- /dev/null +++ b/gas/testsuite/gas/sh/pcrel.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 - .