@@ -813,6 +813,17 @@ static const struct {
.opcode = { 0x66, 0x67, 0xe3, 0x10 },
.opc_len = { 4, 4 },
.disp = { 4 + 16 - MMAP_ADDR, 4 + 16 },
+ }, {
+ .descr = "jmpw *(%rsp)",
+ .opcode = { 0x66, 0xff, 0x24, 0x24 },
+ .opc_len = { 4, 4 },
+ .disp = { STKVAL_DISP - MMAP_ADDR, STKVAL_DISP },
+ }, {
+ .descr = "callw *(%rsp)",
+ .opcode = { 0x66, 0xff, 0x14, 0x24 },
+ .opc_len = { 4, 4 },
+ .stkoff = { -2, -8 },
+ .disp = { STKVAL_DISP - MMAP_ADDR, STKVAL_DISP },
},
};
#endif
@@ -2524,8 +2524,7 @@ x86_decode_onebyte(
{
case 2: /* call (near) */
case 4: /* jmp (near) */
- case 6: /* push */
- if ( mode_64bit() && op_bytes == 4 )
+ if ( mode_64bit() && (op_bytes == 4 || !amd_like(ctxt)) )
op_bytes = 8;
state->desc = DstNone | SrcMem | Mov;
break;
@@ -2537,6 +2536,12 @@ x86_decode_onebyte(
op_bytes = 4;
state->desc = DstNone | SrcMem | Mov;
break;
+
+ case 6: /* push */
+ if ( mode_64bit() && op_bytes == 4 )
+ op_bytes = 8;
+ state->desc = DstNone | SrcMem | Mov;
+ break;
}
break;
}
Intel CPUs ignore operand size overrides here, while AMD ones don't. Signed-off-by: Jan Beulich <jbeulich@suse.com>