IL short-form instructions aren't short?
- by Alix
Hi. I was looking at the IL code of a valid method with Reflector and I've run into this:
L_00a5: leave.s L_0103
Instructions with the suffix .s are supposed to take an int8 operand, and sure enough this is should be the case with Leave_S as well. However, 0x0103 is 259, which exceeds the capacity of an int8. The method somehow works, but when I read the instructions with method Mono.Reflection.Disassembler.GetInstructions it retrieves
L_00a5: leave.s L_0003
that is, 3 instead of 259, because it's supposed to be an int8. So, my question: how is the original instruction (leave.s L_0103) possible? I have looked at the ECMA documentation for that (Partition III: CIL Instruction Set) and I can't find anything that explains it.
Any ideas? Thanks.