2006-04-07 Paul Brook <paul@codesourcery.com>

gas/
	* config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
gas/testsuite/
	* gas/arm/blx-local.d: New test.
	* gas/arm/blx-local.d: New test.
This commit is contained in:
Paul Brook 2006-04-07 15:08:04 +00:00
parent 53365c0d76
commit 7ae2971b7a
5 changed files with 47 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-04-07 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
2006-04-07 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (THUMB2_LOAD_BIT): Define.

View File

@ -11927,6 +11927,14 @@ md_apply_fix (fixS * fixP,
{
newval = md_chars_to_number (buf, INSN_SIZE);
newval |= (value >> 2) & 0x00ffffff;
/* Set the H bit on BLX instructions. */
if (temp == 1)
{
if (value & 2)
newval |= 0x01000000;
else
newval &= ~0x01000000;
}
md_number_to_chars (buf, newval, INSN_SIZE);
}
break;

View File

@ -1,3 +1,8 @@
2006-04-07 Paul Brook <paul@codesourcery.com>
* gas/arm/blx-local.d: New test.
* gas/arm/blx-local.d: New test.
2006-04-07 Paul Brook <paul@codesourcery.com>
* gas/arm/thumb2_pool.d: New test.

View File

@ -0,0 +1,14 @@
#name: Local BLX instructions
#objdump: -dr --prefix-addresses --show-raw-insn
#as:
# Test assembler resolution of blx instructions.
.*: +file format .*arm.*
Disassembly of section .text:
0+00 <[^>]*> fa000000 blx 00+8 <foo>
0+04 <[^>]*> fbffffff blx 00+a <foo2>
0+08 <[^>]*> 46c0 nop \(mov r8, r8\)
0+0a <[^>]*> 46c0 nop \(mov r8, r8\)

View File

@ -0,0 +1,16 @@
.text
.arch armv5t
.arm
one:
blx foo
blx foo2
.thumb
.type foo, %function
.thumb_func
foo:
nop
.type foo2, %function
.thumb_func
foo2:
nop