fehler109
[libfirm] / ir / be / mips / bearch_mips.c
index 54ad32a..b525d82 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.
  *
@@ -654,16 +654,17 @@ static void mips_done(void *self)
        free(isa);
 }
 
-static int mips_get_n_reg_class(const void *self)
+static unsigned mips_get_n_reg_class(const void *self)
 {
        (void) self;
        return N_CLASSES;
 }
 
-static const arch_register_class_t *mips_get_reg_class(const void *self, int i)
+static const arch_register_class_t *mips_get_reg_class(const void *self,
+                                                       unsigned i)
 {
        (void) self;
-       assert(i >= 0 && i < N_CLASSES && "Invalid mips register class requested.");
+       assert(i < N_CLASSES);
        return &mips_reg_classes[i];
 }
 
@@ -679,6 +680,7 @@ const arch_register_class_t *mips_get_reg_class_for_mode(const void *self,
                                                          const ir_mode *mode)
 {
        (void) self;
+       (void) mode;
        ASSERT_NO_FLOAT(mode);
        return &mips_reg_classes[CLASS_mips_gp];
 }
@@ -924,7 +926,7 @@ static void mips_get_call_abi(const void *self, ir_type *method_type,
                        be_abi_call_param_reg(abi, i, reg);
                } else {
                        /* default: all parameters on stack */
-                       be_abi_call_param_stack(abi, i, 4, 0, 0);
+                       be_abi_call_param_stack(abi, i, modes[i], 4, 0, 0);
                }
        }