A while ago we changed pushf and popf in Intel mode to generate pushfq and popfq. Unfortunately that left us with no way to get the 16-bit encoding in Intel mode so this patch adds pushfw and popfw as aliases there.
An alternative would be to revert that change (& make sure both are accessible). The reasoning behind the change was discussed a bit in https://bugs.llvm.org/show_bug.cgi?id=32035 and seems to have been motivated primarily by GCC compatiblity (nasm is the same, masm appears to be the opposite).
Technically, I suspect the Intel & AMD manuals would disagree with the status-quo:
+ They don't mention pushfw at all, which would now be the only way to get the 16-bit instruction. + The table part of the descriptions says pushf is 16-bit (and pushfq is 64-bit). + Conversely the description talks of 64-bits being the default, but in terms of opcode prefixes rather than mnemonics so I'm not sure how much weight it has. + The 32-bit paragraph seems to allow multiple variants.
But GCC compatibility is a pretty compelling counter-argument for me, which is why I'm suggesting this fix for the situation.