Line 51... |
Line 51... |
"%{!mnewlib*:%{pthread:-D_XOPEN_SOURCE=700}}" \
|
"%{!mnewlib*:%{pthread:-D_XOPEN_SOURCE=700}}" \
|
"%{mnewlib*:-idirafter %(target_prefix)/newlib-include}"
|
"%{mnewlib*:-idirafter %(target_prefix)/newlib-include}"
|
|
|
/* Make sure we pick up the crti.o, crtbegin.o, crtend.o and crtn.o files. */
|
/* Make sure we pick up the crti.o, crtbegin.o, crtend.o and crtn.o files. */
|
#undef STARTFILE_SPEC
|
#undef STARTFILE_SPEC
|
#define STARTFILE_SPEC "%{!shared:%{mnewlib:%(target_prefix)/lib/crt0.o} \
|
#define STARTFILE_SPEC \
|
%{!mnewlib:crt0.o%s} crti.o%s crtbegin.o%s}"
|
"%{!shared:"\
|
|
"%{mnewlib*:%(target_prefix)/lib/crt0.o} "\
|
|
"%{mnewlib-*:%(target_prefix)/lib/crtparam-%*.o} "\
|
|
"%{!mnewlib*:crt0.o%s} crti.o%s crtbegin.o%s}"
|
|
|
|
#undef ENDFILE_SPEC
|
|
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
|
|
|
/* Specify the newlib library path if necessary */
|
|
#undef LINK_SPEC
|
|
#define LINK_SPEC "%{mnewlib:-L%(target_prefix)/newlib}"
|
|
|
|
/* Override previous definitions (linux.h). Newlib doesn't have a profiling
|
|
version of the library, but it does have a debugging version (libg.a) */
|
|
#undef LIB_SPEC
|
|
#define LIB_SPEC "%{!mnewlib:" \
|
|
"%{pthread:" \
|
|
"--whole-archive -lpthread --no-whole-archive} " \
|
|
"%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}} \
|
|
%{mnewlib:%{!g:-lc -lor32 -lboard -u free -lc} \
|
|
%{g:-lg -lor32 -lboard -u free -lg} \
|
|
%{mboard=*:-L%(target_prefix)/lib/boards/%*} \
|
|
%{!mboard=*:-L%(target_prefix)/lib/boards/or1ksim}}"
|
|
|
|
#define TARGET_VERSION fprintf (stderr, " (OpenRISC 1000) Mask 0x%x", MASK_HARD_MUL);
|
|
|
#undef ENDFILE_SPEC
|
/* Run-time compilation parameters selecting different hardware subsets. */
|
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
|
|
|
/* Specify the newlib library path if necessary */
|
extern int target_flags;
|
#undef LINK_SPEC
|
|
#define LINK_SPEC "%{mnewlib:-L%(target_prefix)/newlib}"
|
|
|
|
/* Override previous definitions (linux.h). Newlib doesn't have a profiling
|
/* Target machine storage layout */
|
version of the library, but it does have a debugging version (libg.a) */
|
|
|
|
#undef LIB_SPEC
|
/* Define this if most significant bit is lowest numbered
|
#define LIB_SPEC "%{!mnewlib:" \
|
|
"%{pthread:" \
|
|
"--whole-archive -lpthread --no-whole-archive} " \
|
|
"%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}} \
|
|
%{mnewlib:%{!g:-lc -lor32 -lboard -u free -lc} \
|
|
%{g:-lg -lor32 -lboard -u free -lg} \
|
|
%{mboard=*:-L%(target_prefix)/lib/boards/%*} \
|
|
%{!mboard=*:-L%(target_prefix)/lib/boards/or1ksim}}"
|
|
|
|
|
|
#define TARGET_VERSION fprintf (stderr, " (OpenRISC 1000) Mask 0x%x", MASK_HARD_MUL);
|
|
|
|
/* Run-time compilation parameters selecting different hardware subsets. */
|
|
|
|
extern int target_flags;
|
|
|
|
/* Target machine storage layout */
|
|
|
|
/* Define this if most significant bit is lowest numbered
|
|
in instructions that operate on numbered bit-fields.
|
in instructions that operate on numbered bit-fields.
|
This is not true on the or32. */
|
This is not true on the or32. */
|
#define BITS_BIG_ENDIAN 0
|
#define BITS_BIG_ENDIAN 0
|
|
|
/* Define this if most significant byte of a word is the lowest numbered. */
|
/* Define this if most significant byte of a word is the lowest numbered. */
|
#define BYTES_BIG_ENDIAN 1
|
#define BYTES_BIG_ENDIAN 1
|
|
|
/* Define this if most significant word of a multiword number is numbered. */
|
/* Define this if most significant word of a multiword number is numbered. */
|
#define WORDS_BIG_ENDIAN 1
|
#define WORDS_BIG_ENDIAN 1
|
|
|
/* Number of bits in an addressable storage unit */
|
/* Number of bits in an addressable storage unit */
|
#define BITS_PER_UNIT 8
|
#define BITS_PER_UNIT 8
|
|
|
#define BITS_PER_WORD 32
|
#define BITS_PER_WORD 32
|
#define SHORT_TYPE_SIZE 16
|
#define SHORT_TYPE_SIZE 16
|
#define INT_TYPE_SIZE 32
|
#define INT_TYPE_SIZE 32
|
#define LONG_TYPE_SIZE 32
|
#define LONG_TYPE_SIZE 32
|
#define LONG_LONG_TYPE_SIZE 64
|
#define LONG_LONG_TYPE_SIZE 64
|
#define FLOAT_TYPE_SIZE 32
|
#define FLOAT_TYPE_SIZE 32
|
#define DOUBLE_TYPE_SIZE 64
|
#define DOUBLE_TYPE_SIZE 64
|
#define LONG_DOUBLE_TYPE_SIZE 64
|
#define LONG_DOUBLE_TYPE_SIZE 64
|
|
|
/* Width of a word, in units (bytes). */
|
/* Width of a word, in units (bytes). */
|
#define UNITS_PER_WORD 4
|
#define UNITS_PER_WORD 4
|
|
|
/* Width in bits of a pointer.
|
/* Width in bits of a pointer.
|
See also the macro `Pmode' defined below. */
|
See also the macro `Pmode' defined below. */
|
#define POINTER_SIZE 32
|
#define POINTER_SIZE 32
|
|
|
/* Allocation boundary (in *bits*) for storing pointers in memory. */
|
/* Allocation boundary (in *bits*) for storing pointers in memory. */
|
#define POINTER_BOUNDARY 32
|
#define POINTER_BOUNDARY 32
|
|
|
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
|
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
|
#define PARM_BOUNDARY 32
|
#define PARM_BOUNDARY 32
|
|
|
/* Boundary (in *bits*) on which stack pointer should be aligned. */
|
/* Boundary (in *bits*) on which stack pointer should be aligned. */
|
#define STACK_BOUNDARY 32
|
#define STACK_BOUNDARY 32
|
|
|
/* Allocation boundary (in *bits*) for the code of a function. */
|
/* Allocation boundary (in *bits*) for the code of a function. */
|
#define FUNCTION_BOUNDARY 32
|
#define FUNCTION_BOUNDARY 32
|
|
|
/* Alignment of field after `int : 0' in a structure. */
|
/* Alignment of field after `int : 0' in a structure. */
|
#define EMPTY_FIELD_BOUNDARY 8
|
#define EMPTY_FIELD_BOUNDARY 8
|
|
|
/* Every structure's size must be a multiple of this. */
|
/* Every structure's size must be a multiple of this. */
|
#define STRUCTURE_SIZE_BOUNDARY (TARGET_PADSTRUCT ? 32 : 8)
|
#define STRUCTURE_SIZE_BOUNDARY (TARGET_PADSTRUCT ? 32 : 8)
|
|
|
/* A bitfield declared as `int' forces `int' alignment for the struct. */
|
/* A bitfield declared as `int' forces `int' alignment for the struct. */
|
#define PCC_BITFIELD_TYPE_MATTERS 1
|
#define PCC_BITFIELD_TYPE_MATTERS 1
|
|
|
/* No data type wants to be aligned rounder than this. */
|
/* No data type wants to be aligned rounder than this. */
|
#define BIGGEST_ALIGNMENT 32
|
#define BIGGEST_ALIGNMENT 32
|
|
|
/* The best alignment to use in cases where we have a choice. */
|
/* The best alignment to use in cases where we have a choice. */
|
#define FASTEST_ALIGNMENT 32
|
#define FASTEST_ALIGNMENT 32
|
|
|
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
|
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
|
((TREE_CODE (STRUCT) == RECORD_TYPE \
|
((TREE_CODE (STRUCT) == RECORD_TYPE \
|
|| TREE_CODE (STRUCT) == UNION_TYPE \
|
|| TREE_CODE (STRUCT) == UNION_TYPE \
|
|| TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
|
|| TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
|
&& !TYPE_PACKED (STRUCT) \
|
&& !TYPE_PACKED (STRUCT) \
|
&& TYPE_FIELDS (STRUCT) != 0 \
|
&& TYPE_FIELDS (STRUCT) != 0 \
|
? MAX (MAX ((COMPUTED), (SPECIFIED)), or32_struct_alignment (STRUCT)) \
|
? MAX (MAX ((COMPUTED), (SPECIFIED)), or32_struct_alignment (STRUCT)) \
|
: MAX ((COMPUTED), (SPECIFIED))) \
|
: MAX ((COMPUTED), (SPECIFIED))) \
|
|
|
/* Make strings word-aligned so strcpy from constants will be faster. */
|
/* Make strings word-aligned so strcpy from constants will be faster. */
|
/*
|
/*
|
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
|
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
|
((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \
|
((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \
|
&& (ALIGN) < FASTEST_ALIGNMENT \
|
&& (ALIGN) < FASTEST_ALIGNMENT \
|
? FASTEST_ALIGNMENT : (ALIGN))
|
? FASTEST_ALIGNMENT : (ALIGN))
|
*/
|
*/
|
|
|
/* One use of this macro is to increase alignment of medium-size
|
/* One use of this macro is to increase alignment of medium-size
|
data to make it all fit in fewer cache lines. Another is to
|
data to make it all fit in fewer cache lines. Another is to
|
cause character arrays to be word-aligned so that `strcpy' calls
|
cause character arrays to be word-aligned so that `strcpy' calls
|
that copy constants to character arrays can be done inline. */
|
that copy constants to character arrays can be done inline. */
|
/*
|
/*
|
#define DATA_ALIGNMENT(TYPE, ALIGN) \
|
#define DATA_ALIGNMENT(TYPE, ALIGN) \
|
((((ALIGN) < FASTEST_ALIGNMENT) \
|
((((ALIGN) < FASTEST_ALIGNMENT) \
|
&& (TREE_CODE (TYPE) == ARRAY_TYPE \
|
&& (TREE_CODE (TYPE) == ARRAY_TYPE \
|
|| TREE_CODE (TYPE) == UNION_TYPE \
|
|| TREE_CODE (TYPE) == UNION_TYPE \
|
|| TREE_CODE (TYPE) == RECORD_TYPE)) ? FASTEST_ALIGNMENT : (ALIGN))
|
|| TREE_CODE (TYPE) == RECORD_TYPE)) ? FASTEST_ALIGNMENT : (ALIGN))
|
*/ /* CHECK - btw code gets bigger with this one */
|
*/ /* CHECK - btw code gets bigger with this one */
|
#define DATA_ALIGNMENT(TYPE, ALIGN) \
|
#define DATA_ALIGNMENT(TYPE, ALIGN) \
|
((ALIGN) < FASTEST_ALIGNMENT \
|
((ALIGN) < FASTEST_ALIGNMENT \
|
? or32_data_alignment ((TYPE), (ALIGN)) : (ALIGN))
|
? or32_data_alignment ((TYPE), (ALIGN)) : (ALIGN))
|
|
|
#define LOCAL_ALIGNMENT(TYPE, ALIGN) \
|
#define LOCAL_ALIGNMENT(TYPE, ALIGN) \
|
((ALIGN) < FASTEST_ALIGNMENT \
|
((ALIGN) < FASTEST_ALIGNMENT \
|
? or32_data_alignment ((TYPE), (ALIGN)) : (ALIGN))
|
? or32_data_alignment ((TYPE), (ALIGN)) : (ALIGN))
|
|
|
/* Define this if move instructions will actually fail to work
|
/* Define this if move instructions will actually fail to work
|
when given unaligned data. */
|
when given unaligned data. */
|
#define STRICT_ALIGNMENT 1 /* CHECK */
|
#define STRICT_ALIGNMENT 1 /* CHECK */
|
|
|
/* Align an address */
|
/* Align an address */
|
#define OR32_ALIGN(n,a) (((n) + (a) - 1) & ~((a) - 1))
|
#define OR32_ALIGN(n,a) (((n) + (a) - 1) & ~((a) - 1))
|
|
|
/* Define if operations between registers always perform the operation
|
/* Define if operations between registers always perform the operation
|
on the full register even if a narrower mode is specified. */
|
on the full register even if a narrower mode is specified. */
|
#define WORD_REGISTER_OPERATIONS /* CHECK */
|
#define WORD_REGISTER_OPERATIONS /* CHECK */
|
|
|
|
|
/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
|
/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
|
will either zero-extend or sign-extend. The value of this macro should
|
will either zero-extend or sign-extend. The value of this macro should
|
be the code that says which one of the two operations is implicitly
|
be the code that says which one of the two operations is implicitly
|
done, NIL if none. */
|
done, NIL if none. */
|
#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
|
#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
|
|
|
/* Define this macro if it is advisable to hold scalars in registers
|
/* Define this macro if it is advisable to hold scalars in registers
|
in a wider mode than that declared by the program. In such cases,
|
in a wider mode than that declared by the program. In such cases,
|
the value is constrained to be within the bounds of the declared
|
the value is constrained to be within the bounds of the declared
|
type, but kept valid in the wider mode. The signedness of the
|
type, but kept valid in the wider mode. The signedness of the
|
extension may differ from that of the type. */
|
extension may differ from that of the type. */
|
#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \
|
#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \
|
if (GET_MODE_CLASS (MODE) == MODE_INT \
|
if (GET_MODE_CLASS (MODE) == MODE_INT \
|
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
|
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
|
(MODE) = SImode;
|
(MODE) = SImode;
|
/* CHECK */
|
/* CHECK */
|
|
|
|
|
/*
|
/*
|
* brings 0.4% improvment in static size for linux
|
* brings 0.4% improvment in static size for linux
|
*
|
*
|
#define PROMOTE_FOR_CALL_ONLY
|
#define PROMOTE_FOR_CALL_ONLY
|
*/
|
*/
|
|
|
/* Define this macro if it is as good or better to call a constant
|
/* Define this macro if it is as good or better to call a constant
|
function address than to call an address kept in a register. */
|
function address than to call an address kept in a register. */
|
#define NO_FUNCTION_CSE 1 /* check */
|
#define NO_FUNCTION_CSE 1 /* check */
|
|
|
/* Standard register usage. */
|
/* Standard register usage. */
|
|
|
/* Number of actual hardware registers.
|
/* Number of actual hardware registers.
|
The hardware registers are assigned numbers for the compiler
|
The hardware registers are assigned numbers for the compiler
|
from 0 to just below FIRST_PSEUDO_REGISTER.
|
from 0 to just below FIRST_PSEUDO_REGISTER.
|
All registers that the compiler knows about must be given numbers,
|
All registers that the compiler knows about must be given numbers,
|
even those that are not normally considered general registers. */
|
even those that are not normally considered general registers. */
|
|
|
#define OR32_LAST_ACTUAL_REG 31
|
#define OR32_LAST_ACTUAL_REG 31
|
#define ARG_POINTER_REGNUM (OR32_LAST_ACTUAL_REG + 1)
|
#define ARG_POINTER_REGNUM (OR32_LAST_ACTUAL_REG + 1)
|
#define FRAME_POINTER_REGNUM (ARG_POINTER_REGNUM + 1)
|
#define FRAME_POINTER_REGNUM (ARG_POINTER_REGNUM + 1)
|
#define OR32_LAST_INT_REG FRAME_POINTER_REGNUM
|
#define OR32_LAST_INT_REG FRAME_POINTER_REGNUM
|
#define OR32_FLAGS_REG (OR32_LAST_INT_REG + 1)
|
#define OR32_FLAGS_REG (OR32_LAST_INT_REG + 1)
|
#define FIRST_PSEUDO_REGISTER (OR32_FLAGS_REG + 1)
|
#define FIRST_PSEUDO_REGISTER (OR32_FLAGS_REG + 1)
|
|
|
/* 1 for registers that have pervasive standard uses
|
/* 1 for registers that have pervasive standard uses
|
and are not available for the register allocator.
|
and are not available for the register allocator.
|
On the or32, these are r1 as stack pointer and
|
On the or32, these are r1 as stack pointer and
|
r2 as frame/arg pointer. r9 is link register, r0
|
r2 as frame/arg pointer. r9 is link register, r0
|
is zero, r10 is linux thread */
|
is zero, r10 is linux thread */
|
#define FIXED_REGISTERS { \
|
#define FIXED_REGISTERS { \
|
1, 1, 0, 0, 0, 0, 0, 0, \
|
1, 1, 0, 0, 0, 0, 0, 0, \
|
0, 1, 1, 0, 0, 0, 0, 0, \
|
0, 1, 1, 0, 0, 0, 0, 0, \
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 }
|
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 }
|
/* 1 for registers not available across function calls.
|
/* 1 for registers not available across function calls.
|
These must include the FIXED_REGISTERS and also any
|
These must include the FIXED_REGISTERS and also any
|
registers that can be used without being saved.
|
registers that can be used without being saved.
|
The latter must include the registers where values are returned
|
The latter must include the registers where values are returned
|
and the register where structure-value addresses are passed.
|
and the register where structure-value addresses are passed.
|
Aside from that, you can include as many other registers as you like. */
|
Aside from that, you can include as many other registers as you like. */
|
#define CALL_USED_REGISTERS { \
|
#define CALL_USED_REGISTERS { \
|
1, 1, 0, 1, 1, 1, 1, 1, \
|
1, 1, 0, 1, 1, 1, 1, 1, \
|
1, 1, 1, 1, 1, 1, 0, 1, \
|
1, 1, 1, 1, 1, 1, 0, 1, \
|
0, 1, 0, 1, 0, 1, 0, 1, \
|
0, 1, 0, 1, 0, 1, 0, 1, \
|
0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1}
|
0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1}
|
|
|
/* stack pointer: must be FIXED and CALL_USED */
|
/* stack pointer: must be FIXED and CALL_USED */
|
/* hard frame pointer: must be call saved. */
|
/* hard frame pointer: must be call saved. */
|
/* soft frame pointer / arg pointer: must be FIXED and CALL_USED */
|
/* soft frame pointer / arg pointer: must be FIXED and CALL_USED */
|
|
|
/* Return number of consecutive hard regs needed starting at reg REGNO
|
/* Return number of consecutive hard regs needed starting at reg REGNO
|
to hold something of mode MODE.
|
to hold something of mode MODE.
|
This is ordinarily the length in words of a value of mode MODE
|
This is ordinarily the length in words of a value of mode MODE
|
but can be less for certain modes in special long registers.
|
but can be less for certain modes in special long registers.
|
On the or32, all registers are one word long. */
|
On the or32, all registers are one word long. */
|
#define HARD_REGNO_NREGS(REGNO, MODE) \
|
#define HARD_REGNO_NREGS(REGNO, MODE) \
|
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
|
|
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
|
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
|
#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
|
#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
|
|
|
/* Value is 1 if it is a good idea to tie two pseudo registers
|
/* Value is 1 if it is a good idea to tie two pseudo registers
|
when one has mode MODE1 and one has mode MODE2.
|
when one has mode MODE1 and one has mode MODE2.
|
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
|
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
|
for any hard reg, then this must be 0 for correct output. */
|
for any hard reg, then this must be 0 for correct output. */
|
#define MODES_TIEABLE_P(MODE1, MODE2) 1
|
#define MODES_TIEABLE_P(MODE1, MODE2) 1
|
|
|
/* A C expression for the cost of moving data of mode mode from a register in
|
/* A C expression for the cost of moving data of mode mode from a register in
|
class "from" to one in class "to". The classes are expressed using the
|
class "from" to one in class "to". The classes are expressed using the
|
enumeration values such as GENERAL_REGS. A value of 2 is the default; other
|
enumeration values such as GENERAL_REGS. A value of 2 is the default; other
|
values are interpreted relative to that.
|
values are interpreted relative to that.
|
|
|
It is not required that the cost always equal 2 when "from" is the same as
|
It is not required that the cost always equal 2 when "from" is the same as
|
"to"; on some machines it is expensive to move between registers if they are
|
"to"; on some machines it is expensive to move between registers if they are
|
not general registers.
|
not general registers.
|
|
|
If reload sees an insn consisting of a single set between two hard
|
If reload sees an insn consisting of a single set between two hard
|
registers, and if REGISTER_MOVE_COST applied to their classes returns a
|
registers, and if REGISTER_MOVE_COST applied to their classes returns a
|
value of 2, reload does not check to ensure that the constraints of the
|
value of 2, reload does not check to ensure that the constraints of the
|
insn are met. Setting a cost of other than 2 will allow reload to verify
|
insn are met. Setting a cost of other than 2 will allow reload to verify
|
that the constraints are met. You should do this if the "movm" pattern's
|
that the constraints are met. You should do this if the "movm" pattern's
|
constraints do not allow such copying.
|
constraints do not allow such copying.
|
|
|
JPB 31-Aug-10: This is just the default. */
|
JPB 31-Aug-10: This is just the default. */
|
#define REGISTER_MOVE_COST(mode, from, to) 2
|
#define REGISTER_MOVE_COST(mode, from, to) 2
|
|
|
/* A C expression for the cost of moving data of mode mode between a register
|
/* A C expression for the cost of moving data of mode mode between a register
|
of class "class" and memory; "in" is zero if the value is to be written to
|
of class "class" and memory; "in" is zero if the value is to be written to
|
memory, nonzero if it is to be read in. This cost is relative to those in
|
memory, nonzero if it is to be read in. This cost is relative to those in
|
REGISTER_MOVE_COST. If moving between registers and memory is more
|
REGISTER_MOVE_COST. If moving between registers and memory is more
|
expensive than between two registers, you should define this macro to
|
expensive than between two registers, you should define this macro to
|
express the relative cost.
|
express the relative cost.
|
|
|
Line 306... |
Line 307... |
of copying via a secondary reload register, if one is needed. If your
|
of copying via a secondary reload register, if one is needed. If your
|
machine requires a secondary reload register to copy between memory and a
|
machine requires a secondary reload register to copy between memory and a
|
register of class but the reload mechanism is more complex than copying via
|
register of class but the reload mechanism is more complex than copying via
|
an intermediate, define this macro to reflect the actual cost of the move.
|
an intermediate, define this macro to reflect the actual cost of the move.
|
|
|
GCC defines the function "memory_move_secondary_cost" if secondary reloads
|
GCC defines the function "memory_move_secondary_cost" if secondary reloads
|
are needed. It computes the costs due to copying via a secondary
|
are needed. It computes the costs due to copying via a secondary
|
register. If your machine copies from memory using a secondary register in
|
register. If your machine copies from memory using a secondary register in
|
the conventional way but the default base value of 4 is not correct for
|
the conventional way but the default base value of 4 is not correct for
|
your machine, define this macro to add some other value to the result of
|
your machine, define this macro to add some other value to the result of
|
that function. The arguments to that function are the same as to this
|
that function. The arguments to that function are the same as to this
|
macro.
|
macro.
|
|
|
JPB 31-Aug-10. Is this really correct? I suppose the OR32 only takes one
|
JPB 31-Aug-10. Is this really correct? I suppose the OR32 only takes one
|
cycle, notionally, to access memory, but surely that will
|
cycle, notionally, to access memory, but surely that will
|
often stall the pipeline. Needs more investigation. */
|
often stall the pipeline. Needs more investigation. */
|
#define MEMORY_MOVE_COST(mode, class, in) 2
|
#define MEMORY_MOVE_COST(mode, class, in) 2
|
|
|
/* A C expression for the cost of a branch instruction. A value of 1 is the
|
/* A C expression for the cost of a branch instruction. A value of 1 is the
|
default; other values are interpreted relative to that. Parameter "speed_p"
|
default; other values are interpreted relative to that. Parameter "speed_p"
|
is TRUE when the branch in question should be optimized for speed. When it
|
is TRUE when the branch in question should be optimized for speed. When it
|
is FALSE, BRANCH_COST should be returning value optimal for code size
|
is FALSE, BRANCH_COST should be returning value optimal for code size
|
rather then performance considerations. "predictable_p" is true for well
|
rather then performance considerations. "predictable_p" is true for well
|
predictable branches. On many architectures the BRANCH_COST can be reduced
|
predictable branches. On many architectures the BRANCH_COST can be reduced
|
then.
|
then.
|
|
|
JPB 31-Aug-10. The original code had the comment that "... this should
|
JPB 31-Aug-10. The original code had the comment that "... this should
|
specify the cost of a branch insn; roughly the number of
|
specify the cost of a branch insn; roughly the number of
|
extra insns that should be added to avoid a branch.
|
extra insns that should be added to avoid a branch.
|
|
|
Set this to 3 on the or32 since that is roughly the average
|
Set this to 3 on the or32 since that is roughly the average
|
cost of an unscheduled conditional branch.
|
cost of an unscheduled conditional branch.
|
|
|
Cost of 2 and 3 give equal and ~0.7% bigger binaries
|
Cost of 2 and 3 give equal and ~0.7% bigger binaries
|
respectively."
|
respectively."
|
|
|
This seems ad-hoc. Probably we need some experiments. */
|
This seems ad-hoc. Probably we need some experiments. */
|
#define BRANCH_COST(speed_p, predictable_p) 2
|
#define BRANCH_COST(speed_p, predictable_p) 2
|
|
|
/* Specify the registers used for certain standard purposes.
|
/* Specify the registers used for certain standard purposes.
|
The values of these macros are register numbers. */
|
The values of these macros are register numbers. */
|
|
|
/* Register to use for pushing function arguments. */
|
/* Register to use for pushing function arguments. */
|
#define STACK_POINTER_REGNUM 1
|
#define STACK_POINTER_REGNUM 1
|
|
|
/* Base register for access to local variables of the function. */
|
/* Base register for access to local variables of the function. */
|
#define HARD_FRAME_POINTER_REGNUM 2
|
#define HARD_FRAME_POINTER_REGNUM 2
|
|
|
/* Link register. */
|
/* Link register. */
|
#define LINK_REGNUM 9
|
#define LINK_REGNUM 9
|
|
|
/* Define this macro if debugging can be performed even without a frame pointer.
|
/* Define this macro if debugging can be performed even without a frame pointer.
|
If this macro is de ned, GCC will turn on the `-fomit-frame-pointer' option
|
If this macro is de ned, GCC will turn on the `-fomit-frame-pointer' option
|
whenever `-O' is specifed.
|
whenever `-O' is specifed.
|
|
|
This should work for the OpenRISC architecture. Particularly if we
|
This should work for the OpenRISC architecture. Particularly if we
|
generate DWARF2 output OK. */
|
generate DWARF2 output OK. */
|
#define CAN_DEBUG_WITHOUT_FP
|
#define CAN_DEBUG_WITHOUT_FP
|
|
|
/* This function computes the initial size of the frame (difference between SP
|
/* This function computes the initial size of the frame (difference between SP
|
and FP) after the function prologue. */
|
and FP) after the function prologue. */
|
#define INITIAL_FRAME_POINTER_OFFSET(depth) \
|
#define INITIAL_FRAME_POINTER_OFFSET(depth) \
|
{ \
|
{ \
|
int regno; \
|
int regno; \
|
int offset = 0; \
|
int offset = 0; \
|
\
|
\
|
for (regno=0; regno < FIRST_PSEUDO_REGISTER; regno++) \
|
for (regno=0; regno < FIRST_PSEUDO_REGISTER; regno++) \
|
{ \
|
{ \
|
if (df_regs_ever_live_p (regno) && !call_used_regs[regno]) \
|
if (df_regs_ever_live_p (regno) && !call_used_regs[regno]) \
|
{ \
|
{ \
|
offset += 4; \
|
offset += 4; \
|
} \
|
} \
|
} \
|
} \
|
\
|
\
|
(depth) = ((!current_function_is_leaf \
|
(depth) = ((!current_function_is_leaf \
|
|| df_regs_ever_live_p (LINK_REGNUM)) ? 4 : 0) \
|
|| df_regs_ever_live_p (LINK_REGNUM)) ? 4 : 0) \
|
+ (frame_pointer_needed ? 4 : 0) \
|
+ (frame_pointer_needed ? 4 : 0) \
|
+ offset \
|
+ offset \
|
+ OR32_ALIGN (crtl->outgoing_args_size, 4) \
|
+ OR32_ALIGN (crtl->outgoing_args_size, 4) \
|
+ OR32_ALIGN (get_frame_size(), 4); \
|
+ OR32_ALIGN (get_frame_size(), 4); \
|
}
|
}
|
|
|
/* Register in which static-chain is passed to a function. */
|
/* Register in which static-chain is passed to a function. */
|
|
|
#define STATIC_CHAIN_REGNUM 11
|
#define STATIC_CHAIN_REGNUM 11
|
|
|
#define PROLOGUE_TMP 13
|
#define PROLOGUE_TMP 13
|
#define EPILOGUE_TMP 3
|
#define EPILOGUE_TMP 3
|
|
|
/* Register in which address to store a structure value
|
/* Register in which address to store a structure value
|
is passed to a function. */
|
is passed to a function. */
|
/*#define STRUCT_VALUE_REGNUM 0*/
|
/*#define STRUCT_VALUE_REGNUM 0*/
|
|
|
/* Pass address of result struct to callee as "invisible" first argument */
|
/* Pass address of result struct to callee as "invisible" first argument */
|
#define STRUCT_VALUE 0
|
#define STRUCT_VALUE 0
|
|
|
/* -----------------------[ PHX start ]-------------------------------- */
|
/* -----------------------[ PHX start ]-------------------------------- */
|
|
|
/* Define the classes of registers for register constraints in the
|
/* Define the classes of registers for register constraints in the
|
machine description. Also define ranges of constants.
|
machine description. Also define ranges of constants.
|
|
|
One of the classes must always be named ALL_REGS and include all hard regs.
|
One of the classes must always be named ALL_REGS and include all hard regs.
|
If there is more than one class, another class must be named NO_REGS
|
If there is more than one class, another class must be named NO_REGS
|
and contain no registers.
|
and contain no registers.
|
|
|
The name GENERAL_REGS must be the name of a class (or an alias for
|
The name GENERAL_REGS must be the name of a class (or an alias for
|
another name such as ALL_REGS). This is the class of registers
|
another name such as ALL_REGS). This is the class of registers
|
that is allowed by "g" or "r" in a register constraint.
|
that is allowed by "g" or "r" in a register constraint.
|
Also, registers outside this class are allocated only when
|
Also, registers outside this class are allocated only when
|
instructions express preferences for them.
|
instructions express preferences for them.
|
|
|
GENERAL_REGS and BASE_REGS classess are the same on or32.
|
GENERAL_REGS and BASE_REGS classess are the same on or32.
|
|
|
The classes must be numbered in nondecreasing order; that is,
|
The classes must be numbered in nondecreasing order; that is,
|
a larger-numbered class must never be contained completely
|
a larger-numbered class must never be contained completely
|
in a smaller-numbered class.
|
in a smaller-numbered class.
|
|
|
For any two classes, it is very desirable that there be another
|
For any two classes, it is very desirable that there be another
|
class that represents their union. */
|
class that represents their union. */
|
|
|
/* The or32 has only one kind of registers, so NO_REGS, GENERAL_REGS
|
/* The or32 has only one kind of registers, so NO_REGS, GENERAL_REGS
|
and ALL_REGS are the only classes. */
|
and ALL_REGS are the only classes. */
|
/* JPB 26-Aug-10: Based on note from Mikhael (mirekez@gmail.com), we don't
|
/* JPB 26-Aug-10: Based on note from Mikhael (mirekez@gmail.com), we don't
|
need CR_REGS and it is in the wrong place for later things! */
|
need CR_REGS and it is in the wrong place for later things! */
|
enum reg_class
|
enum reg_class
|
{
|
{
|
NO_REGS,
|
NO_REGS,
|
GENERAL_REGS,
|
GENERAL_REGS,
|
ALL_REGS,
|
ALL_REGS,
|
LIM_REG_CLASSES
|
LIM_REG_CLASSES
|
};
|
};
|
|
|
#define N_REG_CLASSES (int) LIM_REG_CLASSES
|
#define N_REG_CLASSES (int) LIM_REG_CLASSES
|
|
|
/* Give names of register classes as strings for dump file. */
|
/* Give names of register classes as strings for dump file. */
|
#define REG_CLASS_NAMES \
|
#define REG_CLASS_NAMES \
|
{ \
|
{ \
|
"NO_REGS", \
|
"NO_REGS", \
|
"GENERAL_REGS", \
|
"GENERAL_REGS", \
|
"ALL_REGS" \
|
"ALL_REGS" \
|
}
|
}
|
|
|
/* Define which registers fit in which classes. This is an initializer for a
|
/* Define which registers fit in which classes. This is an initializer for a
|
vector of HARD_REG_SET of length N_REG_CLASSES.
|
vector of HARD_REG_SET of length N_REG_CLASSES.
|
|
|
An initializer containing the contents of the register classes, as integers
|
An initializer containing the contents of the register classes, as integers
|
which are bit masks. The Nth integer specifies the contents of class N.
|
which are bit masks. The Nth integer specifies the contents of class N.
|
The way the integer MASK is interpreted is that register R is in the class
|
The way the integer MASK is interpreted is that register R is in the class
|
Line 458... |
Line 459... |
containing several integers. Each sub-initializer must be suitable as an
|
containing several integers. Each sub-initializer must be suitable as an
|
initializer for the type `HARD_REG_SET' which is defined in
|
initializer for the type `HARD_REG_SET' which is defined in
|
`hard-reg-set.h'.
|
`hard-reg-set.h'.
|
|
|
For the OR32 we have the minimal set. GENERAL_REGS is all except r0, which
|
For the OR32 we have the minimal set. GENERAL_REGS is all except r0, which
|
it permanently zero. */
|
it permanently zero. */
|
#define REG_CLASS_CONTENTS \
|
#define REG_CLASS_CONTENTS \
|
{ \
|
{ \
|
{ 0x00000000, 0x00000000 }, /* NO_REGS */ \
|
{ 0x00000000, 0x00000000 }, /* NO_REGS */ \
|
{ 0xffffffff, 0x00000003 }, /* GENERAL_REGS */ \
|
{ 0xffffffff, 0x00000003 }, /* GENERAL_REGS */ \
|
{ 0xffffffff, 0x00000007 } /* ALL_REGS */ \
|
{ 0xffffffff, 0x00000007 } /* ALL_REGS */ \
|
}
|
}
|
|
|
/* The same information, inverted:
|
/* The same information, inverted:
|
|
|
Return the class number of the smallest class containing reg number REGNO.
|
Return the class number of the smallest class containing reg number REGNO.
|
This could be a conditional expression or could index an array.
|
This could be a conditional expression or could index an array.
|
|
|
??? 0 is not really a register, but a constant. */
|
??? 0 is not really a register, but a constant. */
|
#define REGNO_REG_CLASS(regno) \
|
#define REGNO_REG_CLASS(regno) \
|
((0 == regno) ? ALL_REGS : ((1 <= regno) && (regno <= OR32_LAST_INT_REG)) \
|
((0 == regno) ? ALL_REGS : ((1 <= regno) && (regno <= OR32_LAST_INT_REG)) \
|
? GENERAL_REGS : NO_REGS)
|
? GENERAL_REGS : NO_REGS)
|
|
|
/* The class value for index registers, and the one for base regs. */
|
/* The class value for index registers, and the one for base regs. */
|
#define INDEX_REG_CLASS GENERAL_REGS
|
#define INDEX_REG_CLASS GENERAL_REGS
|
#define BASE_REG_CLASS GENERAL_REGS
|
#define BASE_REG_CLASS GENERAL_REGS
|
|
|
/* Given an rtx X being reloaded into a reg required to be in class CLASS,
|
/* Given an rtx X being reloaded into a reg required to be in class CLASS,
|
return the class of reg to actually use. In general this is just CLASS;
|
return the class of reg to actually use. In general this is just CLASS;
|
but on some machines in some cases it is preferable to use a more
|
but on some machines in some cases it is preferable to use a more
|
restrictive class. */
|
restrictive class. */
|
#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
|
#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
|
|
|
/* Return the maximum number of consecutive registers needed to represent mode
|
/* Return the maximum number of consecutive registers needed to represent mode
|
MODE in a register of class CLASS.
|
MODE in a register of class CLASS.
|
|
|
On the or32, this is always the size of MODE in words, since all registers
|
On the or32, this is always the size of MODE in words, since all registers
|
are the same size. */
|
are the same size. */
|
#define CLASS_MAX_NREGS(CLASS, MODE) \
|
#define CLASS_MAX_NREGS(CLASS, MODE) \
|
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
/* Stack layout; function entry, exit and calling. */
|
/* Stack layout; function entry, exit and calling. */
|
|
|
/* Define this if pushing a word on the stack makes the stack pointer a
|
/* Define this if pushing a word on the stack makes the stack pointer a
|
smaller address. */
|
smaller address. */
|
#define STACK_GROWS_DOWNWARD 1
|
#define STACK_GROWS_DOWNWARD 1
|
|
|
/* Define this if the nominal address of the stack frame is at the
|
/* Define this if the nominal address of the stack frame is at the
|
high-address end of the local variables; that is, each additional local
|
high-address end of the local variables; that is, each additional local
|
variable allocated goes at a more negative offset in the frame. */
|
variable allocated goes at a more negative offset in the frame. */
|
#define FRAME_GROWS_DOWNWARD 1
|
#define FRAME_GROWS_DOWNWARD 1
|
|
|
/* Offset within stack frame to start allocating local variables at. If
|
/* Offset within stack frame to start allocating local variables at. If
|
FRAME_GROWS_DOWNWARD, this is the offset to the END of the first local
|
FRAME_GROWS_DOWNWARD, this is the offset to the END of the first local
|
allocated. Otherwise, it is the offset to the BEGINNING of the first local
|
allocated. Otherwise, it is the offset to the BEGINNING of the first local
|
allocated. */
|
allocated. */
|
#define STARTING_FRAME_OFFSET 0
|
#define STARTING_FRAME_OFFSET 0
|
|
|
/* Offset of first parameter from the argument pointer register value. */
|
/* Offset of first parameter from the argument pointer register value. */
|
#define FIRST_PARM_OFFSET(FNDECL) 0
|
#define FIRST_PARM_OFFSET(FNDECL) 0
|
|
|
/* Define this if stack space is still allocated for a parameter passed
|
/* Define this if stack space is still allocated for a parameter passed
|
in a register. The value is the number of bytes allocated to this
|
in a register. The value is the number of bytes allocated to this
|
area.
|
area.
|
|
|
No such allocation for OR32. */
|
No such allocation for OR32. */
|
/* #define REG_PARM_STACK_SPACE(FNDECL) (UNITS_PER_WORD * GP_ARG_NUM_REG) */
|
/* #define REG_PARM_STACK_SPACE(FNDECL) (UNITS_PER_WORD * GP_ARG_NUM_REG) */
|
|
|
/* Define this if the above stack space is to be considered part of the
|
/* Define this if the above stack space is to be considered part of the
|
space allocated by the caller.
|
space allocated by the caller.
|
|
|
N/a for OR32. */
|
N/a for OR32. */
|
/* #define OUTGOING_REG_PARM_STACK_SPACE */
|
/* #define OUTGOING_REG_PARM_STACK_SPACE */
|
|
|
/* Define this macro if `REG_PARM_STACK_SPACE' is defined, but the
|
/* Define this macro if `REG_PARM_STACK_SPACE' is defined, but the
|
stack parameters don't skip the area specified by it.
|
stack parameters don't skip the area specified by it.
|
|
|
N/a for OR32. */
|
N/a for OR32. */
|
/* #define STACK_PARMS_IN_REG_PARM_AREA */
|
/* #define STACK_PARMS_IN_REG_PARM_AREA */
|
|
|
/* If nonzero, the maximum amount of space required for outgoing arguments
|
/* If nonzero, the maximum amount of space required for outgoing arguments
|
will be computed and placed into the variable
|
will be computed and placed into the variable
|
current_function_outgoing_args_size. No space will be pushed onto the stack
|
current_function_outgoing_args_size. No space will be pushed onto the stack
|
for each call; instead, the function prologue should increase the stack
|
for each call; instead, the function prologue should increase the stack
|
frame size by this amount.
|
frame size by this amount.
|
|
|
Setting both PUSH_ARGS and ACCUMULATE_OUTGOING_ARGS is not proper.
|
Setting both PUSH_ARGS and ACCUMULATE_OUTGOING_ARGS is not proper.
|
|
|
This is the approached used by OR32. */
|
This is the approached used by OR32. */
|
#define ACCUMULATE_OUTGOING_ARGS 1
|
#define ACCUMULATE_OUTGOING_ARGS 1
|
|
|
#define ELIMINABLE_REGS \
|
#define ELIMINABLE_REGS \
|
{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
|
{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
|
{ ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
|
{ ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
|
{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
|
{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
|
{ FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
|
{ FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
|
|
|
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
(OFFSET) = or32_initial_elimination_offset ((FROM), (TO))
|
(OFFSET) = or32_initial_elimination_offset ((FROM), (TO))
|
|
|
/* A C expression that should indicate the number of bytes of its own
|
/* A C expression that should indicate the number of bytes of its own
|
arguments that a function pops on returning, or 0 if the function pops no
|
arguments that a function pops on returning, or 0 if the function pops no
|
arguments and the caller must therefore pop them all after the function
|
arguments and the caller must therefore pop them all after the function
|
returns.
|
returns.
|
|
|
"fundecl" is a C variable whose value is a tree node that describes the
|
"fundecl" is a C variable whose value is a tree node that describes the
|
function in question. Normally it is a node of type FUNCTION_DECL that
|
function in question. Normally it is a node of type FUNCTION_DECL that
|
describes the declaration of the function. From this you can obtain the
|
describes the declaration of the function. From this you can obtain the
|
DECL_ATTRIBUTES of the function.
|
DECL_ATTRIBUTES of the function.
|
|
|
"funtype" is a C variable whose value is a tree node that describes the
|
"funtype" is a C variable whose value is a tree node that describes the
|
function in question. Normally it is a node of type FUNCTION_TYPE that
|
function in question. Normally it is a node of type FUNCTION_TYPE that
|
describes the data type of the function. From this it is possible to obtain
|
describes the data type of the function. From this it is possible to obtain
|
the data types of the value and arguments (if known).
|
the data types of the value and arguments (if known).
|
|
|
When a call to a library function is being considered, "fundecl" will
|
When a call to a library function is being considered, "fundecl" will
|
contain an identifier node for the library function. Thus, if you need to
|
contain an identifier node for the library function. Thus, if you need to
|
distinguish among various library functions, you can do so by their
|
distinguish among various library functions, you can do so by their
|
names. Note that “library function” in this context means a function used
|
names. Note that “library function” in this context means a function used
|
to perform arithmetic, whose name is known specially in the compiler and
|
to perform arithmetic, whose name is known specially in the compiler and
|
was not mentioned in the C code being compiled.
|
was not mentioned in the C code being compiled.
|
|
|
"size" is the number of bytes of arguments passed on the stack. If a
|
"size" is the number of bytes of arguments passed on the stack. If a
|
variable number of bytes is passed, it is zero, and argument popping will
|
variable number of bytes is passed, it is zero, and argument popping will
|
always be the re- sponsibility of the calling function.
|
always be the re- sponsibility of the calling function.
|
|
|
On the VAX, all functions always pop their arguments, so the definition of
|
On the VAX, all functions always pop their arguments, so the definition of
|
this macro is stack-size. On the 68000, using the standard calling
|
this macro is stack-size. On the 68000, using the standard calling
|
Line 591... |
Line 592... |
other functions (such as printf) pop nothing (the caller pops all). When
|
other functions (such as printf) pop nothing (the caller pops all). When
|
this convention is in use, funtype is examined to determine whether a
|
this convention is in use, funtype is examined to determine whether a
|
function takes a fixed number of arguments.
|
function takes a fixed number of arguments.
|
|
|
On the OR32, no functions pop their arguments.
|
On the OR32, no functions pop their arguments.
|
JPB 29-Aug-10: Is this really correct? */
|
JPB 29-Aug-10: Is this really correct? */
|
#define RETURN_POPS_ARGS(fundecl, funtype, size) 0
|
#define RETURN_POPS_ARGS(fundecl, funtype, size) 0
|
|
|
/* Minimum and maximum general purpose registers used to hold arguments. */
|
/* Minimum and maximum general purpose registers used to hold arguments. */
|
#define GP_ARG_MIN_REG 3
|
#define GP_ARG_MIN_REG 3
|
#define GP_ARG_MAX_REG 8
|
#define GP_ARG_MAX_REG 8
|
#define GP_ARG_NUM_REG (GP_ARG_MAX_REG - GP_ARG_MIN_REG + 1)
|
#define GP_ARG_NUM_REG (GP_ARG_MAX_REG - GP_ARG_MIN_REG + 1)
|
|
|
/* Return register */
|
/* Return register */
|
#define GP_ARG_RETURN 11
|
#define GP_ARG_RETURN 11
|
#define GP_ARG_RETURNH 12
|
#define GP_ARG_RETURNH 12
|
|
|
/* A C expression to create an RTX representing the place where a library
|
/* A C expression to create an RTX representing the place where a library
|
function returns a value of mode mode.
|
function returns a value of mode mode.
|
|
|
Note that “library function” in this context means a compiler support
|
Note that “library function” in this context means a compiler support
|
routine, used to perform arithmetic, whose name is known specially by the
|
routine, used to perform arithmetic, whose name is known specially by the
|
compiler and was not mentioned in the C code being compiled.
|
compiler and was not mentioned in the C code being compiled.
|
|
|
For the OR32, return value is in R11 (GP_ARG_RETURN). */
|
For the OR32, return value is in R11 (GP_ARG_RETURN). */
|
#define LIBCALL_VALUE(mode) \
|
#define LIBCALL_VALUE(mode) \
|
gen_rtx_REG( \
|
gen_rtx_REG( \
|
((GET_MODE_CLASS (mode) != MODE_INT \
|
((GET_MODE_CLASS (mode) != MODE_INT \
|
|| GET_MODE_SIZE (mode) >= 4) \
|
|| GET_MODE_SIZE (mode) >= 4) \
|
? (mode) \
|
? (mode) \
|
: SImode), \
|
: SImode), \
|
GP_ARG_RETURN)
|
GP_ARG_RETURN)
|
|
|
/* Define this if PCC uses the nonreentrant convention for returning
|
/* Define this if PCC uses the nonreentrant convention for returning
|
structure and union values.
|
structure and union values.
|
|
|
Not needed for OR32. */
|
Not needed for OR32. */
|
/*#define PCC_STATIC_STRUCT_RETURN */
|
/*#define PCC_STATIC_STRUCT_RETURN */
|
|
|
/* A C expression that is nonzero if regno is the number of a hard register in
|
/* A C expression that is nonzero if regno is the number of a hard register in
|
which the values of called function may come back.
|
which the values of called function may come back.
|
|
|
A register whose use for returning values is limited to serving as the
|
A register whose use for returning values is limited to serving as the
|
second of a pair (for a value of type double, say) need not be recognized
|
second of a pair (for a value of type double, say) need not be recognized
|
by this macro. So for most machines, this definition suffices:
|
by this macro. So for most machines, this definition suffices:
|
Line 641... |
Line 642... |
recognize only the caller's register numbers.
|
recognize only the caller's register numbers.
|
|
|
For OR32, we must check if we have the return register.
|
For OR32, we must check if we have the return register.
|
|
|
From GCC 4.6, this will be replaced by TARGET_FUNCION_VALUE_REGNO_P target
|
From GCC 4.6, this will be replaced by TARGET_FUNCION_VALUE_REGNO_P target
|
hook function. */
|
hook function. */
|
#define FUNCTION_VALUE_REGNO_P(N) ((N) == GP_ARG_RETURN)
|
#define FUNCTION_VALUE_REGNO_P(N) ((N) == GP_ARG_RETURN)
|
|
|
/* 1 if N is a possible register number for function argument passing. */
|
/* 1 if N is a possible register number for function argument passing. */
|
#define FUNCTION_ARG_REGNO_P(N) \
|
#define FUNCTION_ARG_REGNO_P(N) \
|
((N) >= GP_ARG_MIN_REG && (N) <= GP_ARG_MAX_REG)
|
((N) >= GP_ARG_MIN_REG && (N) <= GP_ARG_MAX_REG)
|
|
|
/* A code distinguishing the floating point format of the target
|
/* A code distinguishing the floating point format of the target
|
machine. There are three defined values: IEEE_FLOAT_FORMAT,
|
machine. There are three defined values: IEEE_FLOAT_FORMAT,
|
VAX_FLOAT_FORMAT, and UNKNOWN_FLOAT_FORMAT. */
|
VAX_FLOAT_FORMAT, and UNKNOWN_FLOAT_FORMAT. */
|
#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
|
#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
|
#define FLOAT_WORDS_BIG_ENDIAN 1
|
#define FLOAT_WORDS_BIG_ENDIAN 1
|
|
|
/* A C type for declaring a variable that is used as the first argument of
|
/* A C type for declaring a variable that is used as the first argument of
|
FUNCTION_ARG and other related values. For some target machines, the type
|
FUNCTION_ARG and other related values. For some target machines, the type
|
int suffices and can hold the number of bytes of argument so far.
|
int suffices and can hold the number of bytes of argument so far.
|
|
|
There is no need to record in CUMULATIVE_ARGS anything about the arguments
|
There is no need to record in CUMULATIVE_ARGS anything about the arguments
|
that have been passed on the stack. The compiler has other variables to
|
that have been passed on the stack. The compiler has other variables to
|
keep track of that. For target machines on which all arguments are passed
|
keep track of that. For target machines on which all arguments are passed
|
on the stack, there is no need to store anything in CUMULATIVE_ARGS;
|
on the stack, there is no need to store anything in CUMULATIVE_ARGS;
|
however, the data structure must exist and should not be empty, so use
|
however, the data structure must exist and should not be empty, so use
|
int. */
|
int. */
|
#define CUMULATIVE_ARGS int
|
#define CUMULATIVE_ARGS int
|
|
|
/* A C statement (sans semicolon) for initializing the variable "cum" for the
|
/* A C statement (sans semicolon) for initializing the variable "cum" for the
|
state at the beginning of the argument list. The variable has type
|
state at the beginning of the argument list. The variable has type
|
CUMULATIVE_ARGS. The value of "fntype" is the tree node for the data type
|
CUMULATIVE_ARGS. The value of "fntype" is the tree node for the data type
|
of the function which will receive the args, or 0 if the args are to a
|
of the function which will receive the args, or 0 if the args are to a
|
compiler support library function. For direct calls that are not libcalls,
|
compiler support library function. For direct calls that are not libcalls,
|
"fndecl" contain the declaration node of the function. "fndecl" is also set
|
"fndecl" contain the declaration node of the function. "fndecl" is also set
|
when INIT_CUMULATIVE_ARGS is used to find arguments for the function being
|
when INIT_CUMULATIVE_ARGS is used to find arguments for the function being
|
compiled. "n_named_args" is set to the number of named arguments,
|
compiled. "n_named_args" is set to the number of named arguments,
|
including a structure return address if it is passed as a parameter, when
|
including a structure return address if it is passed as a parameter, when
|
making a call. When processing incoming arguments, "n_named_args" is set to
|
making a call. When processing incoming arguments, "n_named_args" is set to
|
−1.
|
−1.
|
|
|
When processing a call to a compiler support library function, "libname"
|
When processing a call to a compiler support library function, "libname"
|
identifies which one. It is a symbol_ref rtx which contains the name of the
|
identifies which one. It is a symbol_ref rtx which contains the name of the
|
function, as a string. "libname" is 0 when an ordinary C function call is
|
function, as a string. "libname" is 0 when an ordinary C function call is
|
being processed. Thus, each time this macro is called, either "libname" or
|
being processed. Thus, each time this macro is called, either "libname" or
|
"fntype" is nonzero, but never both of them at once.
|
"fntype" is nonzero, but never both of them at once.
|
|
|
For the OR32, we set "cum" to zero each time.
|
For the OR32, we set "cum" to zero each time.
|
JPB 29-Aug-10: Is this correct? */
|
JPB 29-Aug-10: Is this correct? */
|
#define INIT_CUMULATIVE_ARGS(cum, fntype, libname, fndecl, n_named_args) \
|
#define INIT_CUMULATIVE_ARGS(cum, fntype, libname, fndecl, n_named_args) \
|
(cum = 0)
|
(cum = 0)
|
|
|
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
/* Define intermediate macro to compute the size (in registers) of an argument
|
/* Define intermediate macro to compute the size (in registers) of an argument
|
for the or32.
|
for the or32.
|
|
|
The OR32_ROUND_ADVANCE* macros are local to this file. */
|
The OR32_ROUND_ADVANCE* macros are local to this file. */
|
|
|
/* Round "size" up to a word boundary. */
|
/* Round "size" up to a word boundary. */
|
#define OR32_ROUND_ADVANCE(size) \
|
#define OR32_ROUND_ADVANCE(size) \
|
(((size) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
(((size) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
|
|
/* Round arg "mode"/"type" up to the next word boundary. */
|
/* Round arg "mode"/"type" up to the next word boundary. */
|
#define OR32_ROUND_ADVANCE_ARG(mode, type) \
|
#define OR32_ROUND_ADVANCE_ARG(mode, type) \
|
((mode) == BLKmode \
|
((mode) == BLKmode \
|
? OR32_ROUND_ADVANCE (int_size_in_bytes (type)) \
|
? OR32_ROUND_ADVANCE (int_size_in_bytes (type)) \
|
: OR32_ROUND_ADVANCE (GET_MODE_SIZE (mode)))
|
: OR32_ROUND_ADVANCE (GET_MODE_SIZE (mode)))
|
|
|
/* Round "cum" up to the necessary point for argument "mode"/"type". This is
|
/* Round "cum" up to the necessary point for argument "mode"/"type". This is
|
either rounded to nearest reg or nearest double-reg boundary */
|
either rounded to nearest reg or nearest double-reg boundary */
|
#define OR32_ROUND_ADVANCE_CUM(cum, mode, type) \
|
#define OR32_ROUND_ADVANCE_CUM(cum, mode, type) \
|
((((mode) == BLKmode ? TYPE_ALIGN (type) : GET_MODE_BITSIZE (mode)) \
|
((((mode) == BLKmode ? TYPE_ALIGN (type) : GET_MODE_BITSIZE (mode)) \
|
> BITS_PER_WORD) \
|
> BITS_PER_WORD) \
|
? (((cum) + 1) & ~1) \
|
? (((cum) + 1) & ~1) \
|
: (cum))
|
: (cum))
|
|
|
/* Update the data in "cum" to advance over an argument of mode "mode" and
|
/* Update the data in "cum" to advance over an argument of mode "mode" and
|
data type "type". ("type" is null for libcalls where that information may
|
data type "type". ("type" is null for libcalls where that information may
|
not be available.) */
|
not be available.) */
|
#define FUNCTION_ARG_ADVANCE(cum, mode, type, named) \
|
#define FUNCTION_ARG_ADVANCE(cum, mode, type, named) \
|
((cum) = (OR32_ROUND_ADVANCE_CUM ((cum), (mode), (type)) \
|
((cum) = (OR32_ROUND_ADVANCE_CUM ((cum), (mode), (type)) \
|
+ OR32_ROUND_ADVANCE_ARG ((mode), (type))))
|
+ OR32_ROUND_ADVANCE_ARG ((mode), (type))))
|
|
|
/* Return boolean indicating if arg of type "type" and mode "mode" will be
|
/* Return boolean indicating if arg of type "type" and mode "mode" will be
|
passed in a reg. This includes arguments that have to be passed by
|
passed in a reg. This includes arguments that have to be passed by
|
reference as the pointer to them is passed in a reg if one is available
|
reference as the pointer to them is passed in a reg if one is available
|
(and that is what we're given).
|
(and that is what we're given).
|
|
|
When passing arguments "named" is always 1. When receiving arguments
|
When passing arguments "named" is always 1. When receiving arguments
|
"named" is 1 for each argument except the last in a stdarg/varargs
|
"named" is 1 for each argument except the last in a stdarg/varargs
|
function. In a stdarg function we want to treat the last named arg as
|
function. In a stdarg function we want to treat the last named arg as
|
named. In a varargs function we want to treat the last named arg (which is
|
named. In a varargs function we want to treat the last named arg (which is
|
`__builtin_va_alist') as unnamed.
|
`__builtin_va_alist') as unnamed.
|
|
|
This macro is only used in this file. */
|
This macro is only used in this file. */
|
#define OR32_PASS_IN_REG_P(cum, mode, type, named) \
|
#define OR32_PASS_IN_REG_P(cum, mode, type, named) \
|
((named) \
|
((named) \
|
&& ((OR32_ROUND_ADVANCE_CUM ((cum), (mode), (type)) \
|
&& ((OR32_ROUND_ADVANCE_CUM ((cum), (mode), (type)) \
|
+ OR32_ROUND_ADVANCE_ARG ((mode), (type)) \
|
+ OR32_ROUND_ADVANCE_ARG ((mode), (type)) \
|
<= GP_ARG_NUM_REG)))
|
<= GP_ARG_NUM_REG)))
|
|
|
/* Determine where to put an argument to a function. Value is zero to push
|
/* Determine where to put an argument to a function. Value is zero to push
|
the argument on the stack, or a hard register in which to store the
|
the argument on the stack, or a hard register in which to store the
|
argument.
|
argument.
|
|
|
"mode" is the argument's machine mode.
|
"mode" is the argument's machine mode.
|
|
|
"type" is the data type of the argument (as a tree). This is null for
|
"type" is the data type of the argument (as a tree). This is null for
|
libcalls where that information may not be available.
|
libcalls where that information may not be available.
|
|
|
"cum" is a variable of type CUMULATIVE_ARGS which gives info about the
|
"cum" is a variable of type CUMULATIVE_ARGS which gives info about the
|
preceding args and about the function being called.
|
preceding args and about the function being called.
|
|
|
"named" is nonzero if this argument is a named parameter (otherwise it is
|
"named" is nonzero if this argument is a named parameter (otherwise it is
|
an extra parameter matching an ellipsis).
|
an extra parameter matching an ellipsis).
|
|
|
On the ARC the first MAX_ARC_PARM_REGS args are normally in registers and
|
On the ARC the first MAX_ARC_PARM_REGS args are normally in registers and
|
the rest are pushed. */
|
the rest are pushed. */
|
#define FUNCTION_ARG(cum, mode, type, named) \
|
#define FUNCTION_ARG(cum, mode, type, named) \
|
(OR32_PASS_IN_REG_P ((cum), (mode), (type), (named)) \
|
(OR32_PASS_IN_REG_P ((cum), (mode), (type), (named)) \
|
? gen_rtx_REG ((mode), \
|
? gen_rtx_REG ((mode), \
|
OR32_ROUND_ADVANCE_CUM ((cum), (mode), (type)) \
|
OR32_ROUND_ADVANCE_CUM ((cum), (mode), (type)) \
|
+ GP_ARG_MIN_REG) \
|
+ GP_ARG_MIN_REG) \
|
: 0)
|
: 0)
|
|
|
/* Output assembler code to FILE to increment profiler label # LABELNO
|
/* Output assembler code to FILE to increment profiler label # LABELNO
|
for profiling a function entry.
|
for profiling a function entry.
|
|
|
JPB 29-Aug-10: This patently doesn't work. It is not even OR32 code! */
|
JPB 29-Aug-10: This patently doesn't work. It is not even OR32 code! */
|
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
fprintf (FILE, "\tl.load32u\tr0,LP%d\n\tcall\tmcount\n", (LABELNO));
|
fprintf (FILE, "\tl.load32u\tr0,LP%d\n\tcall\tmcount\n", (LABELNO));
|
|
|
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the
|
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the
|
stack pointer does not matter. The value is tested only in functions that
|
stack pointer does not matter. The value is tested only in functions that
|
have frame pointers. No definition is equivalent to always zero.
|
have frame pointers. No definition is equivalent to always zero.
|
|
|
The default suffices for OR32. */
|
The default suffices for OR32. */
|
#define EXIT_IGNORE_STACK 0
|
#define EXIT_IGNORE_STACK 0
|
|
|
/* A C expression whose value is RTL representing the location of the
|
/* A C expression whose value is RTL representing the location of the
|
incoming return address at the beginning of any function, before the
|
incoming return address at the beginning of any function, before the
|
prologue. This RTL is either a REG, indicating that the return
|
prologue. This RTL is either a REG, indicating that the return
|
value is saved in REG, or a MEM representing a location in
|
value is saved in REG, or a MEM representing a location in
|
the stack. */
|
the stack. */
|
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, LINK_REGNUM)
|
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, LINK_REGNUM)
|
|
|
#define RETURN_ADDR_RTX(COUNT, FP) \
|
#define RETURN_ADDR_RTX(COUNT, FP) \
|
((COUNT) ? NULL_RTX : get_hard_reg_initial_val (Pmode, LINK_REGNUM))
|
((COUNT) ? NULL_RTX : get_hard_reg_initial_val (Pmode, LINK_REGNUM))
|
|
|
|
|
/* Addressing modes, and classification of registers for them. */
|
/* Addressing modes, and classification of registers for them. */
|
|
|
/* #define HAVE_POST_INCREMENT */
|
/* #define HAVE_POST_INCREMENT */
|
/* #define HAVE_POST_DECREMENT */
|
/* #define HAVE_POST_DECREMENT */
|
|
|
/* #define HAVE_PRE_DECREMENT */
|
/* #define HAVE_PRE_DECREMENT */
|
/* #define HAVE_PRE_INCREMENT */
|
/* #define HAVE_PRE_INCREMENT */
|
|
|
/* Macros to check register numbers against specific register classes. */
|
/* Macros to check register numbers against specific register classes. */
|
#define MAX_REGS_PER_ADDRESS 1
|
#define MAX_REGS_PER_ADDRESS 1
|
|
|
/* True if X is an rtx for a constant that is a valid address.
|
/* True if X is an rtx for a constant that is a valid address.
|
|
|
JPB 29-Aug-10: Why is the default implementation not OK? */
|
JPB 29-Aug-10: Why is the default implementation not OK? */
|
#define CONSTANT_ADDRESS_P(X) \
|
#define CONSTANT_ADDRESS_P(X) \
|
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|
|| GET_CODE (X) == HIGH)
|
|| GET_CODE (X) == HIGH)
|
|
|
/* A C expression which is nonzero if register number num is suitable for use
|
/* A C expression which is nonzero if register number num is suitable for use
|
as a base register in operand addresses. Like TARGET_LEGITIMATE_ADDRESS_P,
|
as a base register in operand addresses. Like TARGET_LEGITIMATE_ADDRESS_P,
|
this macro should also define a strict and a non-strict variant. Both
|
this macro should also define a strict and a non-strict variant. Both
|
variants behave the same for hard register; for pseudos, the strict variant
|
variants behave the same for hard register; for pseudos, the strict variant
|
will pass only those that have been allocated to a valid hard registers,
|
will pass only those that have been allocated to a valid hard registers,
|
while the non-strict variant will pass all pseudos.
|
while the non-strict variant will pass all pseudos.
|
Line 822... |
Line 823... |
|
|
JPB 29-Aug-10: This has been conflated with the old REG_OK_FOR_BASE_P
|
JPB 29-Aug-10: This has been conflated with the old REG_OK_FOR_BASE_P
|
function, which is no longer part of GCC.
|
function, which is no longer part of GCC.
|
|
|
I'm not sure this is right. r0 can be a base register, just
|
I'm not sure this is right. r0 can be a base register, just
|
it can't get set by the user. */
|
it can't get set by the user. */
|
#ifdef REG_OK_STRICT
|
#ifdef REG_OK_STRICT
|
#define REGNO_OK_FOR_BASE_P(num) \
|
#define REGNO_OK_FOR_BASE_P(num) \
|
( ((0 < (num)) && ((num) <= OR32_LAST_INT_REG)) \
|
( ((0 < (num)) && ((num) <= OR32_LAST_INT_REG)) \
|
|| ((0 < reg_renumber[num]) && (reg_renumber[num] <= OR32_LAST_INT_REG)))
|
|| ((0 < reg_renumber[num]) && (reg_renumber[num] <= OR32_LAST_INT_REG)))
|
|
|
#else
|
#else
|
/* Accept an int register or a pseudo reg.
|
/* Accept an int register or a pseudo reg.
|
|
|
JPB 1-Sep-10: Should this allow r0, if the strict version does not? */
|
JPB 1-Sep-10: Should this allow r0, if the strict version does not? */
|
#define REGNO_OK_FOR_BASE_P(num) ((num) <= OR32_LAST_INT_REG || \
|
#define REGNO_OK_FOR_BASE_P(num) ((num) <= OR32_LAST_INT_REG || \
|
(num) >= FIRST_PSEUDO_REGISTER)
|
(num) >= FIRST_PSEUDO_REGISTER)
|
#endif
|
#endif
|
|
|
/* OR32 doesn't have any indexed addressing. */
|
/* OR32 doesn't have any indexed addressing. */
|
#define REG_OK_FOR_INDEX_P(X) 0
|
#define REG_OK_FOR_INDEX_P(X) 0
|
#define REGNO_OK_FOR_INDEX_P(X) 0
|
#define REGNO_OK_FOR_INDEX_P(X) 0
|
|
|
|
|
/* OR32 addresses do not depend on the machine mode they are being used in. */
|
/* OR32 addresses do not depend on the machine mode they are being used in. */
|
#define GO_IF_MODE_DEPENDENT_ADDRESS(addr,label)
|
#define GO_IF_MODE_DEPENDENT_ADDRESS(addr,label)
|
|
|
/* Is this suitable for an immediate operand.
|
/* Is this suitable for an immediate operand.
|
|
|
JPB 1-Sep-10: Is this correct. We can only do 16-bit immediates directly. */
|
JPB 1-Sep-10: Is this correct. We can only do 16-bit immediates directly. */
|
#define LEGITIMATE_CONSTANT_P(x) (GET_CODE(x) != CONST_DOUBLE)
|
#define LEGITIMATE_CONSTANT_P(x) (GET_CODE(x) != CONST_DOUBLE)
|
|
|
/* Specify the machine mode that this machine uses for the index in the
|
/* Specify the machine mode that this machine uses for the index in the
|
tablejump instruction. */
|
tablejump instruction. */
|
#define CASE_VECTOR_MODE SImode
|
#define CASE_VECTOR_MODE SImode
|
|
|
/* Define as C expression which evaluates to nonzero if the tablejump
|
/* Define as C expression which evaluates to nonzero if the tablejump
|
instruction expects the table to contain offsets from the address of the
|
instruction expects the table to contain offsets from the address of the
|
table.
|
table.
|
|
|
Do not define this if the table should contain absolute addresses. */
|
Do not define this if the table should contain absolute addresses. */
|
/* #define CASE_VECTOR_PC_RELATIVE 1 */
|
/* #define CASE_VECTOR_PC_RELATIVE 1 */
|
|
|
/* Define this as 1 if `char' should by default be signed; else as 0. */
|
/* Define this as 1 if `char' should by default be signed; else as 0. */
|
#define DEFAULT_SIGNED_CHAR 1
|
#define DEFAULT_SIGNED_CHAR 1
|
|
|
/* This flag, if defined, says the same insns that convert to a signed fixnum
|
/* This flag, if defined, says the same insns that convert to a signed fixnum
|
also convert validly to an unsigned one. */
|
also convert validly to an unsigned one. */
|
#define FIXUNS_TRUNC_LIKE_FIX_TRUNC
|
#define FIXUNS_TRUNC_LIKE_FIX_TRUNC
|
|
|
/* The maximum number of bytes that a single instruction can move quickly
|
/* The maximum number of bytes that a single instruction can move quickly
|
between memory and registers or between two memory locations. */
|
between memory and registers or between two memory locations. */
|
#define MOVE_MAX 4
|
#define MOVE_MAX 4
|
|
|
/* Define this if zero-extension is slow (more than one real instruction). */
|
/* Define this if zero-extension is slow (more than one real instruction). */
|
/* #define SLOW_ZERO_EXTEND */
|
/* #define SLOW_ZERO_EXTEND */
|
|
|
/* Nonzero if access to memory by bytes is slow and undesirable.
|
/* Nonzero if access to memory by bytes is slow and undesirable.
|
For RISC chips, it means that access to memory by bytes is no
|
For RISC chips, it means that access to memory by bytes is no
|
better than access by words when possible, so grab a whole word
|
better than access by words when possible, so grab a whole word
|
and maybe make use of that. */
|
and maybe make use of that. */
|
#define SLOW_BYTE_ACCESS 1
|
#define SLOW_BYTE_ACCESS 1
|
|
|
/* Define if shifts truncate the shift count
|
/* Define if shifts truncate the shift count
|
which implies one can omit a sign-extension or zero-extension
|
which implies one can omit a sign-extension or zero-extension
|
of a shift count. */
|
of a shift count. */
|
/* #define SHIFT_COUNT_TRUNCATED */
|
/* #define SHIFT_COUNT_TRUNCATED */
|
|
|
/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
|
/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
|
is done just by pretending it is already truncated. */
|
is done just by pretending it is already truncated. */
|
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
|
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
|
|
|
/* Specify the machine mode that pointers have.
|
/* Specify the machine mode that pointers have.
|
After generation of rtl, the compiler makes no further distinction
|
After generation of rtl, the compiler makes no further distinction
|
between pointers and any other objects of this machine mode. */
|
between pointers and any other objects of this machine mode. */
|
#define Pmode SImode
|
#define Pmode SImode
|
|
|
/* A function address in a call instruction
|
/* A function address in a call instruction
|
is a byte address (for indexing purposes)
|
is a byte address (for indexing purposes)
|
so give the MEM rtx a byte's mode. */
|
so give the MEM rtx a byte's mode. */
|
#define FUNCTION_MODE SImode
|
#define FUNCTION_MODE SImode
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
/* Condition code stuff */
|
/* Condition code stuff */
|
|
|
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
|
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
|
return the mode to be used for the comparison. */
|
return the mode to be used for the comparison. */
|
#define SELECT_CC_MODE(op, x, y) \
|
#define SELECT_CC_MODE(op, x, y) \
|
((EQ == (op)) ? CCEQmode \
|
((EQ == (op)) ? CCEQmode \
|
: (NE == (op)) ? CCNEmode \
|
: (NE == (op)) ? CCNEmode \
|
: (GEU == (op)) ? CCGEUmode \
|
: (GEU == (op)) ? CCGEUmode \
|
: (GTU == (op)) ? CCGTUmode \
|
: (GTU == (op)) ? CCGTUmode \
|
: (LTU == (op)) ? CCLTUmode \
|
: (LTU == (op)) ? CCLTUmode \
|
: (LEU == (op)) ? CCLEUmode \
|
: (LEU == (op)) ? CCLEUmode \
|
: (GE == (op)) ? CCGEmode \
|
: (GE == (op)) ? CCGEmode \
|
: (LT == (op)) ? CCLTmode \
|
: (LT == (op)) ? CCLTmode \
|
: (GT == (op)) ? CCGTmode \
|
: (GT == (op)) ? CCGTmode \
|
: (LE == (op)) ? CCLEmode \
|
: (LE == (op)) ? CCLEmode \
|
: (abort (), 0))
|
: (abort (), 0))
|
|
|
/* Can the condition code MODE be safely reversed? This is safe in
|
/* Can the condition code MODE be safely reversed? This is safe in
|
all cases on this port, because at present it doesn't use the
|
all cases on this port, because at present it doesn't use the
|
trapping FP comparisons (fcmpo). */
|
trapping FP comparisons (fcmpo). */
|
#define REVERSIBLE_CC_MODE(mode) 1
|
#define REVERSIBLE_CC_MODE(mode) 1
|
|
|
/* Given a condition code and a mode, return the inverse condition.
|
/* Given a condition code and a mode, return the inverse condition.
|
|
|
JPB 31-Aug-10: This seems like the default. Do we even need this? */
|
JPB 31-Aug-10: This seems like the default. Do we even need this? */
|
#define REVERSE_CONDITION(code, mode) reverse_condition (code)
|
#define REVERSE_CONDITION(code, mode) reverse_condition (code)
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
/* Control the assembler format that we output. */
|
/* Control the assembler format that we output. */
|
|
|
/* A C string constant describing how to begin a comment in the target
|
/* A C string constant describing how to begin a comment in the target
|
assembler language. The compiler assumes that the comment will end at
|
assembler language. The compiler assumes that the comment will end at
|
the end of the line. */
|
the end of the line. */
|
#define ASM_COMMENT_START "#"
|
#define ASM_COMMENT_START "#"
|
|
|
/* Output to assembler file text saying following lines may contain character
|
/* Output to assembler file text saying following lines may contain character
|
constants, extra white space, comments, etc.
|
constants, extra white space, comments, etc.
|
|
|
JPB 29-Aug-10: Default would seem to be OK here. */
|
JPB 29-Aug-10: Default would seem to be OK here. */
|