are integers whose size is larger than 64 bits. */
#define RETURN_IN_MEMORY(TYPE) \
- (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE \
+ (TYPE_MODE (TYPE) == BLKmode \
+ || TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE \
|| (TREE_CODE (TYPE) == INTEGER_TYPE && TYPE_PRECISION (TYPE) > 64))
/* 1 if N is a possible register number for a function value
#undef RETURN_IN_MEMORY
#define RETURN_IN_MEMORY(TYPE) \
- (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE(TYPE) == UNION_TYPE)
+ (TYPE_MODE (TYPE) == BLKmode \
+ || TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE(TYPE) == UNION_TYPE)
/* Define which macros to predefine. __svr4__ is our extension. */
/* This used to define X86, but james@bigtex.cactus.org says that
#define FUNCTION_VALUE(TYPE, FUNC) \
gen_rtx (REG, TYPE_MODE (TYPE), 0)
-/* Force objects larger than 16 bytes to be returned in memory, since we
- only have 4 registers available for return values. */
+/* Force aggregates and objects larger than 16 bytes to be returned in memory,
+ since we only have 4 registers available for return values. */
-#define RETURN_IN_MEMORY(TYPE) (int_size_in_bytes (TYPE) > 16)
+#define RETURN_IN_MEMORY(TYPE) \
+ (TYPE_MODE (TYPE) == BLKmode || int_size_in_bytes (TYPE) > 16)
/* For an arg passed partly in registers and partly in memory,
this is the number of registers used.
returned that way. */
#define RETURN_IN_MEMORY(type) \
- (GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
+ (TYPE_MODE (type) == BLKmode \
+ || GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
/* In order to link with Apollo libraries, we can't prefix external
symbols with an underscore. */
/* Disable the promotion of some structures and unions to registers. */
#define RETURN_IN_MEMORY(TYPE) \
- ((TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE(TYPE) == UNION_TYPE) \
- && !(TYPE_MODE (TYPE) == SImode \
- || (TYPE_MODE (TYPE) == BLKmode \
- && TYPE_ALIGN (TYPE) == BITS_PER_WORD \
- && int_size_in_bytes (TYPE) == UNITS_PER_WORD)))
+ (TYPE_MODE (TYPE) == BLKmode \
+ || ((TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE(TYPE) == UNION_TYPE) \
+ && !(TYPE_MODE (TYPE) == SImode \
+ || (TYPE_MODE (TYPE) == BLKmode \
+ && TYPE_ALIGN (TYPE) == BITS_PER_WORD \
+ && int_size_in_bytes (TYPE) == UNITS_PER_WORD))))
/* Define how to find the value returned by a library function
assuming the value has mode MODE. */
always returned. Here TYPE will be a C expression of type
`tree', representing the data type of the value.
- Note that values of mode `BLKmode' are returned in memory
- regardless of this macro. Also, the option `-fpcc-struct-return'
+ Note that values of mode `BLKmode' must be explicitly
+ handled by this macro. Also, the option `-fpcc-struct-return'
takes effect regardless of this macro. On most systems, it is
possible to leave the macro undefined; this causes a default
- definition to be used, whose value is the constant 0.
+ definition to be used, whose value is the constant 1 for BLKmode
+ values, and 0 otherwise.
GCC normally converts 1 byte structures into chars, 2 byte
structs into shorts, and 4 byte structs into ints, and returns
to give us MIPS cc compatibility. */
#define RETURN_IN_MEMORY(TYPE) \
- ((TREE_CODE (TYPE) == RECORD_TYPE) || (TREE_CODE (TYPE) == UNION_TYPE))
+ ((TYPE_MODE (TYPE) == BLKmode) \
+ || (TREE_CODE (TYPE) == RECORD_TYPE) || (TREE_CODE (TYPE) == UNION_TYPE))
\f
/* A code distinguishing the floating point format of the target
type DImode is returned in memory. */
#define RETURN_IN_MEMORY(type) \
- (TARGET_HC_STRUCT_RETURN && TYPE_MODE (type) == DImode)
+ (TYPE_MODE (type) == BLKmode \
+ || (TARGET_HC_STRUCT_RETURN && TYPE_MODE (type) == DImode))
/* 1 if N is a possible register number for a function value
as seen by the caller.
For the RS/6000, any structure or union type is returned in memory. */
#define RETURN_IN_MEMORY(TYPE) \
- (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE)
+ (TYPE_MODE (TYPE) == BLKmode \
+ || TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE)
/* 1 if N is a possible register number for a function value
as seen by the caller.
we follow GCC's normal policy. Use -fpcc-struct-value
if you want to follow the ABI. */
#define RETURN_IN_MEMORY(TYPE) \
- (TYPE_MODE (TYPE) == TFmode)
+ (TYPE_MODE (TYPE) == BLKmode || TYPE_MODE (TYPE) == TFmode)
/* Functions which return large structures get the address
to place the wanted value at offset 64 from the frame.
&& (FUNCTION_ARG_PADDING (MODE, TYPE) \
== MUST_PASS_IN_STACK_BAD_PADDING))))
-/* Nonzero if type TYPE should be returned in memory
- (even though its mode is not BLKmode).
+/* Nonzero if type TYPE should be returned in memory.
Most machines can use the following default definition. */
#ifndef RETURN_IN_MEMORY
-#define RETURN_IN_MEMORY(TYPE) 0
+#define RETURN_IN_MEMORY(TYPE) (TYPE_MODE (TYPE) == BLKmode)
#endif
\f
/* Optabs are tables saying how to generate insn bodies