Changeset 5197 in vbox for trunk/src/recompiler/target-i386
- Timestamp:
- Oct 9, 2007 12:31:32 PM (17 years ago)
- Location:
- trunk/src/recompiler/target-i386
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/target-i386/exec.h
r2422 r5197 215 215 #ifdef VBOX 216 216 void helper_external_event(void); 217 void helper_record_call(void); 217 218 218 219 /* in helper.c */ -
trunk/src/recompiler/target-i386/helper.c
r3727 r5197 1222 1222 remR3TimersRun(env); 1223 1223 } 1224 } 1225 /* helper for recording call instruction addresses for later scanning */ 1226 void helper_record_call() 1227 { 1228 if ( !(env->state & CPU_RAW_RING0) 1229 && (env->cr[0] & CR0_PG_MASK) 1230 && !(env->eflags & X86_EFL_IF)) 1231 remR3RecordCall(env); 1224 1232 } 1225 1233 #endif /* VBOX */ … … 2248 2256 uint32_t val, limit, old_sp_mask; 2249 2257 target_ulong ssp, old_ssp, next_eip, new_eip; 2250 2258 2251 2259 new_cs = T0; 2252 2260 new_eip = T1; -
trunk/src/recompiler/target-i386/op.c
r2841 r5197 821 821 } 822 822 } 823 824 void OPPROTO op_record_call(void) 825 { 826 helper_record_call(); 827 } 828 823 829 #endif /* VBOX */ 824 830 -
trunk/src/recompiler/target-i386/translate.c
r3952 r5197 123 123 #ifdef VBOX 124 124 int vme; /* CR4.VME */ 125 int record_call; /* record calls for CSAM or not? */ 125 126 #endif 126 127 int cpl; … … 3674 3675 case 2: /* call Ev */ 3675 3676 /* XXX: optimize if memory (no 'and' is necessary) */ 3677 #ifdef VBOX_WITH_CALL_RECORD 3678 if (s->record_call) 3679 gen_op_record_call(); 3680 #endif 3676 3681 if (s->dflag == 0) 3677 3682 gen_op_andl_T0_ffff(); … … 6596 6601 dc->f_st = 0; 6597 6602 dc->vm86 = (flags >> VM_SHIFT) & 1; 6598 #ifdef VBOX 6603 #ifdef VBOX_WITH_CALL_RECORD 6599 6604 dc->vme = !!(env->cr[4] & CR4_VME_MASK); 6605 if ( !(env->state & CPU_RAW_RING0) 6606 && (env->cr[0] & CR0_PG_MASK) 6607 && !(env->eflags & X86_EFL_IF) 6608 && dc->code32) 6609 dc->record_call = 1; 6610 else 6611 dc->record_call = 0; 6600 6612 #endif 6601 6613 dc->cpl = (flags >> HF_CPL_SHIFT) & 3;
Note:
See TracChangeset
for help on using the changeset viewer.