This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ARM/FDPIC v6 23/24] [ARM] FDPIC: Implement libitm support.


From: Christophe Lyon <christophe.lyon@linaro.org>

The ldaddr macro in sjlj.S needs to be updated to support the FDPIC
model.

2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

	libitm/
	* config/arm/sjlj.S (ldaddr): Add FDPIC support.

Change-Id: Ieb2c6613363341d109c3500af0575b133b17407d

diff --git a/libitm/config/arm/sjlj.S b/libitm/config/arm/sjlj.S
index a9abf16..5d44964 100644
--- a/libitm/config/arm/sjlj.S
+++ b/libitm/config/arm/sjlj.S
@@ -49,7 +49,16 @@
 	.arch	armv7-m
 #endif
 
-#if defined(HAVE_MOVT) && defined(PIC)
+#if defined(__FDPIC__)
+.macro ldaddr reg, addr
+	ldr \reg, 99f
+	add \reg, \reg, r9
+.subsection 1
+	.align	2
+99:	.word	\addr(GOTOFF)
+.subsection 0
+.endm
+#elif defined(HAVE_MOVT) && defined(PIC)
 .macro ldaddr reg, addr
 	movw	\reg, #:lower16:(\addr - (98f + PC_OFS))
 	movt	\reg, #:upper16:(\addr - (98f + PC_OFS))
-- 
2.6.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]