This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 1/2] i386-cpuid: add support for identifying a processor
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Mike Frysinger <vapier at gentoo dot org>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: "jan dot kratochvil at redhat dot com" <jan dot kratochvil at redhat dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Date: Mon, 17 Feb 2014 08:03:50 +0000
- Subject: RE: [PATCH 1/2] i386-cpuid: add support for identifying a processor
- Authentication-results: sourceware.org; auth=none
- References: <1392294615-16416-1-git-send-email-markus dot t dot metzger at intel dot com> <1912377 dot WkKB1rPacE at vapier>
> -----Original Message-----
> From: Mike Frysinger [mailto:vapier@gentoo.org]
> Sent: Friday, February 14, 2014 6:30 PM
> > +#else /* i386 && x86_64 */
> > +
> > +/* See i386-cpuid.h. */
> > +
> > +struct i386_cpu
> > +i386_this_cpu (void)
> > +{
> > + struct i386_cpu cpu;
> > +
> > + cpu.vendor = CV_UNKNOWN;
> > +
> > + return cpu;
> > +}
> > +
> > +#endif /* i386 && x86_64 */
>
>
> afaict, you don't need the #else. the non-x86 codepaths in i386-cpuid.h will
> set the return value to 0, and your main code will treat this as an error and
> set cpu.vendor to CV_UNKNOWN.
Thanks, you're right. That'll simplify it.
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052