File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ bool X86ExpandPseudo::expandMI(MachineBasicBlock &MBB,
302302 }
303303
304304 // Jump to label or value in register.
305- bool IsWin64 = STI->isTargetWin64 ();
305+ bool IsWinOrUEFI64 = STI->isTargetWin64 () || STI-> isTargetUEFI64 ();
306306 if (Opcode == X86::TCRETURNdi || Opcode == X86::TCRETURNdicc ||
307307 Opcode == X86::TCRETURNdi64 || Opcode == X86::TCRETURNdi64cc) {
308308 unsigned Op;
@@ -339,16 +339,17 @@ bool X86ExpandPseudo::expandMI(MachineBasicBlock &MBB,
339339 }
340340
341341 } else if (Opcode == X86::TCRETURNmi || Opcode == X86::TCRETURNmi64) {
342- unsigned Op = (Opcode == X86::TCRETURNmi)
343- ? X86::TAILJMPm
344- : (IsWin64 ? X86::TAILJMPm64_REX : X86::TAILJMPm64);
342+ unsigned Op =
343+ (Opcode == X86::TCRETURNmi)
344+ ? X86::TAILJMPm
345+ : (IsWinOrUEFI64 ? X86::TAILJMPm64_REX : X86::TAILJMPm64);
345346 MachineInstrBuilder MIB = BuildMI (MBB, MBBI, DL, TII->get (Op));
346347 for (unsigned i = 0 ; i != X86::AddrNumOperands; ++i)
347348 MIB.add (MBBI->getOperand (i));
348349 } else if (Opcode == X86::TCRETURNri64) {
349350 JumpTarget.setIsKill ();
350351 BuildMI (MBB, MBBI, DL,
351- TII->get (IsWin64 ? X86::TAILJMPr64_REX : X86::TAILJMPr64))
352+ TII->get (IsWinOrUEFI64 ? X86::TAILJMPr64_REX : X86::TAILJMPr64))
352353 .add (JumpTarget);
353354 } else {
354355 JumpTarget.setIsKill ();
You can’t perform that action at this time.
0 commit comments