+ return res;
+}
+
+ir_node *
+new_rd_Const_type (dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode, tarval *con, ir_type *tp)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Const_type (db, block, mode, con, tp);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Const (dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode, tarval *con)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Const_type (db, block, mode, con, firm_unknown_type);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Const_long (dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode, long value)
+{
+ return new_rd_Const(db, irg, block, mode, new_tarval_from_long(value, mode));
+}
+
+ir_node *
+new_rd_Id (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *val, ir_mode *mode)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Id(db, block, val, mode);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Proj (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg, ir_mode *mode,
+ long proj)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Proj(db, block, arg, mode, proj);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_defaultProj (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
+ long max_proj)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_defaultProj(db, block, arg, max_proj);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Conv (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *op, ir_mode *mode)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Conv(db, block, op, mode);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Cast (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *op, ir_type *to_tp)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Cast(db, block, op, to_tp);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Tuple (dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node **in)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Tuple(db, block, arity, in);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+NEW_RD_BINOP(Add)
+NEW_RD_BINOP(Sub)
+NEW_RD_UNOP(Minus)
+NEW_RD_BINOP(Mul)
+NEW_RD_DIVOP(Quot)
+NEW_RD_DIVOP(DivMod)
+NEW_RD_DIVOP(Div)
+NEW_RD_DIVOP(Mod)
+NEW_RD_BINOP(And)
+NEW_RD_BINOP(Or)
+NEW_RD_BINOP(Eor)
+NEW_RD_UNOP(Not)
+NEW_RD_BINOP(Shl)
+NEW_RD_BINOP(Shr)
+NEW_RD_BINOP(Shrs)
+NEW_RD_BINOP(Rot)
+NEW_RD_UNOP(Abs)
+NEW_RD_BINOP(Carry)
+NEW_RD_BINOP(Borrow)
+
+ir_node *
+new_rd_Cmp (dbg_info *db, ir_graph *irg, ir_node *block,
+ ir_node *op1, ir_node *op2)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Cmp(db, block, op1, op2);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Jmp (dbg_info *db, ir_graph *irg, ir_node *block)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Jmp(db, block);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_IJmp (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *tgt)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_IJmp(db, block, tgt);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Cond (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *c)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Cond(db, block, c);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Call (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
+ ir_node *callee, int arity, ir_node **in, ir_type *tp)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Call(db, block, store, callee, arity, in, tp);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Return (dbg_info *db, ir_graph *irg, ir_node *block,
+ ir_node *store, int arity, ir_node **in)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Return(db, block, store, arity, in);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Load (dbg_info *db, ir_graph *irg, ir_node *block,
+ ir_node *store, ir_node *adr, ir_mode *mode)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Load(db, block, store, adr, mode);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Store (dbg_info *db, ir_graph *irg, ir_node *block,
+ ir_node *store, ir_node *adr, ir_node *val)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Store(db, block, store, adr, val);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Alloc (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
+ ir_node *size, ir_type *alloc_type, where_alloc where)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Alloc (db, block, store, size, alloc_type, where);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Free (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
+ ir_node *ptr, ir_node *size, ir_type *free_type, where_alloc where)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Free(db, block, store, ptr, size, free_type, where);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block,
+ ir_node *store, ir_node *objptr, entity *ent)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Sel(db, block, store, objptr, 0, NULL, ent);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_Sel (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store, ir_node *objptr,
+ int arity, ir_node **in, entity *ent)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_Sel(db, block, store, objptr, arity, in, ent);
+ current_ir_graph = rem;
+
+ return res;
+}
+
+ir_node *
+new_rd_SymConst_type (dbg_info *db, ir_graph *irg, ir_node *block, symconst_symbol value,
+ symconst_kind symkind, ir_type *tp)
+{
+ ir_node *res;
+ ir_graph *rem = current_ir_graph;
+
+ current_ir_graph = irg;
+ res = new_bd_SymConst_type(db, block, value, symkind, tp);
+ current_ir_graph = rem;