Author: zoltan Date: 2008-02-19 18:59:22 -0500 (Tue, 19 Feb 2008) New Revision: 96208
Modified: trunk/mono/mono/mini/ChangeLog trunk/mono/mono/mini/mini-sparc.c trunk/mono/mono/mini/mini-sparc.h Log: 2008-02-20 Zoltan Varga <[EMAIL PROTECTED]> * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by the int<->float conversion opcodes instead of using mono_spillvar_offset_float (). Modified: trunk/mono/mono/mini/ChangeLog =================================================================== --- trunk/mono/mono/mini/ChangeLog 2008-02-19 23:59:12 UTC (rev 96207) +++ trunk/mono/mono/mini/ChangeLog 2008-02-19 23:59:22 UTC (rev 96208) @@ -1,5 +1,8 @@ 2008-02-20 Zoltan Varga <[EMAIL PROTECTED]> + * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by + the int<->float conversion opcodes instead of using mono_spillvar_offset_float (). + * mini-codegen.c: Eliminate rassign macro which is no longer needed. * mini-codegen.c: Remove unused mono_regstate2_... functions. Modified: trunk/mono/mono/mini/mini-sparc.c =================================================================== --- trunk/mono/mono/mini/mini-sparc.c 2008-02-19 23:59:12 UTC (rev 96207) +++ trunk/mono/mono/mini/mini-sparc.c 2008-02-19 23:59:22 UTC (rev 96208) @@ -162,9 +162,6 @@ static gpointer mono_arch_get_lmf_addr (void); -static int -mono_spillvar_offset_float (MonoCompile *cfg, int spillvar); - const char* mono_arch_regname (int reg) { static const char * rnames[] = { @@ -994,6 +991,11 @@ } } + /* Add a properly aligned dword for use by int<->float conversion opcodes */ + offset += 8; + offset = ALIGN_TO (offset, 8); + cfg->arch.float_spill_slot_offset = offset; + /* * spillvars are stored between the normal locals and the storage reserved * by the ABI. @@ -1001,10 +1003,6 @@ cfg->stack_offset = offset; - /* Add a properly aligned dword for use by int<->float conversion opcodes */ - cfg->spill_count ++; - mono_spillvar_offset_float (cfg, 0); - g_free (cinfo); } @@ -1731,25 +1729,6 @@ { } -static int -mono_spillvar_offset_float (MonoCompile *cfg, int spillvar) -{ - MonoSpillInfo **si, *info; - - g_assert (spillvar == 0); - - si = &cfg->spill_info_float; - - if (!*si) { - *si = info = mono_mempool_alloc (cfg->mempool, sizeof (MonoSpillInfo)); - cfg->stack_offset += sizeof (double); - cfg->stack_offset = ALIGN_TO (cfg->stack_offset, 8); - info->offset = - cfg->stack_offset; - } - - return MONO_SPARC_STACK_BIAS + (*si)->offset; -} - /* FIXME: Strange loads from the stack in basic-float.cs:test_2_rem */ static void @@ -3293,7 +3272,7 @@ break; } case OP_ICONV_TO_R4: { - gint32 offset = mono_spillvar_offset_float (cfg, 0); + gint32 offset = cfg->arch.float_spill_slot_offset; #ifdef SPARCV9 if (!sparc_is_imm13 (offset)) { sparc_set (code, offset, sparc_o7); @@ -3319,7 +3298,7 @@ break; } case OP_ICONV_TO_R8: { - gint32 offset = mono_spillvar_offset_float (cfg, 0); + gint32 offset = cfg->arch.float_spill_slot_offset; #ifdef SPARCV9 if (!sparc_is_imm13 (offset)) { sparc_set (code, offset, sparc_o7); @@ -3353,7 +3332,7 @@ #endif case OP_FCONV_TO_I4: case OP_FCONV_TO_U4: { - gint32 offset = mono_spillvar_offset_float (cfg, 0); + gint32 offset = cfg->arch.float_spill_slot_offset; sparc_fdtoi (code, ins->sreg1, FP_SCRATCH_REG); if (!sparc_is_imm13 (offset)) { sparc_set (code, offset, sparc_o7); @@ -3514,7 +3493,7 @@ EMIT_FLOAT_COND_BRANCH (ins, sparc_fbu, 1, 1); break; case OP_CKFINITE: { - gint32 offset = mono_spillvar_offset_float (cfg, 0); + gint32 offset = cfg->arch.float_spill_slot_offset; if (!sparc_is_imm13 (offset)) { sparc_set (code, offset, sparc_o7); sparc_stdf (code, ins->sreg1, sparc_sp, sparc_o7); Modified: trunk/mono/mono/mini/mini-sparc.h =================================================================== --- trunk/mono/mono/mini/mini-sparc.h 2008-02-19 23:59:12 UTC (rev 96207) +++ trunk/mono/mono/mini/mini-sparc.h 2008-02-19 23:59:22 UTC (rev 96208) @@ -83,6 +83,7 @@ typedef struct MonoCompileArch { gint32 lmf_offset; gint32 localloc_offset; + gint32 float_spill_slot_offset; } MonoCompileArch; #define MONO_CONTEXT_SET_IP(ctx,eip) do { (ctx)->ip = (gpointer)(eip); } while (0); _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches