gcc, inline assembly - pushad/popad missing?

前端 未结 1 1686
栀梦
栀梦 2021-01-20 20:27

Any way to avoid having to copy-paste the pushad/popad instruction body into my code?

Because gcc (current flags: -Wall -m32)

1条回答
  •  野的像风
    2021-01-20 20:59

    GCC use AT/T assembly syntax, while pushad/popad are Intel convention, try this:

    __asm__("pushal;");
    __asm__("popal;");
    

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