This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH 1/2] i386-cpuid: add support for identifying a processor


> -----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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]