From: Julian Seward Date: Fri, 26 Nov 2004 13:01:47 +0000 (+0000) Subject: Handle Ijk_Yield properly. This fixes V regtest "none/tests/yield". X-Git-Tag: svn/VALGRIND_3_0_1^2~745 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4578ef56975db1a32927eaa72c9c8e01d72b6af2;p=thirdparty%2Fvalgrind.git Handle Ijk_Yield properly. This fixes V regtest "none/tests/yield". git-svn-id: svn://svn.valgrind.org/vex/trunk@589 --- diff --git a/VEX/priv/host-x86/hdefs.c b/VEX/priv/host-x86/hdefs.c index d5476feff3..ccfd28d567 100644 --- a/VEX/priv/host-x86/hdefs.c +++ b/VEX/priv/host-x86/hdefs.c @@ -749,7 +749,8 @@ void ppX86Instr ( X86Instr* i ) { break; case Xin_Goto: if (i->Xin.Goto.jk == Ijk_ClientReq - || i->Xin.Goto.jk == Ijk_Syscall) { + || i->Xin.Goto.jk == Ijk_Syscall + || i->Xin.Goto.jk == Ijk_Yield) { vex_printf("movl $"); ppIRJumpKind(i->Xin.Goto.jk); vex_printf(", %%ebp ; "); @@ -952,7 +953,8 @@ void getRegUsage_X86Instr (HRegUsage* u, X86Instr* i) addRegUsage_X86RI(u, i->Xin.Goto.dst); addHRegUse(u, HRmWrite, hregX86_EAX()); if (i->Xin.Goto.jk == Ijk_ClientReq - || i->Xin.Goto.jk == Ijk_Syscall) + || i->Xin.Goto.jk == Ijk_Syscall + || i->Xin.Goto.jk == Ijk_Yield) addHRegUse(u, HRmWrite, hregX86_EBP()); return; case Xin_CMov32: @@ -1721,7 +1723,8 @@ Int emit_X86Instr ( UChar* buf, Int nbuf, X86Instr* i ) vg_constants.h. */ if (i->Xin.Goto.cond == Xcc_ALWAYS && (i->Xin.Goto.jk == Ijk_ClientReq - || i->Xin.Goto.jk == Ijk_Syscall)) { + || i->Xin.Goto.jk == Ijk_Syscall + || i->Xin.Goto.jk == Ijk_Yield)) { /* movl $magic_number, %ebp */ *p++ = 0xBD; switch (i->Xin.Goto.jk) { @@ -1731,6 +1734,9 @@ Int emit_X86Instr ( UChar* buf, Int nbuf, X86Instr* i ) case Ijk_Syscall: /* 19 == VG_TRC_EBP_JMP_SYSCALL */ p = emit32(p, 19); break; + case Ijk_Yield: + /* 27 == VG_TRC_EBP_JMP_YIELD */ + p = emit32(p, 27); break; default: ppIRJumpKind(i->Xin.Goto.jk); vpanic("emit_X86Instr.Xin_Goto: unknown jump kind");