Make rep; nop (pause) yield the thread. Based on a patch by Tom Hughes;
I added a test case and cleaned up vg_dispatch.S while I was about it.
CCMAIL: 69529-done@bugs.kde.org
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2129 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_dispatch.S b/coregrind/vg_dispatch.S
index f8bfaf9..5014c4c 100644
--- a/coregrind/vg_dispatch.S
+++ b/coregrind/vg_dispatch.S
@@ -169,32 +169,13 @@
*/
dispatch_exceptional:
/* this is jumped to only, not fallen-through from above */
- cmpl $VG_TRC_EBP_JMP_SYSCALL, %ebp
- jz dispatch_syscall
- cmpl $VG_TRC_EBP_JMP_CLIENTREQ, %ebp
- jz dispatch_clientreq
cmpl $VG_TRC_INNER_COUNTERZERO, %ebp
jz counter_is_zero
-
- /* ebp has an invalid value ... crap out. */
- pushl $panic_msg_ebp
- call VG_(core_panic)
- /* (never returns) */
-dispatch_syscall:
/* save %eax in %EIP and defer to sched */
- movl $VG_(baseBlock), %ebp
movl VGOFF_(m_eip), %esi
- movl %eax, (%ebp, %esi, 4)
- movl $VG_TRC_EBP_JMP_SYSCALL, %eax
- jmp run_innerloop_exit
-
-dispatch_clientreq:
- /* save %eax in %EIP and defer to sched */
- movl $VG_(baseBlock), %ebp
- movl VGOFF_(m_eip), %esi
- movl %eax, (%ebp, %esi, 4)
- movl $VG_TRC_EBP_JMP_CLIENTREQ, %eax
+ movl %eax, VG_(baseBlock)(,%esi, 4)
+ movl %ebp, %eax
jmp run_innerloop_exit