fehler109
[libfirm] / ir / be / arm / bearch_arm.c
index b0bc967..762908c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -27,8 +27,8 @@
 #include "config.h"
 #endif
 
-#include <libcore/lc_opts.h>
-#include <libcore/lc_opts_enum.h>
+#include "lc_opts.h"
+#include "lc_opts_enum.h"
 
 #include "pseudo_irg.h"
 #include "irgwalk.h"
@@ -37,6 +37,7 @@
 #include "ircons.h"
 #include "irgmod.h"
 #include "irgopt.h"
+#include "iroptimize.h"
 #include "lowering.h"
 
 #include "bitset.h"
@@ -819,19 +820,18 @@ static void arm_done(void *self) {
  * here to speed up register allocation (and makes dumps
  * smaller and more readable).
  */
-static int arm_get_n_reg_class(const void *self) {
-       const arm_isa_t *isa = self;
-
-       /* ARGH! is called BEFORE transform */
+static unsigned arm_get_n_reg_class(const void *self) {
+       (void) self;
        return N_CLASSES;
-       return isa->cg->have_fp_insn ? 2 : 1;
 }
 
 /**
  * Return the register class with requested index.
  */
-static const arch_register_class_t *arm_get_reg_class(const void *self, int i) {
+static const arch_register_class_t *arm_get_reg_class(const void *self,
+                                                      unsigned i) {
        (void) self;
+       assert(i < N_CLASSES);
        return &arm_reg_classes[i];
 }
 
@@ -1042,11 +1042,13 @@ void arm_get_call_abi(const void *self, ir_type *method_type, be_abi_call_t *abi
        for (i = 0; i < n; i++) {
                /* reg = get reg for param i;          */
                /* be_abi_call_param_reg(abi, i, reg); */
-               if (i < 4)
-
+               if (i < 4) {
                        be_abi_call_param_reg(abi, i, arm_get_RegParam_reg(i));
-               else
-                       be_abi_call_param_stack(abi, i, 4, 0, 0);
+               } else {
+                       tp   = get_method_param_type(method_type, i);
+                       mode = get_type_mode(tp);
+                       be_abi_call_param_stack(abi, i, mode, 4, 0, 0);
+               }
        }
 
        /* set return registers */
@@ -1118,10 +1120,11 @@ list_sched_selector_t arm_sched_selector;
  */
 static const list_sched_selector_t *arm_get_list_sched_selector(const void *self, list_sched_selector_t *selector) {
        (void) self;
-       (void) selector;
-       arm_sched_selector = reg_pressure_selector;
+       memcpy(&arm_sched_selector, selector, sizeof(arm_sched_selector));
+       /* arm_sched_selector.exectime              = arm_sched_exectime; */
        arm_sched_selector.to_appear_in_schedule = arm_to_appear_in_schedule;
        return &arm_sched_selector;
+
 }
 
 static const ilp_sched_selector_t *arm_get_ilp_sched_selector(const void *self) {