2007-10-10 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / mini / mini-x86.c
index 25565d57a6ae54d4c7cd0671875b1d1b6263134f..4934e8a7eeb07f03883b098395c6671939a67a94 100644 (file)
@@ -258,6 +258,7 @@ get_call_info (MonoCompile *cfg, MonoMemPool *mp, MonoMethodSignature *sig, gboo
        /* return value */
        {
                ret_type = mono_type_get_underlying_type (sig->ret);
+               ret_type = mini_get_basic_type_from_generic (cfg, ret_type);
                switch (ret_type->type) {
                case MONO_TYPE_BOOLEAN:
                case MONO_TYPE_I1:
@@ -314,12 +315,6 @@ get_call_info (MonoCompile *cfg, MonoMemPool *mp, MonoMethodSignature *sig, gboo
                case MONO_TYPE_VOID:
                        cinfo->ret.storage = ArgNone;
                        break;
-               case MONO_TYPE_VAR:
-               case MONO_TYPE_MVAR:
-                       g_assert (cfg->generic_shared);
-                       cinfo->ret.storage = ArgInIReg;
-                       cinfo->ret.reg = X86_EAX;
-                       break;
                default:
                        g_error ("Can't handle as return value 0x%x", sig->ret->type);
                }
@@ -359,6 +354,7 @@ get_call_info (MonoCompile *cfg, MonoMemPool *mp, MonoMethodSignature *sig, gboo
                        continue;
                }
                ptype = mono_type_get_underlying_type (sig->params [i]);
+               ptype = mini_get_basic_type_from_generic (cfg, ptype);
                switch (ptype->type) {
                case MONO_TYPE_BOOLEAN:
                case MONO_TYPE_I1:
@@ -408,11 +404,6 @@ get_call_info (MonoCompile *cfg, MonoMemPool *mp, MonoMethodSignature *sig, gboo
                case MONO_TYPE_R8:
                        add_float (&fr, &stack_size, ainfo, TRUE);
                        break;
-               case MONO_TYPE_VAR:
-               case MONO_TYPE_MVAR:
-                       g_assert (cfg->generic_shared);
-                       add_general (&gr, &stack_size, ainfo);
-                       break;
                default:
                        g_error ("unexpected type 0x%x", ptype->type);
                        g_assert_not_reached ();