diff mbox series

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

Message ID 20190909154526.11630-24-christophe.lyon@st.com
State New
Headers show
Series FDPIC ABI for ARM | expand

Commit Message

Christophe Lyon Sept. 9, 2019, 3:45 p.m. UTC
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

-- 
2.6.3
diff mbox series

Patch

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))