diff options
author | Sriraman Tallam <tmsriram@google.com> | 2012-04-25 02:04:22 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@gcc.gnu.org> | 2012-04-25 02:04:22 +0000 |
commit | ad491329d9f70bf2c4dfcfc998493e38a4c76a2f (patch) | |
tree | c3e804e4421074166c7d37df8d8e70e4d8fc161d | |
parent | 3b34ddb8e0acc3bb6c103dae6ee1d1d1a7756229 (diff) | |
download | gcc-ad491329d9f70bf2c4dfcfc998493e38a4c76a2f.tar.gz |
i386-cpuinfo.c: Set __cpu_vendor always.
2012-04-24 Sriraman Tallam <tmsriram@google.com>
* libgcc/config/i386/i386-cpuinfo.c: Set __cpu_vendor always.
From-SVN: r186795
-rw-r--r-- | libgcc/ChangeLog | 4 | ||||
-rw-r--r-- | libgcc/config/i386/i386-cpuinfo.c | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 8040eaf1fcb..638994aa3bc 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,9 @@ 2012-04-24 Sriraman Tallam <tmsriram@google.com> + * libgcc/config/i386/i386-cpuinfo.c: Set __cpu_vendor always. + +2012-04-24 Sriraman Tallam <tmsriram@google.com> + * libgcc/config/i386/i386-cpuinfo.c: New file. * libgcc/config/i386/t-cpuinfo: New file. * libgcc/config.host: Include t-cpuinfo. diff --git a/libgcc/config/i386/i386-cpuinfo.c b/libgcc/config/i386/i386-cpuinfo.c index 0735d2cd159..dccf1d58f27 100644 --- a/libgcc/config/i386/i386-cpuinfo.c +++ b/libgcc/config/i386/i386-cpuinfo.c @@ -256,16 +256,25 @@ __cpu_indicator_init (void) /* Assume cpuid insn present. Run in level 0 to get vendor id. */ if (!__get_cpuid_output (0, &eax, &ebx, &ecx, &edx)) - return -1; + { + __cpu_model.__cpu_vendor = VENDOR_OTHER; + return -1; + } vendor = ebx; max_level = eax; if (max_level < 1) - return -1; + { + __cpu_model.__cpu_vendor = VENDOR_OTHER; + return -1; + } if (!__get_cpuid_output (1, &eax, &ebx, &ecx, &edx)) - return -1; + { + __cpu_model.__cpu_vendor = VENDOR_OTHER; + return -1; + } model = (eax >> 4) & 0x0f; family = (eax >> 8) & 0x0f; |