summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-29 00:45:55 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-29 00:45:55 +0000
commit6ea474750902fd354fa7e85c1dffd34487a1cfc5 (patch)
tree14250d69bb7ca4ce0b44c6068676f6ad5414081b
parent6bb7c2f2094e4737055ee6d4183290dfc015c2ed (diff)
downloadppe42-gcc-6ea474750902fd354fa7e85c1dffd34487a1cfc5.tar.gz
ppe42-gcc-6ea474750902fd354fa7e85c1dffd34487a1cfc5.zip
* emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM
is a fixed register before returning pic_offset_table_rtx. * loop.c (scan_loop): Don't hoist insns that set pic_offset_table_rtx when PIC_OFFSET_TABLE_REG_CALL_CLOBBERED is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49304 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/emit-rtl.c3
-rw-r--r--gcc/loop.c3
3 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e1830f0b974..617f635dee0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2002-01-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM
+ is a fixed register before returning pic_offset_table_rtx.
+ * loop.c (scan_loop): Don't hoist insns that set pic_offset_table_rtx
+ when PIC_OFFSET_TABLE_REG_CALL_CLOBBERED is defined.
+
2002-01-28 Jason Merrill <jason@redhat.com>
* dwarf2.h (enum dwarf_call_frame_info): Add other DWARF 3 codes.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 2f3e100c8db..0506a496d47 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -411,7 +411,8 @@ gen_rtx_REG (mode, regno)
if (regno == RETURN_ADDRESS_POINTER_REGNUM)
return return_address_pointer_rtx;
#endif
- if (regno == PIC_OFFSET_TABLE_REGNUM)
+ if (regno == PIC_OFFSET_TABLE_REGNUM
+ && fixed_regs[PIC_OFFSET_TABLE_REGNUM])
return pic_offset_table_rtx;
if (regno == STACK_POINTER_REGNUM)
return stack_pointer_rtx;
diff --git a/gcc/loop.c b/gcc/loop.c
index ebd59af59ff..5df08668977 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -762,6 +762,9 @@ scan_loop (loop, flags)
if (GET_CODE (p) == INSN
&& (set = single_set (p))
&& GET_CODE (SET_DEST (set)) == REG
+#ifdef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
+ && SET_DEST (set) != pic_offset_table_rtx
+#endif
&& ! regs->array[REGNO (SET_DEST (set))].may_not_optimize)
{
int tem1 = 0;
OpenPOWER on IntegriCloud