The code for handling "ret imm16" on AMD64 guests was commented (maybe because ret imm16 is rarly used on amd64?). I need it and the following patch enables it.
Created attachment 18353 [details] Patch against 3.2.1 Enables support for "ret imm16" on amd64.
Sebastian, does the following work for you? case 0xC2: /* RET imm16 */ if (have66orF2orF3(pfx)) goto decode_failure; d64 = getUDisp16(delta); delta += 2; dis_ret(vmi, d64); whatNext = Dis_StopHere; DIP("ret %lld\n", d64); break;
My patch attached patch works. Your code lacks the definition of "getUDisp16" and I don't know what "vmi" is (I use version 3.2.1)
This was fixed by VEX r1676.