{
rtx tga_op1, tga_ret, tmp, tmp2;
-
switch (tls_kind)
{
case TLS_MODEL_GLOBAL_DYNAMIC:
case TLS_MODEL_INITIAL_EXEC:
if (! flag_pic)
- emit_insn (gen_GOTaddr2picreg ());
- tga_op1 = gen_reg_rtx (Pmode);
+ {
+ /* Don't schedule insns for getting GOT address when
+ the first scheduling is enabled, to avoid spill
+ failures for R0. */
+ if (flag_schedule_insns)
+ emit_insn (gen_blockage ());
+ emit_insn (gen_GOTaddr2picreg ());
+ emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode,
+ PIC_REG)));
+ if (flag_schedule_insns)
+ emit_insn (gen_blockage ());
+ }
+ tga_op1 = no_new_pseudos ? op0 : gen_reg_rtx (Pmode);
tmp = gen_sym2GOTTPOFF (op1);
emit_insn (gen_tls_initial_exec (tga_op1, tmp));
op1 = tga_op1;
static int
calc_live_regs (HARD_REG_SET *live_regs_mask)
{
- int reg;
+ unsigned int reg;
int count;
int interrupt_handler;
int pr_live, has_call;
|| current_function_has_nonlocal_label))
pr_live = 1;
has_call = TARGET_SHMEDIA ? ! leaf_function_p () : pr_live;
- for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg >= 0; reg--)
+ for (count = 0, reg = FIRST_PSEUDO_REGISTER; reg-- != 0; )
{
if (reg == (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG)
? pr_live
(TARGET_SHCOMPACT
&& flag_pic
&& current_function_args_info.call_cookie
- && reg == (int) PIC_OFFSET_TABLE_REGNUM)
+ && reg == PIC_OFFSET_TABLE_REGNUM)
|| (regs_ever_live[reg] && ! call_really_used_regs[reg])
|| (current_function_calls_eh_return
- && (reg == (int) EH_RETURN_DATA_REGNO (0)
- || reg == (int) EH_RETURN_DATA_REGNO (1)
- || reg == (int) EH_RETURN_DATA_REGNO (2)
- || reg == (int) EH_RETURN_DATA_REGNO (3)))
+ && (reg == EH_RETURN_DATA_REGNO (0)
+ || reg == EH_RETURN_DATA_REGNO (1)
+ || reg == EH_RETURN_DATA_REGNO (2)
+ || reg == EH_RETURN_DATA_REGNO (3)))
|| ((reg == MACL_REG || reg == MACH_REG)
&& regs_ever_live[reg]
&& sh_cfun_attr_renesas_p ())
&& ! (cfun->static_chain_decl != NULL && i == STATIC_CHAIN_REGNUM)
&& ! (current_function_calls_eh_return
&& (i == EH_RETURN_STACKADJ_REGNO
- || ((unsigned) i <= EH_RETURN_DATA_REGNO (0)
- && (unsigned) i >= EH_RETURN_DATA_REGNO (3)))))
+ || ((unsigned) i >= EH_RETURN_DATA_REGNO (0)
+ && (unsigned) i <= EH_RETURN_DATA_REGNO (3)))))
schedule->temps[tmpx++] = i;
entry->reg = -1;
entry->mode = VOIDmode;
for (entry = &schedule.entries[1]; entry->mode != VOIDmode; entry++)
{
enum machine_mode mode = entry->mode;
- int reg = entry->reg;
+ unsigned int reg = entry->reg;
rtx reg_rtx, mem_rtx, pre_dec = NULL_RTX;
rtx orig_reg_rtx;
if (frame_pointer_needed)
{
+ /* We must avoid scheduling the epilogue with previous basic blocks
+ when exception handling is enabled. See PR/18032. */
+ if (flag_exceptions)
+ emit_insn (gen_blockage ());
output_stack_adjust (frame_size, frame_pointer_rtx, e, &live_regs_mask);
/* We must avoid moving the stack pointer adjustment past code
{
HOST_WIDE_INT size, rsize;
tree tmp, pptr_type_node;
- tree addr, lab_over, result = NULL;
+ tree addr, lab_over = NULL, result = NULL;
int pass_by_ref = targetm.calls.must_pass_in_stack (TYPE_MODE (type), type);
if (pass_by_ref)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
- warning ("`%s' attribute only applies to functions",
+ warning ("%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
- warning ("`%s' attribute only applies to functions",
+ warning ("%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
else if (!pragma_interrupt)
{
/* The sp_switch attribute only has meaning for interrupt functions. */
- warning ("`%s' attribute only applies to interrupt functions",
+ warning ("%qs attribute only applies to interrupt functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
else if (TREE_CODE (TREE_VALUE (args)) != STRING_CST)
{
/* The argument must be a constant string. */
- warning ("`%s' attribute argument not a string constant",
+ warning ("%qs attribute argument not a string constant",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
else
{
- char *s = ggc_strdup (TREE_STRING_POINTER (TREE_VALUE (args)));
+ const char *s = ggc_strdup (TREE_STRING_POINTER (TREE_VALUE (args)));
sp_switch = gen_rtx_SYMBOL_REF (VOIDmode, s);
}
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
- warning ("`%s' attribute only applies to functions",
+ warning ("%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
else if (!pragma_interrupt)
{
/* The trap_exit attribute only has meaning for interrupt functions. */
- warning ("`%s' attribute only applies to interrupt functions",
+ warning ("%qs attribute only applies to interrupt functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
else if (TREE_CODE (TREE_VALUE (args)) != INTEGER_CST)
{
/* The argument must be a constant integer. */
- warning ("`%s' attribute argument not an integer constant",
+ warning ("%qs attribute argument not an integer constant",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
make_message:
{
char *r;
- asprintf (&r, _("created and used with differing settings of `-m%s'"),
+ asprintf (&r, _("created and used with differing settings of '-m%s'"),
flag_that_differs);
if (r == NULL)
return _("out of memory");
sh_dwarf_calling_convention (tree func)
{
if (sh_attr_renesas_p (func))
- return DW_CC_renesas_sh;
+ return DW_CC_GNU_renesas_sh;
return DW_CC_normal;
}
{
/* Release all memory allocated by flow. */
free_basic_block_vars ();
-
- /* Release all memory held by regsets now. */
- regset_release_memory ();
}
reload_completed = 0;
pcum->prototype_p = FALSE;
if (mode != VOIDmode)
{
- pcum->call_cookie =
+ pcum->call_cookie =
CALL_COOKIE_RET_TRAMP (TARGET_SHCOMPACT
&& GET_MODE_SIZE (mode) > 4
&& BASE_RETURN_VALUE_REG (mode) == FIRST_RET_REG);