The instruction set reference says this:
Decrements the stack pointer by 4 (if the current operand-size attribute is 32) and pushes the entire contents of the EFLAGS register onto the stack
It also says:
The PUSHF (push flags) and PUSHFD (push flags double) mnemonics reference the same opcode. The PUSHF instruction is intended for use when the operand-size attribute is 16 and the PUSHFD instruction for when the operand-size attribute is 32. Some assemblers may force the operand size to 16 when PUSHF is used and to 32 when PUSHFD is used. Others may treat these mnemonics as synonyms (PUSHF/PUSHFD) and use the current setting of the operand-size attribute to deter- mine the size of values to be pushed from the stack, regardless of the mnemonic used.
So no problem there. Your asm is broken, though, it should be something more like this:
__asm__ __volatile__(
"pushf\n\t"
"pop %0"
: "=rm" (eflags));