Commit 2c8e03018571246e9c332a68ad7c89d2949155ab
1 parent
81eea5eb
RSP update fix for x86_64 in iret
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1548 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
2 deletions
target-i386/helper.c
... | ... | @@ -2012,7 +2012,6 @@ static inline void helper_ret_protected(int shift, int is_iret, int addend) |
2012 | 2012 | #endif |
2013 | 2013 | sp_mask = get_sp_mask(env->segs[R_SS].flags); |
2014 | 2014 | sp = ESP; |
2015 | - /* XXX: ssp is zero in 64 bit ? */ | |
2016 | 2015 | ssp = env->segs[R_SS].base; |
2017 | 2016 | new_eflags = 0; /* avoid warning */ |
2018 | 2017 | #ifdef TARGET_X86_64 |
... | ... | @@ -2145,7 +2144,7 @@ static inline void helper_ret_protected(int shift, int is_iret, int addend) |
2145 | 2144 | cpu_x86_set_cpl(env, rpl); |
2146 | 2145 | sp = new_esp; |
2147 | 2146 | #ifdef TARGET_X86_64 |
2148 | - if (shift == 2) | |
2147 | + if (env->hflags & HF_CS64_MASK) | |
2149 | 2148 | sp_mask = -1; |
2150 | 2149 | else |
2151 | 2150 | #endif | ... | ... |