From e64e631b139fc426705d24788d2c0ce2abeafeaf Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 25 Aug 2014 18:49:28 +0000 Subject: [PATCH] config/rs6000: Use rtx_insn gcc/ * config/rs6000/rs6000-protos.h (output_cbranch): Strengthen param 4 from rtx to rtx_insn *. (rs6000_final_prescan_insn): Likewise for first param. * config/rs6000/rs6000.c (rs6000_emit_set_const): Likewise for local "insn". (rs6000_get_some_local_dynamic_name): Likewise. (output_cbranch): Likewise for param "insn". (spe_func_has_64bit_regs_p): Likewise for locals "insns", "insn". (rs6000_function_ok_for_sibcall): Likewise for locals "top", "insn". (rs6000_emit_allocate_stack): Likewise for local "insn". (load_cr_save): Likewise. (restore_saved_cr): Likewise. (restore_saved_lr): Likewise. (emit_cfa_restores): Likewise. (rs6000_output_function_epilogue): Likewise for locals "insn" and "deleted_debug_label". (rs6000_output_mi_thunk): Likewise for local "insn". (rs6000_final_prescan_insn): Likewise for param "insn". From-SVN: r214454 --- gcc/ChangeLog | 21 +++++++++++++++++++++ gcc/config/rs6000/rs6000-protos.h | 4 ++-- gcc/config/rs6000/rs6000.c | 34 ++++++++++++++++++---------------- 3 files changed, 41 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f65301..8955550 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,26 @@ 2014-08-25 David Malcolm + * config/rs6000/rs6000-protos.h (output_cbranch): Strengthen param + 4 from rtx to rtx_insn *. + (rs6000_final_prescan_insn): Likewise for first param. + * config/rs6000/rs6000.c (rs6000_emit_set_const): Likewise for + local "insn". + (rs6000_get_some_local_dynamic_name): Likewise. + (output_cbranch): Likewise for param "insn". + (spe_func_has_64bit_regs_p): Likewise for locals "insns", "insn". + (rs6000_function_ok_for_sibcall): Likewise for locals "top", "insn". + (rs6000_emit_allocate_stack): Likewise for local "insn". + (load_cr_save): Likewise. + (restore_saved_cr): Likewise. + (restore_saved_lr): Likewise. + (emit_cfa_restores): Likewise. + (rs6000_output_function_epilogue): Likewise for locals "insn" and + "deleted_debug_label". + (rs6000_output_mi_thunk): Likewise for local "insn". + (rs6000_final_prescan_insn): Likewise for param "insn". + +2014-08-25 David Malcolm + * config/picochip/picochip-protos.h (picochip_final_prescan_insn): Strengthen param "insn" from rtx to rtx_insn *. * config/picochip/picochip.c (picochip_current_prescan_insn): diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index abe29d5..1653b92 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -111,7 +111,7 @@ extern enum rtx_code rs6000_reverse_condition (enum machine_mode, extern void rs6000_emit_sISEL (enum machine_mode, rtx[]); extern void rs6000_emit_sCOND (enum machine_mode, rtx[]); extern void rs6000_emit_cbranch (enum machine_mode, rtx[]); -extern char * output_cbranch (rtx, const char *, int, rtx); +extern char * output_cbranch (rtx, const char *, int, rtx_insn *); extern char * output_e500_flip_gt_bit (rtx, rtx); extern const char * output_probe_stack_range (rtx, rtx); extern bool rs6000_emit_set_const (rtx, rtx); @@ -217,7 +217,7 @@ char *output_call (rtx, rtx *, int, int); const char * rs6000_xcoff_strip_dollar (const char *); #endif -void rs6000_final_prescan_insn (rtx, rtx *operand, int num_operands); +void rs6000_final_prescan_insn (rtx_insn *, rtx *operand, int num_operands); extern bool rs6000_hard_regno_mode_ok_p[][FIRST_PSEUDO_REGISTER]; extern unsigned char rs6000_class_max_nregs[][LIM_REG_CLASSES]; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 225f21e..340cb57 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -7912,7 +7912,8 @@ bool rs6000_emit_set_const (rtx dest, rtx source) { enum machine_mode mode = GET_MODE (dest); - rtx temp, insn, set; + rtx temp, set; + rtx_insn *insn; HOST_WIDE_INT c; gcc_checking_assert (CONST_INT_P (source)); @@ -17942,7 +17943,7 @@ extract_ME (rtx op) static const char * rs6000_get_some_local_dynamic_name (void) { - rtx insn; + rtx_insn *insn; if (cfun->machine->some_ld_name) return cfun->machine->some_ld_name; @@ -19266,7 +19267,7 @@ rs6000_emit_cbranch (enum machine_mode mode, rtx operands[]) INSN is the insn. */ char * -output_cbranch (rtx op, const char *label, int reversed, rtx insn) +output_cbranch (rtx op, const char *label, int reversed, rtx_insn *insn) { static char string[64]; enum rtx_code code = GET_CODE (op); @@ -21574,7 +21575,7 @@ rs6000_stack_info (void) static bool spe_func_has_64bit_regs_p (void) { - rtx insns, insn; + rtx_insn *insns, *insn; /* Functions that save and restore all the call-saved registers will need to save/restore the registers in 64-bits. */ @@ -21843,9 +21844,9 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp) static int rs6000_ra_ever_killed (void) { - rtx top; + rtx_insn *top; rtx reg; - rtx insn; + rtx_insn *insn; if (cfun->is_thunk) return 0; @@ -22154,7 +22155,7 @@ rs6000_emit_stack_tie (rtx fp, bool hard_frame_needed) static void rs6000_emit_allocate_stack (HOST_WIDE_INT size, rtx copy_reg, int copy_off) { - rtx insn; + rtx_insn *insn; rtx stack_reg = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM); rtx tmp_reg = gen_rtx_REG (Pmode, 0); rtx todec = gen_int_mode (-size, Pmode); @@ -24052,7 +24053,7 @@ load_cr_save (int regno, rtx frame_reg_rtx, int offset, bool exit_func) { rtx mem = gen_frame_mem_offset (SImode, frame_reg_rtx, offset); rtx reg = gen_rtx_REG (SImode, regno); - rtx insn = emit_move_insn (reg, mem); + rtx_insn *insn = emit_move_insn (reg, mem); if (!exit_func && DEFAULT_ABI == ABI_V4) { @@ -24083,7 +24084,7 @@ restore_saved_cr (rtx reg, int using_mfcr_multiple, bool exit_func) if (using_mfcr_multiple && count > 1) { - rtx insn; + rtx_insn *insn; rtvec p; int ndx; @@ -24139,7 +24140,7 @@ restore_saved_cr (rtx reg, int using_mfcr_multiple, bool exit_func) if (!exit_func && DEFAULT_ABI != ABI_ELFv2 && (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap)) { - rtx insn = get_last_insn (); + rtx_insn *insn = get_last_insn (); rtx cr = gen_rtx_REG (SImode, CR2_REGNO); add_reg_note (insn, REG_CFA_RESTORE, cr); @@ -24166,7 +24167,7 @@ restore_saved_lr (int regno, bool exit_func) { rtx reg = gen_rtx_REG (Pmode, regno); rtx lr = gen_rtx_REG (Pmode, LR_REGNO); - rtx insn = emit_move_insn (lr, reg); + rtx_insn *insn = emit_move_insn (lr, reg); if (!exit_func && flag_shrink_wrap) { @@ -24218,7 +24219,7 @@ offset_below_red_zone_p (HOST_WIDE_INT offset) static void emit_cfa_restores (rtx cfa_restores) { - rtx insn = get_last_insn (); + rtx_insn *insn = get_last_insn (); rtx *loc = ®_NOTES (insn); while (*loc) @@ -25098,8 +25099,8 @@ rs6000_output_function_epilogue (FILE *file, /* Mach-O doesn't support labels at the end of objects, so if it looks like we might want one, insert a NOP. */ { - rtx insn = get_last_insn (); - rtx deleted_debug_label = NULL_RTX; + rtx_insn *insn = get_last_insn (); + rtx_insn *deleted_debug_label = NULL; while (insn && NOTE_P (insn) && NOTE_KIND (insn) != NOTE_INSN_DELETED_LABEL) @@ -25398,7 +25399,8 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, tree function) { - rtx this_rtx, insn, funexp; + rtx this_rtx, funexp; + rtx_insn *insn; reload_completed = 1; epilogue_completed = 1; @@ -31684,7 +31686,7 @@ rs6000_stack_protect_fail (void) } void -rs6000_final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED, +rs6000_final_prescan_insn (rtx_insn *insn, rtx *operand ATTRIBUTE_UNUSED, int num_operands ATTRIBUTE_UNUSED) { if (rs6000_warn_cell_microcode) -- 2.7.4