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

≡放荡痞女 提交于 2019-12-01 15:50:19

问题


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". What does that mean??


回答1:


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).



来源:https://stackoverflow.com/questions/9410671/what-is-the-difference-between-normal-and-shortform-opcodes-in-cil

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!