Commit 9828c0d9 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

all: Use MEMCPY().

parent 93d15208
......@@ -17,8 +17,8 @@
#include "cgana.h"
#include "irprog.h"
#include "entity_t.h"
#include "analyze_irg_args.h"
#include "util.h"
/**
* Walk recursive the successors of a graph argument
......@@ -196,8 +196,7 @@ static void analyze_ent_args(ir_entity *ent)
}
/* copy the temporary info */
memcpy(ent->attr.mtd_attr.param_access, rw_info,
nparams * sizeof(ent->attr.mtd_attr.param_access[0]));
MEMCPY(ent->attr.mtd_attr.param_access, rw_info, nparams);
}
void analyze_irg_args(ir_graph *irg)
......
......@@ -21,6 +21,7 @@
#include "irdump_t.h"
#include "irhooks.h"
#include "panic.h"
#include "util.h"
static copy_attr_func old_phi_copy_attr;
......@@ -72,9 +73,8 @@ static void new_phi_copy_attr(ir_graph *irg, const ir_node *old_node,
backend_info_t *new_info = be_get_info(new_node);
new_info->in_reqs = old_info->in_reqs;
size_t n_outs = arch_get_irn_n_outs(old_node);
memcpy(new_info->out_infos, old_info->out_infos,
n_outs * sizeof(old_info->out_infos[0]));
size_t const n_outs = arch_get_irn_n_outs(old_node);
MEMCPY(new_info->out_infos, old_info->out_infos, n_outs);
old_phi_copy_attr(irg, old_node, new_node);
}
......
......@@ -704,8 +704,7 @@ static void copy_attr(ir_graph *irg, const ir_node *old_node, ir_node *new_node)
} else {
new_info->in_reqs = OALLOCN(obst,const arch_register_req_t*, n_ins);
}
memcpy(new_info->in_reqs, old_info->in_reqs,
n_ins * sizeof(new_info->in_reqs[0]));
MEMCPY(new_info->in_reqs, old_info->in_reqs, n_ins);
} else {
new_info->in_reqs = NULL;
}
......
......@@ -546,8 +546,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
const arch_register_req_t **new_in_reg_reqs
= OALLOCN(obst, const arch_register_req_t*,
in_size);
memcpy(new_in_reg_reqs, in_reg_reqs,
n_ins*sizeof(new_in_reg_reqs[0]));
MEMCPY(new_in_reg_reqs, in_reg_reqs, n_ins);
ir_node **new_in = ALLOCANZ(ir_node*, in_size);
MEMCPY(new_in, in, n_ins);
......@@ -576,8 +575,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
out_size *= 2;
new_out_reg_reqs
= OALLOCN(obst, const arch_register_req_t*, out_size);
memcpy(new_out_reg_reqs, out_reg_reqs,
out_arity * sizeof(new_out_reg_reqs[0]));
MEMCPY(new_out_reg_reqs, out_reg_reqs, out_arity);
out_reg_reqs = new_out_reg_reqs;
}
......@@ -595,8 +593,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
out_size = out_arity + 1;
new_out_reg_reqs
= OALLOCN(obst, const arch_register_req_t*, out_size);
memcpy(new_out_reg_reqs, out_reg_reqs,
out_arity * sizeof(new_out_reg_reqs[0]));
MEMCPY(new_out_reg_reqs, out_reg_reqs, out_arity);
out_reg_reqs = new_out_reg_reqs;
}
......
......@@ -550,8 +550,7 @@ static ir_node *gen_ASM(ir_node *node)
out_size = n_outs + 1;
const arch_register_req_t **new_out_reg_reqs
= OALLOCN(obst, const arch_register_req_t*, out_size);
memcpy(new_out_reg_reqs, out_reg_reqs,
n_outs * sizeof(new_out_reg_reqs[0]));
MEMCPY(new_out_reg_reqs, out_reg_reqs, n_outs);
out_reg_reqs = new_out_reg_reqs;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment