- Timestamp:
- Mar 15, 2007 2:57:05 PM (18 years ago)
- Location:
- trunk/src/recompiler/target-i386
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/target-i386/op.c
r1511 r1514 496 496 sync_seg(env, idx, env->segs[idx].newselector); 497 497 } 498 #if 0499 498 /* Loading a null selector into a segment register is valid, but using it is most definitely not! */ 500 499 if ( (env->cr[0] & (CR0_PE_MASK|CR0_PG_MASK)) == (CR0_PE_MASK|CR0_PG_MASK) … … 505 504 raise_exception(EXCP0D_GPF); 506 505 } 507 #endif508 509 506 A0 = (uint32_t)env->segs[idx].base; 507 FORCE_RET(); 510 508 #else 511 509 A0 = (uint32_t)*(target_ulong *)((char *)env + PARAM1); … … 522 520 sync_seg(env, idx, env->segs[idx].newselector); 523 521 } 524 #if 0525 522 /* Loading a null selector into a segment register is valid, but using it is most definitely not! */ 526 523 if ( (env->cr[0] & (CR0_PE_MASK|CR0_PG_MASK)) == (CR0_PE_MASK|CR0_PG_MASK) … … 531 528 raise_exception(EXCP0D_GPF); 532 529 } 533 #endif534 530 A0 = (uint32_t)(A0 + env->segs[idx].base); 531 FORCE_RET(); 535 532 #else 536 533 A0 = (uint32_t)(A0 + *(target_ulong *)((char *)env + PARAM1)); -
trunk/src/recompiler/target-i386/translate.c
r1478 r1514 833 833 gen_op_check_external_event(); 834 834 } 835 836 static inline void gen_update_eip(target_ulong pc) 837 { 838 #ifdef TARGET_X86_64 839 if (pc == (uint32_t)pc) { 840 gen_op_movl_eip_im(pc); 841 } else if (pc == (int32_t)pc) { 842 gen_op_movq_eip_im(pc); 843 } else { 844 gen_op_movq_eip_im64(pc >> 32, pc); 845 } 846 #else 847 gen_op_movl_eip_im(pc); 848 #endif 849 } 850 835 851 #endif /* VBOX */ 836 852 … … 839 855 #ifdef VBOX 840 856 gen_check_external_event(); 841 #endif /* VBOX */857 #endif 842 858 #ifdef TARGET_X86_64 843 859 if (pc == (uint32_t)pc) { … … 3134 3150 #endif 3135 3151 s->rip_offset = 0; /* for relative ip address */ 3152 3153 #ifdef VBOX 3154 /* Always update EIP. Otherwise one must be very careful with generated code that can raise exceptions. */ 3155 gen_update_eip(pc_start - s->cs_base); 3156 #endif 3157 3136 3158 next_byte: 3137 3159 b = ldub_code(s->pc);
Note:
See TracChangeset
for help on using the changeset viewer.