+2004-08-05 Zoltan Varga <vargaz@freemail.hu>
+
+ * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
+
+ * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
+
Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
* mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
gpointer
mono_arch_get_throw_exception (void)
{
- static guint8 start [40];
+ static guint8 start [64];
static int inited = 0;
guint8 *code;
amd64_call_reg (code, AMD64_R11);
amd64_breakpoint (code);
- g_assert ((code - start) < 40);
+ g_assert ((code - start) < 64);
return start;
}
if (m->method->save_lmf) {
/* Reserve stack space for saving LMF + argument regs */
offset += sizeof (MonoLMF);
- if (!lmf_tls_offset)
+ if (lmf_tls_offset == -1)
/* Need to save argument regs too */
offset += (AMD64_NREG * 8) + (8 * 8);
m->arch.lmf_offset = offset;
amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r14), AMD64_R14, 8);
amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r15), AMD64_R15, 8);
- if (lmf_tls_offset) {
+ if (lmf_tls_offset != -1) {
/* Load lmf quicky using the FS register */
x86_prefix (code, X86_FS_PREFIX);
amd64_mov_reg_mem (code, AMD64_RAX, 0, 8);