Changeset 47709 in vbox for trunk/src/recompiler/target-i386/cpu.h
- Timestamp:
- Aug 13, 2013 7:34:18 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 87948
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/target-i386/cpu.h
r47678 r47709 117 117 #define DESC_TSS_BUSY_MASK (1 << 9) 118 118 #ifdef VBOX 119 # define DESC_INTEL_UNUSABLE RT_BIT_32(16+8) /**< Internal VT-x bit for NULL sectors. */ 119 # define DESC_INTEL_UNUSABLE RT_BIT_32(16+8) /**< Internal VT-x bit for NULL sectors. */ 120 # define DESC_RAW_FLAG_BITS UINT32_C(0x00ffffff) /**< Flag bits we load from the descriptor. */ 120 121 #endif 121 122 … … 934 935 /* this function must always be used to load data in the segment 935 936 cache: it synchronizes the hflags with the segment cache values */ 937 #ifndef VBOX 936 938 static inline void cpu_x86_load_seg_cache(CPUX86State *env, 937 939 int seg_reg, unsigned int selector, … … 939 941 unsigned int limit, 940 942 unsigned int flags) 943 #else 944 static inline void cpu_x86_load_seg_cache_with_clean_flags(CPUX86State *env, 945 int seg_reg, unsigned int selector, 946 target_ulong base, 947 unsigned int limit, 948 unsigned int flags) 949 #endif 941 950 { 942 951 SegmentCache *sc; … … 947 956 sc->base = base; 948 957 sc->limit = limit; 949 #ifndef VBOX950 958 sc->flags = flags; 951 #else 952 if (flags & DESC_P_MASK) 953 { 954 flags |= DESC_A_MASK; /* Make sure the A bit is set to avoid trouble. */ 955 flags &= ~DESC_INTEL_UNUSABLE; 956 } 957 else if (selector < 4U) 958 flags |= DESC_INTEL_UNUSABLE; 959 else 960 flags &= ~DESC_INTEL_UNUSABLE; 961 sc->flags = flags; 959 #ifdef VBOX 962 960 sc->newselector = 0; 963 961 sc->fVBoxFlags = CPUMSELREG_FLAGS_VALID; … … 1006 1004 } 1007 1005 1006 #ifdef VBOX 1007 /* Raw input, adjust the flags adding the stupid intel flag when applicable. */ 1008 static inline void cpu_x86_load_seg_cache(CPUX86State *env, 1009 int seg_reg, unsigned int selector, 1010 target_ulong base, 1011 unsigned int limit, 1012 unsigned int flags) 1013 { 1014 flags &= DESC_RAW_FLAG_BITS; 1015 if (flags & DESC_P_MASK) 1016 flags |= DESC_A_MASK; /* Make sure the A bit is set to avoid trouble. */ 1017 else if (selector < 4U) 1018 flags |= DESC_INTEL_UNUSABLE; 1019 cpu_x86_load_seg_cache_with_clean_flags(env, seg_reg, selector, base, limit, flags); 1020 } 1021 #endif 1022 1008 1023 static inline void cpu_x86_load_seg_cache_sipi(CPUX86State *env, 1009 1024 int sipi_vector)
Note:
See TracChangeset
for help on using the changeset viewer.