diff --git a/target-i386/helper.c b/target-i386/helper.c index d7cb6849b4c9cf952781a5cca80ec34daa09e435..7e0e777af689acf40be914a8b39587c5e75c0298 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1727,7 +1727,7 @@ static inline void helper_ret_protected(int shift, int is_iret, int addend) load_seg_vm(R_FS, new_fs & 0xffff); load_seg_vm(R_GS, new_gs & 0xffff); - env->eip = new_eip; + env->eip = new_eip & 0xffff; ESP = new_esp; }