partially revert 2e9fdf8841de40f008697ba8bf711fa3f3f2c0e8
[libfirm] / ir / lower / lower_intrinsics.c
index a185916..e8b677b 100644 (file)
@@ -21,7 +21,6 @@
  * @file
  * @brief   lowering of Calls of intrinsic functions
  * @author  Michael Beck
- * @version $Id$
  */
 #include "config.h"
 
@@ -67,10 +66,10 @@ static void call_mapper(ir_node *node, void *env)
                ir_entity *ent;
 
                symconst = get_Call_ptr(node);
-               if (! is_Global(symconst))
+               if (! is_SymConst_addr_ent(symconst))
                        return;
 
-               ent = get_Global_entity(symconst);
+               ent = get_SymConst_entity(symconst);
                p   = pmap_find(wenv->c_map, ent);
 
                if (p) {
@@ -275,7 +274,7 @@ int i_mapper_bswap(ir_node *call, void *ctx)
 
        irn = new_rd_Builtin(dbg, block, get_irg_no_mem(current_ir_graph), 1, &op, ir_bk_bswap, tp);
        set_irn_pinned(irn, op_pin_state_floats);
-       irn = new_r_Proj(irn, get_irn_mode(op), pn_Builtin_1_result);
+       irn = new_r_Proj(irn, get_irn_mode(op), pn_Builtin_max+1);
        replace_call(irn, call, mem, NULL, NULL);
        return 1;
 }  /* i_mapper_bswap */
@@ -605,8 +604,8 @@ int i_mapper_tanh(ir_node *call, void *ctx)
  */
 static ir_entity *get_const_entity(ir_node *ptr)
 {
-       if (is_Global(ptr)) {
-               ir_entity *ent = get_Global_entity(ptr);
+       if (is_SymConst_addr_ent(ptr)) {
+               ir_entity *ent = get_SymConst_entity(ptr);
 
                if (get_entity_linkage(ent) & IR_LINKAGE_CONSTANT) {
                        /* a constant entity */