added include for harness.c
[libfirm] / ir / be / arm / bearch_arm.c
index ee33974..64f0022 100644 (file)
@@ -535,7 +535,7 @@ void arm_global_init(void) {
 
     map_Div->kind     = INTRINSIC_INSTR;
     map_Div->op       = op_Div;
-    map_Div->i_mapper = i_mapper_RuntimeCall;
+    map_Div->i_mapper = (i_mapper_func)i_mapper_RuntimeCall;
     map_Div->ctx      = &rt_Div;
   }
   {
@@ -558,7 +558,7 @@ void arm_global_init(void) {
 
     map_Div->kind     = INTRINSIC_INSTR;
     map_Div->op       = op_Div;
-    map_Div->i_mapper = i_mapper_RuntimeCall;
+    map_Div->i_mapper = (i_mapper_func)i_mapper_RuntimeCall;
     map_Div->ctx      = &rt_Div;
   }
   {
@@ -581,7 +581,7 @@ void arm_global_init(void) {
 
     map_Mod->kind     = INTRINSIC_INSTR;
     map_Mod->op       = op_Mod;
-    map_Mod->i_mapper = i_mapper_RuntimeCall;
+    map_Mod->i_mapper = (i_mapper_func)i_mapper_RuntimeCall;
     map_Mod->ctx      = &rt_Mod;
   }
   {
@@ -604,7 +604,7 @@ void arm_global_init(void) {
 
     map_Mod->kind     = INTRINSIC_INSTR;
     map_Mod->op       = op_Mod;
-    map_Mod->i_mapper = i_mapper_RuntimeCall;
+    map_Mod->i_mapper = (i_mapper_func)i_mapper_RuntimeCall;
     map_Mod->ctx      = &rt_Mod;
   }
 
@@ -887,13 +887,14 @@ void arm_get_call_abi(const void *self, ir_type *method_type, be_abi_call_t *abi
        ir_mode  *mode;
        int       i;
        int       n = get_method_n_params(method_type);
-//     const arch_register_t *reg;
        be_abi_call_flags_t flags = {
-               0, /* store from left to right */
-               0, /* store arguments sequential */
-               1, /* try to omit the frame pointer */
-               1, /* the function can use any register as frame pointer */
-               1  /* a call can take the callee's address as an immediate */
+               {
+                       0, /* store from left to right */
+                       0, /* store arguments sequential */
+                       1, /* try to omit the frame pointer */
+                       1, /* the function can use any register as frame pointer */
+                       1  /* a call can take the callee's address as an immediate */
+               }
        };
 
        /* set stack parameter passing style */
@@ -954,6 +955,14 @@ static const list_sched_selector_t *arm_get_list_sched_selector(const void *self
        return &arm_sched_selector;
 }
 
+/**
+ * Returns the necessary byte alignment for storing a register of given class.
+ */
+static int arm_get_reg_class_alignment(const void *self, const arch_register_class_t *cls) {
+       ir_mode *mode = arch_register_class_mode(cls);
+       return get_mode_size_bytes(mode);
+}
+
 #ifdef WITH_LIBCORE
 static void arm_register_options(lc_opt_entry_t *ent)
 {
@@ -973,4 +982,5 @@ const arch_isa_if_t arm_isa_if = {
        arm_get_irn_handler,
        arm_get_code_generator_if,
        arm_get_list_sched_selector,
+       arm_get_reg_class_alignment
 };