This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
CONSTANT_ADDRESS_P for i386/x86-64
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 25 Mar 2003 20:06:39 +0100
- Subject: CONSTANT_ADDRESS_P for i386/x86-64
Hi,
currently constant_address_p on i386/x86-64 is defined as follows:
bool
constant_address_p (x)
rtx x;
{
switch (GET_CODE (x))
{
case LABEL_REF:
case CONST_INT:
return true;
case CONST_DOUBLE:
return TARGET_64BIT;
case CONST:
/* For Mach-O, really believe the CONST. */
if (TARGET_MACHO)
return true;
/* Otherwise fall through. */
case SYMBOL_REF:
return !flag_pic && legitimate_constant_p (x);
default:
return false;
}
}
This does not make sense for me. Why for -fpic symbol_ref is refused,
byt label_ref is accepted?
should we accept the static SYMBOL_REFs too on x86-64?
What makes this beast different from calling legitimate_address_p on the
operand?
Honza