summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-09-20 15:56:12 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-09-20 15:56:12 +0000
commita05a4a1e20371f632289ae735d4f85d13a9d12e5 (patch)
tree562c94a09583a60439e2db9d08654bc13cd9c102 /gnu/usr.bin/gcc
parentef3e273463eb152ebe7aa3870712452151152016 (diff)
In find_barrier(), be less aggressive when deciding how many instructions
can be put between two set of pc-relative loaded data if we are compiling PIC code; subsequent optimization passes are not as benign as what find_barrier() expects, leading to dreaded ``pcrel too far'' as(1) errors.
Diffstat (limited to 'gnu/usr.bin/gcc')
-rw-r--r--gnu/usr.bin/gcc/gcc/config/sh/sh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/sh/sh.c b/gnu/usr.bin/gcc/gcc/config/sh/sh.c
index 9f138a6970c..fa595e7468a 100644
--- a/gnu/usr.bin/gcc/gcc/config/sh/sh.c
+++ b/gnu/usr.bin/gcc/gcc/config/sh/sh.c
@@ -2687,6 +2687,13 @@ find_barrier (num_mova, mova, from)
si_limit = 1018;
hi_limit = 510;
+#if defined(OPENBSD_NATIVE) || defined(OPENBSD_CROSS)
+ if (flag_pic)
+ {
+ si_limit -= 16;
+ hi_limit -= 16;
+ }
+#endif
while (from && count_si < si_limit && count_hi < hi_limit)
{