X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firarch.c;h=8f753f089041db943cb77028403f242a4ed4518f;hb=8bae7e4a8cf8f1a323ccf7b60c4091da49324f94;hp=1f590ab0e6dc51998cfe4273dd089c1386a7ce98;hpb=e1397b01aceb38b6bb62c319007146af3b922f39;p=libfirm diff --git a/ir/ir/irarch.c b/ir/ir/irarch.c index 1f590ab0e..8f753f089 100644 --- a/ir/ir/irarch.c +++ b/ir/ir/irarch.c @@ -24,7 +24,7 @@ * @author Sebastian Hack, Michael Beck * @version $Id$ * - * Implements "Strenght Reduction of Multiplications by Integer Constants" by Youfeng Wu. + * Implements "Strength Reduction of Multiplications by Integer Constants" by Youfeng Wu. * Implements Division and Modulo by Consts from "Hackers Delight", */ #include "config.h" @@ -131,7 +131,7 @@ static int default_evaluate(insn_kind kind, tarval *tv) { * emit a LEA (or an Add) instruction */ static instruction *emit_LEA(mul_env *env, instruction *a, instruction *b, unsigned shift) { - instruction *res = obstack_alloc(&env->obst, sizeof(*res)); + instruction *res = OALLOC(&env->obst, instruction); res->kind = shift > 0 ? LEA : ADD; res->in[0] = a; res->in[1] = b; @@ -145,7 +145,7 @@ static instruction *emit_LEA(mul_env *env, instruction *a, instruction *b, unsig * emit a SHIFT (or an Add or a Zero) instruction */ static instruction *emit_SHIFT(mul_env *env, instruction *a, unsigned shift) { - instruction *res = obstack_alloc(&env->obst, sizeof(*res)); + instruction *res = OALLOC(&env->obst, instruction); if (shift == env->bits) { /* a 2^bits with bits resolution is a zero */ res->kind = ZERO; @@ -172,7 +172,7 @@ static instruction *emit_SHIFT(mul_env *env, instruction *a, unsigned shift) { * emit a SUB instruction */ static instruction *emit_SUB(mul_env *env, instruction *a, instruction *b) { - instruction *res = obstack_alloc(&env->obst, sizeof(*res)); + instruction *res = OALLOC(&env->obst, instruction); res->kind = SUB; res->in[0] = a; res->in[1] = b; @@ -186,7 +186,7 @@ static instruction *emit_SUB(mul_env *env, instruction *a, instruction *b) { * emit the ROOT instruction */ static instruction *emit_ROOT(mul_env *env, ir_node *root_op) { - instruction *res = obstack_alloc(&env->obst, sizeof(*res)); + instruction *res = OALLOC(&env->obst, instruction); res->kind = ROOT; res->in[0] = NULL; res->in[1] = NULL;