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 84cee21a71caf5768caafea0fc351b79359454dd..7e7b0df4dbcd73b5eb4096383223045c3d410aaf 100644 (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.
index bf91b89e64735eb602ad6c9d8f1f119fc310e1af..54cd349d59d604fe5f5e719416acb355b085b991 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 6a569df8562d61882703aad1b0b0ad4344b5b976..0172771a3de00cdaf6f8df331b4bdb547e2f4bb4 100644 (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.
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
This page took 0.034183 seconds and 4 git commands to generate.