diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f12b7ab8ef93b9be81b6db05b5b9164c0b3d1866..5c5da99da5a8994735d9a8056f36135fac275b91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +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. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 04f06ae997df902250fa2da9fb0e843b5ea4c06e..567daa3731286feb14c29d82183667393475a505 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -8331,7 +8331,7 @@ arm_expand_prologue () 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)); } } @@ -8377,7 +8377,7 @@ arm_expand_prologue () 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; } } @@ -10186,7 +10186,7 @@ thumb_expand_prologue () /* 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))); @@ -10200,7 +10200,7 @@ thumb_expand_prologue () 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 { @@ -10248,7 +10248,7 @@ thumb_expand_epilogue () /* 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 ()); diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 5f508dd8387374654d678a8bc83c2886a4ea0d9a..3646fe5890f6c9e3e66f241d0cf29561c79d0f8a 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -1,6 +1,6 @@ ;;- 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). @@ -64,6 +64,11 @@ (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". ] ) @@ -9187,3 +9192,8 @@ "" ) +(define_insn "prologue_use" + [(unspec:SI [(match_operand:SI 0 "register_operand" "")] UNSPEC_PROLOGUE_USE)] + "" + "%@ %0 needed for prologue" +)