From 590663b30b1f35b6136cf55d8870a2394ed78c21 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 18 Nov 2014 12:56:58 +1030 Subject: [PATCH] powerpc: Fix ffi_go_closure_linux64 Unlike ffi_closure_LINUX64, this entry point is called normally, so we already have the TOC in R2 and the closure in R11. * powerpc/linux64_closure.S (ffi_closure_LINUX64): Remove a register dependency chain. (ffi_go_closure_linux64): Don't load r11 or r2. --- src/powerpc/linux64_closure.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/powerpc/linux64_closure.S b/src/powerpc/linux64_closure.S index 1364225..6487d2a 100644 --- a/src/powerpc/linux64_closure.S +++ b/src/powerpc/linux64_closure.S @@ -101,7 +101,7 @@ ffi_closure_LINUX64: # else # copy r2 to r11 and load TOC into r2 mr %r11, %r2 - ld %r2, 16(%r11) + ld %r2, 16(%r2) mflr %r0 # Save general regs into parm save area @@ -444,10 +444,6 @@ ffi_go_closure_linux64: # load up the pointer to the parm save area mr %r7, %r12 # else - # copy r2 to r11 and load TOC into r2 - mr %r11, %r2 - ld %r2, 16(%r11) - mflr %r0 # Save general regs into parm save area # This is the parameter save area set up by our caller. -- 2.7.4