+2010-02-15 Nick Clifton <nickc@redhat.com>
+
+ * config/h8300/h8300.c: (h8300_push_pop): Use bool type for
+ boolean parameters. Use emit_jump_insn when emitting a pop
+ instruction containing a return insn.
+ (push): Use 'true' rather than '1' as second parameter to F.
+ (h8300_expand_prologue): Likewise.
+ Use 'true' and 'false' for boolean parameters to
+ h8300_push_pop.
+ (h8300_expand_epilogue): Likewise.
+
2010-02-15 Richard Guenther <rguenther@suse.de>
PR middle-end/43068
#endif
static int h8300_and_costs (rtx);
static int h8300_shift_costs (rtx);
-static void h8300_push_pop (int, int, int, int);
+static void h8300_push_pop (int, int, bool, bool);
static int h8300_stack_offset_p (rtx, int);
static int h8300_ldm_stm_regno (rtx, int, int, int);
static void h8300_reorg (void);
x = gen_push_h8300hs_advanced (reg);
else
x = gen_push_h8300hs_normal (reg);
- x = F (emit_insn (x), 1);
+ x = F (emit_insn (x), true);
REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0);
}
(set sp (plus sp (const_int adjust)))] */
static void
-h8300_push_pop (int regno, int nregs, int pop_p, int return_p)
+h8300_push_pop (int regno, int nregs, bool pop_p, bool return_p)
{
int i, j;
rtvec vec;
/* We need one element for the return insn, if present, one for each
register, and one for stack adjustment. */
- vec = rtvec_alloc ((return_p != 0) + nregs + 1);
+ vec = rtvec_alloc ((return_p ? 1 : 0) + nregs + 1);
sp = stack_pointer_rtx;
i = 0;
x = gen_rtx_PARALLEL (VOIDmode, vec);
if (!pop_p)
x = Fpa (x);
- emit_insn (x);
+
+ if (return_p)
+ emit_jump_insn (x);
+ else
+ emit_insn (x);
}
/* Return true if X has the value sp + OFFSET. */
{
/* Push fp. */
push (HARD_FRAME_POINTER_REGNUM);
- F (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx), 1);
+ F (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx), true);
}
/* Push the rest of the registers in ascending order. */
n_regs = 2;
}
- h8300_push_pop (regno, n_regs, 0, 0);
+ h8300_push_pop (regno, n_regs, false, false);
}
}
&& (saved_regs & ((1 << (regno - n_regs + 1)) - 1)) == 0)
returned_p = true;
- h8300_push_pop (regno - n_regs + 1, n_regs, 1, returned_p);
+ h8300_push_pop (regno - n_regs + 1, n_regs, true, returned_p);
}
}
{
if (TARGET_H8300SX)
returned_p = true;
- h8300_push_pop (HARD_FRAME_POINTER_REGNUM, 1, 1, returned_p);
+ h8300_push_pop (HARD_FRAME_POINTER_REGNUM, 1, true, returned_p);
}
if (!returned_p)