RFA: Elimination of compile time warning messages building mips.c
Nick Clifton
nickc@cygnus.com
Mon Aug 7 15:40:00 GMT 2000
Hi Gavin,
I would like to get approval to apply the following patch. It
removes almost all of the compile time warnings when building
gcc/config/mips/mips.c. The only warning that remains is:
mips.c:7792: warning: comparison between signed and unsigned
which is inside the macro MUST_PASS_IN_STACK, which is defined in
expr.h and so I considered it to be outside the scope of this
patch.
Cheers
Nick
2000-08-07 Nick Clifton <nickc@cygnus.com>
* config/mips/mips.c: Fix compile time warning messages.
* config/mips/mips-protos.h: Add prototype for equality_op.
Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.c,v
retrieving revision 1.95
diff -p -r1.95 mips.c
*** mips.c 2000/08/04 20:28:07 1.95
--- mips.c 2000/08/07 22:36:18
*************** mips16_simple_memory_operand (reg, offse
*** 692,698 ****
off = 0x100;
else
off = 0x20;
! if (INTVAL (offset) >= 0 && INTVAL (offset) < off * size)
return 1;
return 0;
}
--- 692,698 ----
off = 0x100;
else
off = 0x20;
! if (INTVAL (offset) >= 0 && INTVAL (offset) < (HOST_WIDE_INT)(off * size))
return 1;
return 0;
}
*************** simple_memory_operand (op, mode)
*** 715,721 ****
/* ??? This isn't strictly correct. It is OK to accept multiword modes
here, since the length attributes are being set correctly, but only
if the address is offsettable. LO_SUM is not offsettable. */
! if (GET_MODE_SIZE (GET_MODE (op)) > UNITS_PER_WORD)
return 0;
/* Decode the address now. */
--- 715,721 ----
/* ??? This isn't strictly correct. It is OK to accept multiword modes
here, since the length attributes are being set correctly, but only
if the address is offsettable. LO_SUM is not offsettable. */
! if (GET_MODE_SIZE (GET_MODE (op)) > (unsigned) UNITS_PER_WORD)
return 0;
/* Decode the address now. */
*************** double_memory_operand (op, mode)
*** 868,874 ****
address will get reloaded anyhow. */
if (GET_CODE (addr) == PLUS
&& GET_CODE (XEXP (addr, 0)) == REG
! && (REGNO (XEXP (addr, 0)) == HARD_FRAME_POINTER_REGNUM
|| REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
&& ((GET_CODE (XEXP (addr, 1)) == CONST_INT
&& ! SMALL_INT (XEXP (addr, 1)))
--- 868,874 ----
address will get reloaded anyhow. */
if (GET_CODE (addr) == PLUS
&& GET_CODE (XEXP (addr, 0)) == REG
! && (REGNO (XEXP (addr, 0)) == (unsigned) HARD_FRAME_POINTER_REGNUM
|| REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
&& ((GET_CODE (XEXP (addr, 1)) == CONST_INT
&& ! SMALL_INT (XEXP (addr, 1)))
*************** double_memory_operand (op, mode)
*** 885,891 ****
maddr = XEXP (addr, 0);
if (GET_CODE (maddr) == PLUS
&& GET_CODE (XEXP (maddr, 0)) == REG
! && (REGNO (XEXP (maddr, 0)) == HARD_FRAME_POINTER_REGNUM
|| REGNO (XEXP (maddr, 0)) == STACK_POINTER_REGNUM)
&& ((GET_CODE (XEXP (maddr, 1)) == CONST_INT
&& ! SMALL_INT (XEXP (maddr, 1)))
--- 885,891 ----
maddr = XEXP (addr, 0);
if (GET_CODE (maddr) == PLUS
&& GET_CODE (XEXP (maddr, 0)) == REG
! && (REGNO (XEXP (maddr, 0)) == (unsigned) HARD_FRAME_POINTER_REGNUM
|| REGNO (XEXP (maddr, 0)) == STACK_POINTER_REGNUM)
&& ((GET_CODE (XEXP (maddr, 1)) == CONST_INT
&& ! SMALL_INT (XEXP (maddr, 1)))
*************** double_memory_operand (op, mode)
*** 905,911 ****
addr = XEXP (XEXP (addr, 0), 0);
if (GET_CODE (addr) == PLUS
&& GET_CODE (XEXP (addr, 0)) == REG
! && (REGNO (XEXP (addr, 0)) == HARD_FRAME_POINTER_REGNUM
|| REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
&& ((GET_CODE (XEXP (addr, 1)) == CONST_INT
&& ! SMALL_INT (XEXP (addr, 1)))
--- 905,911 ----
addr = XEXP (XEXP (addr, 0), 0);
if (GET_CODE (addr) == PLUS
&& GET_CODE (XEXP (addr, 0)) == REG
! && (REGNO (XEXP (addr, 0)) == (unsigned) HARD_FRAME_POINTER_REGNUM
|| REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
&& ((GET_CODE (XEXP (addr, 1)) == CONST_INT
&& ! SMALL_INT (XEXP (addr, 1)))
*************** mips_check_split (address, mode)
*** 1199,1205 ****
{
/* ??? This is the same check used in simple_memory_operand.
We use it here because LO_SUM is not offsettable. */
! if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
return 0;
if ((GET_CODE (address) == SYMBOL_REF && ! SYMBOL_REF_FLAG (address))
--- 1199,1205 ----
{
/* ??? This is the same check used in simple_memory_operand.
We use it here because LO_SUM is not offsettable. */
! if (GET_MODE_SIZE (mode) > (unsigned) UNITS_PER_WORD)
return 0;
if ((GET_CODE (address) == SYMBOL_REF && ! SYMBOL_REF_FLAG (address))
*************** mips_legitimate_address_p (mode, xinsn,
*** 1246,1252 ****
/* Check for constant before stripping off SUBREG, so that we don't
accept (subreg (const_int)) which will fail to reload. */
if (CONSTANT_ADDRESS_P (xinsn)
! && ! (mips_split_addresses && mips_check_split (xinsn, mode))
&& (! TARGET_MIPS16 || mips16_constant (xinsn, mode, 1, 0)))
return 1;
--- 1246,1252 ----
/* Check for constant before stripping off SUBREG, so that we don't
accept (subreg (const_int)) which will fail to reload. */
if (CONSTANT_ADDRESS_P (xinsn)
! && ! (mips_split_addresses && mips_check_split (xinsn, mode))
&& (! TARGET_MIPS16 || mips16_constant (xinsn, mode, 1, 0)))
return 1;
*************** mips_fill_delay_slot (ret, type, operand
*** 1619,1625 ****
dslots_number_nops = num_nops;
mips_load_reg = set_reg;
if (GET_MODE_SIZE (mode)
! > (FP_REG_P (REGNO (set_reg)) ? UNITS_PER_FPREG : UNITS_PER_WORD))
mips_load_reg2 = gen_rtx_REG (SImode, REGNO (set_reg) + 1);
else
mips_load_reg2 = 0;
--- 1619,1625 ----
dslots_number_nops = num_nops;
mips_load_reg = set_reg;
if (GET_MODE_SIZE (mode)
! > (unsigned) (FP_REG_P (REGNO (set_reg)) ? UNITS_PER_FPREG : UNITS_PER_WORD))
mips_load_reg2 = gen_rtx_REG (SImode, REGNO (set_reg) + 1);
else
mips_load_reg2 = 0;
*************** block_move_loop (dest_reg, src_reg, byte
*** 3183,3189 ****
rtx bytes_rtx;
int leftover;
! if (bytes < 2 * MAX_MOVE_BYTES)
abort ();
leftover = bytes % MAX_MOVE_BYTES;
--- 3183,3189 ----
rtx bytes_rtx;
int leftover;
! if (bytes < 2U * MAX_MOVE_BYTES)
abort ();
leftover = bytes % MAX_MOVE_BYTES;
*************** block_move_call (dest_reg, src_reg, byte
*** 3250,3256 ****
/* We want to pass the size as Pmode, which will normally be SImode
but will be DImode if we are using 64 bit longs and pointers. */
if (GET_MODE (bytes_rtx) != VOIDmode
! && GET_MODE (bytes_rtx) != Pmode)
bytes_rtx = convert_to_mode (Pmode, bytes_rtx, 1);
#ifdef TARGET_MEM_FUNCTIONS
--- 3250,3256 ----
/* We want to pass the size as Pmode, which will normally be SImode
but will be DImode if we are using 64 bit longs and pointers. */
if (GET_MODE (bytes_rtx) != VOIDmode
! && GET_MODE (bytes_rtx) != (unsigned) Pmode)
bytes_rtx = convert_to_mode (Pmode, bytes_rtx, 1);
#ifdef TARGET_MEM_FUNCTIONS
*************** expand_block_move (operands)
*** 3292,3298 ****
if (constp && bytes == 0)
return;
! if (align > UNITS_PER_WORD)
align = UNITS_PER_WORD;
/* Move the address into scratch registers. */
--- 3292,3298 ----
if (constp && bytes == 0)
return;
! if (align > (unsigned) UNITS_PER_WORD)
align = UNITS_PER_WORD;
/* Move the address into scratch registers. */
*************** expand_block_move (operands)
*** 3302,3319 ****
if (TARGET_MEMCPY)
block_move_call (dest_reg, src_reg, bytes_rtx);
! else if (constp && bytes <= 2 * MAX_MOVE_BYTES
! && align == UNITS_PER_WORD)
move_by_pieces (orig_dest, orig_src, bytes, align * BITS_PER_WORD);
! else if (constp && bytes <= 2 * MAX_MOVE_BYTES)
emit_insn (gen_movstrsi_internal (change_address (orig_dest, BLKmode,
dest_reg),
change_address (orig_src, BLKmode,
src_reg),
bytes_rtx, align_rtx));
! else if (constp && align >= UNITS_PER_WORD && optimize)
block_move_loop (dest_reg, src_reg, bytes, align, orig_dest, orig_src);
else if (constp && optimize)
--- 3302,3319 ----
if (TARGET_MEMCPY)
block_move_call (dest_reg, src_reg, bytes_rtx);
! else if (constp && bytes <= 2U * MAX_MOVE_BYTES
! && align == (unsigned) UNITS_PER_WORD)
move_by_pieces (orig_dest, orig_src, bytes, align * BITS_PER_WORD);
! else if (constp && bytes <= 2U * MAX_MOVE_BYTES)
emit_insn (gen_movstrsi_internal (change_address (orig_dest, BLKmode,
dest_reg),
change_address (orig_src, BLKmode,
src_reg),
bytes_rtx, align_rtx));
! else if (constp && align >= (unsigned) UNITS_PER_WORD && optimize)
block_move_loop (dest_reg, src_reg, bytes, align, orig_dest, orig_src);
else if (constp && optimize)
*************** function_arg (cum, mode, type, named)
*** 3857,3863 ****
rtx ret;
int regbase = -1;
int bias = 0;
! int *arg_words = &cum->arg_words;
int struct_p = (type != 0
&& (TREE_CODE (type) == RECORD_TYPE
|| TREE_CODE (type) == UNION_TYPE
--- 3857,3863 ----
rtx ret;
int regbase = -1;
int bias = 0;
! unsigned int *arg_words = &cum->arg_words;
int struct_p = (type != 0
&& (TREE_CODE (type) == RECORD_TYPE
|| TREE_CODE (type) == UNION_TYPE
*************** function_arg (cum, mode, type, named)
*** 3938,3944 ****
/* Drops through. */
case BLKmode:
! if (type != NULL_TREE && TYPE_ALIGN (type) > BITS_PER_WORD
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
cum->arg_words += (cum->arg_words & 1);
regbase = GP_ARG_FIRST;
--- 3938,3944 ----
/* Drops through. */
case BLKmode:
! if (type != NULL_TREE && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
cum->arg_words += (cum->arg_words & 1);
regbase = GP_ARG_FIRST;
*************** function_arg (cum, mode, type, named)
*** 3957,3963 ****
regbase = GP_ARG_FIRST;
}
! if (*arg_words >= MAX_ARGS_IN_REGISTERS)
{
if (TARGET_DEBUG_E_MODE)
fprintf (stderr, "<stack>%s\n", struct_p ? ", [struct]" : "");
--- 3957,3963 ----
regbase = GP_ARG_FIRST;
}
! if (*arg_words >= (unsigned) MAX_ARGS_IN_REGISTERS)
{
if (TARGET_DEBUG_E_MODE)
fprintf (stderr, "<stack>%s\n", struct_p ? ", [struct]" : "");
*************** function_arg (cum, mode, type, named)
*** 4007,4013 ****
chunks
= tree_low_cst (TYPE_SIZE_UNIT (type), 1) / UNITS_PER_WORD;
! if (chunks + *arg_words + bias > MAX_ARGS_IN_REGISTERS)
chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias;
/* assign_parms checks the mode of ENTRY_PARM, so we must
--- 4007,4013 ----
chunks
= tree_low_cst (TYPE_SIZE_UNIT (type), 1) / UNITS_PER_WORD;
! if (chunks + *arg_words + bias > (unsigned) MAX_ARGS_IN_REGISTERS)
chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias;
/* assign_parms checks the mode of ENTRY_PARM, so we must
*************** function_arg_partial_nregs (cum, mode, t
*** 4110,4116 ****
if ((mode == BLKmode
|| GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
|| GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
! && cum->arg_words < MAX_ARGS_IN_REGISTERS
&& mips_abi != ABI_EABI)
{
int words;
--- 4110,4116 ----
if ((mode == BLKmode
|| GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
|| GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
! && cum->arg_words < (unsigned) MAX_ARGS_IN_REGISTERS
&& mips_abi != ABI_EABI)
{
int words;
*************** function_arg_partial_nregs (cum, mode, t
*** 4120,4126 ****
else
words = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
! if (words + cum->arg_words <= MAX_ARGS_IN_REGISTERS)
return 0; /* structure fits in registers */
if (TARGET_DEBUG_E_MODE)
--- 4120,4126 ----
else
words = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
! if (words + cum->arg_words <= (unsigned) MAX_ARGS_IN_REGISTERS)
return 0; /* structure fits in registers */
if (TARGET_DEBUG_E_MODE)
*************** function_arg_partial_nregs (cum, mode, t
*** 4130,4136 ****
return MAX_ARGS_IN_REGISTERS - cum->arg_words;
}
! else if (mode == DImode && cum->arg_words == MAX_ARGS_IN_REGISTERS-1
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
{
if (TARGET_DEBUG_E_MODE)
--- 4130,4136 ----
return MAX_ARGS_IN_REGISTERS - cum->arg_words;
}
! else if (mode == DImode && cum->arg_words == MAX_ARGS_IN_REGISTERS - 1U
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
{
if (TARGET_DEBUG_E_MODE)
*************** override_options ()
*** 4638,4644 ****
user. */
#ifdef TARGET_DEFAULT
if (TARGET_SINGLE_FLOAT && TARGET_SOFT_FLOAT)
! target_flags &= ~(TARGET_DEFAULT&(MASK_SOFT_FLOAT|MASK_SINGLE_FLOAT));
#endif
/* Get the architectural level. */
--- 4638,4644 ----
user. */
#ifdef TARGET_DEFAULT
if (TARGET_SINGLE_FLOAT && TARGET_SOFT_FLOAT)
! target_flags &= ~((TARGET_DEFAULT) & (MASK_SOFT_FLOAT | MASK_SINGLE_FLOAT));
#endif
/* Get the architectural level. */
*************** override_options ()
*** 4755,4764 ****
mips_cpu_string = MIPS_CPU_STRING_DEFAULT;
#endif
! /* Identify the processor type */
if (mips_cpu_string == 0
! || !strcmp (mips_cpu_string, "default")
! || !strcmp (mips_cpu_string, "DEFAULT"))
{
switch (mips_isa)
{
--- 4755,4764 ----
mips_cpu_string = MIPS_CPU_STRING_DEFAULT;
#endif
! /* Identify the processor type. */
if (mips_cpu_string == 0
! || ! strcmp (mips_cpu_string, "default")
! || ! strcmp (mips_cpu_string, "DEFAULT"))
{
switch (mips_isa)
{
*************** override_options ()
*** 4780,4786 ****
break;
}
}
-
else
{
const char *p = mips_cpu_string;
--- 4780,4785 ----
*************** override_options ()
*** 4795,4801 ****
p++;
/* Since there is no difference between a R2000 and R3000 in
! terms of the scheduler, we collapse them into just an R3000. */
mips_cpu = PROCESSOR_DEFAULT;
switch (*p)
--- 4794,4800 ----
p++;
/* Since there is no difference between a R2000 and R3000 in
! terms of the scheduler, we collapse them into just an R3000. */
mips_cpu = PROCESSOR_DEFAULT;
switch (*p)
*************** save_restore_insns (store_p, large_reg,
*** 6419,6425 ****
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
! GEN_INT (gp_offset & 0xffff0000));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
insn
--- 6418,6424 ----
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
! GEN_INT (gp_offset & 0xffff0000U));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
insn
*************** save_restore_insns (store_p, large_reg,
*** 6637,6643 ****
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
! GEN_INT (fp_offset & 0xffff0000));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_insn (gen_iorsi3 (base_reg_rtx, base_reg_rtx,
--- 6636,6642 ----
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
! GEN_INT (fp_offset & 0xffff0000U));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_insn (gen_iorsi3 (base_reg_rtx, base_reg_rtx,
*************** function_prologue (file, size)
*** 6839,6847 ****
dest = SET_DEST (set);
if (GET_CODE (dest) != MEM)
continue;
! if (GET_MODE_SIZE (GET_MODE (dest)) == UNITS_PER_WORD)
;
! else if (GET_MODE_SIZE (GET_MODE (dest)) == 2 * UNITS_PER_WORD
&& REGNO (src) < GP_REG_FIRST + 7)
;
else
--- 6838,6846 ----
dest = SET_DEST (set);
if (GET_CODE (dest) != MEM)
continue;
! if (GET_MODE_SIZE (GET_MODE (dest)) == (unsigned) UNITS_PER_WORD)
;
! else if (GET_MODE_SIZE (GET_MODE (dest)) == 2U * UNITS_PER_WORD
&& REGNO (src) < GP_REG_FIRST + 7)
;
else
*************** function_prologue (file, size)
*** 6851,6861 ****
if (GET_CODE (base) != REG
|| GET_CODE (offset) != CONST_INT)
continue;
! if (REGNO (base) == STACK_POINTER_REGNUM
! && INTVAL (offset) == tsize + (REGNO (src) - 4) * UNITS_PER_WORD)
;
! else if (REGNO (base) == HARD_FRAME_POINTER_REGNUM
! && (INTVAL (offset)
== (tsize
+ (REGNO (src) - 4) * UNITS_PER_WORD
- current_function_outgoing_args_size)))
--- 6850,6861 ----
if (GET_CODE (base) != REG
|| GET_CODE (offset) != CONST_INT)
continue;
! if (REGNO (base) == (unsigned) STACK_POINTER_REGNUM
! && (unsigned HOST_WIDE_INT) INTVAL (offset)
! == tsize + (REGNO (src) - 4) * UNITS_PER_WORD)
;
! else if (REGNO (base) == (unsigned) HARD_FRAME_POINTER_REGNUM
! && ((unsigned HOST_WIDE_INT) INTVAL (offset)
== (tsize
+ (REGNO (src) - 4) * UNITS_PER_WORD
- current_function_outgoing_args_size)))
*************** mips_expand_prologue ()
*** 6966,6972 ****
of the first argument in the variable part of the argument list,
otherwise GP_ARG_LAST+1. Note also if the last argument is
the varargs special argument, and treat it as part of the
! variable arguments.
This is only needed if store_args_on_stack is true. */
--- 6966,6972 ----
of the first argument in the variable part of the argument list,
otherwise GP_ARG_LAST+1. Note also if the last argument is
the varargs special argument, and treat it as part of the
! variable arguments.
This is only needed if store_args_on_stack is true. */
*************** mips_expand_prologue ()
*** 7179,7185 ****
&& GET_MODE (tmp_rtx) == SImode)
{
insn = emit_move_insn (tmp_rtx,
! GEN_INT (tsize & 0xffff0000));
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_insn (gen_iorsi3 (tmp_rtx, tmp_rtx,
GEN_INT (tsize & 0x0000ffff)));
--- 7179,7185 ----
&& GET_MODE (tmp_rtx) == SImode)
{
insn = emit_move_insn (tmp_rtx,
! GEN_INT (tsize & 0xffff0000U));
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_insn (gen_iorsi3 (tmp_rtx, tmp_rtx,
GEN_INT (tsize & 0x0000ffff)));
*************** mips_expand_prologue ()
*** 7298,7304 ****
/* Do any necessary cleanup after a function to restore stack, frame,
and regs. */
! #define RA_MASK ((long) 0x80000000) /* 1 << 31 */
#define PIC_OFFSET_TABLE_MASK (1 << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST))
void
--- 7298,7304 ----
/* Do any necessary cleanup after a function to restore stack, frame,
and regs. */
! #define RA_MASK ((unsigned long) 0x80000000U) /* 1 << 31 */
#define PIC_OFFSET_TABLE_MASK (1 << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST))
void
*************** mips_select_rtx_section (mode, x)
*** 7580,7586 ****
/* For hosted applications, always put constants in small data if
possible, as this gives the best performance. */
! if (GET_MODE_SIZE (mode) <= mips_section_threshold
&& mips_section_threshold > 0)
SMALL_DATA_SECTION ();
else if (flag_pic && symbolic_expression_p (x))
--- 7580,7586 ----
/* For hosted applications, always put constants in small data if
possible, as this gives the best performance. */
! if (GET_MODE_SIZE (mode) <= (unsigned) mips_section_threshold
&& mips_section_threshold > 0)
SMALL_DATA_SECTION ();
else if (flag_pic && symbolic_expression_p (x))
*************** function_arg_pass_by_reference (cum, mod
*** 7791,7806 ****
here hopefully is not relevant to mips_va_arg. */
if (cum && MUST_PASS_IN_STACK (mode, type))
{
! /* Don't pass the actual CUM to FUNCTION_ARG, because we would
! get double copies of any offsets generated for small structs
! passed in registers. */
! CUMULATIVE_ARGS temp;
! temp = *cum;
! if (FUNCTION_ARG (temp, mode, type, named) != 0)
! return 1;
}
-
/* Otherwise, we only do this if EABI is selected. */
if (mips_abi != ABI_EABI)
return 0;
--- 7791,7805 ----
here hopefully is not relevant to mips_va_arg. */
if (cum && MUST_PASS_IN_STACK (mode, type))
{
! /* Don't pass the actual CUM to FUNCTION_ARG, because we would
! get double copies of any offsets generated for small structs
! passed in registers. */
! CUMULATIVE_ARGS temp;
! temp = *cum;
! if (FUNCTION_ARG (temp, mode, type, named) != 0)
! return 1;
}
/* Otherwise, we only do this if EABI is selected. */
if (mips_abi != ABI_EABI)
return 0;
*************** mips16_constant (x, mode, addr, addend)
*** 8145,8151 ****
knows how to handle this. We can always accept a string
constant, which is the other case in which SYMBOL_REF_FLAG
will be set. */
! if (! addr && ! addend && SYMBOL_REF_FLAG (x) && mode == Pmode)
return 1;
/* We can accept a string constant, which will have
--- 8144,8153 ----
knows how to handle this. We can always accept a string
constant, which is the other case in which SYMBOL_REF_FLAG
will be set. */
! if (! addr
! && ! addend
! && SYMBOL_REF_FLAG (x)
! && mode == (enum machine_mode) Pmode)
return 1;
/* We can accept a string constant, which will have
*************** mips16_optimize_gp (first)
*** 8716,8729 ****
&& GET_CODE (XEXP (SET_SRC (set), 0)) == REG
&& REGNO (XEXP (SET_SRC (set), 0)) == GP_REG_FIRST + 28
&& GET_CODE (SET_DEST (set)) == REG
! && GET_MODE (SET_DEST (set)) == Pmode)
gpcopy = SET_DEST (set);
else if (slot == NULL_RTX
&& gpcopy != NULL_RTX
&& GET_CODE (SET_DEST (set)) == MEM
&& GET_CODE (SET_SRC (set)) == REG
&& REGNO (SET_SRC (set)) == REGNO (gpcopy)
! && GET_MODE (SET_DEST (set)) == Pmode)
{
rtx base, offset;
--- 8718,8731 ----
&& GET_CODE (XEXP (SET_SRC (set), 0)) == REG
&& REGNO (XEXP (SET_SRC (set), 0)) == GP_REG_FIRST + 28
&& GET_CODE (SET_DEST (set)) == REG
! && GET_MODE (SET_DEST (set)) == (unsigned) Pmode)
gpcopy = SET_DEST (set);
else if (slot == NULL_RTX
&& gpcopy != NULL_RTX
&& GET_CODE (SET_DEST (set)) == MEM
&& GET_CODE (SET_SRC (set)) == REG
&& REGNO (SET_SRC (set)) == REGNO (gpcopy)
! && GET_MODE (SET_DEST (set)) == (unsigned) Pmode)
{
rtx base, offset;
*************** mips16_optimize_gp (first)
*** 8740,8746 ****
&& reg_overlap_mentioned_p (SET_DEST (set), gpcopy)
&& (GET_CODE (SET_DEST (set)) != REG
|| REGNO (SET_DEST (set)) != REGNO (gpcopy)
! || GET_MODE (SET_DEST (set)) != Pmode
|| ((GET_CODE (SET_SRC (set)) != CONST
|| GET_CODE (XEXP (SET_SRC (set), 0)) != REG
|| (REGNO (XEXP (SET_SRC (set), 0))
--- 8742,8748 ----
&& reg_overlap_mentioned_p (SET_DEST (set), gpcopy)
&& (GET_CODE (SET_DEST (set)) != REG
|| REGNO (SET_DEST (set)) != REGNO (gpcopy)
! || GET_MODE (SET_DEST (set)) != (unsigned) Pmode
|| ((GET_CODE (SET_SRC (set)) != CONST
|| GET_CODE (XEXP (SET_SRC (set), 0)) != REG
|| (REGNO (XEXP (SET_SRC (set), 0))
*************** mips16_optimize_gp (first)
*** 8859,8865 ****
set = PATTERN (insn);
if (GET_CODE (set) != SET
! || GET_MODE (SET_DEST (set)) != Pmode)
continue;
if (GET_CODE (SET_DEST (set)) == MEM
--- 8861,8867 ----
set = PATTERN (insn);
if (GET_CODE (set) != SET
! || GET_MODE (SET_DEST (set)) != (unsigned) Pmode)
continue;
if (GET_CODE (SET_DEST (set)) == MEM
Index: gcc/config/mips/mips-protos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips-protos.h,v
retrieving revision 1.3
diff -p -r1.3 mips-protos.h
*** mips-protos.h 2000/04/16 21:47:17 1.3
--- mips-protos.h 2000/08/07 22:36:18
*************** extern int reg_or_0_operand PARAMS ((rt
*** 96,101 ****
--- 96,102 ----
extern int true_reg_or_0_operand PARAMS ((rtx, enum machine_mode));
extern int simple_memory_operand PARAMS ((rtx, enum machine_mode));
extern int double_memory_operand PARAMS ((rtx, enum machine_mode));
+ extern int equality_op PARAMS ((rtx, enum machine_mode));
extern int small_int PARAMS ((rtx, enum machine_mode));
extern int uns_arith_operand PARAMS ((rtx, enum machine_mode));
extern struct rtx_def * embedded_pic_offset PARAMS ((rtx));
More information about the Gcc-patches
mailing list