Changeset 1514 in vbox for trunk/src/recompiler/target-i386/translate.c
- Timestamp:
- Mar 15, 2007 2:57:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.