[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet] ldelema and TypeSpec table
From: |
Speziale Ettore |
Subject: |
[Dotgnu-pnet] ldelema and TypeSpec table |
Date: |
Wed, 1 Apr 2009 17:02:31 +0200 |
Hi,
I'm a collaborator of ILDJIT virtual machine. I have compiled the
attached C# program with the cscc compiler (today CVS version) and
when i run it with ILDJIT i find the following instruction:
ldelema int32 /*Raw token: 1B000001*/
The type token is placed on TypeSpec table (0x1B) but according to
ECMA specs (june 2006, partition 2, section 23.2 .14) the TypeSpec
table can't contains a ELEMENT_TYPE_I4 token. I have tried to run the
same assembly both with mono and ilrun; these VMs correctly decode and
execute the ldelema instruction.
Compiling the same source with the mcs compiler generate a standard
compliant instruction (The type token is placed on TypeRef table):
ldelema class [mscorlib]System.Int32/*01000002*/
My question is: I haven't well understood the standard or the cscc
compiler uses the TypeSpec table due to some exceptional behavior?
Thanks,
address@hidden
C# source:
using System;
using System.Threading;
public class VolatileWithArray {
public static void Main() {
int[] array;
array = new int[4];
Console.WriteLine(Thread.VolatileRead(ref array[2]));
}
}
- [Dotgnu-pnet] ldelema and TypeSpec table,
Speziale Ettore <=