Add support for precise unwind info in epilogs on amd64:
[mono.git] / mono / mini / aot-runtime.c
index dc046daf20eede642d6f19017b60642e4a5eac72..3c9064b885d26a203dc19b01836b11e696780383 100644 (file)
@@ -2700,7 +2700,8 @@ mono_aot_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
                mono_aot_unlock ();
        }
 
-       p = amodule->unwind_info + ji->used_regs;
+       /* The upper 16 bits of ji->used_regs might contain the epilog offset */
+       p = amodule->unwind_info + (ji->used_regs & 0xffff);
        *unwind_info_len = decode_value (p, &p);
        return p;
 }