aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2014-06-20 05:38:40 +0000
committerChung-Lin Tang <cltang@gcc.gnu.org>2014-06-20 05:38:40 +0000
commit6d45574aa297574840e7b0d4ab3ec13f7d9d5b64 (patch)
tree3dcd1797e1107e78f3ae5ecc70398473b70ed9cc
parent27a4e2d0fe7d74ca654f98ef8707982b44799dca (diff)
downloadgcc-6d45574aa297574840e7b0d4ab3ec13f7d9d5b64.zip
gcc-6d45574aa297574840e7b0d4ab3ec13f7d9d5b64.tar.gz
gcc-6d45574aa297574840e7b0d4ab3ec13f7d9d5b64.tar.bz2
arm.c (arm_output_mi_thunk): Fix offset for TARGET_THUMB1_ONLY.
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. Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> From-SVN: r211834
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e43695..03ce0d2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index d293b5b..70682f1 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -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,