From d21677dc8a595a596f7e0613bcb195a810bf41fa Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Tue, 25 Jan 2005 15:47:39 +0000 Subject: [PATCH] Don't do anything special with "rep nop". The former behaviour was to notify the scheduler that this thread wants to yield, but that gives such huge delays as to mess up spin-wait loops using "rep nop". New behaviour is to simply treat it as a no-op, with no scheduling consequences. git-svn-id: svn://svn.valgrind.org/vex/trunk@743 --- VEX/priv/guest-x86/toIR.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/VEX/priv/guest-x86/toIR.c b/VEX/priv/guest-x86/toIR.c index 8a30b0ac1..2fc51e7d0 100644 --- a/VEX/priv/guest-x86/toIR.c +++ b/VEX/priv/guest-x86/toIR.c @@ -11286,8 +11286,14 @@ DisResult disInstr ( /*IN*/ Bool resteerOK, case 0x90: /* REP NOP (PAUSE) */ /* a hint to the P4 re spin-wait loop */ DIP("rep nop (P4 pause)\n"); +# if 0 + /* "observe" the hint. Can cause very long delays, though. */ jmp_lit(Ijk_Yield, ((Addr32)guest_eip_bbstart)+delta); whatNext = Dis_StopHere; +# else + /* act like it's a no-op */ + whatNext = Dis_Continue; +# endif break; //-- case 0xC3: /* REP RET */