+2002-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ * config/ia64/ia64.md (prologue_use): New.
+ * config/ia64/ia64.c (ia64_expand_prologue): Use
+ gen_prologue_use instead of gen_rtx_USE.
+ (group_barrier_needed_p): Handle CODE_FOR_prologue_use the same way
+ as CODE_FOR_pred_rel_mutex.
+ (ia64_sched_reorder2): Likewise.
+
2002-01-16 Eric Christopher <echristo@redhat.com>
* config/mips/r3900.h: Reformat.
/* Even if we're not going to generate an epilogue, we still
need to save the register so that EH works. */
if (! epilogue_p && current_frame_info.reg_save_ar_unat)
- emit_insn (gen_rtx_USE (VOIDmode, ar_unat_save_reg));
+ emit_insn (gen_prologue_use (ar_unat_save_reg));
}
else
ar_unat_save_reg = NULL_RTX;
/* Even if we're not going to generate an epilogue, we still
need to save the register so that EH works. */
if (! epilogue_p)
- emit_insn (gen_rtx_USE (VOIDmode, alt_reg));
+ emit_insn (gen_prologue_use (alt_reg));
}
else
{
/* Even if we're not going to generate an epilogue, we still
need to save the register so that EH works. */
if (! epilogue_p)
- emit_insn (gen_rtx_USE (VOIDmode, alt_reg));
+ emit_insn (gen_prologue_use (alt_reg));
}
else
{
/* Even if we're not going to generate an epilogue, we still
need to save the register so that EH works. */
if (! epilogue_p)
- emit_insn (gen_rtx_USE (VOIDmode, alt_reg));
+ emit_insn (gen_prologue_use (alt_reg));
}
else
{
/* Doesn't generate code. */
case CODE_FOR_pred_rel_mutex:
+ case CODE_FOR_prologue_use:
return 0;
default:
/* Ignore cycle displays and .pred.rel.mutex. */
if (insn_code == CODE_FOR_cycle_display
- || insn_code == CODE_FOR_pred_rel_mutex)
+ || insn_code == CODE_FOR_pred_rel_mutex
+ || insn_code == CODE_FOR_prologue_use)
continue;
if (insn_code == CODE_FOR_insn_group_barrier)
;; 22 bundle selector
;; 23 cycle display
;; 24 addp4
+;; 25 prologue_use
;;
;; unspec_volatile:
;; 0 alloc
"addp4 %0 = 0,%1"
[(set_attr "itanium_class" "ialu")])
+;;
+;; As USE insns aren't meaningful after reload, this is used instead
+;; to prevent deleting instructions setting registers for EH handling
+(define_insn "prologue_use"
+ [(unspec:DI [(match_operand:DI 0 "register_operand" "")] 25)]
+ ""
+ "// %0 needed for EH"
+ [(set_attr "itanium_class" "ignore")
+ (set_attr "predicable" "no")])