In mono/mini:
authorRobert Jordan <robertj@gmx.net>
Sun, 9 Dec 2007 17:43:59 +0000 (17:43 -0000)
committerRobert Jordan <robertj@gmx.net>
Sun, 9 Dec 2007 17:43:59 +0000 (17:43 -0000)
2007-12-09  Robert Jordan  <robertj@gmx.net>

* mini-x86.c (mono_arch_emit_epilog):
Consider all kinds of 64-bit types. Fixes #323114.

In mono/tests:
2007-12-09  Robert Jordan  <robertj@gmx.net>

* bug-323114.cs: Add test case for #323114.

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

mono/mini/ChangeLog
mono/mini/mini-x86.c
mono/tests/ChangeLog
mono/tests/Makefile.am
mono/tests/bug-323114.cs [new file with mode: 0644]

index f22c56c0ff4acc21116126a1b86f0448f9157065..38b9ef693e8e0c2396b4547bf3509c3dc2a6234f 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-09  Robert Jordan  <robertj@gmx.net>
+
+       * mini-x86.c (mono_arch_emit_epilog):
+       Consider all kinds of 64-bit types. Fixes #323114.
+
 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
 
        * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
index d2f154658ae0c348b7d7c6b124686ec000087859..8c65ead58a850e2f1c6bed286d265ef95f5ba8f5 100644 (file)
@@ -3914,7 +3914,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
                        x86_mov_mem_reg (code, lmf_tls_offset, X86_ECX, 4);
                } else {
                        /* Find a spare register */
-                       switch (sig->ret->type) {
+                       switch (mono_type_get_underlying_type (sig->ret)->type) {
                        case MONO_TYPE_I8:
                        case MONO_TYPE_U8:
                                prev_lmf_reg = X86_EDI;
index 3dfa7e4cc8fc500a321d98008078ebb7ada00f02..8f8c887a49c601f43f78e3cf097609fd99eccaa5 100644 (file)
@@ -1,3 +1,7 @@
+2007-12-09  Robert Jordan  <robertj@gmx.net>
+
+       * bug-323114.cs: Add test case for #323114.
+
 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
 
        * pinvoke2.cs: Fix the names of two tests.
index 79731eea71cd99d74a00bea29b3ecb1fdea99e9c..c743e5bcf60eee898e0689e0a307f1e0f7db278a 100644 (file)
@@ -215,6 +215,7 @@ TEST_CS_SRC=                        \
        bug-78653.cs            \
        bug-78656.cs            \
        bug-77127.cs            \
+       bug-323114.cs           \
        bug-331958.cs           \
        interlocked.cs          \
        cross-domain.cs         \
diff --git a/mono/tests/bug-323114.cs b/mono/tests/bug-323114.cs
new file mode 100644 (file)
index 0000000..ef9ff99
--- /dev/null
@@ -0,0 +1,23 @@
+using System;
+
+public enum Enum64 : long
+{
+       A = Int64.MaxValue,
+}
+
+delegate Enum64 EnumDelegate (Enum64 value);
+
+class Test
+{
+       static Enum64 Method (Enum64 value)
+       {
+               return value;
+       }
+
+       static int Main ()
+       {
+               EnumDelegate d = new EnumDelegate (Method);
+               Enum64 r = d.EndInvoke (d.BeginInvoke (Enum64.A, null, null));
+               return r == Enum64.A ? 0 : 1;
+       }
+}