processor type defines: __PPC403__, __PPC750__ would be nice?

Dan Kegel dank@kegel.com
Sat Apr 20 09:59:00 GMT 2002


Today I needed to check for the processor type in
a program that compiles on ppc403, ppc750, sh4, and generic pentium.
The tests, judging from the specs files of my gccs, would be

#ifdef __SH4__
#if CPU==PPC403
#if CPU==PPC750
#ifdef __i386__

Hmm.  That's not very uniform.  Is there a more uniform scheme
I could use?  A URL where I could RTFM would be greatly appreciated.

Or am I right in thinking that the symbols
__PPC403__ and __PPC750__ should be added to the specs file
for gcc on those platforms to make processor type detection
a little more similar in the ppc world to how it's done elsewhere?
Then my programs could do

#ifdef __SH4__
#ifdef __PPC403__
#ifdef __PPC750__
#ifdef __i386__

which is a bit more pleasing.
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list