[Mono-list] code size of each IL instruction?
Thu, 28 Aug 2003 08:01:05 -0400
For CIL code information, just refer to the standard:
In particular, you want "Partition III CIL Instruction Set."
For actually dealing with CIL opcodes, you might want to look at
PEAPI.dll, which is included with mono distributions (since 0.25, at
least) and in CVS.
On Wed, 2003-08-27 at 22:12, Okehee Goh wrote:
> I'd like to manipulate CIL codes manually. Each instruction's code size
> seems to be different.
> Could you tell me where I can refer the code size information for all IL
> For instance, the following codes are a part of IL codes generated by using
> "monodis" tool.
> The first field implicates a relative address of each instruction and they
> are determined by the code size of an ahead instruction. I like to insert
> certain IL instructions manually somewhere of these codes.
> So, I'd like to refer the code size of IL instructions.
> ==== a part of IL codes
> IL_0000: newobj instance void class Node::.ctor()
> IL_0005: stloc.3
> IL_0006: ldstr " size of NODE:"
> IL_000b: ldloc.3
> IL_000c: call int32 class
> [corlib]System.Runtime.InteropServices.Marshal::SizeOf(object) IL_0011:
> box [mscorlib]System.Int32
> IL_0016: call string valuetype [corlib]System.String::Concat(object,
> IL_001b: call void class [corlib]System.Console::WriteLine(string)
> IL_0020: call valuetype [corlib]System.DateTime valuetype
> Mono-list maillist - Monofirstname.lastname@example.org