Changeset 9486 in vbox
- Timestamp:
- Jun 6, 2008 2:39:56 PM (16 years ago)
- Location:
- trunk/src/recompiler
- Files:
-
- 3 edited
-
VBoxRecompiler.c (modified) (1 diff)
-
target-i386/cpu.h (modified) (2 diffs)
-
target-i386/translate.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/VBoxRecompiler.c
r9467 r9486 294 294 } 295 295 CPUMGetGuestCpuId(pVM, 1, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext_features, &pVM->rem.s.Env.cpuid_features); 296 CPUMGetGuestCpuId(pVM, 0x80000001, &u32Dummy, &u32Dummy, & u32Dummy, &pVM->rem.s.Env.cpuid_ext2_features);296 CPUMGetGuestCpuId(pVM, 0x80000001, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext3_features, &pVM->rem.s.Env.cpuid_ext2_features); 297 297 298 298 /* allocate code buffer for single instruction emulation. */ -
trunk/src/recompiler/target-i386/cpu.h
r3727 r9486 291 291 #define CPUID_EXT_SSE3 (1 << 0) 292 292 #define CPUID_EXT_MONITOR (1 << 3) 293 #define CPUID_EXT_DSCPL (1 << 4) 294 #define CPUID_EXT_VMX (1 << 5) 295 #define CPUID_EXT_SMX (1 << 6) 296 #define CPUID_EXT_EST (1 << 7) 297 #define CPUID_EXT_TM2 (1 << 8) 298 #define CPUID_EXT_SSSE3 (1 << 9) 299 #define CPUID_EXT_CID (1 << 10) 293 300 #define CPUID_EXT_CX16 (1 << 13) 301 #define CPUID_EXT_XTPR (1 << 14) 302 #define CPUID_EXT_DCA (1 << 17) 303 #define CPUID_EXT_POPCNT (1 << 22) 294 304 295 305 #define CPUID_EXT2_SYSCALL (1 << 11) 306 #define CPUID_EXT2_MP (1 << 19) 296 307 #define CPUID_EXT2_NX (1 << 20) 308 #define CPUID_EXT2_MMXEXT (1 << 22) 297 309 #define CPUID_EXT2_FFXSR (1 << 25) 310 #define CPUID_EXT2_PDPE1GB (1 << 26) 311 #define CPUID_EXT2_RDTSCP (1 << 27) 298 312 #define CPUID_EXT2_LM (1 << 29) 313 #define CPUID_EXT2_3DNOWEXT (1 << 30) 314 #define CPUID_EXT2_3DNOW (1 << 31) 315 316 #define CPUID_EXT3_LAHF_LM (1 << 0) 317 #define CPUID_EXT3_CMP_LEG (1 << 1) 318 #define CPUID_EXT3_SVM (1 << 2) 319 #define CPUID_EXT3_EXTAPIC (1 << 3) 320 #define CPUID_EXT3_CR8LEG (1 << 4) 321 #define CPUID_EXT3_ABM (1 << 5) 322 #define CPUID_EXT3_SSE4A (1 << 6) 323 #define CPUID_EXT3_MISALIGNSSE (1 << 7) 324 #define CPUID_EXT3_3DNOWPREFETCH (1 << 8) 325 #define CPUID_EXT3_OSVW (1 << 9) 326 #define CPUID_EXT3_IBS (1 << 10) 299 327 300 328 #define EXCP00_DIVZ 0 … … 576 604 #endif /* !VBOX */ 577 605 uint32_t cpuid_ext2_features; 606 uint32_t cpuid_ext3_features; 578 607 579 608 #ifndef VBOX -
trunk/src/recompiler/target-i386/translate.c
r9015 r9486 137 137 int cpuid_features; 138 138 int cpuid_ext_features; 139 int cpuid_ext2_features; 140 int cpuid_ext3_features; 139 141 } DisasContext; 140 142 … … 5427 5429 break; 5428 5430 case 0x9e: /* sahf */ 5429 if (CODE64(s) )5431 if (CODE64(s) && !(s->cpuid_ext3_features & CPUID_EXT3_LAHF_LM)) 5430 5432 goto illegal_op; 5431 5433 gen_op_mov_TN_reg[OT_BYTE][0][R_AH](); … … 5436 5438 break; 5437 5439 case 0x9f: /* lahf */ 5438 if (CODE64(s) )5440 if (CODE64(s) && !(s->cpuid_ext3_features & CPUID_EXT3_LAHF_LM)) 5439 5441 goto illegal_op; 5440 5442 if (s->cc_op != CC_OP_DYNAMIC) … … 6788 6790 dc->cpuid_features = env->cpuid_features; 6789 6791 dc->cpuid_ext_features = env->cpuid_ext_features; 6792 dc->cpuid_ext2_features = env->cpuid_ext2_features; 6793 dc->cpuid_ext3_features = env->cpuid_ext3_features; 6790 6794 #ifdef TARGET_X86_64 6791 6795 dc->lma = (flags >> HF_LMA_SHIFT) & 1;
Note:
See TracChangeset
for help on using the changeset viewer.

