mobile/System.dll: Add BindingList<T>
[mono.git] / mono / mini / mini-sparc.c
index aefde7dfc14175d376efbb2f4b7c02460a39d8b2..12150ca1eb6f75ed24be0269957c7b8f4a37cb58 100644 (file)
@@ -204,7 +204,7 @@ mono_arch_cpu_init (void)
 {
        guint32 dummy;
        /* make sure sparcv9 is initialized for embedded use */
-       mono_arch_cpu_optimizazions(&dummy);
+       mono_arch_cpu_optimizations(&dummy);
 }
 
 /*
@@ -227,7 +227,7 @@ 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)
 {
        char buf [1024];
        guint32 opts = 0;
@@ -264,6 +264,19 @@ mono_arch_cpu_optimizazions (guint32 *exclude_mask)
        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;
+}
+
 #ifdef __GNUC__
 #define flushi(addr)    __asm__ __volatile__ ("iflush %0"::"r"(addr):"memory")
 #else /* assume Sun's compiler */
@@ -2259,19 +2272,6 @@ mono_sparc_is_virtual_call (guint32 *code)
        return FALSE;
 }
 
-/*
- * mono_arch_get_vcall_slot:
- *
- *  Determine the vtable slot used by a virtual call.
- */
-gpointer
-mono_arch_get_vcall_slot (guint8 *code8, mgreg_t *regs, int *displacement)
-{
-       /* Not used on sparc */
-       g_assert_not_reached ();
-       return NULL;
-}
-
 #define CMP_SIZE 3
 #define BR_SMALL_SIZE 2
 #define BR_LARGE_SIZE 2
@@ -2329,8 +2329,12 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckI
                                item->jmp_code = (guint8*)code;
                                sparc_branch (code, 0, sparc_bne, 0);
                                sparc_nop (code);
-                               sparc_set (code, ((guint32)(&(vtable->vtable [item->value.vtable_slot]))), sparc_g5);
-                               sparc_ld (code, sparc_g5, 0, sparc_g5);
+                               if (item->has_target_code) {
+                                       sparc_set (code, item->value.target_code, sparc_f5);
+                               } else {
+                                       sparc_set (code, ((guint32)(&(vtable->vtable [item->value.vtable_slot]))), sparc_g5);
+                                       sparc_ld (code, sparc_g5, 0, sparc_g5);
+                               }
                                sparc_jmpl (code, sparc_g5, sparc_g0, sparc_g0);
                                sparc_nop (code);
 
@@ -2390,7 +2394,7 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
 }
 
 gpointer
-mono_arch_get_this_arg_from_call (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, mgreg_t *regs, guint8 *code)
+mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
 {
        mono_sparc_flushw ();
 
@@ -3689,7 +3693,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;
 
@@ -4129,7 +4133,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);
@@ -4219,7 +4223,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
        while (cfg->code_len + code_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);
@@ -4357,7 +4361,7 @@ mono_arch_get_lmf_addr (void)
 #endif
 
 void
-mono_arch_setup_jit_tls_data (MonoJitTlsData *tls)
+mono_arch_finish_init (void)
 {
        if (!lmf_addr_key_inited) {
                int res;
@@ -4405,7 +4409,7 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
  * Returns the size of the activation frame.
  */
 int
-mono_arch_get_argument_info (MonoMethodSignature *csig, int param_count, MonoJitArgumentInfo *arg_info)
+mono_arch_get_argument_info (MonoGenericSharingContext *gsctx, MonoMethodSignature *csig, int param_count, MonoJitArgumentInfo *arg_info)
 {
        int k, align;
        CallInfo *cinfo;
@@ -4441,7 +4445,7 @@ MonoInst* mono_arch_get_domain_intrinsic (MonoCompile* cfg)
        return NULL;
 }
 
-gpointer
+mgreg_t
 mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
 {
        /* FIXME: implement */