title: Need to convert old 32-bit GAS code to a current GAS assembler (pushfl/popl)
body: <p>I am in the process of trying to compile an old project on my modern machine. I know this old project used an old (2.x) version of GCC/GAS so I need to clean it up so that I can compile it with a current version.</p>
  
  <p>The code in question:</p>
  
  <pre><code>__get_flags:
      pushfl
      popl %eax
      ret
  </code></pre>
  
  <p><code>gas</code> complains that <code>pushfl</code> is not an instruction. From what I read this is an old deprecated GNU mnemonic, but there must be some sort of x86_64 equivalent, surely?</p>
  
  <p>In addition to answering how to convert this code to x86_64 gas, it would be great if someone could explain where mnemonics like <code>pushfl</code> and <code>pushfq</code> and defined and documented. I am quite sure that are GAS creations...</p>
  
  <p>Note: I want to compile this on gcc 4.6.1 and gas 2.21</p>