From c41c1387d39f345a301dde4c414d379319d6ccc1 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sun, 1 Jun 2008 09:47:28 +0000 Subject: [PATCH] rtl.h (emit_clobber, [...]): Declare. gcc/ * 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 (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. From-SVN: r136251 --- gcc/ChangeLog | 65 +++++++++++++++++++++++++++++++++++ gcc/builtins.c | 35 +++++++------------ gcc/cfgbuild.c | 2 +- gcc/cfgrtl.c | 2 +- gcc/config/alpha/alpha.md | 4 +-- gcc/config/arc/arc.md | 4 +-- gcc/config/arm/arm.c | 8 ++--- gcc/config/arm/arm.md | 3 +- gcc/config/arm/linux-elf.h | 2 +- gcc/config/avr/avr.c | 2 +- gcc/config/bfin/bfin.c | 4 +-- gcc/config/bfin/bfin.md | 6 ++-- gcc/config/cris/cris.c | 2 +- gcc/config/darwin.c | 13 +++---- gcc/config/frv/frv.c | 12 +++---- gcc/config/i386/i386.c | 8 ++--- gcc/config/ia64/ia64.md | 4 +-- gcc/config/iq2000/iq2000.c | 3 +- gcc/config/m32c/m32c.c | 2 +- gcc/config/m32r/m32r.c | 4 +-- gcc/config/mips/mips.md | 14 ++++---- gcc/config/mn10300/mn10300.md | 4 +-- gcc/config/pa/pa.md | 24 +++++-------- gcc/config/pdp11/pdp11.md | 2 +- gcc/config/rs6000/rs6000.c | 2 +- gcc/config/s390/s390.c | 2 +- gcc/config/s390/s390.md | 22 ++++++------ gcc/config/sh/sh.c | 13 ++++--- gcc/config/sparc/sparc.c | 4 +-- gcc/config/sparc/sparc.md | 8 ++--- gcc/config/spu/spu.c | 3 +- gcc/config/v850/v850.c | 2 +- gcc/emit-rtl.c | 56 ++++++++++++++++++++++++++++++ gcc/explow.c | 7 ++-- gcc/expmed.c | 2 +- gcc/expr.c | 10 +++--- gcc/function.c | 6 ++-- gcc/lower-subreg.c | 2 +- gcc/optabs.c | 6 ++-- gcc/reload.c | 2 +- gcc/reload1.c | 7 ++-- gcc/rtl.h | 4 +++ gcc/stmt.c | 4 +-- 43 files changed, 243 insertions(+), 148 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e50465a7631..e990443a4bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,68 @@ +2008-06-01 Richard Sandiford + + * 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 (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 * config/avr/avr.md (UNSPECV_WRITE_SP_IRQ_ON): New constants. diff --git a/gcc/builtins.c b/gcc/builtins.c index 77cd48beaed..05eb6bbdd98 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -708,11 +708,11 @@ expand_builtin_setjmp_receiver (rtx receiver_label ATTRIBUTE_UNUSED) { /* 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. */ @@ -723,7 +723,7 @@ expand_builtin_setjmp_receiver (rtx receiver_label ATTRIBUTE_UNUSED) 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 @@ -822,18 +822,14 @@ expand_builtin_longjmp (rtx buf_addr, rtx value) { 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); } } @@ -892,13 +888,8 @@ expand_builtin_nonlocal_goto (tree exp) { 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 @@ -910,8 +901,8 @@ expand_builtin_nonlocal_goto (tree exp) /* 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. @@ -924,7 +915,7 @@ expand_builtin_nonlocal_goto (tree exp) 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); } @@ -1602,7 +1593,7 @@ expand_builtin_return (rtx result) 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); diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index b4e3baad820..3b9c6faef8e 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -170,7 +170,7 @@ count_basic_blocks (const_rtx f) 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; } diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 994fb16fc47..8ce39006cf3 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2809,7 +2809,7 @@ rtl_flow_call_edges_add (sbitmap blocks) 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 (); } } diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 768ff38b8bb..fed9efee89e 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -6948,8 +6948,8 @@ 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 diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index 64f1c449ca1..da435941427 100644 --- a/gcc/config/arc/arc.md +++ b/gcc/config/arc/arc.md @@ -313,7 +313,7 @@ ;{ ; /* 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), @@ -406,7 +406,7 @@ ;{ ; /* 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), diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 38d4a2d9d9f..e1ec23b3862 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3693,7 +3693,7 @@ arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED) /* 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); } @@ -17064,10 +17064,10 @@ thumb1_expand_epilogue (void) 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 @@ -18329,7 +18329,7 @@ thumb_set_return_address (rtx source, rtx scratch) 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; diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index c66ea74d2af..9cd6e7262a2 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -8785,8 +8785,7 @@ /* 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 (); diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index ca56f7bb669..7036e71f8b3 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -111,7 +111,7 @@ /* 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 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index bde58f029b6..7135c79610a 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -680,7 +680,7 @@ expand_prologue (void) 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) diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index d6506b6e09b..a7600cf80e2 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -1009,12 +1009,12 @@ do_unlink (rtx spreg, HOST_WIDE_INT frame_size, bool all, int epilogue_p) { 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); } } } diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index 6b1c1e8e981..1388266400b 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -904,7 +904,7 @@ enum insn_code icode = CODE_FOR_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]); @@ -1022,7 +1022,7 @@ 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) @@ -1055,7 +1055,7 @@ 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])); diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index b197956b774..810366f5681 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -3002,7 +3002,7 @@ cris_expand_prologue (void) 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) diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 38899833341..5461fe083e0 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -555,7 +555,7 @@ machopic_indirect_data_reference (rtx orig, rtx reg) 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 @@ -756,9 +756,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) 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, @@ -782,9 +780,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) 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) @@ -857,8 +853,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) 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); diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index ef9aa51b9c5..93648ccf39d 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -1682,7 +1682,7 @@ frv_frame_access (frv_frame_accessor_t *accessor, rtx reg, int stack_offset) } else emit_insn (gen_rtx_SET (VOIDmode, reg, mem)); - emit_insn (gen_rtx_USE (VOIDmode, reg)); + emit_use (reg); } else { @@ -1946,7 +1946,7 @@ frv_expand_epilogue (bool emit_return) 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. */ @@ -1972,7 +1972,7 @@ frv_expand_epilogue (bool emit_return) emit_move_insn (lr, return_addr); } - emit_insn (gen_rtx_USE (VOIDmode, lr)); + emit_use (lr); } } @@ -5999,7 +5999,7 @@ frv_ifcvt_modify_insn (ce_if_block_t *ce_info, 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 @@ -9099,8 +9099,8 @@ frv_expand_mdpackh_builtin (tree call, rtx target) /* 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); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6640c62c9f7..16e74228ddf 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10549,7 +10549,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[]) writing to the top half twice. */ if (TARGET_SSE_SPLIT_REGS) { - emit_insn (gen_rtx_CLOBBER (VOIDmode, op0)); + emit_clobber (op0); zero = op0; } else @@ -10583,7 +10583,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[]) 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); @@ -10976,7 +10976,7 @@ ix86_expand_convert_uns_didf_sse (rtx target, rtx input) 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 @@ -24184,7 +24184,7 @@ ix86_expand_vector_init_general (bool mmx_ok, enum machine_mode mode, 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); diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 7135bf4da58..cf746f52b68 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -6332,8 +6332,8 @@ 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; diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 7ee5eda9407..2d20a4ba4c2 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -2085,8 +2085,7 @@ iq2000_expand_epilogue (void) /* 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 diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 697e42a7948..b0733dd8364 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -4079,7 +4079,7 @@ m32c_emit_eh_epilogue (rtx ret_addr) (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 (); } diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 64b7e5f63ab..23e7851b160 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -1349,7 +1349,7 @@ m32r_reload_lr (rtx sp, int size) emit_insn (gen_movsi (lr, gen_frame_mem (Pmode, tmp))); } - emit_insn (gen_rtx_USE (VOIDmode, lr)); + emit_use (lr); } void @@ -1361,7 +1361,7 @@ m32r_load_pic_register (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. */ diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 592ad528042..921e416bd0e 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -2912,7 +2912,7 @@ /* 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; } }) @@ -2955,7 +2955,7 @@ /* 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; }) @@ -2997,7 +2997,7 @@ /* 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; }) @@ -3039,7 +3039,7 @@ /* 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; }) @@ -5685,9 +5685,9 @@ 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; }) diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index 57c51625b22..73043e99b1a 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -1807,7 +1807,7 @@ 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 @@ -1852,7 +1852,7 @@ 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 diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index a5dc031c91c..c3d686db5c4 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -7432,12 +7432,8 @@ 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 @@ -7449,8 +7445,8 @@ 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 @@ -8892,12 +8888,8 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" (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 @@ -8913,8 +8905,8 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" /* 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 diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md index 385c11c5aa3..32b3e92e9c9 100644 --- a/gcc/config/pdp11/pdp11.md +++ b/gcc/config/pdp11/pdp11.md @@ -1593,7 +1593,7 @@ ; ; /* 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; ;}") diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 54b38ce843b..19734767797 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5000,7 +5000,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode) 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. */ diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 5ffbcaef338..ff2edecb223 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -7797,7 +7797,7 @@ s390_emit_prologue (void) 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); } } diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index f97e756518f..d33cc5c3267 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -2494,11 +2494,11 @@ 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]); @@ -2694,7 +2694,7 @@ 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]); @@ -2850,11 +2850,11 @@ 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]); @@ -3215,7 +3215,7 @@ { 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))); @@ -3365,7 +3365,7 @@ { 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; @@ -5116,7 +5116,7 @@ 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); @@ -5234,7 +5234,7 @@ 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); @@ -8004,7 +8004,7 @@ "flag_pic" { emit_insn (s390_load_got ()); - emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx)); + emit_use (pic_offset_table_rtx); DONE; }) @@ -8087,7 +8087,7 @@ if (temp) emit_move_insn (s390_back_chain_rtx (), temp); - emit_insn (gen_rtx_USE (VOIDmode, base)); + emit_use (base); DONE; }) diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 3af0ee8cff1..71419ec61de 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -1371,8 +1371,7 @@ prepare_move_operands (rtx operands[], enum machine_mode mode) 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 ()); } @@ -5723,8 +5722,8 @@ output_stack_adjust (int size, rtx reg, int epilogue_p, 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); @@ -6862,7 +6861,7 @@ sh_expand_epilogue (bool sibcall_p) 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; @@ -6916,7 +6915,7 @@ sh_set_return_address (rtx ra, rtx tmp) 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; } @@ -10714,7 +10713,7 @@ sh_expand_t_scc (enum rtx_code code, rtx target) 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)); } diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index c1cc725334c..009ab3a2bcf 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -3427,7 +3427,7 @@ load_pic_register (bool delay_pic_helper) 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; } @@ -3457,7 +3457,7 @@ load_pic_register (bool delay_pic_helper) 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 diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index c02c7094df2..bc29bcf819c 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -7104,8 +7104,8 @@ 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 (); @@ -7191,8 +7191,8 @@ 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)); diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index de307ab32ed..b944a00e5bf 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -1906,8 +1906,7 @@ spu_expand_epilogue (bool sibcall_p) 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); } diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 2a0f3093641..b9f11b1583f 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -1909,7 +1909,7 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n", plus_constant (stack_pointer_rtx, offset))); - emit_insn (gen_rtx_USE (VOIDmode, restore_regs[i])); + emit_use (restore_regs[i]); offset -= 4; } diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 45a256347c0..1194ad79b81 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4548,6 +4548,62 @@ emit_note (enum insn_note kind) 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. */ diff --git a/gcc/explow.c b/gcc/explow.c index d3cc01b9701..d573836d293 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -1016,11 +1016,8 @@ emit_stack_restore (enum save_level save_level, rtx sa, rtx after) /* 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 (); diff --git a/gcc/expmed.c b/gcc/expmed.c index ab5057a9e8f..27ff0c063cf 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1374,7 +1374,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, 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++) { diff --git a/gcc/expr.c b/gcc/expr.c index e2693d84740..d55a2797fb5 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -557,7 +557,7 @@ convert_move (rtx to, rtx from, int unsignedp) { 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); @@ -3108,7 +3108,7 @@ emit_move_complex_parts (rtx x, rtx y) 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); @@ -3305,7 +3305,7 @@ emit_move_multi_word (enum machine_mode mode, rtx x, rtx y) if (x != y && ! (reload_in_progress || reload_completed) && need_clobber != 0) - emit_insn (gen_rtx_CLOBBER (VOIDmode, x)); + emit_clobber (x); emit_insn (seq); @@ -5160,7 +5160,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) } 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. */ @@ -5360,7 +5360,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) 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 diff --git a/gcc/function.c b/gcc/function.c index 845017f7124..bb4a2e6ab68 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4311,7 +4311,7 @@ diddle_return_value (void (*doit) (rtx, void *), void *arg) static void do_clobber_return_reg (rtx reg, void *arg ATTRIBUTE_UNUSED) { - emit_insn (gen_rtx_CLOBBER (VOIDmode, reg)); + emit_clobber (reg); } void @@ -4334,7 +4334,7 @@ clobber_return_register (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 @@ -4740,7 +4740,7 @@ thread_prologue_and_epilogue_insns (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); diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 219226048ff..a9e7da998a4 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -836,7 +836,7 @@ resolve_simple_move (rtx set, rtx insn) 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, diff --git a/gcc/optabs.c b/gcc/optabs.c index b3517697ff2..bd054edce18 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -329,7 +329,7 @@ widen_operand (rtx op, enum machine_mode mode, enum machine_mode oldmode, 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; } @@ -1998,7 +1998,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, /* 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++) @@ -2755,7 +2755,7 @@ expand_doubleword_bswap (enum machine_mode mode, rtx op, rtx target) 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); diff --git a/gcc/reload.c b/gcc/reload.c index 7472272d9c4..ad0a04f6633 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -4083,7 +4083,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, 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); } } } diff --git a/gcc/reload1.c b/gcc/reload1.c index 51d3f4c4d19..7f413665747 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3316,14 +3316,13 @@ eliminate_regs_in_insn (rtx insn, int replace) 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); } } diff --git a/gcc/rtl.h b/gcc/rtl.h index e9dbb3b8d30..2e0884f8f56 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1609,6 +1609,10 @@ extern rtx emit_label (rtx); 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); diff --git a/gcc/stmt.c b/gcc/stmt.c index 57e8ad4db7e..00dd59ce463 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1775,11 +1775,11 @@ expand_nl_goto_receiver (void) { /* 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) -- 2.30.2