aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-03-25 20:44:50 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2003-03-25 19:44:50 +0000
commit3504dad3f6f3c6df4e72aed80203eb687affff04 (patch)
treea6ed9fab767d34432bf5904b2a8a7217340a5262 /gcc
parentcb9a1d9bb63b68d604dde99a916e48eb5171dd7e (diff)
downloadgcc-3504dad3f6f3c6df4e72aed80203eb687affff04.zip
gcc-3504dad3f6f3c6df4e72aed80203eb687affff04.tar.gz
gcc-3504dad3f6f3c6df4e72aed80203eb687affff04.tar.bz2
i386.c (ix86_rtx_costs): For -fpic and x86-64 local symbolic constants are not expensive.
* i386.c (ix86_rtx_costs): For -fpic and x86-64 local symbolic constants are not expensive. From-SVN: r64855
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ff7624a..71147415 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 25 20:35:51 CET 2003 Jan Hubicka <jh@suse.cz>
+
+ * 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 <jh@suse.cz>
PR opt/10056
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d640f22..9c6653c 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;
}