unsigned PC = RegMap->createVirtualRegister(X86::GR32RegisterClass);
const TargetInstrInfo *TII = TM.getInstrInfo();
- BuildMI(FirstMBB, MBBI, TII->get(X86::MovePCtoStack));
+ // Operand of MovePCtoStack is completely ignored by asm printer. It's
+ // only used in JIT code emission as displacement to pc.
+ BuildMI(FirstMBB, MBBI, TII->get(X86::MovePCtoStack)).addImm(0);
BuildMI(FirstMBB, MBBI, TII->get(X86::POP32r), PC);
// If we're using vanilla 'GOT' PIC style, we should use relative addressing
let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP5, FP6, ST0,
MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7,
XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, EFLAGS] in {
- def CALLpcrel32 : I<0xE8, RawFrm, (outs), (ins i32imm:$dst, variable_ops),
- "call\t${dst:call}", []>;
+ def CALLpcrel32 : Ii32<0xE8, RawFrm, (outs), (ins i32imm:$dst,variable_ops),
+ "call\t${dst:call}", []>;
def CALL32r : I<0xFF, MRM2r, (outs), (ins GR32:$dst, variable_ops),
"call\t{*}$dst", [(X86call GR32:$dst)]>;
def CALL32m : I<0xFF, MRM2m, (outs), (ins i32mem:$dst, variable_ops),
let Defs = [ESP], Uses = [ESP, EFLAGS] in
def PUSHFD : I<0x9C, RawFrm, (outs), (ins), "pushf", []>;
-def MovePCtoStack : I<0, Pseudo, (outs), (ins piclabel:$label),
- "call\t$label", []>;
+def MovePCtoStack : Ii32<0xE8, RawFrm, (outs), (ins piclabel:$label),
+ "call\t$label", []>;
let isTwoAddress = 1 in // GR32 = bswap GR32
def BSWAP32r : I<0xC8, AddRegFrm,