]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-06-20 Julian Brown <julian@codesourcery.com>
authorcltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jun 2014 05:38:40 +0000 (05:38 +0000)
committercltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jun 2014 05:38:40 +0000 (05:38 +0000)
    Chung-Lin Tang  <cltang@codesourcery.com>

* config/arm/arm.c (arm_output_mi_thunk): Fix offset for
TARGET_THUMB1_ONLY. Add comments.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211834 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/arm.c

index 3e43695dc88c8dd676a722ed2f51f96a8cda2e46..03ce0d2b3cc76f6c9ba32370f53fa7ae2f1f876c 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-20  Julian Brown  <julian@codesourcery.com>
+           Chung-Lin Tang  <cltang@codesourcery.com>
+
+       * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
+       TARGET_THUMB1_ONLY. Add comments.
+
 2014-06-19  Tom de Vries  <tom@codesourcery.com>
 
        * config/aarch64/aarch64-protos.h (aarch64_emit_call_insn): Change
index d293b5b24f41bd75a59f04ff5032d756232a1df0..70682f1189e0d8023a6cd66686f86978e97001fc 100644 (file)
@@ -28455,9 +28455,13 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
       fputs (":\n", file);
       if (flag_pic)
        {
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
          rtx tem = XEXP (DECL_RTL (function), 0);
-         tem = plus_constant (GET_MODE (tem), tem, -7);
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
+            pipeline offset is four rather than eight.  Adjust the offset
+            accordingly.  */
+         tem = plus_constant (GET_MODE (tem), tem,
+                              TARGET_THUMB1_ONLY ? -3 : -7);
          tem = gen_rtx_MINUS (GET_MODE (tem),
                               tem,
                               gen_rtx_SYMBOL_REF (Pmode,