John
John

Reputation: 6268

Assembly pushf not correct

The GCC compiler as you can see on this page: https://defuse.ca/online-x86-assembler.htm#disassembly

Treats both pushf and pushfd as 0x9C when pushf should be 0x66, 0x9C. Is there a way to make this compiler not convert pushf to pushfd?

Upvotes: 1

Views: 546

Answers (2)

JS1
JS1

Reputation: 4767

Try using pushfw to get the 16 bit variant.

Upvotes: 1

Mike
Mike

Reputation: 2761

Check out http://faydoc.tripod.com/cpu/pushfd.htm. They do indeed share the same operand and which gets executed is a product of the environment, not the instruction.

Upvotes: 0

Related Questions