i960 Processor Compiler User's Guide
3-6
3
ic960 and Predefined Macros
Predefined macros within a program can act as constants during execution
or as values in conditional-compilation statements. Predefined macros
include ANSI-standard macros and macros specific to the i960 processor
architecture. The
U (Undefine) option can remove i960 processor-specific
macros but not ANSI-standard macros.
The following macros are available in accordance with the ANSI standard
for C, as described in the book, C: A Reference Manual:
__DATE__ __FILE__ __LINE__ __TIME__ __STDC__
The following macros are predefined by the compilation system when
invoked with the ic960 driver program:
__IC960 indicates the CTOOLS960 compilation system.
The compiler defines
__IC960 automatically,
when invoked with the ic960 driver.
__IC960_VER is defined to a decimal number that can be used
to check the version number of the compiler.
The number is expressed in decimal as
MmmPPPP
, where
M
is the major version number,
mm
is the minor version number, and
PPPP
is an
internal version number that is used to track the
patch level. So, for example, R4.5 patch level
4008 has
__IC960_VER defined to be 4054008.
__i960 indicates the i960 processor environment. The
compiler defines
__i960 automatically. This
macro can be used to identify the parts of a
program specific to the i960 processor.