This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix for SH reg-prefix test
- From: Nick Clifton <nickc at redhat dot com>
- To: kraj at mvista dot com
- Cc: binutils at sources dot redhat dot com, gniibe at m17n dot org
- Date: Mon, 10 Oct 2005 09:22:34 +0100
- Subject: Fix for SH reg-prefix test
Hi Khem,
I am checking in the patch below to fix the new SH reg-prefix test.
There were two problems with it, which I only found out about this
weekend whilst running a full re-build/test cycle. The first is
that the original test used the "movli.l" instruction which does not
exist in the SH64 instruction set. So running the reg-prefix test
with, say, a toolchain configures as "--target=sh64-elf"" would
fail. I changed the instruction to "mov.l" which is supported by
both the 32-bit and 64-bit instruction sets.
The other problem was that the test was assuming a big-endian
assembly, which is the default for most SH targets but not for the
sh-symbianelf target. Since this target only supports a little
endian assembly, I have added an explicit switch to select little
endian, and adjusted the expected opcode values.
Cheers
Nick
gas/testsuite/ChangeLog
2005-10-10 Nick Clifton <nickc@redhat.com>
* gas/sh/reg-prefix.s: Use mov.l instruction in preference to
movli.l.
* gas/sh/reg-prefix.d: Force little endian assembly.
Index: gas/testsuite/gas/sh/reg-prefix.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/sh/reg-prefix.d,v
retrieving revision 1.1
diff -c -3 -p -r1.1 reg-prefix.d
*** gas/testsuite/gas/sh/reg-prefix.d 6 Oct 2005 11:44:07 -0000 1.1
--- gas/testsuite/gas/sh/reg-prefix.d 10 Oct 2005 08:04:32 -0000
***************
*** 1,9 ****
#objdump: -dr --prefix-addresses --show-raw-insn
! #as: --allow-reg-prefix
#name: SH --allow-reg-prefix option
# Test SH register names prefixed with $:
.*: file format elf.*sh.*
Disassembly of section .text:
! 0x00000000 01 63 movli.l @r1,r0
--- 1,10 ----
#objdump: -dr --prefix-addresses --show-raw-insn
! #as: --allow-reg-prefix -little
#name: SH --allow-reg-prefix option
# Test SH register names prefixed with $:
.*: file format elf.*sh.*
Disassembly of section .text:
! 0x00000000 12 60 mov\.l @r1,r0
!
Index: gas/testsuite/gas/sh/reg-prefix.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/sh/reg-prefix.s,v
retrieving revision 1.1
diff -c -3 -p -r1.1 reg-prefix.s
*** gas/testsuite/gas/sh/reg-prefix.s 6 Oct 2005 11:44:07 -0000 1.1
--- gas/testsuite/gas/sh/reg-prefix.s 10 Oct 2005 08:04:32 -0000
***************
*** 1,2 ****
.text
! movli.l @r1,$r0
--- 1,3 ----
.text
! mov.l @r1,$r0
!