* config/h8300/h8300.c: Include df.h.
(push, pop): Use add_reg_note.
(compute_plussi_cc, compute_logical_op_cc): Return enum attr_c.
(compute_a_shift_cc): Likewise.
(expand_a_shift): Argument code has type enum rtx_code.
(struct shift_insn): Member cc_valid has type enum attr_cc.
(struct shift_info) <cc_inline, cc_special>: Likewise.
enum attr_cc.
* config/h8300/h8300-protos.h (compute_plussi_cc): Update prototype.
(compute_a_shift_cc, compute_logical_op_cc, expand_a_shift): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166336
138bc75d-0d04-0410-961f-
82ee72b054a4
* genopinit.c (main) [FIXUNS_TRUNC_LIKE_FIX_TRUNC]: Cast
iteration variables to enum machine_mode.
+ PR target/44751
+ * config/h8300/h8300.c: Include df.h.
+ (push, pop): Use add_reg_note.
+ (compute_plussi_cc, compute_logical_op_cc): Return enum attr_c.
+ (compute_a_shift_cc): Likewise.
+ (expand_a_shift): Argument code has type enum rtx_code.
+ (struct shift_insn): Member cc_valid has type enum attr_cc.
+ (struct shift_info) <cc_inline, cc_special>: Likewise.
+ enum attr_cc.
+ * config/h8300/h8300-protos.h (compute_plussi_cc): Update prototype.
+ (compute_a_shift_cc, compute_logical_op_cc, expand_a_shift): Likewise.
+
2010-11-04 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/46213
extern unsigned int compute_mov_length (rtx *);
extern const char *output_plussi (rtx *);
extern unsigned int compute_plussi_length (rtx *);
-extern int compute_plussi_cc (rtx *);
extern const char *output_a_shift (rtx *);
extern unsigned int compute_a_shift_length (rtx, rtx *);
-extern int compute_a_shift_cc (rtx, rtx *);
extern const char *output_a_rotate (enum rtx_code, rtx *);
extern unsigned int compute_a_rotate_length (rtx *);
extern const char *output_simode_bld (int, rtx[]);
extern const char *output_logical_op (enum machine_mode, rtx *);
extern unsigned int compute_logical_op_length (enum machine_mode,
rtx *);
-extern int compute_logical_op_cc (enum machine_mode, rtx *);
+#ifdef HAVE_ATTR_cc
+extern enum attr_cc compute_plussi_cc (rtx *);
+extern enum attr_cc compute_a_shift_cc (rtx, rtx *);
+extern enum attr_cc compute_logical_op_cc (enum machine_mode, rtx *);
+#endif
extern void h8300_expand_branch (rtx[]);
extern void h8300_expand_store (rtx[]);
-extern bool expand_a_shift (enum machine_mode, int, rtx[]);
+extern bool expand_a_shift (enum machine_mode, enum rtx_code, rtx[]);
extern int h8300_shift_needs_scratch_p (int, enum machine_mode);
extern int expand_a_rotate (rtx[]);
extern int fix_bit_operand (rtx *, enum rtx_code);
#include "ggc.h"
#include "target.h"
#include "target-def.h"
+#include "df.h"
/* Classifies a h8300_src_operand or h8300_dst_operand.
else
x = gen_push_h8300hs_normal (reg);
x = F (emit_insn (x), true);
- REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0);
+ add_reg_note (x, REG_INC, stack_pointer_rtx);
}
/* Emit an insn to pop register RN. */
else
x = gen_pop_h8300hs_normal (reg);
x = emit_insn (x);
- REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0);
+ add_reg_note (x, REG_INC, stack_pointer_rtx);
}
/* Emit an instruction to push or pop NREGS consecutive registers
/* Compute which flag bits are valid after an addition insn. */
-int
+enum attr_cc
compute_plussi_cc (rtx *operands)
{
enum machine_mode mode = GET_MODE (operands[0]);
/* Compute which flag bits are valid after a logical insn. */
-int
+enum attr_cc
compute_logical_op_cc (enum machine_mode mode, rtx *operands)
{
/* Figure out the logical op that we need to perform. */
/* Emit code to do shifts. */
bool
-expand_a_shift (enum machine_mode mode, int code, rtx operands[])
+expand_a_shift (enum machine_mode mode, enum rtx_code code, rtx operands[])
{
switch (h8sx_classify_shift (mode, code, operands[2]))
{
struct shift_insn
{
const char *const assembler;
- const int cc_valid;
+ const enum attr_cc cc_valid;
};
/* Assembler instruction shift table.
const char *shift2;
/* CC status for SHIFT_INLINE. */
- int cc_inline;
+ enum attr_cc cc_inline;
/* CC status for SHIFT_SPECIAL. */
- int cc_special;
+ enum attr_cc cc_special;
};
static void get_shift_alg (enum shift_type,
/* Compute which flag bits are valid after a shift insn. */
-int
+enum attr_cc
compute_a_shift_cc (rtx insn ATTRIBUTE_UNUSED, rtx *operands)
{
rtx shift = operands[3];