提交 99596385 编写于 作者: A Aurelien Jarno

target-i386: Fix "call im" on x86_64 when executing 32-bit code

Similarly to what is done in 32938e12
for "jmp im", trunc the immediate to 32-bit when not running in 64-bit
mode.
Reported-by: NKevin O'Connor <kevin@koconnor.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 3e372cf8
......@@ -6259,6 +6259,8 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
tval += next_eip;
if (s->dflag == 0)
tval &= 0xffff;
else if(!CODE64(s))
tval &= 0xffffffff;
gen_movtl_T0_im(next_eip);
gen_push_T0(s);
gen_jmp(s, tval);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册