Commit e55ef7f4 by Richard Earnshaw Committed by Richard Earnshaw

re PR target/23473 (ICE at config/arm/arm.c:3280)

	PR target/23473
	* arm.md (arm_load_pic_register): Change argument to the mask of
	saved registers.  Call thumb_find_work_register if we need a
	scratch register on Thumb.
	(arm_expand_prologue): Pass empty register set to
	arm_load_pic_register.
	(thumb_expand_prologue): Pass live_regs_mask directly to
	arm_load_pic_register.
	* arm-protos.h (arm_load_pic_register): Update prototype.

From-SVN: r103277
parent d102596b
2005-08-19 Richard Earnshaw <richard.earnshaw@arm.com>
PR target/23473
* arm.md (arm_load_pic_register): Change argument to the mask of
saved registers. Call thumb_find_work_register if we need a
scratch register on Thumb.
(arm_expand_prologue): Pass empty register set to
arm_load_pic_register.
(thumb_expand_prologue): Pass live_regs_mask directly to
arm_load_pic_register.
* arm-protos.h (arm_load_pic_register): Update prototype.
2005-08-19 J"orn Rennecke <joern.rennecke@st.com> 2005-08-19 J"orn Rennecke <joern.rennecke@st.com>
* sh.c (find_sole_member): New function. * sh.c (find_sole_member): New function.
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
extern void arm_override_options (void); extern void arm_override_options (void);
extern int use_return_insn (int, rtx); extern int use_return_insn (int, rtx);
extern int arm_regno_class (int); extern int arm_regno_class (int);
extern void arm_load_pic_register (unsigned int); extern void arm_load_pic_register (unsigned long);
extern int arm_volatile_func (void); extern int arm_volatile_func (void);
extern const char *arm_output_epilogue (rtx); extern const char *arm_output_epilogue (rtx);
extern void arm_expand_prologue (void); extern void arm_expand_prologue (void);
......
...@@ -3285,7 +3285,7 @@ thumb_find_work_register (unsigned long pushed_regs_mask) ...@@ -3285,7 +3285,7 @@ thumb_find_work_register (unsigned long pushed_regs_mask)
low register. */ low register. */
void void
arm_load_pic_register (unsigned int scratch) arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED)
{ {
#ifndef AOF_ASSEMBLER #ifndef AOF_ASSEMBLER
rtx l1, pic_tmp, pic_tmp2, pic_rtx; rtx l1, pic_tmp, pic_tmp2, pic_rtx;
...@@ -3319,9 +3319,10 @@ arm_load_pic_register (unsigned int scratch) ...@@ -3319,9 +3319,10 @@ arm_load_pic_register (unsigned int scratch)
{ {
if (REGNO (pic_offset_table_rtx) > LAST_LO_REGNUM) if (REGNO (pic_offset_table_rtx) > LAST_LO_REGNUM)
{ {
/* We will have pushed the pic register, so should always be /* We will have pushed the pic register, so we should always be
able to find a work register. */ able to find a work register. */
pic_tmp = gen_rtx_REG (SImode, scratch); pic_tmp = gen_rtx_REG (SImode,
thumb_find_work_register (saved_regs));
emit_insn (gen_pic_load_addr_thumb (pic_tmp, pic_rtx)); emit_insn (gen_pic_load_addr_thumb (pic_tmp, pic_rtx));
emit_insn (gen_movsi (pic_offset_table_rtx, pic_tmp)); emit_insn (gen_movsi (pic_offset_table_rtx, pic_tmp));
} }
...@@ -10509,7 +10510,7 @@ arm_expand_prologue (void) ...@@ -10509,7 +10510,7 @@ arm_expand_prologue (void)
if (flag_pic) if (flag_pic)
arm_load_pic_register (INVALID_REGNUM); arm_load_pic_register (0UL);
/* If we are profiling, make sure no instructions are scheduled before /* If we are profiling, make sure no instructions are scheduled before
the call to mcount. Similarly if the user has requested no the call to mcount. Similarly if the user has requested no
...@@ -13236,7 +13237,7 @@ thumb_expand_prologue (void) ...@@ -13236,7 +13237,7 @@ thumb_expand_prologue (void)
/* Load the pic register before setting the frame pointer, /* Load the pic register before setting the frame pointer,
so we can use r7 as a temporary work register. */ so we can use r7 as a temporary work register. */
if (flag_pic) if (flag_pic)
arm_load_pic_register (thumb_find_work_register (live_regs_mask)); arm_load_pic_register (live_regs_mask);
offsets = arm_get_frame_offsets (); offsets = arm_get_frame_offsets ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment