2009-07-30 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Fri, 31 Jul 2009 00:04:16 +0000 (00:04 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 31 Jul 2009 00:04:16 +0000 (00:04 -0000)
cil-opcodes.xml: Fix naming of stelem and ldelem to be
the same of the spec. Fix stack effect of stelem. Change
type of constrained and readonly prefixes.

2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>

* method-to-ir.c: Fix naming of stelem and ldelem.

2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>

* verify.c: Fix naming of stelem and ldelem.

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

mono/cil/ChangeLog
mono/cil/cil-opcodes.xml
mono/cil/opcode.def
mono/metadata/ChangeLog
mono/metadata/verify.c
mono/mini/ChangeLog
mono/mini/method-to-ir.c

index af51f31cbe51fe4993035380ebc2f644d10b5286..17123e0fb817f46f3a34e49d58513bd0d1189cd3 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-30  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       cil-opcodes.xml: Fix naming of stelem and ldelem to be
+       the same of the spec. Fix stack effect of stelem. Change
+       type of constrained and readonly prefixes. 
+
 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
 
        * cil-opcodes.xml: Add an 'icall_addr' opcode.
index 14e34f2ff94d0ca4c9ef85fe9bd528887d91f7a2..25c0e4a330e6e69e0e6cf07bf1a9df1ffb57d00e 100644 (file)
 <opcode name="stelem.r4" input="PopRef+PopI+PopR4" output="Push0" args="InlineNone" o1="0xFF" o2="0xA0" flow="next" type="Objmodel" />
 <opcode name="stelem.r8" input="PopRef+PopI+PopR8" output="Push0" args="InlineNone" o1="0xFF" o2="0xA1" flow="next" type="Objmodel" />
 <opcode name="stelem.ref" input="PopRef+PopI+PopRef" output="Push0" args="InlineNone" o1="0xFF" o2="0xA2" flow="next" type="Objmodel" />
-<opcode name="ldelem.any" input="PopRef+PopI" output="Push1" args="InlineType" o1="0xFF" o2="0xA3" flow="next" type="Objmodel" />
-<opcode name="stelem.any" input="PopRef+PopI+PopRef" output="Push0" args="InlineType" o1="0xFF" o2="0xA4" flow="next" type="Objmodel" />
+<opcode name="ldelem" input="PopRef+PopI" output="Push1" args="InlineType" o1="0xFF" o2="0xA3" flow="next" type="Objmodel" />
+<opcode name="stelem" input="PopRef+PopI+Pop1" output="Push0" args="InlineType" o1="0xFF" o2="0xA4" flow="next" type="Objmodel" />
 <opcode name="unbox.any" input="PopRef" output="Push1" args="InlineType" o1="0xFF" o2="0xA5" flow="next" type="Objmodel" />
 <opcode name="unused5" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA6" flow="next" />
 <opcode name="unused6" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA7" flow="next" />
 <opcode name="volatile." input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x13" flow="meta" type="Prefix" />
 <opcode name="tail." input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x14" flow="meta" type="Prefix" />
 <opcode name="initobj" input="PopI" output="Push0" args="InlineType" o1="0xFE" o2="0x15" flow="next" type="Objmodel" />
-<opcode name="constrained." input="Pop0" output="Push0" args="InlineType" o1="0xFE" o2="0x16" flow="next" type="Prefix" />
+<opcode name="constrained." input="Pop0" output="Push0" args="InlineType" o1="0xFE" o2="0x16" flow="meta" type="Prefix" />
 <opcode name="cpblk" input="PopI+PopI+PopI" output="Push0" args="InlineNone" o1="0xFE" o2="0x17" flow="next" type="Primitive" />
 <opcode name="initblk" input="PopI+PopI+PopI" output="Push0" args="InlineNone" o1="0xFE" o2="0x18" flow="next" type="Primitive" />
 <opcode name="no." input="Pop0" output="Push0" args="ShortInlineI" o1="0xFE" o2="0x19" flow="next" />
 <opcode name="unused" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1B" flow="next" />
 <opcode name="sizeof" input="Pop0" output="PushI" args="InlineType" o1="0xFE" o2="0x1C" flow="next" type="Primitive" />
 <opcode name="refanytype" input="Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x1D" flow="next" type="Primitive" />
-<opcode name="readonly." input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1E" flow="next" />
+<opcode name="readonly." input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1E" flow="meta" />
 <opcode name="unused53" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1F" flow="next" />
 <opcode name="unused54" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x20" flow="next" />
 <opcode name="unused55" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x21" flow="next" />
index 7bffa33a5bc978dbd5537926e0b1b01b91477a29..4eef979fa833d02626682d01cb35faed93c069a7 100644 (file)
@@ -161,8 +161,8 @@ OPDEF(CEE_STELEM_I8, "stelem.i8", PopRef+PopI+PopI8, Push0, InlineNone, X, 1, 0x
 OPDEF(CEE_STELEM_R4, "stelem.r4", PopRef+PopI+PopR4, Push0, InlineNone, X, 1, 0xFF, 0xA0, NEXT)
 OPDEF(CEE_STELEM_R8, "stelem.r8", PopRef+PopI+PopR8, Push0, InlineNone, X, 1, 0xFF, 0xA1, NEXT)
 OPDEF(CEE_STELEM_REF, "stelem.ref", PopRef+PopI+PopRef, Push0, InlineNone, X, 1, 0xFF, 0xA2, NEXT)
-OPDEF(CEE_LDELEM_ANY, "ldelem.any", PopRef+PopI, Push1, InlineType, X, 1, 0xFF, 0xA3, NEXT)
-OPDEF(CEE_STELEM_ANY, "stelem.any", PopRef+PopI+PopRef, Push0, InlineType, X, 1, 0xFF, 0xA4, NEXT)
+OPDEF(CEE_LDELEM, "ldelem", PopRef+PopI, Push1, InlineType, X, 1, 0xFF, 0xA3, NEXT)
+OPDEF(CEE_STELEM, "stelem", PopRef+PopI+Pop1, Push0, InlineType, X, 1, 0xFF, 0xA4, NEXT)
 OPDEF(CEE_UNBOX_ANY, "unbox.any", PopRef, Push1, InlineType, X, 1, 0xFF, 0xA5, NEXT)
 OPDEF(CEE_UNUSED5, "unused5", Pop0, Push0, InlineNone, X, 1, 0xFF, 0xA6, NEXT)
 OPDEF(CEE_UNUSED6, "unused6", Pop0, Push0, InlineNone, X, 1, 0xFF, 0xA7, NEXT)
@@ -276,7 +276,7 @@ OPDEF(CEE_UNALIGNED_, "unaligned.", Pop0, Push0, ShortInlineI, X, 2, 0xFE, 0x12,
 OPDEF(CEE_VOLATILE_, "volatile.", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x13, META)
 OPDEF(CEE_TAIL_, "tail.", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x14, META)
 OPDEF(CEE_INITOBJ, "initobj", PopI, Push0, InlineType, X, 2, 0xFE, 0x15, NEXT)
-OPDEF(CEE_CONSTRAINED_, "constrained.", Pop0, Push0, InlineType, X, 2, 0xFE, 0x16, NEXT)
+OPDEF(CEE_CONSTRAINED_, "constrained.", Pop0, Push0, InlineType, X, 2, 0xFE, 0x16, META)
 OPDEF(CEE_CPBLK, "cpblk", PopI+PopI+PopI, Push0, InlineNone, X, 2, 0xFE, 0x17, NEXT)
 OPDEF(CEE_INITBLK, "initblk", PopI+PopI+PopI, Push0, InlineNone, X, 2, 0xFE, 0x18, NEXT)
 OPDEF(CEE_NO_, "no.", Pop0, Push0, ShortInlineI, X, 2, 0xFE, 0x19, NEXT)
@@ -284,7 +284,7 @@ OPDEF(CEE_RETHROW, "rethrow", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x1A, ERROR)
 OPDEF(CEE_UNUSED, "unused", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x1B, NEXT)
 OPDEF(CEE_SIZEOF, "sizeof", Pop0, PushI, InlineType, X, 2, 0xFE, 0x1C, NEXT)
 OPDEF(CEE_REFANYTYPE, "refanytype", Pop1, PushI, InlineNone, X, 2, 0xFE, 0x1D, NEXT)
-OPDEF(CEE_READONLY_, "readonly.", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x1E, NEXT)
+OPDEF(CEE_READONLY_, "readonly.", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x1E, META)
 OPDEF(CEE_UNUSED53, "unused53", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x1F, NEXT)
 OPDEF(CEE_UNUSED54, "unused54", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x20, NEXT)
 OPDEF(CEE_UNUSED55, "unused55", Pop0, Push0, InlineNone, X, 2, 0xFE, 0x21, NEXT)
index da96a64699be085711a148ccce3b0e101ea09832..4c172bc5c5dc572a8b69854f758848868d097c91 100644 (file)
@@ -1,3 +1,7 @@
+2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: Fix naming of stelem and ldelem.
+
 2009-07-30  Mark Probst  <mark.probst@gmail.com>
 
        * generic-sharing.c: Replace the templates lock with the loader
index fde63582ea1edfa339f200b3ad569a74bd226232..38b62cef9a3b19b82b9dfefe4e33f6ddb379b6c8 100644 (file)
@@ -4193,7 +4193,7 @@ do_ldelem (VerifyContext *ctx, int opcode, int token)
        if (!check_underflow (ctx, 2))
                return;
 
-       if (opcode == CEE_LDELEM_ANY) {
+       if (opcode == CEE_LDELEM) {
                if (!(type = verifier_load_type (ctx, token, "ldelem.any"))) {
                        ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Type (0x%08x) not found at 0x%04x", token, ctx->ip_offset));
                        return;
@@ -4246,7 +4246,7 @@ do_stelem (VerifyContext *ctx, int opcode, int token)
        if (!check_underflow (ctx, 3))
                return;
 
-       if (opcode == CEE_STELEM_ANY) {
+       if (opcode == CEE_STELEM) {
                if (!(type = verifier_load_type (ctx, token, "stelem.any"))) {
                        ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Type (0x%08x) not found at 0x%04x", token, ctx->ip_offset));
                        return;
@@ -5544,13 +5544,13 @@ mono_method_verify (MonoMethod *method, int level)
                        ++ip;
                        break;
 
-               case CEE_LDELEM_ANY:
+               case CEE_LDELEM:
                        code_bounds_check (5);
                        do_ldelem (&ctx, *ip, read32 (ip + 1));
                        ip += 5;
                        break;
 
-               case CEE_STELEM_ANY:
+               case CEE_STELEM:
                        code_bounds_check (5);
                        do_stelem (&ctx, *ip, read32 (ip + 1));
                        ip += 5;
index ee172623d52bc48520f59b57afb8065cffa8e707..1cd604a880b704b41d7ad8215930582858db8a25 100644 (file)
@@ -1,3 +1,7 @@
+2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * method-to-ir.c: Fix naming of stelem and ldelem.
+
 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
 
        * driver.c (main_thread_handler): Check that the assembly loaded
index 9f9c21b28185650ede6aa839332840112ea04331..addc9f98f3268a80f552173ad7bf24f40006138f 100644 (file)
@@ -8484,7 +8484,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        *sp++ = ins;
                        ip += 5;
                        break;
-               case CEE_LDELEM_ANY:
+               case CEE_LDELEM:
                case CEE_LDELEM_I1:
                case CEE_LDELEM_U1:
                case CEE_LDELEM_I2:
@@ -8501,7 +8501,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        CHECK_STACK (2);
                        sp -= 2;
 
-                       if (*ip == CEE_LDELEM_ANY) {
+                       if (*ip == CEE_LDELEM) {
                                CHECK_OPSIZE (5);
                                token = read32 (ip + 1);
                                klass = mini_get_class (method, token, generic_context);
@@ -8528,7 +8528,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr->dreg, 0);
                        }
                        *sp++ = ins;
-                       if (*ip == CEE_LDELEM_ANY)
+                       if (*ip == CEE_LDELEM)
                                ip += 5;
                        else
                                ++ip;
@@ -8542,7 +8542,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                case CEE_STELEM_R4:
                case CEE_STELEM_R8:
                case CEE_STELEM_REF:
-               case CEE_STELEM_ANY: {
+               case CEE_STELEM: {
                        MonoInst *addr;
 
                        CHECK_STACK (3);
@@ -8550,7 +8550,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        cfg->flags |= MONO_CFG_HAS_LDELEMA;
 
-                       if (*ip == CEE_STELEM_ANY) {
+                       if (*ip == CEE_STELEM) {
                                CHECK_OPSIZE (5);
                                token = read32 (ip + 1);
                                klass = mini_get_class (method, token, generic_context);
@@ -8593,7 +8593,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                }
                        }
 
-                       if (*ip == CEE_STELEM_ANY)
+                       if (*ip == CEE_STELEM)
                                ip += 5;
                        else
                                ++ip;