aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/libitm/config/powerpc/sjlj.S
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/libitm/config/powerpc/sjlj.S')
-rw-r--r--gcc-4.8/libitm/config/powerpc/sjlj.S24
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc-4.8/libitm/config/powerpc/sjlj.S b/gcc-4.8/libitm/config/powerpc/sjlj.S
index 1f4a100f9..4a0b43dbb 100644
--- a/gcc-4.8/libitm/config/powerpc/sjlj.S
+++ b/gcc-4.8/libitm/config/powerpc/sjlj.S
@@ -26,7 +26,26 @@
#include "asmcfi.h"
-#if defined(__powerpc64__) && defined(__ELF__)
+#if defined(__powerpc64__) && _CALL_ELF == 2
+.macro FUNC name
+ .globl \name
+ .type \name, @function
+\name:
+0: addis 2,12,(.TOC.-0b)@ha
+ addi 2,2,(.TOC.-0b)@l
+ .localentry \name, . - \name
+.endm
+.macro END name
+ .size \name, . - \name
+.endm
+.macro HIDDEN name
+ .hidden \name
+.endm
+.macro CALL name
+ bl \name
+ nop
+.endm
+#elif defined(__powerpc64__) && defined(__ELF__)
.macro FUNC name
.globl \name, .\name
.section ".opd","aw"
@@ -117,6 +136,9 @@ _$0:
#if defined(_CALL_AIXDESC)
# define BASE 6*WS
# define LR_SAVE 2*WS
+#elif _CALL_ELF == 2
+# define BASE 6*WS
+# define LR_SAVE 2*WS
#elif defined(_CALL_SYSV)
# define BASE 2*WS
# define LR_SAVE 1*WS