+2004-10-13 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm-protos.h (arm_load_pic_register): Update prototype.
+ * config/arm/arm.c (thumb_find_work_register): Update comments.
+ (arm_load_pic_register): Add argument for scratch register.
+ (arm_expand_prologue, thumb_expand_prologue): Pass extra argument.
+ * config/arm/arm.md (builtin_setjmp_receiver): Ditto.
+
2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
* tree-data-ref.c: Fix comment typos.
* gcse.c (remove_reachable_equiv_notes): Use ei_container().
2004-10-11 Sebastian Pop <pop@cri.ensmp.fr>
-
+
* Makefile.in (tree-ssa-loop-niter.o): Depends on tree-data-ref.h.
* cfgloop.c (initialize_loops_parallel_p): New.
(flow_loops_find): Initialize the parallel_p field to true for all
extern void arm_override_options (void);
extern int use_return_insn (int, rtx);
extern int arm_regno_class (int);
-extern void arm_load_pic_register (void);
+extern void arm_load_pic_register (unsigned int);
extern int arm_volatile_func (void);
extern const char *arm_output_epilogue (rtx);
extern void arm_expand_prologue (void);
if (!regs_ever_live[LAST_ARG_REGNUM])
return LAST_ARG_REGNUM;
- /* Look for a pushed register. */
+ /* Look for a pushed register. This is used before the frame pointer is
+ setup, so r7 is a candidate. */
for (reg = LAST_LO_REGNUM; reg >=0; reg--)
if (live_regs_mask & (1 << reg))
return reg;
}
-/* Generate code to load the PIC register. */
+/* Generate code to load the PIC register. In thumb mode SCRATCH is a
+ low register. */
void
-arm_load_pic_register (void)
+arm_load_pic_register (unsigned int scratch)
{
#ifndef AOF_ASSEMBLER
rtx l1, pic_tmp, pic_tmp2, pic_rtx;
{
if (REGNO (pic_offset_table_rtx) > LAST_LO_REGNUM)
{
- int reg;
-
/* We will have pushed the pic register, so should always be
able to find a work register. */
- reg = thumb_find_work_register (thumb_compute_save_reg_mask ());
- pic_tmp = gen_rtx_REG (SImode, reg);
+ pic_tmp = gen_rtx_REG (SImode, scratch);
emit_insn (gen_pic_load_addr_thumb (pic_tmp, pic_rtx));
emit_insn (gen_movsi (pic_offset_table_rtx, pic_tmp));
}
if (flag_pic)
- arm_load_pic_register ();
+ arm_load_pic_register (INVALID_REGNUM);
/* If we are profiling, make sure no instructions are scheduled before
the call to mcount. Similarly if the user has requested no
return;
}
+ live_regs_mask = thumb_compute_save_reg_mask ();
/* Load the pic register before setting the frame pointer, so we can use r7
as a temporary work register. */
if (flag_pic)
- arm_load_pic_register ();
+ arm_load_pic_register (thumb_find_work_register (live_regs_mask));
offsets = arm_get_frame_offsets ();
RTX_FRAME_RELATED_P (insn) = 1;
}
- live_regs_mask = thumb_compute_save_reg_mask ();
amount = offsets->outgoing_args - offsets->saved_regs;
if (amount)
{