2004-08-05 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Wed, 4 Aug 2004 22:50:40 +0000 (22:50 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 4 Aug 2004 22:50:40 +0000 (22:50 -0000)
* exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.

* mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.

svn path=/trunk/mono/; revision=31909

mono/mini/ChangeLog
mono/mini/exceptions-amd64.c
mono/mini/mini-amd64.c

index 1c9a3f2940884e263ce646b9f02c470abeaec8ec..0b9eb35b3c71f8a106ab2ffc00086e827631f5cd 100644 (file)
@@ -1,3 +1,9 @@
+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
index 6a762fcb3c90392471246b3f50f59f7483be0fea..2144cfd6135e3e86dcd0afc6c9efc3a4b750e76f 100644 (file)
@@ -277,7 +277,7 @@ throw_exception (MonoObject *exc, guint64 rip, guint64 rsp,
 gpointer 
 mono_arch_get_throw_exception (void)
 {
-       static guint8 start [40];
+       static guint8 start [64];
        static int inited = 0;
        guint8 *code;
 
@@ -306,7 +306,7 @@ mono_arch_get_throw_exception (void)
        amd64_call_reg (code, AMD64_R11);
        amd64_breakpoint (code);
 
-       g_assert ((code - start) < 40);
+       g_assert ((code - start) < 64);
        return start;
 }
 
index 383088d15abf855a124958b3e7fa7b799d22ab86..77f5e0f67e56352eacc3336f23a244fc215abd3d 100644 (file)
@@ -765,7 +765,7 @@ mono_arch_allocate_vars (MonoCompile *m)
        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;
@@ -4234,7 +4234,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                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);