Merge pull request #2802 from BrzVlad/feature-evacuation-opt2
[mono.git] / mono / mini / liveness.c
index ee87dfa082ad509892177d58242c5dc7bf962971..c897893074057b178071b619e5420ae7a36b5b6e 100644 (file)
@@ -6,6 +6,7 @@
  *
  * (C) 2002 Ximian, Inc.
  * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
 #include <config.h>
@@ -103,8 +104,8 @@ visit_bb (MonoCompile *cfg, MonoBasicBlock *bb, GSList **visited)
                        cfg->varinfo [vi->idx]->flags |= MONO_INST_VOLATILE;
                        if (SIZEOF_REGISTER == 4 && (var->type == STACK_I8 || (var->type == STACK_R8 && COMPILE_SOFT_FLOAT (cfg)))) {
                                /* Make the component vregs volatile as well (#612206) */
-                               get_vreg_to_inst (cfg, var->dreg + 1)->flags |= MONO_INST_VOLATILE;
-                               get_vreg_to_inst (cfg, var->dreg + 2)->flags |= MONO_INST_VOLATILE;
+                               get_vreg_to_inst (cfg, MONO_LVREG_LS (var->dreg))->flags |= MONO_INST_VOLATILE;
+                               get_vreg_to_inst (cfg, MONO_LVREG_MS (var->dreg))->flags |= MONO_INST_VOLATILE;
                        }
                }
                        
@@ -122,8 +123,8 @@ visit_bb (MonoCompile *cfg, MonoBasicBlock *bb, GSList **visited)
                                cfg->varinfo [vi->idx]->flags |= MONO_INST_VOLATILE;
                                if (SIZEOF_REGISTER == 4 && (var->type == STACK_I8 || (var->type == STACK_R8 && COMPILE_SOFT_FLOAT (cfg)))) {
                                        /* Make the component vregs volatile as well (#612206) */
-                                       get_vreg_to_inst (cfg, var->dreg + 1)->flags |= MONO_INST_VOLATILE;
-                                       get_vreg_to_inst (cfg, var->dreg + 2)->flags |= MONO_INST_VOLATILE;
+                                       get_vreg_to_inst (cfg, MONO_LVREG_LS (var->dreg))->flags |= MONO_INST_VOLATILE;
+                                       get_vreg_to_inst (cfg, MONO_LVREG_MS (var->dreg))->flags |= MONO_INST_VOLATILE;
                                }
                        }
                }