C# IL 指令

来源:互联网 发布:visual studio编程教材 编辑:程序博客网 时间:2024/04/30 11:51
Opcode
InstructionDescription0x00nopDo nothing.0x01breakInform a debugger that a breakpoint has been reached.0x02ldarg.0Load argument 0 onto the stack.0x03ldarg.1Load argument 1 onto the stack.0x04ldarg.2Load argument 2 onto the stack.0x05ldarg.3Load argument 3 onto the stack.0x06ldloc.0Load local variable 0 onto stack.0x07ldloc.1Load local variable 1 onto stack.0x08ldloc.2Load local variable 2 onto stack.0x09ldloc.3Load local variable 3 onto stack.0x0Astloc.0Pop a value from stack into local variable 0.0x0Bstloc.1Pop a value from stack into local variable 1.0x0Cstloc.2Pop a value from stack into local variable 2.0x0Dstloc.3Pop a value from stack into local variable 3.0x0Eldarg.s <uint8 (num)>Load argument numbered num onto the stack, short form.0x0Fldarga.s <uint8 (argNum)>Fetch the address of argument argNum, short form.0x10starg.s <uint8 (num)>Store value to the argument numbered num, short form.0x11ldloc.s <uint8 (indx)>Load local variable of index indx onto stack, short form.0x12ldloca.s <uint8 (indx)>Load address of local variable with index indx, short form.0x13stloc.s <uint8 (indx)>Pop a value from stack into local variable indx, short form.0x14ldnullPush a null reference on the stack.0x15ldc.i4.m1Push -1 onto the stack as int32.0x15ldc.i4.M1Push -1 of type int32 onto the stack as int32 (alias for ldc.i4.m1).0x16ldc.i4.0Push 0 onto the stack as int32.0x17ldc.i4.1Push 1 onto the stack as int32.0x18ldc.i4.2Push 2 onto the stack as int32.0x19ldc.i4.3Push 3 onto the stack as int32.0x1Aldc.i4.4Push 4 onto the stack as int32.0x1Bldc.i4.5Push 5 onto the stack as int32.0x1Cldc.i4.6Push 6 onto the stack as int32.0x1Dldc.i4.7Push 7 onto the stack as int32.0x1Eldc.i4.8Push 8 onto the stack as int32.0x1Fldc.i4.s <int8 (num)>Push num onto the stack as int32, short form.0x20ldc.i4 <int32 (num)>Push num of type int32 onto the stack as int32.0x21ldc.i8 <int64 (num)>Push num of type int64 onto the stack as int64.0x22ldc.r4 <float32 (num)>Push num of type float32 onto the stack as F.0x23ldc.r8 <float64 (num)>Push num of type float64 onto the stack as F.0x25dupDuplicate the value on the top of the stack.0x26popPop value from the stack.0x27jmp <method>Exit current method and jump to the specified method.0x28call <method>Call method described by method.0x29calli <callsitedescr>Call method indicated on the stack with arguments described by callsitedescr.0x2AretReturn from method, possibly with a value.0x2Bbr.s <int8 (target)>Branch to target, short form.0x2Cbrzero.s <int8 (target)>Branch to target if value is zero (alias for brfalse.s), short form.0x2Cbrfalse.s <int8 (target)>Branch to target if value is zero (false), short form.0x2Cbrnull.s <int8 (target)>Branch to target if value is null (alias for brfalse.s), short form.0x2Dbrtrue.s <int8 (target)>Branch to target if value is non-zero (true), short form.0x2Dbrinst.s <int8 (target)>Branch to target if value is a non-null object reference, short form (alias for brtrue.s).0x2Ebeq.s <int8 (target)>Branch to target if equal, short form.0x2Fbge.s <int8 (target)>Branch to target if greater than or equal to, short form.0x30bgt.s <int8 (target)>Branch to target if greater than, short form.0x31ble.s <int8 (target)>Branch to target if less than or equal to, short form.0x32blt.s <int8 (target)>Branch to target if less than, short form.0x33bne.un.s <int8 (target)>Branch to target if unequal or unordered, short form.0x34bge.un.s <int8 (target)>Branch to target if greater than or equal to (unsigned or unordered), short form0x35bgt.un.s <int8 (target)>Branch to target if greater than (unsigned or unordered), short form.0x36ble.un.s <int8 (target)>Branch to target if less than or equal to (unsigned or unordered), short form0x37blt.un.s <int8 (target)>Branch to target if less than (unsigned or unordered), short form.0x38br <int32 (target)>Branch to target.0x39brfalse <int32 (target)>Branch to target if value is zero (false).0x39brnull <int32 (target)>Branch to target if value is null (alias for brfalse).0x39brzero <int32 (target)>Branch to target if value is zero (alias for brfalse).0x3Abrtrue <int32 (target)>Branch to target if value is non-zero (true).0x3Abrinst <int32 (target)>Branch to target if value is a non-null object reference (alias for brtrue).0x3Bbeq <int32 (target)>Branch to target if equal.0x3Cbge <int32 (target)>Branch to target if greater than or equal to.0x3Dbgt <int32 (target)>Branch to target if greater than.0x3Eble <int32 (target)>Branch to target if less than or equal to.0x3Fblt <int32 (target)>Branch to target if less than.0x40bne.un <int32 (target)>Branch to target if unequal or unordered.0x41bge.un <int32 (target)>Branch to target if greater than or equal to (unsigned or unordered).0x42bgt.un <int32 (target)>Branch to target if greater than (unsigned or unordered).0x43ble.un <int32 (target)>Branch to target if less than or equal to (unsigned or unordered).0x44blt.un <int32 (target)>Branch to target if less than (unsigned or unordered).0x45switch <uint32, int32,int32 (t1..tN)>Jump to one of n values.0x46ldind.i1Indirect load value of type int8 as int32 on the stack.0x47ldind.u1Indirect load value of type unsigned int8 as int32 on the stack0x48ldind.i2Indirect load value of type int16 as int32 on the stack.0x49ldind.u2Indirect load value of type unsigned int16 as int32 on the stack0x4Aldind.i4Indirect load value of type int32 as int32 on the stack.0x4Bldind.u4Indirect load value of type unsigned int32 as int32 on the stack0x4Cidind.u8Indirect load value of type unsigned int64 as int64 on the stack (alias for ldind.i8).0x4Cldind.i8Indirect load value of type int64 as int64 on the stack.0x4Dldind.iIndirect load value of type native int as native int on the stack0x4Eldind.r4Indirect load value of type float32 as F on the stack.0x4Fldind.r8Indirect load value of type float64 as F on the stack.0x50ldind.refIndirect load value of type object ref as O on the stack.0x51stind.refStore value of type object ref (type O) into memory at address0x52stind.i1Store value of type int8 into memory at address0x53stind.i2Store value of type int16 into memory at address0x54stind.i4Store value of type int32 into memory at address0x55stind.i8Store value of type int64 into memory at address0x56stind.r4Store value of type float32 into memory at address0x57stind.r8Store value of type float64 into memory at address0x58addAdd two values, returning a new value.0x59subSubtract value2 from value1, returning a new value.0x5AmulMultiply values.0x5BdivDivide two values to return a quotient or floating-point result.0x5Cdiv.unDivide two values, unsigned, returning a quotient.0x5DremRemainder when dividing one value by another.0x5Erem.unRemainder when dividing one unsigned value by another.0x5FandBitwise AND of two integral values, returns an integral value.0x60orBitwise OR of two integer values, returns an integer.0x61xorBitwise XOR of integer values, returns an integer.0x62shlShift an integer left (shifting in zeros), return an integer.0x63shrShift an integer right (shift in sign), return an integer.0x64shr.unShift an integer right (shift in zero), return an integer.0x65negNegate value.0x66notBitwise complement.0x67conv.i1Convert to int8, pushing int32 on stack.0x68conv.i2Convert to int16, pushing int32 on stack.0x69conv.i4Convert to int32, pushing int32 on stack.0x6Aconv.i8Convert to int64, pushing int64 on stack.0x6Bconv.r4Convert to float32, pushing F on stack.0x6Cconv.r8Convert to float64, pushing F on stack.0x6Dconv.u4Convert to unsigned int32, pushing int32 on stack.0x6Econv.u8Convert to unsigned int64, pushing int64 on stack.0x6Fcallvirt <method>Call a method associated with an object.0x70cpobj <typeTok>Copy a value type from src to dest.0x71ldobj <typeTok>Copy the value stored at address src to the stack.0x72ldstr <string>Push a string object for the literal string.0x73newobj <ctor>Allocate an uninitialized object or value type and call ctor.0x74castclass <class>Cast obj to class.0x75isinst <class>Test if obj is an instance of class, returning null or an instance of that class or interface.0x76conv.r.unConvert unsigned integer to floating-point, pushing F on stack.0x79unbox <valuetype>Extract a value-type from obj, its boxed representation.0x7AthrowThrow an exception.0x7Bldfld <field>Push the value of field of object (or value type) obj, onto the stack.0x7Cldflda <field>Push the address of field of object obj on the stack.0x7Dstfld <field>Replace the value of field of the object obj with value.0x7Eldsfld <field>Push the value of field on the stack.0x7Fldsflda <field>Push the address of the static field, field, on the stack.0x80stsfld <field>Replace the value of field with val.0x81stobj <typeTok>Store a value of type typeTok at an address.0x82conv.ovf.i1.unConvert unsigned to an int8 (on the stack as int32) and throw an exception on overflow.0x83conv.ovf.i2.unConvert unsigned to an int16 (on the stack as int32) and throw an exception on overflow.0x84conv.ovf.i4.unConvert unsigned to an int32 (on the stack as int32) and throw an exception on overflow.0x85conv.ovf.i8.unConvert unsigned to an int64 (on the stack as int64) and throw an exception on overflow.0x86conv.ovf.u1.unConvert unsigned to an unsigned int8 (on the stack as int32) and throw an exception on overflow.0x87conv.ovf.u2.unConvert unsigned to an unsigned int16 (on the stack as int32) and throw an exception on overflow.0x88conv.ovf.u4.unConvert unsigned to an unsigned int32 (on the stack as int32) and throw an exception on overflow.0x89conv.ovf.u8.unConvert unsigned to an unsigned int64 (on the stack as int64) and throw an exception on overflow.0x8Aconv.ovf.i.unConvert unsigned to a native int (on the stack as native int) and throw an exception on overflow.0x8Bconv.ovf.u.unConvert unsigned to a native unsigned int (on the stack as native int) and throw an exception on overflow.0x8Cbox <typeTok>Convert a boxable value to its boxed form0x8Dnewarr <etype>Create a new array with elements of type etype.0x8EldlenPush the length (of type native unsigned int) of array on the stack.0x8Fldelema <class>Load the address of element at index onto the top of the stack.0x90ldelem.i1Load the element with type int8 at index onto the top of the stack as an int32.0x91ldelem.u1Load the element with type unsigned int8 at index onto the top of the stack as an int32.0x92ldelem.i2Load the element with type int16 at index onto the top of the stack as an int32.0x93ldelem.u2Load the element with type unsigned int16 at index onto the top of the stack as an int32.0x94ldelem.i4Load the element with type int32 at index onto the top of the stack as an int32.0x95ldelem.u4Load the element with type unsigned int32 at index onto the top of the stack as an int32.0x96ldelem.i8Load the element with type int64 at index onto the top of the stack as an int64.0x96ldelem.u8Load the element with type unsigned int64 at index onto the top of the stack as an int64 (alias for ldelem.i8).0x97ldelem.iLoad the element with type native int at index onto the top of the stack as a native int.0x98ldelem.r4Load the element with type float32 at index onto the top of the stack as an F0x99ldelem.r8Load the element with type float64 at index onto the top of the stack as an F.0x9Aldelem.refLoad the element at index onto the top of the stack as an O. The typeof the O is the same as the element type of the array pushed on the CIL stack.0x9Bstelem.iReplace array element at index with the i value on the stack.0x9Cstelem.i1Replace array element at index with the int8 value on the stack.0x9Dstelem.i2Replace array element at index with the int16 value on the stack.0x9Estelem.i4Replace array element at index with the int32 value on the stack.0x9Fstelem.i8Replace array element at index with the int64 value on the stack.0xA0stelem.r4Replace array element at index with the float32 value on the stack.0xA1stelem.r8Replace array element at index with the float64 value on the stack.0xA2stelem.refReplace array element at index with the ref value on the stack.0xA3ldelem <typeTok>Load the element at index onto the top of the stack.0xA4stelem <typeTok>Replace array element at index with the value on the stack0xA5unbox.any <typeTok>Extract a value-type from obj, its boxed representation0xB3conv.ovf.i1Convert to an int8 (on the stack as int32) and throw an exception on overflow.0xB4conv.ovf.u1Convert to an unsigned int8 (on the stack as int32) and throw an exception on overflow.0xB5conv.ovf.i2Convert to an int16 (on the stack as int32) and throw an exception on overflow.0xB6conv.ovf.u2Convert to an unsigned int16 (on the stack as int32) and throw an exception on overflow.0xB7conv.ovf.i4Convert to an int32 (on the stack as int32) and throw an exception on overflow.0xB8conv.ovf.u4Convert to an unsigned int32 (on the stack as int32) and throw an exception on overflow.0xB9conv.ovf.i8Convert to an int64 (on the stack as int64) and throw an exception on overflow.0xBAconv.ovf.u8Convert to an unsigned int64 (on the stack as int64) and throw an exception on overflow.0xC2refanyval <type>Push the address stored in a typed reference.0xC3ckfiniteThrow ArithmeticException if value is not a finite number.0xC6mkrefany <class>Push a typed reference to ptr of type class onto the stack.0xD0ldtoken <token>Convert metadata token to its runtime representation.0xD1conv.u2Convert to unsigned int16, pushing int32 on stack.0xD2conv.u1Convert to unsigned int8, pushing int32 on stack.0xD3conv.iConvert to native int, pushing native int on stack.0xD4conv.ovf.iConvert to a native int (on the stack as native int) and throw an exception on overflow.0xD5conv.ovf.uConvert to a native unsigned int (on the stack as native int) and throw an exception on overflow.0xD6add.ovfAdd signed integer values with overflow check.0xD7add.ovf.unAdd unsigned integer values with overflow check.0xD8mul.ovfMultiply signed integer values. Signed result shall fit in same size0xD9mul.ovf.unMultiply unsigned integer values. Unsigned result shall fit in same size0xDAsub.ovfSubtract native int from a native int. Signed result shall fit in same size0xDBsub.ovf.unSubtract native unsigned int from a native unsigned int. Unsigned result shall fit in same size.0xDCendfinallyEnd finally clause of an exception block.0xDCendfaultEnd fault clause of an exception block.0xDDleave <int32 (target)>Exit a protected region of code.0xDEleave.s <int8 (target)>Exit a protected region of code, short form.0xDFstind.iStore value of type native int into memory at address0xE0conv.uConvert to native unsigned int, pushing native int on stack.0xFE 0x00arglistReturn argument list handle for the current method.0xFE 0x01ceqPush 1 (of type int32) if value1 equals value2, else push 0.0xFE 0x02cgtPush 1 (of type int32) if value1 > value2, else push 0.0xFE 0x03cgt.unPush 1 (of type int32) if value1 > value2, unsigned or unordered, else push 0.0xFE 0x04cltPush 1 (of type int32) if value1 < value2, else push 0.0xFE 0x05clt.unPush 1 (of type int32) if value1 < value2, unsigned or unordered, else push 0.0xFE 0x06ldftn <method>Push a pointer to a method referenced by method, on the stack.0xFE 0x07ldvirtftn <method>Push address of virtual method method on the stack.0xFE 0x09ldarg <uint16 (num)>Load argument numbered num onto the stack.0xFE 0x0Aldarga <uint16 (argNum)>Fetch the address of argument argNum.0xFE 0x0Bstarg <uint16 (num)>Store value to the argument numbered num.0xFE 0x0Cldloc <uint16 (indx)>Load local variable of index indx onto stack.0xFE 0x0Dldloca <uint16 (indx)>Load address of local variable with index indx.0xFE 0x0Estloc <uint16 (indx)>Pop a value from stack into local variable indx.0xFE 0x0FlocallocAllocate space from the local memory pool.0xFE 0X11endfilterEnd an exception handling filter clause.0xFE 0x12unaligned. (alignment) [prefix]Subsequent pointer instruction might be unaligned.0xFE 0x13volatile. [prefix]Subsequent pointer reference is volatile.0xFE 0x14tail. [prefix]Subsequent call terminates current method0xFE 0x15initobj <typeTok>Initialize the value at address dest.0xFE 0x16constrained. <thisType> [prefix]Call a virtual method on a type constrained to be type T0xFE 0x17cpblkCopy data from memory to memory.0xFE 0x18initblkSet all bytes in a block of memory to a given byte value.0xFE 0x19no. { typecheck, rangecheck, nullcheck } [prefix]The specified fault check(s) normally performedas part of the execution of the subsequent instruction can/shall be skipped.0xFE 0x1ArethrowRethrow the current exception.0xFE 0x1Csizeof <typeTok>Push the size, in bytes, of a type as an unsigned int32.0xFE 0x1DrefanytypePush the type token stored in a typed reference.0xFE 0x1Ereadonly. [prefix]Specify that the subsequent array address operation performs notype check at runtime, and that it returns a controlled-mutability managed pointer