This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Sign-extend CONST_INTs within their modes
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: Sign-extend CONST_INTs within their modes
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Tue, 03 Apr 2001 11:14:28 -0400
- cc: Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
The rs6000.c:rs6000_emit_move patch is incomplete. The logic
written during the last backend update was wrong for 64-bit hosts.
The purpose of this logic is intended to be that we do not want to
store all 64-bit constants in the TOC/GOT and we do not want to generate
all of the 64-bit constants inline.
The patch which I have been waiting to install is:
Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.166
diff -c -p -r1.166 rs6000.c
*************** rs6000_emit_move (dest, source, mode)
*** 1688,1704 ****
}
else if (mode == Pmode
&& CONSTANT_P (operands[1])
! && (((HOST_BITS_PER_WIDE_INT != 32
! || GET_CODE (operands[1]) != CONST_INT)
! && ! easy_fp_constant (operands[1], mode))
! || (GET_CODE (operands[0]) == REG
! && FP_REGNO_P (REGNO (operands[0]))))
&& GET_CODE (operands[1]) != HIGH
&& ! LEGITIMATE_CONSTANT_POOL_ADDRESS_P (operands[1])
&& ! TOC_RELATIVE_EXPR_P (operands[1]))
{
int special_constant_p = 0;
/* Emit a USE operation so that the constant isn't deleted if
expensive optimizations are turned on because nobody
references it. This should only be done for operands that
--- 1688,1705 ----
}
else if (mode == Pmode
&& CONSTANT_P (operands[1])
! && ((GET_CODE (operands[1]) != CONST_INT
! && ! easy_fp_constant (operands[1], mode))
! || (GET_CODE (operands[1]) == CONST_INT
! && num_insns_constant (operands[1], mode) > 2)
! || (GET_CODE (operands[0]) == REG
! && FP_REGNO_P (REGNO (operands[0]))))
&& GET_CODE (operands[1]) != HIGH
&& ! LEGITIMATE_CONSTANT_POOL_ADDRESS_P (operands[1])
&& ! TOC_RELATIVE_EXPR_P (operands[1]))
{
int special_constant_p = 0;
/* Emit a USE operation so that the constant isn't deleted if
expensive optimizations are turned on because nobody
references it. This should only be done for operands that