ia32: Remove declarations of non-existent functions.
[libfirm] / ir / be / ia32 / ia32_new_nodes.c
index 6fe2fb6..def52a3 100644 (file)
@@ -54,6 +54,8 @@
 #include "ia32_new_nodes.h"
 #include "gen_ia32_regalloc_if.h"
 
+struct obstack opcodes_obst;
+
 /**
  * Dumper interface for dumping ia32 nodes in vcg.
  * @param n        the node to dump
@@ -125,13 +127,12 @@ static void ia32_dump_node(FILE *F, const ir_node *n, dump_reason_t reason)
 
                case dump_node_nodeattr_txt:
                        if (! is_ia32_Lea(n)) {
-                               if (is_ia32_AddrModeS(n)) {
-                                       fprintf(F, "[AM S] ");
-                               } else if (is_ia32_AddrModeD(n)) {
-                                       fprintf(F, "[AM D] ");
+                               switch (get_ia32_op_type(n)) {
+                               case ia32_Normal:    break;
+                               case ia32_AddrModeS: fprintf(F, "[AM S] "); break;
+                               case ia32_AddrModeD: fprintf(F, "[AM D] "); break;
                                }
                        }
-
                        break;
 
                case dump_node_info_txt:
@@ -772,25 +773,6 @@ void set_ia32_orig_node(ir_node *node, const ir_node *old)
 
 #endif /* NDEBUG */
 
-
-/**
- * Returns whether or not the node is an AddrModeS node.
- */
-int is_ia32_AddrModeS(const ir_node *node)
-{
-       const ia32_attr_t *attr = get_ia32_attr_const(node);
-       return (attr->data.tp == ia32_AddrModeS);
-}
-
-/**
- * Returns whether or not the node is an AddrModeD node.
- */
-int is_ia32_AddrModeD(const ir_node *node)
-{
-       const ia32_attr_t *attr = get_ia32_attr_const(node);
-       return (attr->data.tp == ia32_AddrModeD);
-}
-
 void ia32_swap_left_right(ir_node *node)
 {
        ia32_attr_t *attr  = get_ia32_attr(node);
@@ -1051,7 +1033,7 @@ static unsigned ia32_hash_Immediate(const ir_node *irn)
 {
        const ia32_immediate_attr_t *a = get_ia32_immediate_attr_const(irn);
 
-       return HASH_PTR(a->symconst) + (a->sc_sign << 16) + a->offset;
+       return hash_ptr(a->symconst) + (a->sc_sign << 16) + a->offset;
 }
 
 /** Compare node attributes for Immediates. */
@@ -1114,5 +1096,12 @@ static void ia32_copy_attr(ir_graph *irg, const ir_node *old_node,
        new_info->flags = old_info->flags;
 }
 
+static void ia32_init_op(ir_op *op, unsigned latency)
+{
+       ia32_op_attr_t *attr = OALLOCZ(&opcodes_obst, ia32_op_attr_t);
+       attr->latency = latency;
+       set_op_attr(op, attr);
+}
+
 /* Include the generated constructor functions */
 #include "gen_ia32_new_nodes.c.inl"