组装 pushf 不正确

Assembly pushf not correct

如您在此页面上所见,GCC 编译器: https://defuse.ca/online-x86-assembler.htm#disassembly

当 pushf 应为 0x66、0x9C 时,将 pushf 和 pushfd 都视为 0x9C。 有没有办法让这个编译器不把 pushf 转换成 pushfd?

查看 http://faydoc.tripod.com/cpu/pushfd.htm。它们确实共享相同的操作数,执行的是环境的产物,而不是指令。

尝试使用 pushfw 获取 16 位变体。