MSIL opcode: br vs br.s?

1k Views Asked by At

What are differences between MSIL opcodes: br and br.s?

0x38 br Branch to target.

vs

0x2B br.s Branch to target, short form.

1

There are 1 best solutions below

0
On BEST ANSWER

From the documentation

The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

The difference is the size of the target, most jumps happen close around a location so it makes sense to optimize this instruction for size, reducing the total size of the IL, which may have several benefits (faster load times, smaller .dll sizes, etc)