OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e372cf
)
target-i386: Fix "call im" on x86_64 when executing 32-bit code
author
Aurelien Jarno
<aurelien@aurel32.net>
Sun, 3 Jan 2010 02:08:19 +0000
(
03:08
+0100)
committer
Aurelien Jarno
<aurelien@aurel32.net>
Sun, 3 Jan 2010 02:14:41 +0000
(
03:14
+0100)
Similarly to what is done in
32938e127f50a40844a0fb9c5abb8691aeeccf7e
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>
target-i386/translate.c
patch
|
blob
|
history
diff --git
a/target-i386/translate.c
b/target-i386/translate.c
index
64bc0a3
..
511a4ea
100644
(file)
--- a/
target-i386/translate.c
+++ b/
target-i386/translate.c
@@
-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);