s/\<\(LC_\)\?INLINE\>/inline/.
[libfirm] / ir / ir / irarch.c
index 5f9fdfe..c5ca7e6 100644 (file)
@@ -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 <stdlib.h>
@@ -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)