What is the difference between normal and shortform opcodes in CIL?

后端 未结 1 1873
礼貌的吻别
礼貌的吻别 2021-01-18 01:44

I am going through various opcodes in CIL and I find a lot of similar looking codes like Beq,Beq_S Bge,Bge_S Bgt,Bgt_S Br,Br_S

Where S is supposedly \"short form\".

相关标签:
1条回答
  • 2021-01-18 02:32

    The short forms of the instructions take up less space (that is, the binary encoding of the CIL instructions are themselves shorter, so your assembly will take up less space on disk or in memory). Therefore, they would typically be preferred when applicable. However, the tradeoff is that they have limited ranges compared to the full forms of the instructions (e.g. branch target offsets must fit within bytes instead of ints).

    0 讨论(0)
提交回复
热议问题