Is there a list of deprecated x86 instructions?

前端 未结 4 1053
囚心锁ツ
囚心锁ツ 2021-02-07 15:33

I\'m taking an x86 assembly language programming class and know that certain instructions shouldn\'t be used anymore -- because they\'re slow on modern processors; for example,

4条回答
  •  不思量自难忘°
    2021-02-07 15:57

    Oh, but there still might be a good reason to use the loop instruction. For example, loop label only requires two bytes. As opposed to dec cx followed by jnz label requires three bytes. Sometimes code size is more important than speed.

    I would suggest, however, that if you're just learning x86 assembly--especially if this is your first foray into assembly language--that you first concentrate on how to do things. Once you've gotten a better feel for how things work, then worry about making them faster.

提交回复
热议问题