From e87dac45ade7e14d817d465b4353c35c93489a85 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Fri, 5 Apr 2002 08:00:32 +0000 Subject: [PATCH] * config/mips/mips.h (CUMULATIVE_ARGS): Rename fp_regs to num_fprs to avoid clash with Irix header file sys/ucontext.h. Rename gp_regs to num_gprs for symmetry. * config/mips/mips.c: Adjust accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51906 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/mips/mips.c | 24 +++++++++++++----------- gcc/config/mips/mips.h | 4 ++-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af23e04..ed61e4e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-04-04 Richard Sandiford + + * config/mips/mips.h (CUMULATIVE_ARGS): Rename fp_regs to num_fprs + to avoid clash with Irix header file sys/ucontext.h. Rename gp_regs + to num_gprs for symmetry. + * config/mips/mips.c: Adjust accordingly. + 2002-04-04 Neil Booth * c-common.c (truthvalue_conversion): Rename, update. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 213090c..c04b054 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4023,8 +4023,8 @@ mips_arg_info (cum, mode, type, named, info) The EABI allocates the floating-point registers separately, but the other ABIs allocate them like integer registers. */ info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p - ? cum->fp_regs - : cum->gp_regs); + ? cum->num_fprs + : cum->num_gprs); if (even_reg_p) info->reg_offset += info->reg_offset & 1; @@ -4102,9 +4102,9 @@ function_arg_advance (cum, mode, type, named) cum->fp_code += (mode == SFmode ? 1 : 2) << ((cum->arg_number - 1) * 2); if (mips_abi != ABI_EABI || !info.fpr_p) - cum->gp_regs = info.reg_offset + info.reg_words; + cum->num_gprs = info.reg_offset + info.reg_words; else if (info.reg_words > 0) - cum->fp_regs += FP_INC; + cum->num_fprs += FP_INC; if (info.stack_words > 0) cum->stack_words = info.stack_offset + info.stack_words; @@ -4279,9 +4279,9 @@ mips_setup_incoming_varargs (cum, mode, type, no_rtl) FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1); /* Found out how many registers we need to save. */ - gp_saved = MAX_ARGS_IN_REGISTERS - local_cum.gp_regs; + gp_saved = MAX_ARGS_IN_REGISTERS - local_cum.num_gprs; fp_saved = (EABI_FLOAT_VARARGS_P - ? MAX_ARGS_IN_REGISTERS - local_cum.fp_regs + ? MAX_ARGS_IN_REGISTERS - local_cum.num_fprs : 0); if (!no_rtl) @@ -4302,7 +4302,7 @@ mips_setup_incoming_varargs (cum, mode, type, no_rtl) if (mips_abi != ABI_EABI && BYTES_BIG_ENDIAN) MEM_SET_IN_STRUCT_P (mem, 1); - move_block_from_reg (local_cum.gp_regs + GP_ARG_FIRST, mem, + move_block_from_reg (local_cum.num_gprs + GP_ARG_FIRST, mem, gp_saved, gp_saved * UNITS_PER_WORD); } if (fp_saved > 0) @@ -4321,7 +4321,7 @@ mips_setup_incoming_varargs (cum, mode, type, no_rtl) mode = TARGET_SINGLE_FLOAT ? SFmode : DFmode; - for (i = local_cum.fp_regs; i < MAX_ARGS_IN_REGISTERS; i += FP_INC) + for (i = local_cum.num_fprs; i < MAX_ARGS_IN_REGISTERS; i += FP_INC) { rtx ptr = plus_constant (virtual_incoming_args_rtx, off); emit_move_insn (gen_rtx_MEM (mode, ptr), @@ -4412,7 +4412,7 @@ mips_va_start (stdarg_p, valist, nextarg) int gpr_save_area_size; gpr_save_area_size - = (MAX_ARGS_IN_REGISTERS - cum->gp_regs) * UNITS_PER_WORD; + = (MAX_ARGS_IN_REGISTERS - cum->num_gprs) * UNITS_PER_WORD; if (EABI_FLOAT_VARARGS_P) { @@ -4470,7 +4470,7 @@ mips_va_start (stdarg_p, valist, nextarg) /* Likewise emit code to initialize FOFF, the offset from FTOP of the next FPR argument. */ fpr_save_area_size - = (MAX_ARGS_IN_REGISTERS - cum->fp_regs) * UNITS_PER_FPREG; + = (MAX_ARGS_IN_REGISTERS - cum->num_fprs) * UNITS_PER_FPREG; t = build (MODIFY_EXPR, TREE_TYPE (foff), foff, build_int_2 (fpr_save_area_size, 0)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -4502,7 +4502,9 @@ mips_va_start (stdarg_p, valist, nextarg) if (mips_abi == ABI_N32 || mips_abi == ABI_64 || mips_abi == ABI_MEABI) - ofs = (cum->gp_regs < MAX_ARGS_IN_REGISTERS ? 0 : -UNITS_PER_WORD); + ofs = (cum->num_gprs < MAX_ARGS_IN_REGISTERS + ? 0 + : -UNITS_PER_WORD); else ofs = -UNITS_PER_WORD; } diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 16b34ab..553edb7 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2794,10 +2794,10 @@ typedef struct mips_args { /* For EABI, the number of integer registers used so far. For other ABIs, the number of words passed in registers (whether integer or floating-point). */ - unsigned int gp_regs; + unsigned int num_gprs; /* For EABI, the number of floating-point registers used so far. */ - unsigned int fp_regs; + unsigned int num_fprs; /* The number of words passed on the stack. */ unsigned int stack_words; -- 2.7.4