Implement column number support in sdb.
[mono.git] / mono / mini / mini-hppa.c
index 807943c080efb1d70ed528d66d0173b59ca45395..3f72c551723e9ab3dfcd7fb2f7c9e2d65b7ee3e6 100644 (file)
@@ -161,7 +161,7 @@ void
 mono_arch_cpu_init (void)
 {
        guint32 dummy;
-       mono_arch_cpu_optimizazions(&dummy);
+       mono_arch_cpu_optimizations(&dummy);
 }
 
 /*
@@ -184,13 +184,26 @@ mono_arch_cleanup (void)
  * This function returns the optimizations supported on this cpu.
  */
 guint32
-mono_arch_cpu_optimizazions (guint32 *exclude_mask)
+mono_arch_cpu_optimizations (guint32 *exclude_mask)
 {
        guint32 opts = 0;
        *exclude_mask = 0;
        return opts;
 }
 
+/*
+ * This function test for all SIMD functions supported.
+ *
+ * Returns a bitmask corresponding to all supported versions.
+ *
+ */
+guint32
+mono_arch_cpu_enumerate_simd_versions (void)
+{
+       /* SIMD is currently unimplemented */
+       return 0;
+}
+
 void
 mono_arch_flush_icache (guint8 *code, gint size)
 {
@@ -355,7 +368,7 @@ handle_enum:
                        
                case MONO_TYPE_VALUETYPE:
                        if (type->data.klass->enumtype) {
-                               type = type->data.klass->enum_basetype;
+                               type = mono_class_enum_basetype (type->data.klass);
                                goto handle_enum;
                        }
                        /* Fall through */
@@ -521,7 +534,7 @@ mono_arch_allocate_vars (MonoCompile *m)
        DEBUG_FUNC_ENTER();
        m->flags |= MONO_CFG_HAS_SPILLUP;
 
-       header = mono_method_get_header (m->method);
+       header = m->header;
 
        sig = mono_method_signature (m->method);
        DEBUG (printf ("Allocating locals - incoming params:\n"));
@@ -1112,7 +1125,7 @@ emit_memcpy (guint32 *code, int doff, int dreg, int soff, int sreg, int size)
  *  Determine the vtable slot used by a virtual call.
  */
 gpointer*
-mono_arch_get_vcall_slot_addr (guint8 *code8, gpointer *regs)
+mono_arch_get_vcall_slot_addr (guint8 *code8, mgreg_t *regs)
 {
        guint32 *code = (guint32*)((unsigned long)code8 & ~3);
 
@@ -1154,21 +1167,13 @@ mono_arch_get_vcall_slot_addr (guint8 *code8, gpointer *regs)
 } while (0)
 
 #define EMIT_COND_BRANCH_FLAGS(ins,r1,r2,b0,b1) do {\
-       if (ins->flags & MONO_INST_BRLABEL) { \
-               mono_add_patch_info (cfg, (guint8*)code - cfg->native_code, MONO_PATCH_INFO_LABEL, ins->inst_i0); \
-               if (b0) \
-                       hppa_combt (code, r1, r2, b1, 0); \
-               else \
-                       hppa_combf (code, r1, r2, b1, 0); \
-       } else { \
-               if (b0) \
-                       hppa_combf (code, r1, r2, b1, 2); \
-               else \
-                       hppa_combt (code, r1, r2, b1, 2); \
-               hppa_nop (code); \
-               mono_add_patch_info (cfg, (guint8*)code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb); \
-               hppa_bl (code, 0, hppa_r0); \
-       } \
+       if (b0) \
+               hppa_combf (code, r1, r2, b1, 2); \
+       else \
+               hppa_combt (code, r1, r2, b1, 2); \
+       hppa_nop (code); \
+       mono_add_patch_info (cfg, (guint8*)code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb); \
+       hppa_bl (code, 0, hppa_r0); \
        hppa_nop (code); \
 } while (0)
 
@@ -1177,10 +1182,7 @@ mono_arch_get_vcall_slot_addr (guint8 *code8, gpointer *regs)
 #define EMIT_FLOAT_COND_BRANCH_FLAGS(ins,r1,r2,b0) do {\
        hppa_fcmp (code, HPPA_FP_FMT_DBL, b0, r1, r2); \
        hppa_ftest (code, 0); \
-       if (ins->flags & MONO_INST_BRLABEL) \
-               mono_add_patch_info (cfg, (guint8*)code - cfg->native_code, MONO_PATCH_INFO_LABEL, ins->inst_i0); \
-       else \
-               mono_add_patch_info (cfg, (guint8*)code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb); \
+       mono_add_patch_info (cfg, (guint8*)code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb); \
        hppa_bl (code, 8, hppa_r0); \
        hppa_nop (code); \
 } while (0)
@@ -1275,7 +1277,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        cfg->code_size *= 2;
                        cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
                        code = (guint32*)(cfg->native_code + offset);
-                       mono_jit_stats.code_reallocs++;
+                       cfg->stat_code_reallocs++;
                }
                code_start = (guint8*)code;
                //      if (ins->cil_code)
@@ -1725,11 +1727,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_BR: {
                        guint32 target;
                        DEBUG (printf ("target: %p, next: %p, curr: %p, last: %p\n", ins->inst_target_bb, bb->next_bb, ins, bb->last_ins));
-                       if (ins->flags & MONO_INST_BRLABEL) {
-                               mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_LABEL, ins->inst_i0);
-                       } else {
-                               mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_BB, ins->inst_target_bb);
-                       }
+                       mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_BB, ins->inst_target_bb);
                        hppa_bl (code, 8, hppa_r0); 
                        /* TODO: if the branch is too long, we may need to
                         * use a long-branch sequence:
@@ -2054,7 +2052,7 @@ mono_arch_register_lowlevel_calls (void)
 }
 
 void
-mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, MonoCodeManager *dyn_code_mp, gboolean run_cctors)
 {
        MonoJumpInfo *patch_info;
 
@@ -2131,7 +2129,7 @@ enum {
 };
 
 void*
-mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean enable_arguments)
+mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolean enable_arguments, gboolean preserve_argument_registers)
 {
        guint32 *code = (guint32*)p;
        DEBUG_FUNC_ENTER();
@@ -2610,7 +2608,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
        while (cfg->code_len + max_epilog_size > (cfg->code_size - 16)) {
                cfg->code_size *= 2;
                cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
-               mono_jit_stats.code_reallocs++;
+               cfg->stat_code_reallocs++;
        }
 
        code = (guint32*)(cfg->native_code + cfg->code_len);
@@ -2766,7 +2764,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
        while (cfg->code_len + max_epilog_size > (cfg->code_size - 16)) {
                cfg->code_size *= 2;
                cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
-               mono_jit_stats.code_reallocs++;
+               cfg->stat_code_reallocs++;
        }
 
        code = cfg->native_code + cfg->code_len;
@@ -2849,7 +2847,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
 #endif
 
 void
-mono_arch_setup_jit_tls_data (MonoJitTlsData *tls)
+mono_arch_finish_init (void)
 {
 }
 
@@ -2942,11 +2940,6 @@ MonoInst* mono_arch_get_domain_intrinsic (MonoCompile* cfg)
        return NULL;
 }
 
-MonoInst* mono_arch_get_thread_intrinsic (MonoCompile* cfg)
-{
-       return NULL;
-}
-
 gpointer
 mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
 {