]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
RSP update fix for x86_64 in iret
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 21 Aug 2005 09:32:43 +0000 (09:32 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 21 Aug 2005 09:32:43 +0000 (09:32 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1548 c046a42c-6fe2-441c-8c8c-71466251a162

target-i386/helper.c

index fd044304619c0a154e3fbadac2c956f83d83af2d..c41cbb7278aad573156a3fc485aa9787c6f88cc9 100644 (file)
@@ -2012,7 +2012,6 @@ static inline void helper_ret_protected(int shift, int is_iret, int addend)
 #endif
         sp_mask = get_sp_mask(env->segs[R_SS].flags);
     sp = ESP;
-    /* XXX: ssp is zero in 64 bit ? */
     ssp = env->segs[R_SS].base;
     new_eflags = 0; /* avoid warning */
 #ifdef TARGET_X86_64
@@ -2145,7 +2144,7 @@ static inline void helper_ret_protected(int shift, int is_iret, int addend)
         cpu_x86_set_cpl(env, rpl);
         sp = new_esp;
 #ifdef TARGET_X86_64
-        if (shift == 2)
+        if (env->hflags & HF_CS64_MASK)
             sp_mask = -1;
         else
 #endif