aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-08-12 09:19:19 -0700
committerUlrich Drepper <drepper@redhat.com>2010-08-12 09:19:19 -0700
commitbebff237c522e4e8e23204ca1e5104896389158e (patch)
treea4edee831e0476277cc372a46fa8281ab0bc229a /nptl
parent026373745eab50a683536d950cb7e17dc98c4259 (diff)
downloadglibc-bebff237c522e4e8e23204ca1e5104896389158e.zip
glibc-bebff237c522e4e8e23204ca1e5104896389158e.tar.gz
glibc-bebff237c522e4e8e23204ca1e5104896389158e.tar.bz2
PowerPC64 ABI fixes
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h69
2 files changed, 55 insertions, 25 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c1f8620..848084e 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,14 @@
+2010-05-01 Alan Modra <amodra@gmail.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
+ (PSEUDO): Use correct cr save. Don't use wrong parm save area
+ to save temps. Correct cfi for possible later frame manipulation.
+ (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
+ (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
+ (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
+ (DOCARGS_6, UNDOCARGS_6): Likewise.
+ (CENABLE, CDISABLE): Add nops for non-shared calls.
+
2010-07-06 Andreas Schwab <schwab@redhat.com>
* sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
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 707765a..597630c 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