From 240a513f871a0204915f635d41e61814a1f460f7 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 25 Aug 2014 20:00:46 +0000 Subject: [PATCH] config/xtensa: Use rtx_insn and rtx_code_label gcc/ * config/xtensa/xtensa-protos.h (xtensa_emit_loop_end): Strengthen first param from rtx to rtx_insn *. * config/xtensa/xtensa.c (struct machine_function): Likewise for field "set_frame_ptr_insn". (xtensa_expand_compare_and_swap): Strengthen locals "csloop" and "csend" from rtx to rtx_code_label *. (xtensa_expand_atomic): Likewise for local "csloop". (xtensa_emit_loop_end): Strengthen param "insn" from rtx to rtx_insn *. (xtensa_call_tls_desc): Likewise for return type and locals "call_insn", "insns". (xtensa_legitimize_tls_address): Likewise for local "insns". (xtensa_expand_prologue): Likewise for locals "insn", "first". From-SVN: r214467 --- gcc/ChangeLog | 16 ++++++++++++++++ gcc/config/xtensa/xtensa-protos.h | 2 +- gcc/config/xtensa/xtensa.c | 23 +++++++++++++---------- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9722233303..1f1c6e6a457 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2014-08-25 David Malcolm + + * config/xtensa/xtensa-protos.h (xtensa_emit_loop_end): Strengthen + first param from rtx to rtx_insn *. + * config/xtensa/xtensa.c (struct machine_function): Likewise for + field "set_frame_ptr_insn". + (xtensa_expand_compare_and_swap): Strengthen locals "csloop" and + "csend" from rtx to rtx_code_label *. + (xtensa_expand_atomic): Likewise for local "csloop". + (xtensa_emit_loop_end): Strengthen param "insn" from rtx to + rtx_insn *. + (xtensa_call_tls_desc): Likewise for return type and locals + "call_insn", "insns". + (xtensa_legitimize_tls_address): Likewise for local "insns". + (xtensa_expand_prologue): Likewise for locals "insn", "first". + 2014-08-25 David Malcolm * config/v850/v850-protos.h (v850_adjust_insn_length): Strengthen diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h index 5f090263c95..e684af80914 100644 --- a/gcc/config/xtensa/xtensa-protos.h +++ b/gcc/config/xtensa/xtensa-protos.h @@ -47,7 +47,7 @@ extern rtx xtensa_copy_incoming_a7 (rtx); extern void xtensa_expand_nonlocal_goto (rtx *); extern void xtensa_expand_compare_and_swap (rtx, rtx, rtx, rtx); extern void xtensa_expand_atomic (enum rtx_code, rtx, rtx, rtx, bool); -extern void xtensa_emit_loop_end (rtx, rtx *); +extern void xtensa_emit_loop_end (rtx_insn *, rtx *); extern char *xtensa_emit_branch (bool, bool, rtx *); extern char *xtensa_emit_bit_branch (bool, bool, rtx *); extern char *xtensa_emit_movcc (bool, bool, bool, rtx *); diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 173b27b9588..dc0629a0b8a 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -99,7 +99,7 @@ struct GTY(()) machine_function bool need_a7_copy; bool vararg_a7; rtx vararg_a7_copy; - rtx set_frame_ptr_insn; + rtx_insn *set_frame_ptr_insn; }; /* Vector, indexed by hard register number, which contains 1 for a @@ -1463,8 +1463,8 @@ xtensa_expand_compare_and_swap (rtx target, rtx mem, rtx cmp, rtx new_rtx) rtx tmp, cmpv, newv, val; rtx oldval = gen_reg_rtx (SImode); rtx res = gen_reg_rtx (SImode); - rtx csloop = gen_label_rtx (); - rtx csend = gen_label_rtx (); + rtx_code_label *csloop = gen_label_rtx (); + rtx_code_label *csend = gen_label_rtx (); init_alignment_context (&ac, mem); @@ -1524,7 +1524,7 @@ xtensa_expand_atomic (enum rtx_code code, rtx target, rtx mem, rtx val, { enum machine_mode mode = GET_MODE (mem); struct alignment_context ac; - rtx csloop = gen_label_rtx (); + rtx_code_label *csloop = gen_label_rtx (); rtx cmp, tmp; rtx old = gen_reg_rtx (SImode); rtx new_rtx = gen_reg_rtx (SImode); @@ -1642,7 +1642,7 @@ xtensa_setup_frame_addresses (void) when the branch is taken. */ void -xtensa_emit_loop_end (rtx insn, rtx *operands) +xtensa_emit_loop_end (rtx_insn *insn, rtx *operands) { char done = 0; @@ -1862,10 +1862,11 @@ xtensa_tls_module_base (void) } -static rtx +static rtx_insn * xtensa_call_tls_desc (rtx sym, rtx *retp) { - rtx fn, arg, a10, call_insn, insns; + rtx fn, arg, a10; + rtx_insn *call_insn, *insns; start_sequence (); fn = gen_reg_rtx (Pmode); @@ -1889,7 +1890,8 @@ static rtx xtensa_legitimize_tls_address (rtx x) { unsigned int model = SYMBOL_REF_TLS_MODEL (x); - rtx dest, tp, ret, modbase, base, addend, insns; + rtx dest, tp, ret, modbase, base, addend; + rtx_insn *insns; dest = gen_reg_rtx (Pmode); switch (model) @@ -2648,7 +2650,8 @@ xtensa_expand_prologue (void) { HOST_WIDE_INT total_size; rtx size_rtx; - rtx insn, note_rtx; + rtx_insn *insn; + rtx note_rtx; total_size = compute_frame_size (get_frame_size ()); size_rtx = GEN_INT (total_size); @@ -2669,7 +2672,7 @@ xtensa_expand_prologue (void) { if (cfun->machine->set_frame_ptr_insn) { - rtx first; + rtx_insn *first; push_topmost_sequence (); first = get_insns (); -- 2.30.2