gcc, inline assembly - pushad/popad missing?

前端 未结 1 1685
栀梦
栀梦 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)
提交回复
热议问题