请输入您要查询的百科知识:

 

词条 List of CIL instructions
释义

  1. See also

  2. References

{{main article|Common Intermediate Language}}

This is a list of the instructions in the instruction set of the Common Intermediate Language bytecode.

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

See also

  • Common Intermediate Language is the assembly language that uses the instruction set.
  • Common Language Infrastructure is the standard in which the Common Intermediate Language is defined.
  • .NET Framework is a platform and implementation of the Common Language Infrastructure.
  • Mono is a cross-platform open-source implementation of the Common Language Infrastructure.

References

  • [https://web.archive.org/web/20100127183600/http://en.csharp-online.net/CIL_Instruction_Set CIL Instruction Set at C# Online.NET (CSharp-Online.NET)]
  • ECMA - CIL Instruction Set - Page 321 (ECMA-335.pdf)
{{Common Language Infrastructure}}

2 : Common Language Infrastructure|Instruction set listings

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 14:02:43