From: Paul Brook Date: Fri, 7 Apr 2006 15:08:04 +0000 (+0000) Subject: 2006-04-07 Paul Brook X-Git-Tag: insight_6_8-branchpoint~3555 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=97f3bd3af96cabb0130a2ab0e5d9f0c519e26e2a;p=pf3gnuchains%2Fpf3gnuchains4x.git 2006-04-07 Paul Brook 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 84cee21a71..7e7b0df4db 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2006-04-07 Paul Brook + * config/tc-arm.c (md_apply_fix): Set H bit on blx instruction. + +2006-04-07 Paul Brook + * config/tc-arm.c (THUMB2_LOAD_BIT): Define. (move_or_literal_pool): Handle Thumb-2 instructions. (do_t_ldst): Call move_or_literal_pool for =N addressing modes. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index bf91b89e64..54cd349d59 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -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; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 6a569df856..0172771a3d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2006-04-07 Paul Brook + * gas/arm/blx-local.d: New test. + * gas/arm/blx-local.d: New test. + +2006-04-07 Paul Brook + * gas/arm/thumb2_pool.d: New test. * gas/arm/thumb2_pool.s: New test. diff --git a/gas/testsuite/gas/arm/blx-local.d b/gas/testsuite/gas/arm/blx-local.d new file mode 100644 index 0000000000..5c868ff093 --- /dev/null +++ b/gas/testsuite/gas/arm/blx-local.d @@ -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 +0+04 <[^>]*> fbffffff blx 00+a +0+08 <[^>]*> 46c0 nop \(mov r8, r8\) +0+0a <[^>]*> 46c0 nop \(mov r8, r8\) diff --git a/gas/testsuite/gas/arm/blx-local.s b/gas/testsuite/gas/arm/blx-local.s new file mode 100644 index 0000000000..c85a562d90 --- /dev/null +++ b/gas/testsuite/gas/arm/blx-local.s @@ -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