+2004-02-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/mips/mips.h (TARGET_OLDABI): Define. Use TARGET_NEWABI and
+ TARGET_LODABI consistently.
+ * config/mips/mips.c (function_arg,mips_setup_incoming_varargs,
+ mips_va_arg,override_options,compute_frame_size,
+ mips_initial_elimination_offset,mips16_fp_args,build_mips16_call_stub
+ ,mips_return_in_memory,mips_strict_argument_naming): Use TARGET_NEWABI
+ and TARGET_LODABI consistently.
+ * config/mips/mips.md (exception_receiver): Likewise.
+ * config/mips/linux64.h: Likewise.
+
2004-02-11 Hartmut Penner <hpenner@de.ibm.com>
* gcc/config/rs6000/rs6000.c (rs6000_override_options)
if (type != 0
&& TREE_CODE (type) == RECORD_TYPE
- && (mips_abi == ABI_N32 || mips_abi == ABI_64)
+ && TARGET_NEWABI
&& TYPE_SIZE_UNIT (type)
&& host_integerp (TYPE_SIZE_UNIT (type), 1)
&& named)
}
}
}
- if (mips_abi == ABI_32 || mips_abi == ABI_O64)
+ if (TARGET_OLDABI)
{
/* No need for pretend arguments: the register parameter area was
allocated by the caller. */
that alignments <= UNITS_PER_WORD are preserved by the va_arg
increment mechanism. */
- if ((mips_abi == ABI_N32 || mips_abi == ABI_64)
- && TYPE_ALIGN (type) > 64)
+ if (TARGET_NEWABI && TYPE_ALIGN (type) > 64)
align = 16;
else if (TARGET_64BIT)
align = 8;
}
}
- if (mips_abi != ABI_32 && mips_abi != ABI_O64)
+ if (!TARGET_OLDABI)
flag_pcc_struct_return = 0;
#if defined(USE_COLLECT2)
/* Add in space reserved on the stack by the callee for storing arguments
passed in registers. */
- if (mips_abi != ABI_32 && mips_abi != ABI_O64)
+ if (!TARGET_OLDABI)
total_size += MIPS_STACK_ALIGN (current_function_pretend_args_size);
/* Save other computed information. */
case ARG_POINTER_REGNUM:
offset = cfun->machine->frame.total_size;
- if (mips_abi == ABI_N32 || mips_abi == ABI_64)
+ if (TARGET_NEWABI)
offset -= current_function_pretend_args_size;
break;
unsigned int f;
/* This code only works for the original 32 bit ABI and the O64 ABI. */
- if (mips_abi != ABI_32 && mips_abi != ABI_O64)
+ if (!TARGET_OLDABI)
abort ();
if (from_fp_p)
/* This code will only work for o32 and o64 abis. The other ABI's
require more sophisticated support. */
- if (mips_abi != ABI_32 && mips_abi != ABI_O64)
+ if (!TARGET_OLDABI)
abort ();
/* We can only handle SFmode and DFmode floating point return
static bool
mips_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED)
{
- if (mips_abi == ABI_32 || mips_abi == ABI_O64)
+ if (TARGET_OLDABI)
return (TYPE_MODE (type) == BLKmode);
else
return ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
static bool
mips_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
{
- return (mips_abi != ABI_32 && mips_abi != ABI_O64);
+ return !TARGET_OLDABI;
}
static int
#define TUNE_SB1 (mips_tune == PROCESSOR_SB1)
#define TUNE_SR71K (mips_tune == PROCESSOR_SR71000)
+#define TARGET_OLDABI (mips_abi == ABI_32 || mips_abi == ABI_O64)
#define TARGET_NEWABI (mips_abi == ABI_N32 || mips_abi == ABI_64)
/* IRIX specific stuff. */
/* True if the ABI can only work with 64-bit integer registers. We
generally allow ad-hoc variations for TARGET_SINGLE_FLOAT, but
otherwise floating-point registers must also be 64-bit. */
-#define ABI_NEEDS_64BIT_REGS (mips_abi == ABI_64 \
- || mips_abi == ABI_O64 \
- || mips_abi == ABI_N32)
+#define ABI_NEEDS_64BIT_REGS (TARGET_NEWABI || mips_abi == ABI_O64)
/* Likewise for 32-bit regs. */
#define ABI_NEEDS_32BIT_REGS (mips_abi == ABI_32)
#define FLOAT_TYPE_SIZE 32
#define DOUBLE_TYPE_SIZE 64
-#define LONG_DOUBLE_TYPE_SIZE \
- (mips_abi == ABI_N32 || mips_abi == ABI_64 ? 128 : 64)
+#define LONG_DOUBLE_TYPE_SIZE (TARGET_NEWABI ? 128 : 64)
/* long double is not a fixed mode, but the idea is that, if we
support long double, we also want a 128-bit integer type. */
#define POINTERS_EXTEND_UNSIGNED 0
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
-#define PARM_BOUNDARY ((mips_abi == ABI_O64 || mips_abi == ABI_N32 \
- || mips_abi == ABI_64 \
+#define PARM_BOUNDARY ((mips_abi == ABI_O64 \
+ || TARGET_NEWABI \
|| (mips_abi == ABI_EABI && TARGET_64BIT)) ? 64 : 32)
/* o32 and o64 reserve stack space for all argument registers. */
#define REG_PARM_STACK_SPACE(FNDECL) \
- ((mips_abi == ABI_32 || mips_abi == ABI_O64) \
+ (TARGET_OLDABI \
? (MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD) \
: 0)
`current_function_outgoing_args_size'. */
#define OUTGOING_REG_PARM_STACK_SPACE
-#define STACK_BOUNDARY \
- ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \
- ? 64 : 128)
-
+#define STACK_BOUNDARY ((TARGET_OLDABI || mips_abi == ABI_EABI) ? 64 : 128)
\f
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
#define GP_RETURN (GP_REG_FIRST + 2)
#define FP_RETURN ((TARGET_SOFT_FLOAT) ? GP_RETURN : (FP_REG_FIRST + 0))
-#define MAX_ARGS_IN_REGISTERS \
- ((mips_abi == ABI_32 || mips_abi == ABI_O64) ? 4 : 8)
+#define MAX_ARGS_IN_REGISTERS (TARGET_OLDABI ? 4 : 8)
/* Largest possible value of MAX_ARGS_IN_REGISTERS. */
/* Treat LOC as a byte offset from the stack pointer and round it up
to the next fully-aligned offset. */
#define MIPS_STACK_ALIGN(LOC) \
- ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \
+ ((TARGET_OLDABI || mips_abi == ABI_EABI) \
? ((LOC) + 7) & ~7 \
: ((LOC) + 15) & ~15)
fprintf (FILE, "\t.set\tnoat\n"); \
fprintf (FILE, "\tmove\t%s,%s\t\t# save current return address\n", \
reg_names[GP_REG_FIRST + 1], reg_names[GP_REG_FIRST + 31]); \
- if (mips_abi != ABI_N32 && mips_abi != ABI_64) \
+ if (!TARGET_NEWABI) \
{ \
fprintf (FILE, \
"\t%s\t%s,%s,%d\t\t# _mcount pops 2 words from stack\n", \
/* See mips_expand_prologue's use of loadgp for when this should be
true. */
-#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_ABICALLS \
- && mips_abi != ABI_32 \
- && mips_abi != ABI_O64)
+#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_ABICALLS && !TARGET_OLDABI)
\f
#define DFMODE_NAN \