OSDN Git Service

2006-04-07 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Fri, 7 Apr 2006 15:08:04 +0000 (15:08 +0000)
committerPaul Brook <paul@codesourcery.com>
Fri, 7 Apr 2006 15:08:04 +0000 (15:08 +0000)
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.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/blx-local.d [new file with mode: 0644]
gas/testsuite/gas/arm/blx-local.s [new file with mode: 0644]

index 84cee21..7e7b0df 100644 (file)
@@ -1,5 +1,9 @@
 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.
        (move_or_literal_pool): Handle Thumb-2 instructions.
        (do_t_ldst): Call move_or_literal_pool for =N addressing modes.
index bf91b89..54cd349 100644 (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;
index 6a569df..0172771 100644 (file)
@@ -1,5 +1,10 @@
 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.
        * 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 (file)
index 0000000..5c868ff
--- /dev/null
@@ -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\)
diff --git a/gas/testsuite/gas/arm/blx-local.s b/gas/testsuite/gas/arm/blx-local.s
new file mode 100644 (file)
index 0000000..c85a562
--- /dev/null
@@ -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