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:
ted.mielczarek 2009-12-14 11:47:53 +00:00
parent bb618860df
commit 9dcc03f47d

View file

@ -637,6 +637,7 @@ bool MinidumpGenerator::WriteSystemInfoStream(
// get version and feature info
cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2,
info_ptr->cpu.x86_cpu_info.feature_information);
// family
info_ptr->processor_level =
(info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8;
@ -644,6 +645,20 @@ bool MinidumpGenerator::WriteSystemInfoStream(
info_ptr->processor_revision =
(info_ptr->cpu.x86_cpu_info.version_information & 0xF) |
((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__
break;
default: