From bebff237c522e4e8e23204ca1e5104896389158e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 12 Aug 2010 09:19:19 -0700 Subject: PowerPC64 ABI fixes --- .../sysv/linux/powerpc/powerpc64/sysdep-cancel.h | 69 ++++++++++++++-------- 1 file changed, 44 insertions(+), 25 deletions(-) (limited to 'nptl/sysdeps/unix/sysv') diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h index 707765ab58..597630cea4 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h @@ -52,51 +52,70 @@ cfi_offset (lr, 16); \ DOCARGS_##args; /* save syscall args around CENABLE. */ \ CENABLE; \ - std 3,72(1); /* store CENABLE return value (MASK). */ \ + std 3,112(1); /* store CENABLE return value (MASK). */ \ UNDOCARGS_##args; /* restore syscall args. */ \ DO_CALL (SYS_ify (syscall_name)); \ mfcr 0; /* save CR/R3 around CDISABLE. */ \ - std 3,64(1); \ - std 0,8(1); \ - ld 3,72(1); /* pass MASK to CDISABLE. */ \ + std 3,120(1); \ + std 0,128+8(1); \ + cfi_offset (cr, 8); \ + ld 3,112(1); /* pass MASK to CDISABLE. */ \ CDISABLE; \ ld 9,128+16(1); \ - ld 0,8(1); /* restore CR/R3. */ \ - ld 3,64(1); \ + ld 0,128+8(1); /* restore CR/R3. */ \ + ld 3,120(1); \ mtlr 9; \ mtcr 0; \ - addi 1,1,128; + addi 1,1,128; \ + cfi_adjust_cfa_offset (-128); \ + cfi_restore (lr); \ + cfi_restore (cr) # define DOCARGS_0 # define UNDOCARGS_0 -# define DOCARGS_1 std 3,80(1); DOCARGS_0 -# define UNDOCARGS_1 ld 3,80(1); UNDOCARGS_0 +# define DOCARGS_1 std 3,128+48(1); DOCARGS_0 +# define UNDOCARGS_1 ld 3,128+48(1); UNDOCARGS_0 -# define DOCARGS_2 std 4,88(1); DOCARGS_1 -# define UNDOCARGS_2 ld 4,88(1); UNDOCARGS_1 +# define DOCARGS_2 std 4,128+56(1); DOCARGS_1 +# define UNDOCARGS_2 ld 4,128+56(1); UNDOCARGS_1 -# define DOCARGS_3 std 5,96(1); DOCARGS_2 -# define UNDOCARGS_3 ld 5,96(1); UNDOCARGS_2 +# define DOCARGS_3 std 5,128+64(1); DOCARGS_2 +# define UNDOCARGS_3 ld 5,128+64(1); UNDOCARGS_2 -# define DOCARGS_4 std 6,104(1); DOCARGS_3 -# define UNDOCARGS_4 ld 6,104(1); UNDOCARGS_3 +# define DOCARGS_4 std 6,128+72(1); DOCARGS_3 +# define UNDOCARGS_4 ld 6,128+72(1); UNDOCARGS_3 -# define DOCARGS_5 std 7,112(1); DOCARGS_4 -# define UNDOCARGS_5 ld 7,112(1); UNDOCARGS_4 +# define DOCARGS_5 std 7,128+80(1); DOCARGS_4 +# define UNDOCARGS_5 ld 7,128+80(1); UNDOCARGS_4 -# define DOCARGS_6 std 8,120(1); DOCARGS_5 -# define UNDOCARGS_6 ld 8,120(1); UNDOCARGS_5 +# define DOCARGS_6 std 8,128+88(1); DOCARGS_5 +# define UNDOCARGS_6 ld 8,128+88(1); UNDOCARGS_5 # ifdef IS_IN_libpthread -# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel) -# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel) +# ifdef SHARED +# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel) +# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel) +# else +# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel); nop +# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel); nop +# endif # elif !defined NOT_IN_libc -# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel) -# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel) +# ifdef SHARED +# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel) +# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel) +# else +# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel); nop +# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel); nop +# endif # elif defined IS_IN_librt -# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel) -# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel) +# ifdef SHARED +# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel) +# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel) +# else +# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel); nop +# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel); nop +# endif # else # error Unsupported library # endif -- cgit v1.2.3