The Intel p4 manual suggests inserting a pause instruction in
spin-wait loops as a hint to what the code is doing. In other
respects it acts just like a nop. Pause (0xF3 0x90) currently
causes valgrind to panic. The patch below keeps things running.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@493
codegen_REPE_STOS ( cb, sz, eip_orig, eip );
*isEnd = True;
if (dis) VG_(printf)("repe stos%c\n", nameISize(sz));
+ }
+ else
+ if (abyte == 0x90) { /* REPE NOP (PAUSE) */
+ if (dis) VG_(printf)("repe nop (P4 pause)\n");
+ /* do nothing; apparently a hint to the P4 re spin-wait loop */
} else {
VG_(printf)("REPE then 0x%x\n", (UInt)abyte);
VG_(panic)("Unhandled REPE case");
codegen_REPE_STOS ( cb, sz, eip_orig, eip );
*isEnd = True;
if (dis) VG_(printf)("repe stos%c\n", nameISize(sz));
+ }
+ else
+ if (abyte == 0x90) { /* REPE NOP (PAUSE) */
+ if (dis) VG_(printf)("repe nop (P4 pause)\n");
+ /* do nothing; apparently a hint to the P4 re spin-wait loop */
} else {
VG_(printf)("REPE then 0x%x\n", (UInt)abyte);
VG_(panic)("Unhandled REPE case");