mips.h (FUNCTION_ARG_REGNO_P): Simplify.
* config/mips/mips.h (FUNCTION_ARG_REGNO_P): Simplify. (CLASS_UNITS): Undefine. (CLASS_MAX_NREGS): Use FP_INC. * config/mips/mips.c (compute_frame_size): Likewise. (override_options): Use FP_INC and UNITS_PER_FPVALUE. From-SVN: r51166
This commit is contained in:
parent
6e11556869
commit
e6f884cdac
3 changed files with 21 additions and 34 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-03-22 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* config/mips/mips.h (FUNCTION_ARG_REGNO_P): Simplify.
|
||||
(CLASS_UNITS): Undefine.
|
||||
(CLASS_MAX_NREGS): Use FP_INC.
|
||||
* config/mips/mips.c (compute_frame_size): Likewise.
|
||||
(override_options): Use FP_INC and UNITS_PER_FPVALUE.
|
||||
|
||||
2002-03-22 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cpplex.c (parse_identifier_slow): Rename parse_slow, adjust
|
||||
|
|
|
@ -5257,7 +5257,7 @@ override_options ()
|
|||
temp = ((regno & 1) == 0 || size <= UNITS_PER_WORD);
|
||||
|
||||
else if (FP_REG_P (regno))
|
||||
temp = ((TARGET_FLOAT64 || ((regno & 1) == 0)
|
||||
temp = (((regno % FP_INC) == 0
|
||||
/* I think this change is OK regardless of abi, but
|
||||
I'm being cautions untill I can test this more.
|
||||
HARD_REGNO_MODE_OK is about whether or not you
|
||||
|
@ -5268,7 +5268,7 @@ override_options ()
|
|||
&& (class == MODE_FLOAT
|
||||
|| class == MODE_COMPLEX_FLOAT
|
||||
|| (TARGET_DEBUG_H_MODE && class == MODE_INT))
|
||||
&& (! TARGET_SINGLE_FLOAT || size <= 4));
|
||||
&& size <= UNITS_PER_FPVALUE);
|
||||
|
||||
else if (MD_REG_P (regno))
|
||||
temp = (class == MODE_INT
|
||||
|
@ -6415,8 +6415,6 @@ compute_frame_size (size)
|
|||
HOST_WIDE_INT fp_reg_size; /* # bytes needed to store fp regs */
|
||||
long mask; /* mask of saved gp registers */
|
||||
long fmask; /* mask of saved fp registers */
|
||||
int fp_inc; /* 1 or 2 depending on the size of fp regs */
|
||||
long fp_bits; /* bitmask to use for each fp register */
|
||||
tree return_type;
|
||||
|
||||
gp_reg_size = 0;
|
||||
|
@ -6488,28 +6486,16 @@ compute_frame_size (size)
|
|||
}
|
||||
}
|
||||
|
||||
/* Calculate space needed for fp registers. */
|
||||
if (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT)
|
||||
{
|
||||
fp_inc = 1;
|
||||
fp_bits = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
fp_inc = 2;
|
||||
fp_bits = 3;
|
||||
}
|
||||
|
||||
/* This loop must iterate over the same space as its companion in
|
||||
save_restore_insns. */
|
||||
for (regno = (FP_REG_LAST - fp_inc + 1);
|
||||
for (regno = (FP_REG_LAST - FP_INC + 1);
|
||||
regno >= FP_REG_FIRST;
|
||||
regno -= fp_inc)
|
||||
regno -= FP_INC)
|
||||
{
|
||||
if (regs_ever_live[regno] && !call_used_regs[regno])
|
||||
{
|
||||
fp_reg_size += fp_inc * UNITS_PER_FPREG;
|
||||
fmask |= fp_bits << (regno - FP_REG_FIRST);
|
||||
fp_reg_size += FP_INC * UNITS_PER_FPREG;
|
||||
fmask |= ((1 << FP_INC) - 1) << (regno - FP_REG_FIRST);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6555,7 +6541,7 @@ compute_frame_size (size)
|
|||
current_frame_info.fmask = fmask;
|
||||
current_frame_info.initialized = reload_completed;
|
||||
current_frame_info.num_gp = gp_reg_size / UNITS_PER_WORD;
|
||||
current_frame_info.num_fp = fp_reg_size / (fp_inc * UNITS_PER_FPREG);
|
||||
current_frame_info.num_fp = fp_reg_size / (FP_INC * UNITS_PER_FPREG);
|
||||
|
||||
if (mask)
|
||||
{
|
||||
|
@ -6582,7 +6568,7 @@ compute_frame_size (size)
|
|||
{
|
||||
unsigned long offset = (args_size + extra_size + var_size
|
||||
+ gp_reg_rounded + fp_reg_size
|
||||
- fp_inc * UNITS_PER_FPREG);
|
||||
- FP_INC * UNITS_PER_FPREG);
|
||||
current_frame_info.fp_sp_offset = offset;
|
||||
current_frame_info.fp_save_offset = offset - total_size;
|
||||
}
|
||||
|
|
|
@ -2331,15 +2331,10 @@ extern enum reg_class mips_char_to_class[256];
|
|||
/* Return the maximum number of consecutive registers
|
||||
needed to represent mode MODE in a register of class CLASS. */
|
||||
|
||||
#define CLASS_UNITS(mode, size) \
|
||||
((GET_MODE_SIZE (mode) + (size) - 1) / (size))
|
||||
|
||||
#define CLASS_MAX_NREGS(CLASS, MODE) \
|
||||
((CLASS) == FP_REGS \
|
||||
? (TARGET_FLOAT64 \
|
||||
? CLASS_UNITS (MODE, 8) \
|
||||
: 2 * CLASS_UNITS (MODE, 8)) \
|
||||
: CLASS_UNITS (MODE, UNITS_PER_WORD))
|
||||
? FP_INC \
|
||||
: (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
||||
|
||||
/* If defined, gives a class of registers that cannot be used as the
|
||||
operand of a SUBREG that changes the mode of the object illegally.
|
||||
|
@ -2718,11 +2713,9 @@ extern struct mips_frame_info current_frame_info;
|
|||
are 32 bits, we can't directly reference the odd numbered ones. */
|
||||
|
||||
#define FUNCTION_ARG_REGNO_P(N) \
|
||||
(((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST) \
|
||||
|| ((! TARGET_SOFT_FLOAT \
|
||||
&& ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST) \
|
||||
&& (TARGET_FLOAT64 || (0 == (N) % 2))) \
|
||||
&& ! fixed_regs[N]))
|
||||
((((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST) \
|
||||
|| ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST)) \
|
||||
&& !fixed_regs[N])
|
||||
|
||||
/* A C expression which can inhibit the returning of certain function
|
||||
values in registers, based on the type of value. A nonzero value says
|
||||
|
|
Loading…
Add table
Reference in a new issue