warning fixes
[libfirm] / ir / be / arm / arm_new_nodes.c
index 9b2212e..d7ad4b4 100644 (file)
@@ -41,7 +41,7 @@
  * Returns the shift modifier string.
  */
 const char *arm_shf_mod_name(arm_shift_modifier mod) {
-  static const char *names[] = { NULL, NULL, "ASR", "LSL", "LSR", "ROR", "RRX" };
+  static const char *names[] = { NULL, NULL, "asr", "lsl", "lsr", "ror", "rrx" };
        return names[mod];
 }
 
@@ -131,7 +131,6 @@ static void dump_reg_req(FILE *F, ir_node *n, const arm_register_req_t **reqs, i
        }
 }
 
-
 /**
  * Dumper interface for dumping arm nodes in vcg.
  * @param n        the node to dump
@@ -139,7 +138,7 @@ static void dump_reg_req(FILE *F, ir_node *n, const arm_register_req_t **reqs, i
  * @param reason   indicates which kind of information should be dumped
  * @return 0 on success or != 0 on failure
  */
-static int dump_node_arm(ir_node *n, FILE *F, dump_reason_t reason) {
+static int arm_dump_node(ir_node *n, FILE *F, dump_reason_t reason) {
        ir_mode     *mode = NULL;
        int          bad  = 0;
        int          i;
@@ -227,10 +226,10 @@ static int dump_node_arm(ir_node *n, FILE *F, dump_reason_t reason) {
 
                        if (get_arm_value(n)) {
                                if (is_arm_CopyB(n)) {
-                                       fprintf(F, "size = %u\n", get_tarval_long(get_arm_value(n)));
+                                       fprintf(F, "size = %lu\n", get_tarval_long(get_arm_value(n)));
                                } else {
                                        if (mode_is_float(get_irn_mode(n))) {
-                                               fprintf(F, "float value = (%lf)\n", get_tarval_double(get_arm_value(n)));
+                                               fprintf(F, "float value = (%f)\n", (double) get_tarval_double(get_arm_value(n)));
                                        } else if (mode_is_int(get_irn_mode(n))) {
                                                long v =  get_tarval_long(get_arm_value(n));
                                                fprintf(F, "long value = %ld (0x%08lx)\n", v, v);
@@ -500,19 +499,21 @@ arm_shift_modifier get_arm_shift_modifier(ir_node *node) {
 
 /* Set the ARM machine node attributes to default values. */
 void init_arm_attributes(ir_node *node, int flags, const arm_register_req_t ** in_reqs,
-                                                const arm_register_req_t ** out_reqs, int n_res) {
+                                                const arm_register_req_t ** out_reqs, const be_execution_unit_t ***execution_units,
+                                                int n_res, unsigned latency) {
        arm_attr_t *attr = get_arm_attr(node);
        attr->in_req           = in_reqs;
        attr->out_req          = out_reqs;
        attr->n_res            = n_res;
        attr->flags            = flags;
-       attr->slots            = xcalloc(n_res, sizeof(attr->slots[0]));
        attr->instr_fl         = (ARM_COND_AL << 3) | ARM_SHF_NONE;
        attr->value            = NULL;
        attr->proj_num         = -42;
        attr->symconst_label   = NULL;
        attr->n_projs          = 0;
        attr->default_proj_num = 0;
+
+       memset((void *)attr->slots, 0, n_res * sizeof(attr->slots[0]));
 }
 
 static int arm_comp_condJmp(arm_attr_t *attr_a, arm_attr_t *attr_b) {
@@ -588,7 +589,7 @@ ir_node *new_r_arm_StoreStackMInc(ir_graph *irg, ir_node *block, ir_node *mem, i
   flags |= arch_irn_flags_rematerializable;   /* op can be easily recalculated */
 
   /* init node attributes */
-  init_arm_attributes(res, flags, _in_req_arm_StoreStackM4Inc, NULL, 0);
+  init_arm_attributes(res, flags, _in_req_arm_StoreStackM4Inc, NULL, NULL, 0, 1);
 
   res = optimize_node(res);
   irn_vrfy_irg(res, irg);
@@ -612,7 +613,7 @@ typedef struct _opt_tuple {
        ir_op *op_shf_right;    /**< shift operand on right */
 } opt_tuple;
 
-static const opt_tuple *opt_ops[iro_arm_last];
+//static const opt_tuple *opt_ops[iro_arm_last];
 
 void arm_set_optimizers(void) {
        /*