summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-31 03:45:34 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-31 03:45:34 +0000
commit1ef600dde4e88a4452e6dd5bd89e6ceb91e82ee0 (patch)
treef5f83c4fb40c1b7d7003307eb173e00a4cde3a86
parent70b94afd8df5453589c80f870400b8b51de04929 (diff)
downloadgcc-1ef600dde4e88a4452e6dd5bd89e6ceb91e82ee0.tar.gz
* src/powerpc/linux64_closure.S: Add new ABI support.
* src/powerpc/linux64.S: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193015 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/powerpc/linux64.S21
-rw-r--r--libffi/src/powerpc/linux64_closure.S20
3 files changed, 42 insertions, 4 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 9d31a064930..56d77254299 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-31 Alan Modra <amodra@gmail.com>
+
+ * src/powerpc/linux64_closure.S: Add new ABI support.
+ * src/powerpc/linux64.S: Likewise.
+
2012-09-14 David Edelsohn <dje.gcc@gmail.com>
* configure: Regenerated.
diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S
index 57b56cbb266..f28da8120b7 100644
--- a/libffi/src/powerpc/linux64.S
+++ b/libffi/src/powerpc/linux64.S
@@ -30,16 +30,25 @@
#include <ffi.h>
#ifdef __powerpc64__
- .hidden ffi_call_LINUX64, .ffi_call_LINUX64
- .globl ffi_call_LINUX64, .ffi_call_LINUX64
+ .hidden ffi_call_LINUX64
+ .globl ffi_call_LINUX64
.section ".opd","aw"
.align 3
ffi_call_LINUX64:
+#ifdef _CALL_LINUX
+ .quad .L.ffi_call_LINUX64,.TOC.@tocbase,0
+ .type ffi_call_LINUX64,@function
+ .text
+.L.ffi_call_LINUX64:
+#else
+ .hidden .ffi_call_LINUX64
+ .globl .ffi_call_LINUX64
.quad .ffi_call_LINUX64,.TOC.@tocbase,0
.size ffi_call_LINUX64,24
.type .ffi_call_LINUX64,@function
.text
.ffi_call_LINUX64:
+#endif
.LFB1:
mflr %r0
std %r28, -32(%r1)
@@ -58,7 +67,11 @@ ffi_call_LINUX64:
/* Call ffi_prep_args64. */
mr %r4, %r1
+#ifdef _CALL_LINUX
+ bl ffi_prep_args64
+#else
bl .ffi_prep_args64
+#endif
ld %r0, 0(%r29)
ld %r2, 8(%r29)
@@ -137,7 +150,11 @@ ffi_call_LINUX64:
.LFE1:
.long 0
.byte 0,12,0,1,128,4,0,0
+#ifdef _CALL_LINUX
+ .size ffi_call_LINUX64,.-.L.ffi_call_LINUX64
+#else
.size .ffi_call_LINUX64,.-.ffi_call_LINUX64
+#endif
.section .eh_frame,EH_FRAME_FLAGS,@progbits
.Lframe1:
diff --git a/libffi/src/powerpc/linux64_closure.S b/libffi/src/powerpc/linux64_closure.S
index f7aa2c98efc..b1e12197a2b 100644
--- a/libffi/src/powerpc/linux64_closure.S
+++ b/libffi/src/powerpc/linux64_closure.S
@@ -32,16 +32,24 @@
#ifdef __powerpc64__
FFI_HIDDEN (ffi_closure_LINUX64)
- FFI_HIDDEN (.ffi_closure_LINUX64)
- .globl ffi_closure_LINUX64, .ffi_closure_LINUX64
+ .globl ffi_closure_LINUX64
.section ".opd","aw"
.align 3
ffi_closure_LINUX64:
+#ifdef _CALL_LINUX
+ .quad .L.ffi_closure_LINUX64,.TOC.@tocbase,0
+ .type ffi_closure_LINUX64,@function
+ .text
+.L.ffi_closure_LINUX64:
+#else
+ FFI_HIDDEN (.ffi_closure_LINUX64)
+ .globl .ffi_closure_LINUX64
.quad .ffi_closure_LINUX64,.TOC.@tocbase,0
.size ffi_closure_LINUX64,24
.type .ffi_closure_LINUX64,@function
.text
.ffi_closure_LINUX64:
+#endif
.LFB1:
# save general regs into parm save area
std %r3, 48(%r1)
@@ -91,7 +99,11 @@ ffi_closure_LINUX64:
addi %r6, %r1, 128
# make the call
+#ifdef _CALL_LINUX
+ bl ffi_closure_helper_LINUX64
+#else
bl .ffi_closure_helper_LINUX64
+#endif
.Lret:
# now r3 contains the return type
@@ -194,7 +206,11 @@ ffi_closure_LINUX64:
.LFE1:
.long 0
.byte 0,12,0,1,128,0,0,0
+#ifdef _CALL_LINUX
+ .size ffi_closure_LINUX64,.-.L.ffi_closure_LINUX64
+#else
.size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64
+#endif
.section .eh_frame,EH_FRAME_FLAGS,@progbits
.Lframe1: