+2008-06-01 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * rtl.h (emit_clobber, gen_clobber, emit_use, gen_use): Declare.
+ * emit-rtl.c (emit_clobber, gen_clobber, emit_use, gen_use): New
+ functions. Do not emit uses and clobbers of CONCATs; individually
+ use and clobber their operands.
+ * builtins.c (expand_builtin_setjmp_receiver): Use emit_clobber,
+ gen_clobber, emit_use and gen_use.
+ (expand_builtin_longjmp, expand_builtin_nonlocal_goto): Likewise.
+ (expand_builtin_return): Likewise.
+ * cfgbuild.c (count_basic_blocks): Likewise.
+ * cfgrtl.c (rtl_flow_call_edges_add): Likewise.
+ * explow.c (emit_stack_restore): Likewise.
+ * expmed.c (extract_bit_field_1): Likewise.
+ * expr.c (convert_move, emit_move_complex_parts): Likewise.
+ (emit_move_multi_word, store_constructor): Likewise.
+ * function.c (do_clobber_return_reg, do_use_return_reg): Likewise.
+ (thread_prologue_and_epilogue_insns): Likewise.
+ * lower-subreg.c (resolve_simple_move): Likewise.
+ * optabs.c (widen_operand, expand_binop): Likewise.
+ (expand_doubleword_bswap, emit_no_conflict_block): Likewise.
+ * reload.c (find_reloads): Likewise.
+ * reload1.c (eliminate_regs_in_insn): Likewise.
+ * stmt.c (expand_nl_goto_receiver): Likewise.
+ * config/alpha/alpha.md (builtin_longjmp): Likewise.
+ * config/arc/arc.md (*movdi_insn, *movdf_insn): Likewise.
+ * config/arm/arm.c (arm_load_pic_register): Likewise.
+ (thumb1_expand_epilogue, thumb_set_return_address): Likewise.
+ * config/arm/arm.md (untyped_return): Likewise.
+ * config/arm/linux-elf.h (PROFILE_HOOK): Likewise.
+ * config/avr/avr.c (expand_prologue): Likewise.
+ * config/bfin/bfin.c (do_unlink): Likewise.
+ * config/bfin/bfin.md (<optab>di3, adddi3, subdi3): Likewise.
+ * config/cris/cris.c (cris_expand_prologue): Likewise.
+ * config/darwin.c (machopic_indirect_data_reference): Likewise.
+ (machopic_legitimize_pic_address): Likewise.
+ * config/frv/frv.c (frv_frame_access, frv_expand_epilogue): Likewise.
+ (frv_ifcvt_modify_insn, frv_expand_mdpackh_builtin): Likewise.
+ * config/i386/i386.c (ix86_expand_vector_move_misalign): Likewise.
+ (ix86_expand_convert_uns_didf_sse): Likewise.
+ (ix86_expand_vector_init_general): Likewise.
+ * config/ia64/ia64.md (eh_epilogue): Likewise.
+ * config/iq2000/iq2000.c (iq2000_expand_epilogue): Likewise.
+ * config/m32c/m32c.c (m32c_emit_eh_epilogue): Likewise.
+ * config/m32r/m32r.c (m32r_reload_lr): Likewise.
+ (config/iq2000/iq2000.c): Likewise.
+ * config/mips/mips.md (fixuns_truncdfsi2): Likewise.
+ (fixuns_truncdfdi2, fixuns_truncsfsi2, fixuns_truncsfdi2): Likewise.
+ (builtin_longjmp): Likewise.
+ * config/mn10300/mn10300.md (call, call_value): Likewise.
+ * config/pa/pa.md (nonlocal_goto, nonlocal_longjmp): Likewise.
+ * config/pdp11/pdp11.md (abshi2): Likewise.
+ * config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
+ * config/s390/s390.c (s390_emit_prologue): Likewise.
+ * config/s390/s390.md (movmem_long, setmem_long): Likewise.
+ (cmpmem_long, extendsidi2, zero_extendsidi2, udivmoddi4): Likewise.
+ (builtin_setjmp_receiver, restore_stack_nonlocal): Likewise.
+ * config/sh/sh.c (prepare_move_operands): Likewise.
+ (output_stack_adjust, sh_expand_epilogue): Likewise.
+ (sh_set_return_address, sh_expand_t_scc): Likewise.
+ * config/sparc/sparc.c (load_pic_register): Likewise.
+ * config/sparc/sparc.md (untyped_return, nonlocal_goto): Likewise.
+ * config/spu/spu.c (spu_expand_epilogue): Likewise.
+ * config/v850/v850.c (expand_epilogue): Likewise.
+
2008-05-31 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.md (UNSPECV_WRITE_SP_IRQ_ON): New constants.
{
/* Clobber the FP when we get here, so we have to make sure it's
marked as used by this function. */
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
/* Mark the static chain as clobbered here so life information
doesn't get messed up for it. */
- emit_insn (gen_rtx_CLOBBER (VOIDmode, static_chain_rtx));
+ emit_clobber (static_chain_rtx);
/* Now put in the code to restore the frame pointer, and argument
pointer, if needed. */
emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx);
/* This might change the hard frame pointer in ways that aren't
apparent to early optimization passes, so force a clobber. */
- emit_insn (gen_rtx_CLOBBER (VOIDmode, hard_frame_pointer_rtx));
+ emit_clobber (hard_frame_pointer_rtx);
}
#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
{
lab = copy_to_reg (lab);
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- gen_rtx_SCRATCH (VOIDmode))));
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- hard_frame_pointer_rtx)));
+ emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
+ emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));
emit_move_insn (hard_frame_pointer_rtx, fp);
emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX);
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
+ emit_use (stack_pointer_rtx);
emit_indirect_jump (lab);
}
}
{
r_label = copy_to_reg (r_label);
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- gen_rtx_SCRATCH (VOIDmode))));
-
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- hard_frame_pointer_rtx)));
+ emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
+ emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));
/* Restore frame pointer for containing function.
This sets the actual hard register used for the frame pointer
/* USE of hard_frame_pointer_rtx added for consistency;
not clear if really needed. */
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
+ emit_use (stack_pointer_rtx);
/* If the architecture is using a GP register, we must
conservatively assume that the target function makes use of it.
a no-op if the GP register is a global invariant.) */
if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
&& fixed_regs[PIC_OFFSET_TABLE_REGNUM])
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
emit_indirect_jump (r_label);
}
emit_move_insn (reg, adjust_address (result, mode, size));
push_to_sequence (call_fusage);
- emit_insn (gen_rtx_USE (VOIDmode, reg));
+ emit_use (reg);
call_fusage = get_insns ();
end_sequence ();
size += GET_MODE_SIZE (mode);
check for the edge case of do-nothing functions with no basic blocks. */
if (count == NUM_FIXED_BLOCKS)
{
- emit_insn (gen_rtx_USE (VOIDmode, const0_rtx));
+ emit_use (const0_rtx);
count = NUM_FIXED_BLOCKS + 1;
}
e = find_edge (bb, EXIT_BLOCK_PTR);
if (e)
{
- insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
+ insert_insn_on_edge (gen_use (const0_rtx), e);
commit_edge_insertions ();
}
}
emit_move_insn (hard_frame_pointer_rtx, fp);
emit_move_insn (pv, lab);
emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX);
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
+ emit_use (stack_pointer_rtx);
/* Load the label we are jumping through into $27 so that we know
where to look for it when we get back to setjmp's function for
;{
; /* Flow doesn't understand that this is effectively a DFmode move.
; It doesn't know that all of `operands[0]' is set. */
-; emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+; emit_clobber (operands[0]);
;
; /* Emit insns that movsi_insn can handle. */
; emit_insn (gen_movsi (operand_subword (operands[0], 0, 0, DImode),
;{
; /* Flow doesn't understand that this is effectively a DFmode move.
; It doesn't know that all of `operands[0]' is set. */
-; emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+; emit_clobber (operands[0]);
;
; /* Emit insns that movsi_insn can handle. */
; emit_insn (gen_movsi (operand_subword (operands[0], 0, 0, DFmode),
/* Need to emit this whether or not we obey regdecls,
since setjmp/longjmp can cause life info to screw up. */
- emit_insn (gen_rtx_USE (VOIDmode, pic_reg));
+ emit_use (pic_reg);
}
so that flow2 will get register lifetimes correct. */
for (regno = 0; regno < 13; regno++)
if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
- emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, regno)));
+ emit_clobber (gen_rtx_REG (SImode, regno));
if (! df_regs_ever_live_p (LR_REGNUM))
- emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)));
+ emit_use (gen_rtx_REG (SImode, LR_REGNUM));
}
static void
rtx addr;
unsigned long mask;
- emit_insn (gen_rtx_USE (VOIDmode, source));
+ emit_use (source);
offsets = arm_get_frame_offsets ();
mask = offsets->saved_regs_mask;
/* Emit USE insns before the return. */
for (i = 0; i < XVECLEN (operands[1], 0); i++)
- emit_insn (gen_rtx_USE (VOIDmode,
- SET_DEST (XVECEXP (operands[1], 0, i))));
+ emit_use (SET_DEST (XVECEXP (operands[1], 0, i)));
/* Construct the return. */
expand_naked_return ();
/* The GNU/Linux profiler clobbers the link register. Make sure the
prologue knows to save it. */
#define PROFILE_HOOK(X) \
- emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)))
+ emit_clobber (gen_rtx_REG (SImode, LR_REGNUM))
/* The GNU/Linux profiler needs a frame pointer. */
#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
RTX_FRAME_RELATED_P (insn) = 1;
/* Prevent any attempt to delete the setting of ZERO_REG! */
- emit_insn (gen_rtx_USE (VOIDmode, zero_reg_rtx));
+ emit_use (zero_reg_rtx);
}
if (minimize && (frame_pointer_needed
|| (AVR_2_BYTE_PC && live_seq > 6)
{
rtx fpreg = gen_rtx_REG (Pmode, REG_FP);
emit_move_insn (fpreg, postinc);
- emit_insn (gen_rtx_USE (VOIDmode, fpreg));
+ emit_use (fpreg);
}
if (! current_function_is_leaf)
{
emit_move_insn (bfin_rets_rtx, postinc);
- emit_insn (gen_rtx_USE (VOIDmode, bfin_rets_rtx));
+ emit_use (bfin_rets_rtx);
}
}
}
enum insn_code icode = CODE_FOR_<optab>si3;
if (!reg_overlap_mentioned_p (operands[0], operands[1])
&& !reg_overlap_mentioned_p (operands[0], operands[2]))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_clobber (operands[0]);
split_di (operands, 3, lo_half, hi_half);
if (!(*insn_data[icode].operand[2].predicate) (lo_half[2], SImode))
lo_half[2] = force_reg (SImode, lo_half[2]);
xops[4] = force_reg (SImode, xops[4]);
if (!reg_overlap_mentioned_p (operands[0], operands[1])
&& !reg_overlap_mentioned_p (operands[0], operands[2]))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_clobber (operands[0]);
emit_insn (gen_add_with_carry (xops[0], xops[2], xops[4], xops[7]));
emit_insn (gen_movbisi (xops[6], xops[7]));
if (!register_operand (xops[5], SImode)
xops[7] = gen_rtx_REG (BImode, REG_CC);
if (!reg_overlap_mentioned_p (operands[0], operands[1])
&& !reg_overlap_mentioned_p (operands[0], operands[2]))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_clobber (operands[0]);
emit_insn (gen_sub_with_carry (xops[0], xops[2], xops[4], xops[7]));
emit_insn (gen_notbi (xops[7], xops[7]));
emit_insn (gen_movbisi (xops[6], xops[7]));
the GOT register load as maybe-dead. To see this, remove the
line below and try libsupc++/vec.cc or a trivial
"static void y (); void x () {try {y ();} catch (...) {}}". */
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
}
if (cris_max_stackframe && framesize > cris_max_stackframe)
emit_insn (gen_rtx_SET (VOIDmode, reg,
gen_rtx_LO_SUM (Pmode, reg,
copy_rtx (offset))));
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
orig = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, reg);
#endif
pic_ref = reg;
#else
- emit_insn (gen_rtx_USE (VOIDmode,
- gen_rtx_REG (Pmode,
- PIC_OFFSET_TABLE_REGNUM)));
+ emit_use (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
emit_insn (gen_rtx_SET (VOIDmode, reg,
gen_rtx_HIGH (Pmode,
pic = reg;
}
#if 0
- emit_insn (gen_rtx_USE (VOIDmode,
- gen_rtx_REG (Pmode,
- PIC_OFFSET_TABLE_REGNUM)));
+ emit_use (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
#endif
if (reload_in_progress)
pic = reg;
}
#if 0
- emit_insn (gen_rtx_USE (VOIDmode,
- pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
#endif
if (reload_in_progress)
df_set_regs_ever_live (REGNO (pic), true);
}
else
emit_insn (gen_rtx_SET (VOIDmode, reg, mem));
- emit_insn (gen_rtx_USE (VOIDmode, reg));
+ emit_use (reg);
}
else
{
if (frame_pointer_needed)
{
emit_insn (gen_rtx_SET (VOIDmode, fp, gen_rtx_MEM (Pmode, fp)));
- emit_insn (gen_rtx_USE (VOIDmode, fp));
+ emit_use (fp);
}
/* Deallocate the stack frame. */
emit_move_insn (lr, return_addr);
}
- emit_insn (gen_rtx_USE (VOIDmode, lr));
+ emit_use (lr);
}
}
goto fail;
}
- frv_ifcvt_add_insn (gen_rtx_USE (VOIDmode, dest), insn, FALSE);
+ frv_ifcvt_add_insn (gen_use (dest), insn, FALSE);
}
/* If we are just loading a constant created for a nested conditional
/* The high half of each word is not explicitly initialized, so indicate
that the input operands are not live before this point. */
- emit_insn (gen_rtx_CLOBBER (DImode, op0));
- emit_insn (gen_rtx_CLOBBER (DImode, op1));
+ emit_clobber (op0);
+ emit_clobber (op1);
/* Move each argument into the low half of its associated input word. */
emit_move_insn (simplify_gen_subreg (HImode, op0, DImode, 2), arg1);
writing to the top half twice. */
if (TARGET_SSE_SPLIT_REGS)
{
- emit_insn (gen_rtx_CLOBBER (VOIDmode, op0));
+ emit_clobber (op0);
zero = op0;
}
else
if (TARGET_SSE_PARTIAL_REG_DEPENDENCY)
emit_move_insn (op0, CONST0_RTX (mode));
else
- emit_insn (gen_rtx_CLOBBER (VOIDmode, op0));
+ emit_clobber (op0);
if (mode != V4SFmode)
op0 = gen_lowpart (V4SFmode, op0);
emit_insn (gen_movdi_to_sse (int_xmm, input));
else if (TARGET_SSE_SPLIT_REGS)
{
- emit_insn (gen_rtx_CLOBBER (VOIDmode, int_xmm));
+ emit_clobber (int_xmm);
emit_move_insn (gen_lowpart (DImode, int_xmm), input);
}
else
else if (n_words == 2)
{
rtx tmp = gen_reg_rtx (mode);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, tmp));
+ emit_clobber (tmp);
emit_move_insn (gen_lowpart (word_mode, tmp), words[0]);
emit_move_insn (gen_highpart (word_mode, tmp), words[1]);
emit_move_insn (target, tmp);
emit_move_insn (sp, operands[2]);
operands[2] = sp;
}
- emit_insn (gen_rtx_USE (VOIDmode, sp));
- emit_insn (gen_rtx_USE (VOIDmode, bsp));
+ emit_use (sp);
+ emit_use (bsp);
cfun->machine->ia64_eh_epilogue_sp = sp;
cfun->machine->ia64_eh_epilogue_bsp = bsp;
/* Perform the additional bump for __throw. */
emit_move_insn (gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM),
stack_pointer_rtx);
- emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (Pmode,
- HARD_FRAME_POINTER_REGNUM)));
+ emit_use (gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM));
emit_jump_insn (gen_eh_return_internal ());
}
else
(fudged), and return (fudged). This is actually easier to do in
assembler, so punt to libgcc. */
emit_jump_insn (gen_eh_epilogue (ret_addr, cfun->machine->eh_stack_adjust));
- /* emit_insn (gen_rtx_CLOBBER (HImode, gen_rtx_REG (HImode, R0L_REGNO))); */
+ /* emit_clobber (gen_rtx_REG (HImode, R0L_REGNO)); */
emit_barrier ();
}
emit_insn (gen_movsi (lr, gen_frame_mem (Pmode, tmp)));
}
- emit_insn (gen_rtx_USE (VOIDmode, lr));
+ emit_use (lr);
}
void
/* Need to emit this whether or not we obey regdecls,
since setjmp/longjmp can cause life info to screw up. */
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
}
/* Expand the m32r prologue as a series of insns. */
/* Allow REG_NOTES to be set on last insn (labels don't have enough
fields, and can't be used for REG_NOTES anyway). */
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (stack_pointer_rtx);
DONE;
}
})
/* Allow REG_NOTES to be set on last insn (labels don't have enough
fields, and can't be used for REG_NOTES anyway). */
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (stack_pointer_rtx);
DONE;
})
/* Allow REG_NOTES to be set on last insn (labels don't have enough
fields, and can't be used for REG_NOTES anyway). */
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (stack_pointer_rtx);
DONE;
})
/* Allow REG_NOTES to be set on last insn (labels don't have enough
fields, and can't be used for REG_NOTES anyway). */
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (stack_pointer_rtx);
DONE;
})
\f
mips_emit_move (pv, lab);
emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX);
mips_emit_move (gp, gpv);
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, gp));
+ emit_use (hard_frame_pointer_rtx);
+ emit_use (stack_pointer_rtx);
+ emit_use (gp);
emit_indirect_jump (pv);
DONE;
})
shared library support for AM30 either, so we just assume
the linker is going to adjust all @PLT relocs to the
actual symbols. */
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
XEXP (operands[0], 0) = gen_sym2PLT (XEXP (operands[0], 0));
}
else
shared library support for AM30 either, so we just assume
the linker is going to adjust all @PLT relocs to the
actual symbols. */
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
XEXP (operands[1], 0) = gen_sym2PLT (XEXP (operands[1], 0));
}
else
lab = copy_to_reg (lab);
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- gen_rtx_SCRATCH (VOIDmode))));
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- hard_frame_pointer_rtx)));
+ emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
+ emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));
/* Restore the frame pointer. The virtual_stack_vars_rtx is saved
instead of the hard_frame_pointer_rtx in the save area. As a
emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX);
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
+ emit_use (stack_pointer_rtx);
/* Nonlocal goto jumps are only used between functions in the same
translation unit. Thus, we can avoid the extra overhead of an
(POINTER_SIZE * 2) / BITS_PER_UNIT));
rtx pv = gen_rtx_REG (Pmode, 1);
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- gen_rtx_SCRATCH (VOIDmode))));
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- hard_frame_pointer_rtx)));
+ emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
+ emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));
/* Restore the frame pointer. The virtual_stack_vars_rtx is saved
instead of the hard_frame_pointer_rtx in the save area. We need
/* This bit is the same as expand_builtin_longjmp. */
emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX);
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
+ emit_use (stack_pointer_rtx);
/* Load the label we are jumping through into r1 so that we know
where to look for it when we get back to setjmp's function for
;
; /* allow REG_NOTES to be set on last insn (labels don't have enough
; fields, and can't be used for REG_NOTES anyway). */
-; emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
+; emit_use (stack_pointer_rtx);
; DONE;
;}")
This should not be done for operands that contain LABEL_REFs.
For now, we just handle the obvious case. */
if (GET_CODE (operands[1]) != LABEL_REF)
- emit_insn (gen_rtx_USE (VOIDmode, operands[1]));
+ emit_use (operands[1]);
#if TARGET_MACHO
/* Darwin uses a special PIC legitimizer. */
if (TARGET_BACKCHAIN && flag_non_call_exceptions)
{
addr = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode));
- emit_insn (gen_rtx_CLOBBER (VOIDmode, addr));
+ emit_clobber (addr);
}
}
rtx len0 = gen_lowpart (Pmode, reg0);
rtx len1 = gen_lowpart (Pmode, reg1);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, reg0));
+ emit_clobber (reg0);
emit_move_insn (addr0, force_operand (XEXP (operands[0], 0), NULL_RTX));
emit_move_insn (len0, operands[2]);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, reg1));
+ emit_clobber (reg1);
emit_move_insn (addr1, force_operand (XEXP (operands[1], 0), NULL_RTX));
emit_move_insn (len1, operands[2]);
rtx addr0 = gen_lowpart (Pmode, gen_highpart (word_mode, reg0));
rtx len0 = gen_lowpart (Pmode, reg0);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, reg0));
+ emit_clobber (reg0);
emit_move_insn (addr0, force_operand (XEXP (operands[0], 0), NULL_RTX));
emit_move_insn (len0, operands[1]);
rtx len0 = gen_lowpart (Pmode, reg0);
rtx len1 = gen_lowpart (Pmode, reg1);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, reg0));
+ emit_clobber (reg0);
emit_move_insn (addr0, force_operand (XEXP (operands[0], 0), NULL_RTX));
emit_move_insn (len0, operands[2]);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, reg1));
+ emit_clobber (reg1);
emit_move_insn (addr1, force_operand (XEXP (operands[1], 0), NULL_RTX));
emit_move_insn (len1, operands[2]);
{
if (!TARGET_64BIT)
{
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_clobber (operands[0]);
emit_move_insn (gen_highpart (SImode, operands[0]), operands[1]);
emit_move_insn (gen_lowpart (SImode, operands[0]), const0_rtx);
emit_insn (gen_ashrdi3 (operands[0], operands[0], GEN_INT (32)));
{
if (!TARGET_64BIT)
{
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_clobber (operands[0]);
emit_move_insn (gen_lowpart (SImode, operands[0]), operands[1]);
emit_move_insn (gen_highpart (SImode, operands[0]), const0_rtx);
DONE;
gen_rtx_ZERO_EXTEND (TImode, div_equal));
operands[4] = gen_reg_rtx(TImode);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[4]));
+ emit_clobber (operands[4]);
emit_move_insn (gen_lowpart (DImode, operands[4]), operands[1]);
emit_move_insn (gen_highpart (DImode, operands[4]), const0_rtx);
gen_rtx_ZERO_EXTEND (DImode, div_equal));
operands[4] = gen_reg_rtx(DImode);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[4]));
+ emit_clobber (operands[4]);
emit_move_insn (gen_lowpart (SImode, operands[4]), operands[1]);
emit_move_insn (gen_highpart (SImode, operands[4]), const0_rtx);
"flag_pic"
{
emit_insn (s390_load_got ());
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
DONE;
})
if (temp)
emit_move_insn (s390_back_chain_rtx (), temp);
- emit_insn (gen_rtx_USE (VOIDmode, base));
+ emit_use (base);
DONE;
})
if (flag_schedule_insns)
emit_insn (gen_blockage ());
emit_insn (gen_GOTaddr2picreg ());
- emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode,
- PIC_REG)));
+ emit_use (gen_rtx_REG (SImode, PIC_REG));
if (flag_schedule_insns)
emit_insn (gen_blockage ());
}
mem = gen_tmp_stack_mem (Pmode, gen_rtx_POST_INC (Pmode, reg));
emit_move_insn (tmp_reg, mem);
/* Tell flow the insns that pop r4/r5 aren't dead. */
- emit_insn (gen_rtx_USE (VOIDmode, tmp_reg));
- emit_insn (gen_rtx_USE (VOIDmode, adj_reg));
+ emit_use (tmp_reg);
+ emit_use (adj_reg);
return;
}
const_reg = gen_rtx_REG (GET_MODE (reg), temp);
USE PR_MEDIA_REG, since it will be explicitly copied to TR0_REG
by the return pattern. */
if (TEST_HARD_REG_BIT (live_regs_mask, PR_REG))
- emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, PR_REG)));
+ emit_use (gen_rtx_REG (SImode, PR_REG));
}
static int sh_need_epilogue_known = 0;
emit_insn (GEN_MOV (rr, ra));
/* Tell flow the register for return isn't dead. */
- emit_insn (gen_rtx_USE (VOIDmode, rr));
+ emit_use (rr);
return;
}
emit_insn (gen_movrt (result));
else if ((code == EQ && val == 0) || (code == NE && val == 1))
{
- emit_insn (gen_rtx_CLOBBER (VOIDmode, result));
+ emit_clobber (result);
emit_insn (gen_subc (result, result, result));
emit_insn (gen_addsi3 (result, result, const1_rtx));
}
if (TARGET_VXWORKS_RTP)
{
emit_insn (gen_vxworks_load_got ());
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
return;
}
since setjmp/longjmp can cause life info to screw up.
??? In the case where we don't obey regdecls, this is not sufficient
since we may not fall out the bottom. */
- emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx));
+ emit_use (pic_offset_table_rtx);
}
/* Emit a call instruction with the pattern given by PAT. ADDR is the
adjust_address (result, TARGET_ARCH64 ? TFmode : DFmode, 8));
/* Put USE insns before the return. */
- emit_insn (gen_rtx_USE (VOIDmode, valreg1));
- emit_insn (gen_rtx_USE (VOIDmode, valreg2));
+ emit_use (valreg1);
+ emit_use (valreg2);
/* Construct the return. */
expand_naked_return ();
and reload the appropriate value into %fp. */
emit_move_insn (hard_frame_pointer_rtx, stack);
- emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
- emit_insn (gen_rtx_USE (VOIDmode, static_chain_rtx));
+ emit_use (stack_pointer_rtx);
+ emit_use (static_chain_rtx);
/* ??? The V9-specific version was disabled in rev 1.65. */
emit_jump_insn (gen_goto_handler_and_restore (labreg));
if (!sibcall_p)
{
- emit_insn (gen_rtx_USE
- (VOIDmode, gen_rtx_REG (SImode, LINK_REGISTER_REGNUM)));
+ emit_use (gen_rtx_REG (SImode, LINK_REGISTER_REGNUM));
jump = emit_jump_insn (gen__return ());
emit_barrier_after (jump);
}
plus_constant (stack_pointer_rtx,
offset)));
- emit_insn (gen_rtx_USE (VOIDmode, restore_regs[i]));
+ emit_use (restore_regs[i]);
offset -= 4;
}
return note;
}
+/* Emit a clobber of lvalue X. */
+
+rtx
+emit_clobber (rtx x)
+{
+ /* CONCATs should not appear in the insn stream. */
+ if (GET_CODE (x) == CONCAT)
+ {
+ emit_clobber (XEXP (x, 0));
+ return emit_clobber (XEXP (x, 1));
+ }
+ return emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+}
+
+/* Return a sequence of insns to clobber lvalue X. */
+
+rtx
+gen_clobber (rtx x)
+{
+ rtx seq;
+
+ start_sequence ();
+ emit_clobber (x);
+ seq = get_insns ();
+ end_sequence ();
+ return seq;
+}
+
+/* Emit a use of rvalue X. */
+
+rtx
+emit_use (rtx x)
+{
+ /* CONCATs should not appear in the insn stream. */
+ if (GET_CODE (x) == CONCAT)
+ {
+ emit_use (XEXP (x, 0));
+ return emit_use (XEXP (x, 1));
+ }
+ return emit_insn (gen_rtx_USE (VOIDmode, x));
+}
+
+/* Return a sequence of insns to use rvalue X. */
+
+rtx
+gen_use (rtx x)
+{
+ rtx seq;
+
+ start_sequence ();
+ emit_use (x);
+ seq = get_insns ();
+ end_sequence ();
+ return seq;
+}
+
/* Cause next statement to emit a line note even if the line number
has not changed. */
/* These clobbers prevent the scheduler from moving
references to variable arrays below the code
that deletes (pops) the arrays. */
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- gen_rtx_SCRATCH (VOIDmode))));
- emit_insn (gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode, stack_pointer_rtx)));
+ emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
+ emit_clobber (gen_rtx_MEM (BLKmode, stack_pointer_rtx));
}
discard_pending_stack_adjust ();
target = gen_reg_rtx (mode);
/* Indicate for flow that the entire target reg is being set. */
- emit_insn (gen_rtx_CLOBBER (VOIDmode, target));
+ emit_clobber (target);
for (i = 0; i < nwords; i++)
{
{
if (reg_overlap_mentioned_p (to, from))
from = force_reg (from_mode, from);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, to));
+ emit_clobber (to);
}
convert_move (word_to, from, unsignedp);
emit_unop_insn (code, to, word_to, equiv_code);
hard regs shouldn't appear here except as return values. */
if (!reload_completed && !reload_in_progress
&& REG_P (x) && !reg_overlap_mentioned_p (x, y))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ emit_clobber (x);
write_complex_part (x, read_complex_part (y, false), false);
write_complex_part (x, read_complex_part (y, true), true);
if (x != y
&& ! (reload_in_progress || reload_completed)
&& need_clobber != 0)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ emit_clobber (x);
emit_insn (seq);
}
if (REG_P (target) && !cleared)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, target));
+ emit_clobber (target);
/* Store each element of the constructor into the
corresponding field of TARGET. */
if (!cleared && REG_P (target))
/* Inform later passes that the old value is dead. */
- emit_insn (gen_rtx_CLOBBER (VOIDmode, target));
+ emit_clobber (target);
/* Store each element of the constructor into the
corresponding element of TARGET, determined by counting the
static void
do_clobber_return_reg (rtx reg, void *arg ATTRIBUTE_UNUSED)
{
- emit_insn (gen_rtx_CLOBBER (VOIDmode, reg));
+ emit_clobber (reg);
}
void
static void
do_use_return_reg (rtx reg, void *arg ATTRIBUTE_UNUSED)
{
- emit_insn (gen_rtx_USE (VOIDmode, reg));
+ emit_use (reg);
}
static void
/* Insert an explicit USE for the frame pointer
if the profiling is on and the frame pointer is required. */
if (crtl->profile && frame_pointer_needed)
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
/* Retain a map of the prologue insns. */
record_insns (seq, &prologue);
unsigned int i;
if (REG_P (dest) && !HARD_REGISTER_NUM_P (REGNO (dest)))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, dest));
+ emit_clobber (dest);
for (i = 0; i < words; ++i)
emit_move_insn (simplify_gen_subreg_concatn (word_mode, dest,
part to OP. */
result = gen_reg_rtx (mode);
- emit_insn (gen_rtx_CLOBBER (VOIDmode, result));
+ emit_clobber (result);
emit_move_insn (gen_lowpart (GET_MODE (op), result), op);
return result;
}
/* Indicate for flow that the entire target reg is being set. */
if (REG_P (target))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, xtarget));
+ emit_clobber (xtarget);
/* Do the actual arithmetic. */
for (i = 0; i < nwords; i++)
if (target == 0)
target = gen_reg_rtx (mode);
if (REG_P (target))
- emit_insn (gen_rtx_CLOBBER (VOIDmode, target));
+ emit_clobber (target);
emit_move_insn (operand_subword (target, 0, 1, mode), t0);
emit_move_insn (operand_subword (target, 1, 1, mode), t1);
PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, operand),
insn), QImode);
if (modified[i] != RELOAD_READ)
- emit_insn_after (gen_rtx_CLOBBER (VOIDmode, operand), insn);
+ emit_insn_after (gen_clobber (operand), insn);
}
}
}
this point. */
*recog_data.operand_loc[i] = 0;
- /* If an output operand changed from a REG to a MEM and INSN is an
- insn, write a CLOBBER insn. */
+ /* If an output operand changed from a REG to a MEM and INSN is an
+ insn, write a CLOBBER insn. */
if (recog_data.operand_type[i] != OP_IN
&& REG_P (orig_operand[i])
&& MEM_P (substed_operand[i])
&& replace)
- emit_insn_after (gen_rtx_CLOBBER (VOIDmode, orig_operand[i]),
- insn);
+ emit_insn_after (gen_clobber (orig_operand[i]), insn);
}
}
extern rtx emit_barrier (void);
extern rtx emit_note (enum insn_note);
extern rtx emit_note_copy (rtx);
+extern rtx gen_clobber (rtx);
+extern rtx emit_clobber (rtx);
+extern rtx gen_use (rtx);
+extern rtx emit_use (rtx);
extern rtx make_insn_raw (rtx);
extern rtx make_jump_insn_raw (rtx);
extern void add_function_usage_to (rtx, rtx);
{
/* Clobber the FP when we get here, so we have to make sure it's
marked as used by this function. */
- emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
+ emit_use (hard_frame_pointer_rtx);
/* Mark the static chain as clobbered here so life information
doesn't get messed up for it. */
- emit_insn (gen_rtx_CLOBBER (VOIDmode, static_chain_rtx));
+ emit_clobber (static_chain_rtx);
#ifdef HAVE_nonlocal_goto
if (! HAVE_nonlocal_goto)