Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-0]: src/external/gpl3/gcc/dist/gcc/config/i386 Pull up followin...
details: https://anonhg.NetBSD.org/src/rev/84521c2eb142
branches: netbsd-7-0
changeset: 801095:84521c2eb142
user: snj <snj%NetBSD.org@localhost>
date: Thu Dec 10 23:47:26 2015 +0000
description:
Pull up following revision(s) (requested by christos in ticket #1048):
external/gpl3/gcc/dist/gcc/config/i386/cpuid.h: revision 1.2
Fix logic bug where __cpuid gets called when __get_cpuid_max() returns 0.
This happens when __level == 0, from libgcc/config/i386/cpuinfo.c#285.
This breaks early i486 CPUs which don't have cpuid
diffstat:
external/gpl3/gcc/dist/gcc/config/i386/cpuid.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 693792791fcf -r 84521c2eb142 external/gpl3/gcc/dist/gcc/config/i386/cpuid.h
--- a/external/gpl3/gcc/dist/gcc/config/i386/cpuid.h Sun Nov 22 14:22:16 2015 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/i386/cpuid.h Thu Dec 10 23:47:26 2015 +0000
@@ -259,8 +259,9 @@
unsigned int *__ecx, unsigned int *__edx)
{
unsigned int __ext = __level & 0x80000000;
+ unsigned int __maxlevel = __get_cpuid_max (__ext, 0);
- if (__get_cpuid_max (__ext, 0) < __level)
+ if (__maxlevel == 0 || __maxlevel < __level)
return 0;
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
Home |
Main Index |
Thread Index |
Old Index