summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
diff options
context:
space:
mode:
authorLiubov Dmitrieva <liubov.dmitrieva@intel.com>2013-01-25 18:40:50 +0400
committerLiubov Dmitrieva <ldmitrie@sourceware.org>2013-10-23 19:07:37 +0400
commit7838e39881b61895ae13a15cf86ad041c75593de (patch)
tree973756a8835f2f7840a7b8378ea80f4af6cb10ff /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
parent36aee6bb45b54f2d242e256b5e596838c18c0b85 (diff)
downloadglibc-7838e39881b61895ae13a15cf86ad041c75593de.tar.gz
Intel MPX support for x86_64 and x86_32 pthread routines.
Always use INIT bounds in __tls_get_addr. Set bounds manually in _Unwind_Resume.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S49
1 files changed, 48 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 6c1a75fd47..e30845dfce 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -99,6 +99,12 @@ __pthread_cond_timedwait:
movq %rsi, 16(%rsp)
movq %rdx, %r13
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov %bnd0, 72(%rsp)
+ bndmov %bnd1, 88(%rsp)
+ bndmov %bnd2, 104(%rsp)
+#endif
+
je 22f
mov %RSI_LP, dep_mutex(%rdi)
@@ -128,7 +134,15 @@ __pthread_cond_timedwait:
/* Unlock the mutex. */
32: movq 16(%rsp), %rdi
xorl %esi, %esi
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov %bnd1, %bnd0
+#endif
callq __pthread_mutex_unlock_usercnt
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov 72(%rsp), %bnd0
+ bndmov 88(%rsp), %bnd1
+ bndmov 104(%rsp), %bnd2
+#endif
testl %eax, %eax
jne 46f
@@ -338,7 +352,15 @@ __pthread_cond_timedwait:
testb %r15b, %r15b
jnz 64f
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov %bnd1, %bnd0
+#endif
callq __pthread_mutex_cond_lock
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov 72(%rsp), %bnd0
+ bndmov 88(%rsp), %bnd1
+ bndmov 104(%rsp), %bnd2
+#endif
63: testq %rax, %rax
cmoveq %r14, %rax
@@ -362,7 +384,16 @@ __pthread_cond_timedwait:
cfi_restore_state
-64: callq __pthread_mutex_cond_lock_adjust
+64:
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov %bnd1, %bnd0
+#endif
+ callq __pthread_mutex_cond_lock_adjust
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov 72(%rsp), %bnd0
+ bndmov 88(%rsp), %bnd1
+ bndmov 104(%rsp), %bnd2
+#endif
movq %r14, %rax
jmp 48b
@@ -457,7 +488,15 @@ __pthread_cond_timedwait:
/* Unlock the mutex. */
2: movq 16(%rsp), %rdi
xorl %esi, %esi
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov %bnd1, %bnd0
+#endif
callq __pthread_mutex_unlock_usercnt
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov 72(%rsp), %bnd0
+ bndmov 88(%rsp), %bnd1
+ bndmov 104(%rsp), %bnd2
+#endif
testl %eax, %eax
jne 46b
@@ -786,7 +825,15 @@ __condvar_cleanup2:
cmpl %eax, %fs:TID
jne 7f
/* We managed to get the lock. Fix it up before returning. */
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov %bnd1, %bnd0
+#endif
callq __pthread_mutex_cond_lock_adjust
+#if defined __CHKP__ || defined __CHKWR__
+ bndmov 72(%rsp), %bnd0
+ bndmov 88(%rsp), %bnd1
+ bndmov 104(%rsp), %bnd2
+#endif
jmp 8f
7: callq __pthread_mutex_cond_lock