summaryrefslogtreecommitdiff
path: root/gcc/config/cris
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2002-03-12 21:42:40 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-03-12 21:42:40 -0800
commit5b43fed17bf58c31f3151dd37966e7a9b85a309e (patch)
treeff7ebe9916a64b81e187d279cffac13101372cd6 /gcc/config/cris
parent56d4fe31c5265b7f5a0aaea8d5013a7154b211e8 (diff)
downloadgcc-5b43fed17bf58c31f3151dd37966e7a9b85a309e.tar.gz
re PR rtl-optimization/5878 (gcc 3.1 breaks on C code generated by the Mercury compiler)
PR 5878 * config/arc/arc.h, config/cris/cris.h, config/i386/i386.h, config/m68k/m68k.h, config/s390/s390.h, config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Conditionalize on flag_pic. * config/arm/arm.h config/i386/i386.h, config/m68k/m68k.h, config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Set PIC_OFFSET_TABLE_REGNUM based on INVALID_REGNUM not flag_pic. * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): New. * config/arm/arm.c (arm_pic_register): Init to INVALID_REGNUM. (arm_override_options): Set arm_pic_register if TARGET_APCS_STACK also. Don't set it if not flag_pic. * config/i386/i386.c (ix86_save_reg): Trust PIC_OFFSET_TABLE_REGNUM to be INVALID_REGNUM when not used. * gcc.dg/20020312-2.c: New. From-SVN: r50713
Diffstat (limited to 'gcc/config/cris')
-rw-r--r--gcc/config/cris/cris.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 235777db85e..21065a9f462 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -1468,7 +1468,7 @@ call_ ## FUNC (void) \
/* Node: PIC */
-#define PIC_OFFSET_TABLE_REGNUM 0
+#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 0 : INVALID_REGNUM)
#define LEGITIMATE_PIC_OPERAND_P(X) cris_legitimate_pic_operand (X)