gas vs. nasm: which assembler produces the best code?

前端 未结 6 1443
挽巷
挽巷 2021-02-14 02:46

Both tools translate assembly instructions directly into machine code, but is it possible to determine which one produces the fastest and cleanest code?

6条回答
  •  礼貌的吻别
    2021-02-14 03:33

    As a sidenote on the syntax-matter. You can have GAS work perfectly fine with Intel syntax by putting the following line at the top of your source file:

    .intel_syntax noprefix
    

    I am using Intel syntax too for all my assmebly needs. It seems far more natural than the AT&T syntax. And it saves some keystrokes :-).

提交回复
热议问题