summaryrefslogtreecommitdiff
path: root/gcc/config/frv/frv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/frv/frv.c')
-rw-r--r--gcc/config/frv/frv.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 93648ccf39d..6ba924b1df7 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -6950,7 +6950,7 @@ frv_assemble_integer (rtx value, unsigned int size, int aligned_p)
static struct machine_function *
frv_init_machine_status (void)
{
- return ggc_alloc_cleared (sizeof (struct machine_function));
+ return GGC_CNEW (struct machine_function);
}
/* Implement TARGET_SCHED_ISSUE_RATE. */
@@ -7525,7 +7525,8 @@ frv_sort_insn_group_1 (enum frv_insn_group group,
static int
frv_compare_insns (const void *first, const void *second)
{
- const rtx *insn1 = first, *insn2 = second;
+ const rtx *const insn1 = (rtx const *) first,
+ *const insn2 = (rtx const *) second;
return frv_insn_unit (*insn1) - frv_insn_unit (*insn2);
}
@@ -7758,7 +7759,7 @@ frv_extract_membar (struct frv_io *io, rtx insn)
static void
frv_io_check_address (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
- rtx *other = data;
+ rtx *other = (rtx *) data;
if (REG_P (x) && *other != 0 && reg_overlap_mentioned_p (x, *other))
*other = 0;
@@ -7770,7 +7771,7 @@ frv_io_check_address (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
static void
frv_io_handle_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
- HARD_REG_SET *set = data;
+ HARD_REG_SET *set = (HARD_REG_SET *) data;
unsigned int regno;
if (REG_P (x))
@@ -7784,7 +7785,7 @@ frv_io_handle_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
static int
frv_io_handle_use_1 (rtx *x, void *data)
{
- HARD_REG_SET *set = data;
+ HARD_REG_SET *set = (HARD_REG_SET *) data;
unsigned int regno;
if (REG_P (*x))
@@ -8005,8 +8006,8 @@ frv_optimize_membar (void)
rtx *last_membar;
compute_bb_for_insn ();
- first_io = xcalloc (last_basic_block, sizeof (struct frv_io));
- last_membar = xcalloc (last_basic_block, sizeof (rtx));
+ first_io = XCNEWVEC (struct frv_io, last_basic_block);
+ last_membar = XCNEWVEC (rtx, last_basic_block);
FOR_EACH_BB (bb)
frv_optimize_membar_local (bb, &first_io[bb->index],