[mini] Write barrier liveness fix.
authorMark Probst <mark.probst@gmail.com>
Sat, 21 Aug 2010 21:38:19 +0000 (23:38 +0200)
committerMark Probst <mark.probst@gmail.com>
Sat, 21 Aug 2010 21:38:19 +0000 (23:38 +0200)
We were keeping the wrong register alive in
mono_emit_wb_aware_memcpy().  It needs to be the value, not the
destination pointer.

mono/mini/method-to-ir.c

index 428889f755aabe17c4f3111202dd2dbdeddd0170..d0ee2b74562cdae58f1ac16f87783d537a3c9f07 100644 (file)
@@ -2642,11 +2642,10 @@ mono_emit_wb_aware_memcpy (MonoCompile *cfg, MonoClass *klass, MonoInst *iargs[4
                        mono_emit_method_call (cfg, write_barrier, &iargs [0], NULL);
 
                        MONO_INST_NEW (cfg, dummy_use, OP_DUMMY_USE);
-                       dummy_use->sreg1 = dest_ptr_reg;
+                       dummy_use->sreg1 = tmp_reg;
                        MONO_ADD_INS (cfg->cbb, dummy_use);
                }
 
-
                offset += SIZEOF_VOID_P;
                size -= SIZEOF_VOID_P;
                need_wb >>= 1;