Download presentation
Presentation is loading. Please wait.
Published byJasmyn Edmond Modified over 10 years ago
1
IL Instructions and Stack Transition
2
… add additionجمع بدون محاسبه سرريز add.ovf checked addition جمع با محاسبه سرريز add.ovr.un checked unsigned additionجمع بدون علامت با محاسبه سرريز …, value1, value2 …, value1 + value2 عمليات جمع مثال : 17 12 ldc.i4 add 29
3
عمليات ُوُ منطقي and …, value1, value2 …, value1 & value2 bitwise AND … مثال : 17 12 ldc.i4 and 0
4
arglist …, …,handleget argument list handle ليست آرگومانهاي يک تابع را وارد پشته ميکند … handle
5
عمليات پرش beq targetbranch if equal bge targetbranch if greater than or equal bge.un targetbranch if greater than or equal unsigned bgt targetbranch if greater than bgt.un targetbranch if greater than unsigned ble target …, value1, value2 …, branch if less than or equal ble.un targetbranch if less than or equal unsigned blt targetbranch if less than blt.un targetbranch if less than unsigned bne.un targetbranch if not equal unsigned
6
… مثال : value1 value2 ldc.i4 ble.un Loop
7
box type …,address …, object box value type … address ldc.i4 box type object
8
br target …, …, unconditional branch پرش بدون شرط break …, …, breakpointدستور توقف
9
brfalse target brtrue target …, value پث … branch if zero branch if nonzero brfalse target branch if zero پرش در صورتي که بالاي پشته صفر است …, value … brtrue target branch if nonzero پرش در صورتي که بالاي پشته صفر نيست … brfalse target value
10
call method…, arg1 … argn …, value call calli signature…, arg1 … argn, address …, value call indirect callvirt method …, object, arg1 … argn …, value call virtual method castclass type …, object …, objectcast object عمليات فراخواني
11
ceqcompare value cgtcompare greater than cgt.un…,value1,value2 …,0 or 1compare greater than unsigned cltcompare less than clt.uncompare less than unsigned عمليات مقايسه … 30 20 clt.un 0
12
conv.i convert to I, push I conv.i1 convert to I1, push I4 conv.i2 convert to I2, push I4 conv.i4 convert to I4, push I4 conv.i8 convert to I8, push I4 conv.r.un convert unsigned to F, push F conv.r4 convert to R4, push F conv.r8 convert to R8, push F conv.u...,value …,result convert to U, push U conv.u1 convert to U1, push U4 conv.u2 convert to U2, push U4 conv.u4 convert to U4, push U4 conv.u8 convert to U8, push U8 conv.ovf.i checked … conv.ovf.i1 checked … conv.ovf.i2 checked … conv.ovf.i4 checked … conv.ovf.i8 checked … عمليات تبديل نوع
13
conv.u conv.u1 conv.u2 conv.u4 conv.u8 conv.ovf.i.un conv.ovf.i1.un conv.ovf.i2.un conv.ovf.i4.un conv.ovf.i8.un conv.ovf.u.un conv.ovf.u1.un conv.ovf.u2.un conv.ovf.u4.un conv.ovf.u8.un عمليات تبديل نوع … conv.u8 value result
14
… divdivisionتقسيم div.ununsigned divisionتقسيم بدون علامت …, value1, value2 …, value1 / value2 عمليات تقسيم مثال : 18 5 ldc.i4 div 3.6
15
dup …, value …, value, value duplicate initblk …, address, value, size … initialize memory initobj type …, address … initialize a value type isinst type …, object …, object or null type test and cast
16
jmp method … … jump to method عمليات پرش عمليات ورود به پشته ldc.i4 constantpush constant ldc.i8 constant ldc.r4 constant… …, value ldc.r8 constant … value
17
عمليات ورود عنصر آرايه به پشته ldelem.i ldelem.i1 ldelem.i2 ldelem.i4 ldelem.i8 ldelem.r4…, object, index …, valuepush array element ldelem.r8 ldelem.ref ldelem.u1 ldelem.u2 ldftn method … …, address push method address
18
عمليات ورود با آدرس غير مستقيم به پشته ldind.i ldind.i1 ldind.i2 ldind.i4 ldind.i8 ldind.r4 …, address…, value push indirect ldind.r8 ldind.ref ldind.u1 ldind.u2 ldind.u4 … address value
19
… mulmultiplication ضرب mul.ovfchecked multiplication ضرب با محاسبه سرريز mul.ovf.unchecked unsigned multiplicationضرب بدون علامت با محاسبه سرريز …, value1, value2 …, value1 * value2 عمليات ضرب مثال : 16 3 ldc.i4 mul 48
20
neg …, value …, –value negation nop … … no operation not …, value …, ¬value bitwise complement or …, value1, value2 …, value1 | value2 bitwise inclusive OR pop …, value … discard value ret...…return …, value (callee) …, value (caller) shl …, value1, value2 …, value1 << value2 left shift shr…, value1, value2 …, value1 >> value2arithmetic right shift shr.un …, value1, value2 …, value1 >> value2logical right shift
21
عمليات خروج از پشته starg n …, value … store to argument stelem.i stelem.i1 stelem.i2 stelem.i4 stelem.i8…, object, index, value …store to array element stelem.r4 stelem.ref stelem.r8 stfld field …, object, value … store to instance field
22
عمليات خروج از پشته stind.i stind.i1 stind.i2 stind.i4 stind.i8…, address, value …store indirect stind.r4 stind.r8 stind.ref stloc n …, value … store to local variable
23
… sub subtraction تفريق sub.ovf checked subtraction تفريق با محاسبه سرريز sub.ovr.un checked unsigned subtraction تفريق بدون علامت با محاسبه سرريز …, value1, value2 …, value1 - value2 عمليات تفريق مثال : 17 12 ldc.i4 sub 5
24
IL to Execute.ppt To part
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.