aix_closure.S (ffi_closure_ASM): Adjust for Darwin64 change to return value of ffi_cl...
authorDavid Edelsohn <dje@gcc.gnu.org>
Fri, 9 Mar 2012 19:51:54 +0000 (14:51 -0500)
committerDavid Edelsohn <dje@gcc.gnu.org>
Fri, 9 Mar 2012 19:51:54 +0000 (14:51 -0500)
        * 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.

From-SVN: r185152

libffi/src/powerpc/aix_closure.S

index c906017c45992f53ac642df0b5a063926699f496..aabd3c3c1eedf9749bc19c68d741b87084ca1f48 100644 (file)
@@ -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