X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firarch.c;h=c5ca7e649d2a5f1586416616f3abcf5b8b3f6919;hb=bb9f2e36362333c6635b89f5258171b06c786608;hp=5f9fdfe9608794d60de5d6d3cd52fd1551752208;hpb=e5beeab8b7b91878088417de02683bf15cba1c59;p=libfirm diff --git a/ir/ir/irarch.c b/ir/ir/irarch.c index 5f9fdfe96..c5ca7e649 100644 --- a/ir/ir/irarch.c +++ b/ir/ir/irarch.c @@ -27,9 +27,7 @@ * Implements "Strenght Reduction of Multiplications by Integer Constants" by Youfeng Wu. * Implements Division and Modulo by Consts from "Hackers Delight", */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "config.h" #ifdef HAVE_STDLIB_H # include @@ -52,6 +50,7 @@ #include "ircons.h" #include "irarch.h" #include "irflag.h" +#include "error.h" #undef DEB @@ -467,7 +466,7 @@ static ir_node *build_graph(mul_env *env, instruction *inst) { case ZERO: return inst->irn = new_r_Const(current_ir_graph, env->blk, env->mode, get_mode_null(env->mode)); default: - assert(0); + panic("Unsupported instruction kind"); return NULL; } } @@ -507,10 +506,8 @@ static int evaluate_insn(mul_env *env, instruction *inst) { case ZERO: inst->costs = costs = env->evaluate(inst->kind, NULL); return costs; - default: - assert(0); - return 0; } + panic("Unsupported instruction kind"); } /** @@ -634,7 +631,7 @@ static int tv_ld2(tarval *tv, int bits) { #define SHL(a, b) tarval_shl(a, b) #define SHR(a, b) tarval_shr(a, b) #define ADD(a, b) tarval_add(a, b) -#define SUB(a, b) tarval_sub(a, b) +#define SUB(a, b) tarval_sub(a, b, NULL) #define MUL(a, b) tarval_mul(a, b) #define DIV(a, b) tarval_div(a, b) #define MOD(a, b) tarval_mod(a, b)