X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ffunction.c;h=96879c8adcc67f2bf00d3b960a20c497b9d71d37;hb=b48209d97d1a754d95c68970e95dde86ee7b5b7b;hp=fcb79f5d1b88c4c6bfb8a3bf0c8f146acacad187;hpb=2e851bb8acd6ed85d5f9769a4d522dd0acca046a;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/function.c b/gcc/function.c index fcb79f5d1b8..96879c8adcc 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -939,14 +939,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, /* If a type is specified, set the relevant flags. */ if (type != 0) - { - MEM_VOLATILE_P (slot) = TYPE_VOLATILE (type); - gcc_checking_assert (!MEM_SCALAR_P (slot) && !MEM_IN_STRUCT_P (slot)); - if (AGGREGATE_TYPE_P (type) || TREE_CODE (type) == COMPLEX_TYPE) - MEM_IN_STRUCT_P (slot) = 1; - else - MEM_SCALAR_P (slot) = 1; - } + MEM_VOLATILE_P (slot) = TYPE_VOLATILE (type); MEM_NOTRAP_P (slot) = 1; return slot; @@ -1737,7 +1730,7 @@ instantiate_virtual_regs_in_insn (rtx insn) if (!check_asm_operands (PATTERN (insn))) { error_for_asm (insn, "impossible constraint in %"); - delete_insn (insn); + delete_insn_and_edges (insn); } } else @@ -2982,11 +2975,26 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, && insn_operand_matches (icode, 1, op1)) { enum rtx_code code = unsignedp ? ZERO_EXTEND : SIGN_EXTEND; - rtx insn, insns; + rtx insn, insns, t = op1; HARD_REG_SET hardregs; start_sequence (); - insn = gen_extend_insn (op0, op1, promoted_nominal_mode, + /* If op1 is a hard register that is likely spilled, first + force it into a pseudo, otherwise combiner might extend + its lifetime too much. */ + if (GET_CODE (t) == SUBREG) + t = SUBREG_REG (t); + if (REG_P (t) + && HARD_REGISTER_P (t) + && ! TEST_HARD_REG_BIT (fixed_reg_set, REGNO (t)) + && targetm.class_likely_spilled_p (REGNO_REG_CLASS (REGNO (t)))) + { + t = gen_reg_rtx (GET_MODE (op1)); + emit_move_insn (t, op1); + } + else + t = op1; + insn = gen_extend_insn (op0, t, promoted_nominal_mode, data->passed_mode, unsignedp); emit_insn (insn); insns = get_insns (); @@ -5294,6 +5302,10 @@ requires_stack_frame_p (rtx insn, HARD_REG_SET prologue_used, if (CALL_P (insn)) return !SIBLING_CALL_P (insn); + /* We need a frame to get the unique CFA expected by the unwinder. */ + if (cfun->can_throw_non_call_exceptions && can_throw_internal (insn)) + return true; + CLEAR_HARD_REG_SET (hardregs); for (df_rec = DF_INSN_DEFS (insn); *df_rec; df_rec++) { @@ -5949,7 +5961,7 @@ thread_prologue_and_epilogue_insns (void) if (pic_offset_table_rtx) add_to_hard_reg_set (&set_up_by_prologue.set, Pmode, PIC_OFFSET_TABLE_REGNUM); - if (stack_realign_drap && crtl->drap_reg) + if (crtl->drap_reg) add_to_hard_reg_set (&set_up_by_prologue.set, GET_MODE (crtl->drap_reg), REGNO (crtl->drap_reg));