* gas/config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
* gas/testsuite/gas/arm/blx-local.d: New test.
* gas/testsuite/gas/arm/blx-local.d: New test.
2006-03-20 Paul Brook <paul@codesourcery.com>
-gas/
- * config/tc-arm.c (THUMB2_LOAD_BIT): Define.
+ * gas/config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
+
+ * gas/testsuite/gas/arm/blx-local.d: New test.
+ * gas/testsuite/gas/arm/blx-local.d: New test.
+
+2006-03-20 Paul Brook <paul@codesourcery.com>
+
+ * gas/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.
-gas/testsuite/
- * gas/arm/thumb2_pool.d: New test.
- * gas/arm/thumb2_pool.s: New test.
+
+ * gas/testsuite/gas/arm/thumb2_pool.d: New test.
+ * gas/testsuite/gas/arm/thumb2_pool.s: New test.
{
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;
--- /dev/null
+#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\)
--- /dev/null
+ .text
+ .arch armv5t
+ .arm
+one:
+ blx foo
+ blx foo2
+
+ .thumb
+ .type foo, %function
+ .thumb_func
+foo:
+ nop
+ .type foo2, %function
+ .thumb_func
+foo2:
+ nop
--- /dev/null
+# as: -march=armv6t2
+# objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0+000 <[^>]+> 4e04 ldr r6, \[pc, #16\] \(00+14 <[^>]+>\)
+0+002 <[^>]+> 4904 ldr r1, \[pc, #16\] \(00+14 <[^>]+>\)
+0+004 <[^>]+> f8df 600c ldr\.w r6, \[pc, #12\] ; 00+14 <[^>]+>
+0+008 <[^>]+> f8df 9008 ldr\.w r9, \[pc, #8\] ; 00+14 <[^>]+>
+0+00c <[^>]+> bf00 nop
+0+00e <[^>]+> f8df 5004 ldr\.w r5, \[pc, #4\] ; 00+14 <[^>]+>
+0+012 <[^>]+> 4900 ldr r1, \[pc, #0\] \(00+14 <[^>]+>\)
+0+014 <[^>]+> (5678|1234) .*
+0+016 <[^>]+> (1234|5678) .*
--- /dev/null
+ .text
+ .thumb
+ .syntax unified
+ .thumb_func
+thumb2_ldr:
+ ldr r6, =0x12345678
+ ldr.n r1, =0x12345678
+ ldr.w r6, =0x12345678
+ ldr r9, =0x12345678
+ nop
+ ldr.w r5, =0x12345678
+ ldr r1, =0x12345678
+ .pool