]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
x86 front end: handle UD2 as an officially recognised, unimplemented instruction...
authorJulian Seward <jseward@acm.org>
Wed, 3 Oct 2018 13:26:48 +0000 (15:26 +0200)
committerJulian Seward <jseward@acm.org>
Wed, 3 Oct 2018 13:26:48 +0000 (15:26 +0200)
This doesn't change anything downstream -- a SIGILL is still raised -- but
there's a bit less debug printing now.

VEX/priv/guest_x86_toIR.c

index ad1f8d83851908d8639b2ec5fae1bd942b1c729a..2e3b80303e2d141e18d70f471fd113c869e9be11 100644 (file)
@@ -15408,6 +15408,15 @@ DisResult disInstr_X86_WRK (
          DIP("syscall\n");
          break;
 
+      /* =-=-=-=-=-=-=-=-=-=- UD2 =-=-=-=-=-=-=-=-=-=-=-= */
+
+      case 0x0B: /* UD2 */
+         stmt( IRStmt_Put( OFFB_EIP, mkU32(guest_EIP_curr_instr) ) );
+         jmp_lit(&dres, Ijk_NoDecode, guest_EIP_curr_instr);
+         vassert(dres.whatNext == Dis_StopHere);
+         DIP("ud2\n");
+         break;
+
       /* =-=-=-=-=-=-=-=-=- unimp2 =-=-=-=-=-=-=-=-=-=-= */
 
       default: