aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-i386/op_helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index 32952b3a63..e9a6942440 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -2651,7 +2651,8 @@ void helper_iret_real(int shift)
POPW(ssp, sp, sp_mask, new_eflags);
}
ESP = (ESP & ~sp_mask) | (sp & sp_mask);
- load_seg_vm(R_CS, new_cs);
+ env->segs[R_CS].selector = new_cs;
+ env->segs[R_CS].base = (new_cs << 4);
env->eip = new_eip;
if (env->eflags & VM_MASK)
eflags_mask = TF_MASK | AC_MASK | ID_MASK | IF_MASK | RF_MASK | NT_MASK;