diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-02-02 13:28:27 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-02-02 13:28:27 +0100 |
commit | 8aaf4681da0697653119fb541aef303da5b0aaaf (patch) | |
tree | c1e0b211864547ada0d59bb5238bf7ef134aad03 /libffi/src | |
parent | 60def7edd2381f2b6d5cde1b4be98dff4a248368 (diff) | |
download | gcc-8aaf4681da0697653119fb541aef303da5b0aaaf.zip gcc-8aaf4681da0697653119fb541aef303da5b0aaaf.tar.gz gcc-8aaf4681da0697653119fb541aef303da5b0aaaf.tar.bz2 |
linux64.S (ffi_call_LINUX64): Move restore of r2 immediately after bctrl instruction.
* src/powerpc/linux64.S (ffi_call_LINUX64): Move restore of r2
immediately after bctrl instruction.
From-SVN: r121498
Diffstat (limited to 'libffi/src')
-rw-r--r-- | libffi/src/powerpc/linux64.S | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S index d72912d..dbfcc7b 100644 --- a/libffi/src/powerpc/linux64.S +++ b/libffi/src/powerpc/linux64.S @@ -47,8 +47,8 @@ ffi_call_LINUX64: std %r0, 16(%r1) mr %r28, %r1 /* our AP. */ - stdux %r1, %r1, %r4 .LCFI0: + stdux %r1, %r1, %r4 mr %r31, %r5 /* flags, */ mr %r30, %r6 /* rvalue, */ mr %r29, %r7 /* function address. */ @@ -100,6 +100,10 @@ ffi_call_LINUX64: /* Make the call. */ bctrl + /* This must follow the call immediately, the unwinder + uses this to find out if r2 has been saved or not. */ + ld %r2, 40(%r1) + /* Now, deal with the return value. */ mtcrf 0x01, %r31 bt- 30, .Ldone_return_value @@ -109,7 +113,6 @@ ffi_call_LINUX64: .Ldone_return_value: /* Restore the registers we used and return. */ - ld %r2, 40(%r1) mr %r1, %r28 ld %r0, 16(%r28) ld %r28, -32(%r1) |