+2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/arm/arm.md (UNSPEC_PROLOGUE_USE): New unspec constant.
+ (prologue_use): New pattern.
+ * config/arm/arm.c (expand_prologue): Use gen_prologue_use in
+ preference to gen_rtx_USE.
+ (thumb_expand_prologue): Use gen_prologue_use in preference to
+ gen_rtx_USE.
+ (thumb_expand_epilogue): Use gen_prologue_use in preference to
+ gen_rtx_USE.
+
2002-01-23 Hans-Peter Nilsson <hp@bitrange.com>
* loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0.
emit_insn (gen_rtx_SET (SImode, ip_rtx, insn));
/* Add a USE to stop propagate_one_insn() from barfing. */
- emit_insn (gen_rtx_USE (VOIDmode, ip_rtx));
+ emit_insn (gen_prologue_use (ip_rtx));
}
}
then make sure that it does not get reused by the ce2 pass. */
if ((live_regs_mask & (1 << LR_REGNUM)) == 0)
{
- emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)));
+ emit_insn (gen_prologue_use (gen_rtx_REG (SImode, LR_REGNUM)));
cfun->machine->lr_save_eliminated = 1;
}
}
/* Save it by copying it into a high, scratch register. */
emit_insn (gen_movsi (spare, reg));
/* Add a USE to stop propagate_one_insn() from barfing. */
- emit_insn (gen_rtx_USE (VOIDmode, spare));
+ emit_insn (gen_prologue_use (spare));
/* Decrement the stack. */
emit_insn (gen_movsi (reg, GEN_INT (- amount)));
analysis will not consider the restore redundant. The
register won't be used again in this function and isn't
restored by the epilogue. */
- emit_insn (gen_rtx_USE (VOIDmode, reg));
+ emit_insn (gen_prologue_use (reg));
}
else
{
/* Emit a USE (stack_pointer_rtx), so that
the stack adjustment will not be deleted. */
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_insn (gen_prologue_use (stack_pointer_rtx));
if (current_function_profile || TARGET_NO_SCHED_PRO)
emit_insn (gen_blockage ());
;;- Machine description for ARM for GNU compiler
-;; Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000, 2001
-;; Free Software Foundation, Inc.
+;; Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000,
+;; 2001, 2002 Free Software Foundation, Inc.
;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
;; and Martin Simmons (@harleqn.co.uk).
;; More major hacks by Richard Earnshaw (rearnsha@arm.com).
(UNSPEC_CLZ 5) ; `clz' instruction, count leading zeros (SImode):
; operand 0 is the result,
; operand 1 is the parameter.
+ (UNSPEC_PROLOGUE_USE 6) ; As USE insns are not meaningful after reload,
+ ; this unspec is used to prevent the deletion of
+ ; instructions setting registers for EH handling
+ ; and stack frame generation. Operand 0 is the
+ ; register to "use".
]
)
""
)
+(define_insn "prologue_use"
+ [(unspec:SI [(match_operand:SI 0 "register_operand" "")] UNSPEC_PROLOGUE_USE)]
+ ""
+ "%@ %0 needed for prologue"
+)