[Mono-list] code size of each IL instruction?

Okehee Goh ogoh@asu.edu
Wed, 27 Aug 2003 19:12:03 -0700


 Hello,
 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
instructions?
 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.

 Regards,

 Okehee


 ==== 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,
object)
    IL_001b: call void class [corlib]System.Console::WriteLine(string)
    IL_0020: call valuetype [corlib]System.DateTime valuetype
[corlib]System.DateTime::get_No
w()