aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-15 14:25:31 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-15 14:25:31 -0700
commitf16af742175c8bdf536ebd97bf9fb33db925f02e (patch)
tree6d00f73405a77639f3de3fcc4ee8b94c96a33506 /nptl
parentd86813a021b6200cf2ff75041abc101cefcb2da2 (diff)
downloadglibc-f16af742175c8bdf536ebd97bf9fb33db925f02e.zip
glibc-f16af742175c8bdf536ebd97bf9fb33db925f02e.tar.gz
glibc-f16af742175c8bdf536ebd97bf9fb33db925f02e.tar.bz2
Use R*_LP to load pointer and operate on stack
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h63
2 files changed, 44 insertions, 31 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 133af22..fc91c72 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,17 @@
2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
+ futex pointer into RDI_LP. Use RSP_LP to operate on stack.
+ (lll_robust_lock): Likewise.
+ (lll_cond_lock): Likewise.
+ (lll_robust_cond_lock): Likewise.
+ (lll_timedlock): Likewise.
+ (lll_robust_timedlock): Likewise.
+ (lll_unlock): Likewise.
+ (lll_robust_unlock): Likewise.
+
+2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
+
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
LP_OP(cmp) and RCX_LP on dep_mutex pointer.
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index 1f5b848..ad14185 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002-2004, 2006-2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2008, 2009, 2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -298,10 +299,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_lock_%=, @function\n" \
"_L_lock_%=:\n" \
- "1:\tleaq %2, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %2, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_lock_wait_private\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_lock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -316,10 +317,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_lock_%=, @function\n" \
"_L_lock_%=:\n" \
- "1:\tleaq %2, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %2, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_lock_wait\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_lock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -338,10 +339,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_robust_lock_%=, @function\n" \
"_L_robust_lock_%=:\n" \
- "1:\tleaq %2, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %2, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_robust_lock_wait\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_robust_lock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -361,10 +362,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_cond_lock_%=, @function\n" \
"_L_cond_lock_%=:\n" \
- "1:\tleaq %2, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %2, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_lock_wait\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_cond_lock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -383,10 +384,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_robust_cond_lock_%=, @function\n" \
"_L_robust_cond_lock_%=:\n" \
- "1:\tleaq %2, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %2, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_robust_lock_wait\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_robust_cond_lock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -406,11 +407,11 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_timedlock_%=, @function\n" \
"_L_timedlock_%=:\n" \
- "1:\tleaq %4, %%rdi\n" \
+ "1:\tlea %4, %%" RDI_LP "\n" \
"0:\tmov %8, %%" RDX_LP "\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_timedlock_wait\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_timedlock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -430,11 +431,11 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_robust_timedlock_%=, @function\n" \
"_L_robust_timedlock_%=:\n" \
- "1:\tleaq %4, %%rdi\n" \
+ "1:\tlea %4, %%" RDI_LP "\n" \
"0:\tmov %8, %%" RDX_LP "\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_robust_timedlock_wait\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_robust_timedlock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -468,10 +469,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_unlock_%=, @function\n" \
"_L_unlock_%=:\n" \
- "1:\tleaq %0, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %0, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_unlock_wake_private\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_unlock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -485,10 +486,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_unlock_%=, @function\n" \
"_L_unlock_%=:\n" \
- "1:\tleaq %0, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %0, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_unlock_wake\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_unlock_%=, 6b-1b\n\t" \
".previous\n" \
@@ -508,10 +509,10 @@ LLL_STUB_UNWIND_INFO_END
".subsection 1\n\t" \
".type _L_robust_unlock_%=, @function\n" \
"_L_robust_unlock_%=:\n" \
- "1:\tleaq %0, %%rdi\n" \
- "2:\tsubq $128, %%rsp\n" \
+ "1:\tlea %0, %%" RDI_LP "\n" \
+ "2:\tsub $128, %%" RSP_LP "\n" \
"3:\tcallq __lll_unlock_wake\n" \
- "4:\taddq $128, %%rsp\n" \
+ "4:\tadd $128, %%" RSP_LP "\n" \
"5:\tjmp 24f\n" \
"6:\t.size _L_robust_unlock_%=, 6b-1b\n\t" \
".previous\n" \