Author: lupus
Date: 2007-03-23 14:26:57 -0500 (Fri, 23 Mar 2007)
New Revision: 74906
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini-codegen.c
Log:
Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <[EMAIL PROTECTED]>
* mini-codegen.c: make sure the right spill amount is
used for fp or integer registers (fixes the float_sub_spill() on ppc).
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2007-03-23 19:18:02 UTC (rev 74905)
+++ trunk/mono/mono/mini/ChangeLog 2007-03-23 19:26:57 UTC (rev 74906)
@@ -1,4 +1,9 @@
+Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * mini-codegen.c: make sure the right spill amount is
+ used for fp or integer registers (fixes the float_sub_spill() on ppc).
+
Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <[EMAIL PROTECTED]>
* mini-ppc.c: fixes for the fp_branch_nan test.
Modified: trunk/mono/mono/mini/mini-codegen.c
===================================================================
--- trunk/mono/mono/mini/mini-codegen.c 2007-03-23 19:18:02 UTC (rev 74905)
+++ trunk/mono/mono/mini/mini-codegen.c 2007-03-23 19:26:57 UTC (rev 74906)
@@ -214,7 +214,7 @@
* spill variable if necessary.
*/
static inline int
-mono_spillvar_offset (MonoCompile *cfg, int spillvar)
+mono_spillvar_offset_int (MonoCompile *cfg, int spillvar)
{
MonoSpillInfo *info;
@@ -243,8 +243,6 @@
return info->offset;
}
-#if MONO_ARCH_USE_FPSTACK
-
/*
* returns the offset used by spillvar. It allocates a new
* spill float variable if necessary.
@@ -280,6 +278,17 @@
return info->offset;
}
+static inline int
+mono_spillvar_offset (MonoCompile *cfg, int spillvar, gboolean fp)
+{
+ if (fp)
+ return mono_spillvar_offset_float (cfg, spillvar);
+ else
+ return mono_spillvar_offset_int (cfg, spillvar);
+}
+
+#if MONO_ARCH_USE_FPSTACK
+
/*
* Creates a store for spilled floating point items
*/
@@ -525,7 +534,7 @@
MONO_INST_NEW (cfg, load, OP_LOAD_MEMBASE);
load->dreg = sel;
load->inst_basereg = cfg->frame_reg;
- load->inst_offset = mono_spillvar_offset (cfg, spill);
+ load->inst_offset = mono_spillvar_offset (cfg, spill, fp);
insert_after_ins (ins, item, load);
DEBUG (printf ("SPILLED LOAD (%d at 0x%08lx(%%ebp)) R%d (freed %s)\n",
spill, (long)load->inst_offset, i, mono_regname_full (sel, fp)));
if (fp)
@@ -613,7 +622,7 @@
MONO_INST_NEW (cfg, load, fp ? OP_LOADR8_MEMBASE : OP_LOAD_MEMBASE);
load->dreg = sel;
load->inst_basereg = cfg->frame_reg;
- load->inst_offset = mono_spillvar_offset (cfg, spill);
+ load->inst_offset = mono_spillvar_offset (cfg, spill, fp);
insert_after_ins (ins, item, load);
DEBUG (printf ("\tSPILLED LOAD (%d at 0x%08lx(%%ebp)) R%d (freed
%s)\n", spill, (long)load->inst_offset, i, mono_regname_full (sel, fp)));
if (fp)
@@ -683,7 +692,7 @@
MONO_INST_NEW (cfg, store, fp ? OP_STORER8_MEMBASE_REG :
OP_STORE_MEMBASE_REG);
store->sreg1 = reg;
store->inst_destbasereg = cfg->frame_reg;
- store->inst_offset = mono_spillvar_offset (cfg, spill);
+ store->inst_offset = mono_spillvar_offset (cfg, spill, fp);
if (ins) {
store->next = ins->next;
ins->next = store;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches