/[qemu]/qemu/target-i386/helper.c
ViewVC logotype

Diff of /qemu/target-i386/helper.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by bellard, Wed Jan 12 22:41:17 2005 UTC revision 1.40 by bellard, Sun Jan 16 23:35:43 2005 UTC
# Line 1550  void helper_ljmp_protected_T0_T1(int nex Line 1550  void helper_ljmp_protected_T0_T1(int nex
1550          if (!(e2 & DESC_P_MASK))          if (!(e2 & DESC_P_MASK))
1551              raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc);              raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc);
1552          limit = get_seg_limit(e1, e2);          limit = get_seg_limit(e1, e2);
1553          if (new_eip > limit)          if (new_eip > limit &&
1554                !(env->hflags & HF_LMA_MASK) && !(e2 & DESC_L_MASK))
1555              raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc);              raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc);
1556          cpu_x86_load_seg_cache(env, R_CS, (new_cs & 0xfffc) | cpl,          cpu_x86_load_seg_cache(env, R_CS, (new_cs & 0xfffc) | cpl,
1557                         get_seg_base(e1, e2), limit, e2);                         get_seg_base(e1, e2), limit, e2);
# Line 1949  static inline void helper_ret_protected( Line 1950  static inline void helper_ret_protected(
1950          raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc);          raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc);
1951            
1952      sp += addend;      sp += addend;
1953      if (rpl == cpl && !(env->hflags & HF_CS64_MASK)) {      if (rpl == cpl && (!(env->hflags & HF_CS64_MASK) ||
1954                           ((env->hflags & HF_CS64_MASK) && !is_iret))) {
1955          /* return to same priledge level */          /* return to same priledge level */
1956          cpu_x86_load_seg_cache(env, R_CS, new_cs,          cpu_x86_load_seg_cache(env, R_CS, new_cs,
1957                         get_seg_base(e1, e2),                         get_seg_base(e1, e2),

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26