Mozilla bug 532713 - OS X client code doesn't decoded extended family ids in CPU info. Patch by Jeff Muizelaar <jmuizelaar@mozilla.com>, r=me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@440 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
bb618860df
commit
9dcc03f47d
1 changed files with 15 additions and 0 deletions
|
@ -637,6 +637,7 @@ bool MinidumpGenerator::WriteSystemInfoStream(
|
||||||
// get version and feature info
|
// get version and feature info
|
||||||
cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2,
|
cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2,
|
||||||
info_ptr->cpu.x86_cpu_info.feature_information);
|
info_ptr->cpu.x86_cpu_info.feature_information);
|
||||||
|
|
||||||
// family
|
// family
|
||||||
info_ptr->processor_level =
|
info_ptr->processor_level =
|
||||||
(info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8;
|
(info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8;
|
||||||
|
@ -644,6 +645,20 @@ bool MinidumpGenerator::WriteSystemInfoStream(
|
||||||
info_ptr->processor_revision =
|
info_ptr->processor_revision =
|
||||||
(info_ptr->cpu.x86_cpu_info.version_information & 0xF) |
|
(info_ptr->cpu.x86_cpu_info.version_information & 0xF) |
|
||||||
((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4);
|
((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4);
|
||||||
|
|
||||||
|
// decode extended model info
|
||||||
|
if (info_ptr->processor_level == 0xF ||
|
||||||
|
info_ptr->processor_level == 0x6) {
|
||||||
|
info_ptr->processor_revision |=
|
||||||
|
((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// decode extended family info
|
||||||
|
if (info_ptr->processor_level == 0xF) {
|
||||||
|
info_ptr->processor_level +=
|
||||||
|
((info_ptr->cpu.x86_cpu_info.version_information & 0xFF00000) >> 20);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // __i386__
|
#endif // __i386__
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue