Changeset 42488 in vbox for trunk/src/recompiler/target-i386
- Timestamp:
- Jul 31, 2012 4:56:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/target-i386/op_helper.c
r42482 r42488 201 201 (uint32_t)env->regs[R_ESP], (uint32_t)env->regs[R_EBP], 202 202 (uint32_t)env->regs[R_ESI], (uint32_t)env->regs[R_EDI])); 203 } 204 205 /** 206 * Updates e2 with the DESC_A_MASK, writes it to the descriptor table, and 207 * returns the updated e2. 208 * 209 * @returns e2 with A set. 210 * @param e2 The 2nd selector DWORD. 211 */ 212 static uint32_t set_segment_accessed(int selector, uint32_t e2) 213 { 214 SegmentCache *dt = selector & X86_SEL_LDT ? &env->ldt : &env->gdt; 215 target_ulong ptr = dt->base + (selector & X86_SEL_MASK); 216 217 e2 |= DESC_A_MASK; 218 stl_kernel(ptr + 4, e2); 219 return e2; 203 220 } 204 221 … … 3234 3251 ((env->hflags & HF_CS64_MASK) && !is_iret))) { 3235 3252 /* return to same privilege level */ 3253 #ifdef VBOX 3254 if (!(e2 & DESC_A_MASK)) 3255 e2 = set_segment_accessed(new_cs, e2); 3256 #endif 3236 3257 cpu_x86_load_seg_cache(env, R_CS, new_cs, 3237 3258 get_seg_base(e1, e2), … … 3264 3285 /* XXX: test CS64 ? */ 3265 3286 if ((env->hflags & HF_LMA_MASK) && rpl != 3) { 3287 # ifdef VBOX 3288 if (!(e2 & DESC_A_MASK)) 3289 e2 = set_segment_accessed(new_cs, e2); 3290 # endif 3266 3291 cpu_x86_load_seg_cache(env, R_SS, new_ss, 3267 3292 0, 0xffffffff, … … 3289 3314 if (!(ss_e2 & DESC_P_MASK)) 3290 3315 raise_exception_err(EXCP0B_NOSEG, new_ss & 0xfffc); 3316 #ifdef VBOX 3317 if (!(e2 & DESC_A_MASK)) 3318 e2 = set_segment_accessed(new_cs, e2); 3319 if (!(ss_e2 & DESC_A_MASK)) 3320 ss_e2 = set_segment_accessed(new_ss, e2); 3321 #endif 3291 3322 cpu_x86_load_seg_cache(env, R_SS, new_ss, 3292 3323 get_seg_base(ss_e1, ss_e2),
Note:
See TracChangeset
for help on using the changeset viewer.