Displaying 1 result from an estimated 1 matches for "pushf64".
Did you mean:
pushf
2016 Feb 29
2
X86 Backend - How to push and pop eflags?
...ist,
i am implementing an X86 Machine Pass that at some point needs to push/pop
eflags on the stack. This pass is hooked at preRegAlloc and LLVM is 3.7.0.
I got two big problems:
1) I didn't found a way to emit a pushfq instruction in a clean way, i.e.
with BuildMI(*MBB, MI, DL, TII.get(X86::PUSHF64)). Even if both EFLAGS
and RSP are added to the MBB liveins, the Machine Verifier complains saying:
*** Bad machine code: Using an undefined physical register ***
- function: main
- basic block: BB#238 for.inc.121.4 (0x43133b0)
- instruction: PUSHF64- operand 2: %EFLAGS<imp-use,kill>...