target-i386: Fix "call im" on x86_64 when executing 32-bit code
Similarly to what is done in 32938e127f
for "jmp im", trunc the immediate to 32-bit when not running in 64-bit
mode.
Reported-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
3e372cf87f
commit
995963852c
@ -6259,6 +6259,8 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
|
|||||||
tval += next_eip;
|
tval += next_eip;
|
||||||
if (s->dflag == 0)
|
if (s->dflag == 0)
|
||||||
tval &= 0xffff;
|
tval &= 0xffff;
|
||||||
|
else if(!CODE64(s))
|
||||||
|
tval &= 0xffffffff;
|
||||||
gen_movtl_T0_im(next_eip);
|
gen_movtl_T0_im(next_eip);
|
||||||
gen_push_T0(s);
|
gen_push_T0(s);
|
||||||
gen_jmp(s, tval);
|
gen_jmp(s, tval);
|
||||||
|
Loading…
Reference in New Issue
Block a user