- case OP_LDADDR:
- g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), ins);
- if (cfg->verbose_level > 2) { printf ("New address: "); mono_print_ins (ins); }
+ case OP_LDADDR: {
+ MonoInst *var = (MonoInst*)ins->inst_p0;
+ if (var->flags & MONO_INST_VOLATILE) {
+ if (cfg->verbose_level > 2) { printf ("Found address to volatile var, can't take it: "); mono_print_ins (ins); }
+ } else {
+ g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), ins);
+ if (cfg->verbose_level > 2) { printf ("New address: "); mono_print_ins (ins); }
+ }