^

AR# 22480 12.1 EDK - Are there target-specific definitions for the MicroBlaze and PowerPC processors?

Are there target-specific definitions for the MicroBlaze and PowerPC processors in the GNU compiler?
There are target-specific #defines built into mb-gcc and powerpc-eabi-gcc compilers. Following is an example piece of code to demonstrate usage for MicroBlaze and PowerPC, respectively:

#if defined(__PPC__)

if (hdr->ih_arch != IH_CPU_PPC)

#elif defined(__MICROBLAZE__)

if (hdr->ih_arch != IH_CPU_MICROBLAZE)

#else

# error Unknown CPU type

#endif

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
34609 12.x EDK - Master Answer Record List N/A N/A
AR# 22480
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article
Tools
  • EDK - 11.5
  • EDK - 12.1
  • EDK - 12.2
Feed Back