Note that the definitions of the macros in this table which are sizes or
alignments measured in bits do not need to be constant. They can be C
expressions that refer to static variables, such as the target_flags
.
See section Run-time Target Specification.
BITS_BIG_ENDIAN
BYTES_BIG_ENDIAN
.
BYTES_BIG_ENDIAN
WORDS_BIG_ENDIAN
LIBGCC2_WORDS_BIG_ENDIAN
FLOAT_WORDS_BIG_ENDIAN
DFmode
, XFmode
or
TFmode
floating point numbers are stored in memory with the word
containing the sign bit at the lowest address; otherwise define it to
have the value 0. This macro need not be a constant.
You need not define this macro if the ordering is the same as for
multi-word integers.
BITS_PER_UNIT
BITS_PER_WORD
MAX_BITS_PER_WORD
BITS_PER_WORD
. Otherwise, it is the constant value that is the
largest value that BITS_PER_WORD
can have at run-time.
UNITS_PER_WORD
MIN_UNITS_PER_WORD
UNITS_PER_WORD
. Otherwise, it is the constant value that is the
smallest value that UNITS_PER_WORD
can have at run-time.
POINTER_SIZE
Pmode
. If it is not equal to the width of Pmode
,
you must define POINTERS_EXTEND_UNSIGNED
.
POINTERS_EXTEND_UNSIGNED
POINTER_SIZE
bits wide to Pmode
are sign-extended and zero if they are zero-extended.
You need not define this macro if the POINTER_SIZE
is equal
to the width of Pmode
.
PROMOTE_MODE (m, unsignedp, type)
word_mode
if
m is an integer mode narrower than BITS_PER_WORD
. In most
cases, only integer modes should be widened because wider-precision
floating-point operations are usually more expensive than their narrower
counterparts.
For most machines, the macro definition does not change unsignedp.
However, some machines, have instructions that preferentially handle
either signed or unsigned quantities of certain modes. For example, on
the DEC Alpha, 32-bit loads from memory and 32-bit add instructions
sign-extend the result to 64 bits. On such machines, set
unsignedp according to which kind of extension is more efficient.
Do not define this macro if it would never modify m.
PROMOTE_FUNCTION_ARGS
PROMOTE_MODE
should also be done for outgoing function arguments.
PROMOTE_FUNCTION_RETURN
PROMOTE_MODE
should also be done for the return value of functions.
If this macro is defined, FUNCTION_VALUE
must perform the same
promotions done by PROMOTE_MODE
.
PROMOTE_FOR_CALL_ONLY
PROMOTE_MODE
should only be performed for outgoing function arguments or
function return values, as specified by PROMOTE_FUNCTION_ARGS
and PROMOTE_FUNCTION_RETURN
, respectively.
PARM_BOUNDARY
STACK_BOUNDARY
PUSH_ROUNDING
is not defined, the stack will always be aligned
to the specified boundary. If PUSH_ROUNDING
is defined and specifies a
less strict alignment than STACK_BOUNDARY
, the stack may be
momentarily unaligned while pushing arguments.
FUNCTION_BOUNDARY
BIGGEST_ALIGNMENT
MINIMUM_ATOMIC_ALIGNMENT
BITS_PER_UNIT
, but may be larger
on machines that don't have byte or half-word store operations.
BIGGEST_FIELD_ALIGNMENT
BIGGEST_ALIGNMENT
for
structure fields only.
ADJUST_FIELD_ALIGN (field, computed)
BIGGEST_ALIGNMENT
or
BIGGEST_FIELD_ALIGNMENT
, if defined, for structure fields only.
MAX_OFILE_ALIGNMENT
__attribute__ ((aligned (n)))
construct. If not defined,
the default value is BIGGEST_ALIGNMENT
.
DATA_ALIGNMENT (type, basic-align)
strcpy
calls that copy
constants to character arrays can be done inline.
CONSTANT_ALIGNMENT (constant, basic-align)
strcpy
calls that copy
constants can be done inline.
EMPTY_FIELD_BOUNDARY
int : 0;
.
Note that PCC_BITFIELD_TYPE_MATTERS
also affects the alignment
that results from an empty field.
STRUCTURE_SIZE_BOUNDARY
BITS_PER_UNIT
.
STRICT_ALIGNMENT
PCC_BITFIELD_TYPE_MATTERS
int
,
short
, or other integer type) imposes an alignment for the
entire structure, as if the structure really did contain an ordinary
field of that type. In addition, the bitfield is placed within the
structure so that it would fit within such a field, not crossing a
boundary for it.
Thus, on most machines, a bitfield whose type is written as int
would not cross a four-byte boundary, and would force four-byte
alignment for the whole structure. (The alignment used may not be four
bytes; it is controlled by the other alignment parameters.)
If the macro is defined, its definition should be a C expression;
a nonzero value for the expression enables this behavior.
Note that if this macro is not defined, or its value is zero, some
bitfields may cross more than one alignment boundary. The compiler can
support such references if there are `insv', `extv', and
`extzv' insns that can directly reference memory.
The other known way of making bitfields work is to define
STRUCTURE_SIZE_BOUNDARY
as large as BIGGEST_ALIGNMENT
.
Then every structure can be accessed with fullwords.
Unless the machine has bitfield instructions or you define
STRUCTURE_SIZE_BOUNDARY
that way, you must define
PCC_BITFIELD_TYPE_MATTERS
to have a nonzero value.
If your aim is to make GNU CC use the same conventions for laying out
bitfields as are used by another compiler, here is how to investigate
what the other compiler does. Compile and run this program:
struct foo1 { char x; char :0; char y; }; struct foo2 { char x; int :0; char y; }; main () { printf ("Size of foo1 is %d\n", sizeof (struct foo1)); printf ("Size of foo2 is %d\n", sizeof (struct foo2)); exit (0); }If this prints 2 and 5, then the compiler's behavior is what you would get from
PCC_BITFIELD_TYPE_MATTERS
.
BITFIELD_NBYTES_LIMITED
ROUND_TYPE_SIZE (struct, size, align)
ROUND_TYPE_ALIGN (struct, computed, specified)
BIGGEST_ALIGNMENT
MAX_FIXED_MODE_SIZE
GET_MODE_BITSIZE
(DImode)
is assumed.
CHECK_FLOAT_VALUE (mode, value, overflow)
double
) for mode mode. This means that you check whether
value fits within the possible range of values for mode
mode on this target machine. The mode mode is always
a mode of class MODE_FLOAT
. overflow is nonzero if
the value is already known to be out of range.
If value is not valid or if overflow is nonzero, you should
set overflow to 1 and then assign some valid value to value.
Allowing an invalid value to go through the compiler can produce
incorrect assembler code which may even cause Unix assemblers to crash.
This macro need not be defined if there is no work for it to do.
TARGET_FLOAT_FORMAT
IEEE_FLOAT_FORMAT
VAX_FLOAT_FORMAT
UNKNOWN_FLOAT_FORMAT
HOST_FLOAT_FORMAT
(see section The Configuration File) to determine whether the target machine has the same
format as the host machine. If any other formats are actually in use on
supported machines, new codes should be defined for them.
The ordering of the component words of floating point values stored in
memory is controlled by FLOAT_WORDS_BIG_ENDIAN
for the target
machine and HOST_FLOAT_WORDS_BIG_ENDIAN
for the host.
Go to the first, previous, next, last section, table of contents.