mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-01-11 03:35:31 +00:00
Fix gcc vs clang cpuid.h discrepency.
For r1254, gcc defines bit_FXSAVE while clang defines bit_FXSR. R=mark@chromium.org Review URL: https://breakpad.appspot.com/924002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1260 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
ba1f54c093
commit
3c613e7bdb
|
@ -195,6 +195,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__i386)
|
#if defined(__i386)
|
||||||
|
#if !defined(bit_FXSAVE) // e.g. Clang
|
||||||
|
#define bit_FXSAVE bit_FXSR
|
||||||
|
#endif
|
||||||
// Detect if the CPU supports the FXSAVE/FXRSTOR instructions
|
// Detect if the CPU supports the FXSAVE/FXRSTOR instructions
|
||||||
int eax, ebx, ecx, edx;
|
int eax, ebx, ecx, edx;
|
||||||
__cpuid(1, eax, ebx, ecx, edx);
|
__cpuid(1, eax, ebx, ecx, edx);
|
||||||
|
@ -205,7 +208,7 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) {
|
||||||
} else {
|
} else {
|
||||||
memset(&info->fpxregs, 0, sizeof(info->fpxregs));
|
memset(&info->fpxregs, 0, sizeof(info->fpxregs));
|
||||||
}
|
}
|
||||||
#endif
|
#endif // defined(__i386)
|
||||||
|
|
||||||
#if defined(__i386) || defined(__x86_64)
|
#if defined(__i386) || defined(__x86_64)
|
||||||
for (unsigned i = 0; i < ThreadInfo::kNumDebugRegisters; ++i) {
|
for (unsigned i = 0; i < ThreadInfo::kNumDebugRegisters; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue