This is the mail archive of the
mailing list for the binutils project.
Commit: MN10300: Fix relaxation of "mov imm32, An" instructions
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 08 Nov 2011 15:12:36 +0000
- Subject: Commit: MN10300: Fix relaxation of "mov imm32, An" instructions
I am applying the patch below to fix a problem with MN10300 linker's
relaxation of "mov imm32, An" instructions. The test to stop this
relaxation when the value is negative (since the 16-bit version of the
instruction zero-extends rather than sign-extends) was not correctly
masking out the address register bits.
Tested by building and running the G++ testsuite for an mn10300-elf
toolchain, both with and without relaxation enabled.
2011-11-08 Nick Clifton <email@example.com>
* elf-m10300.c (mn10300_elf_relax_section): Fix check for an
immediate move into an address register.
RCS file: /cvs/src/src/bfd/elf-m10300.c,v
retrieving revision 1.109
diff -u -3 -p -r1.109 elf-m10300.c
--- bfd/elf-m10300.c 19 Oct 2011 07:17:19 -0000 1.109
+++ bfd/elf-m10300.c 8 Nov 2011 15:03:15 -0000
@@ -3604,8 +3604,8 @@ mn10300_elf_relax_section (bfd *abfd,
&& (value & 0x8000))
- /* mov imm16, an zero-extends the immediate. */
- if (code == 0xdc
+ /* "mov imm16, an" zero-extends the immediate. */
+ if ((code & 0xfc) == 0xdc
&& (long) value < 0)