diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff7624a8ec6..7114741559c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 25 20:35:51 CET 2003 Jan Hubicka + + * i386.c (ix86_rtx_costs): For -fpic and x86-64 local symbolic + constants are not expensive. + Mon Mar 24 20:03:03 CET 2003 Jan Hubicka PR opt/10056 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d640f22aa71..9c6653cfcfc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14939,7 +14939,11 @@ ix86_rtx_costs (x, code, outer_code, total) *total = 3; else if (TARGET_64BIT && !x86_64_zero_extended_value (x)) *total = 2; - else if (flag_pic && SYMBOLIC_CONST (x)) + else if (flag_pic && SYMBOLIC_CONST (x) + && (!TARGET_64BIT + || (!GET_CODE (x) != LABEL_REF + && (GET_CODE (x) != SYMBOL_REF + || !SYMBOL_REF_FLAG (x))))) *total = 1; else *total = 0; @@ -14962,7 +14966,7 @@ ix86_rtx_costs (x, code, outer_code, total) /* Start with (MEM (SYMBOL_REF)), since that's where it'll probably end up. Add a penalty for size. */ *total = (COSTS_N_INSNS (1) - + (flag_pic != 0) + + (flag_pic != 0 && !TARGET_64BIT) + (mode == SFmode ? 0 : mode == DFmode ? 1 : 2)); break; }