summaryrefslogtreecommitdiffstats
path: root/libffi
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-09 19:51:54 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-09 19:51:54 +0000
commit82f442983b52fd6eba013e9a47048f679c479602 (patch)
tree53803eed9247f545eaea6677e149e3bb42ba114e /libffi
parent22af978f833fc390f31193e73d3e095886c10e54 (diff)
downloadppe42-gcc-82f442983b52fd6eba013e9a47048f679c479602.tar.gz
ppe42-gcc-82f442983b52fd6eba013e9a47048f679c479602.zip
* src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64
change to return value of ffi_closure_helper_DARWIN and load type from return type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/src/powerpc/aix_closure.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/libffi/src/powerpc/aix_closure.S b/libffi/src/powerpc/aix_closure.S
index c906017c459..aabd3c3c1ee 100644
--- a/libffi/src/powerpc/aix_closure.S
+++ b/libffi/src/powerpc/aix_closure.S
@@ -167,6 +167,7 @@ ffi_closure_ASM:
/* look up the proper starting point in table */
/* by using return type as offset */
+ lhz r3, 10(r3) /* load type from return type */
ld r4, LC..60(2) /* get address of jump table */
sldi r3, r3, 4 /* now multiply return type by 16 */
ld r0, 240+16(r1) /* load return address */
@@ -339,8 +340,9 @@ L..finish:
/* look up the proper starting point in table */
/* by using return type as offset */
+ lhz r3, 6(r3) /* load type from return type */
lwz r4, LC..60(2) /* get address of jump table */
- slwi r3, r3, 4 /* now multiply return type by 4 */
+ slwi r3, r3, 4 /* now multiply return type by 16 */
lwz r0, 176+8(r1) /* load return address */
add r3, r3, r4 /* add contents of table to table address */
mtctr r3
OpenPOWER on IntegriCloud