diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-02 20:02:27 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-02 20:02:27 +0000 |
commit | bdadc0b5b6c396a77c9faed8eb6829789bfb6151 (patch) | |
tree | 6fa0abbbc1503777cede8cc22a391d0394ed6b4c /target-i386/op_helper.c | |
parent | Include qemu-common.h in order to get prototypes for qemu_malloc etc. (diff) | |
download | qemu-kvm-bdadc0b5b6c396a77c9faed8eb6829789bfb6151.tar.gz qemu-kvm-bdadc0b5b6c396a77c9faed8eb6829789bfb6151.tar.bz2 qemu-kvm-bdadc0b5b6c396a77c9faed8eb6829789bfb6151.zip |
Do not use load_seg_vm to load CS in real mode iret handling
load_seg_vm calls cpu_x86_load_seg_cache which updates hflags of
current env, real hardware doesn't do this, nor the code that handles
real mode lret/lcall/ljmp.
This unbreaks "unreal mode" and makes QEMU the first emulator being
able to run Project Angel demo by IMPACT Studios. (Not that there are
many physical machines out there capable of doing the same)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5403 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/op_helper.c')
-rw-r--r-- | target-i386/op_helper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index 32952b3a6..e9a694244 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; |