- Timestamp:
- 07/21/11 03:44:29 (13 years ago)
- Location:
- ps/trunk/source/lib/sysdep/arch
- Files:
-
- 6 deleted
- 2 edited
-
amd64/amd64_abi.inc (deleted)
-
amd64/amd64_asm.asm (deleted)
-
amd64/amd64_asm.h (deleted)
-
ia32/ia32.cpp (modified) (2 diffs)
-
ia32/ia32.inc (deleted)
-
ia32/ia32_asm.asm (deleted)
-
ia32/ia32_asm.h (deleted)
-
x86_x64/x86_x64.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/lib/sysdep/arch/ia32/ia32.cpp
r9871 r9891 1 /* Copyright (c) 201 0Wildfire Games1 /* Copyright (c) 2011 Wildfire Games 2 2 * 3 3 * Permission is hereby granted, free of charge, to any person obtaining … … 29 29 #include "lib/sysdep/cpu.h" 30 30 #include "lib/sysdep/arch/ia32/ia32.h" 31 #include "lib/sysdep/arch/ia32/ia32_asm.h"32 31 33 32 #if MSC_VERSION -
ps/trunk/source/lib/sysdep/arch/x86_x64/x86_x64.cpp
r9886 r9891 1 /* Copyright (c) 201 0Wildfire Games1 /* Copyright (c) 2011 Wildfire Games 2 2 * 3 3 * Permission is hereby granted, free of charge, to any person obtaining … … 45 45 #endif 46 46 47 #define HAVE_CPUIDEX 0 48 #if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 150030729 // __cpuidex available on VC10+ and VC9 SP1 (allows setting ecx beforehand) 49 # undef HAVE_CPUIDEX 50 # define HAVE_CPUIDEX 1 47 #if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 150030729 48 // VC10+ and VC9 SP1: __cpuidex is already available 49 #elif GCC_VERSION 50 # define __cpuidex(regsArray, level, index)\ 51 __asm__ __volatile__ ("cpuid"\ 52 : "=a" ((regsArray)[0]), "=b" ((regsArray)[1]), "=c" ((regsArray)[2]), "=d" ((regsArray)[3])\ 53 : "0" (level), "2" (index)); 51 54 #else 52 # if ARCH_AMD64 53 # include "lib/sysdep/arch/amd64/amd64_asm.h" 54 # else 55 # include "lib/sysdep/arch/ia32/ia32_asm.h" 56 # endif 55 # error "compiler not supported" 57 56 #endif 58 57 … … 73 72 static void cpuid(x86_x64_CpuidRegs* regs) 74 73 { 75 #if HAVE_CPUIDEX76 74 cassert(sizeof(regs->eax) == sizeof(int)); 77 75 cassert(sizeof(*regs) == 4*sizeof(int)); 78 76 __cpuidex((int*)regs, regs->eax, regs->ecx); 79 #else80 # if ARCH_AMD6481 amd64_asm_cpuid(regs);82 # else83 ia32_asm_cpuid(regs);84 # endif85 #endif86 77 } 87 78
Note:
See TracChangeset
for help on using the changeset viewer.
