Skip to content

Commit 6fc7ace

Browse files
committed
UEFI backend for x86_64
1 parent d1335fb commit 6fc7ace

File tree

13 files changed

+101
-35
lines changed

13 files changed

+101
-35
lines changed

clang/lib/Basic/Targets/OSTargets.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,12 +778,18 @@ class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public OSTargetInfo<Target> {
778778
}
779779
};
780780

781+
void addWindowsDefines(const llvm::Triple &Triple, const LangOptions &Opts,
782+
MacroBuilder &Builder);
783+
781784
// UEFI target
782785
template <typename Target>
783786
class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
784787
protected:
785788
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
786-
MacroBuilder &Builder) const override {}
789+
MacroBuilder &Builder) const override {
790+
Builder.defineMacro("__UEFI__");
791+
addWindowsDefines(Triple, Opts, Builder);
792+
}
787793

788794
public:
789795
UEFITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
@@ -793,8 +799,7 @@ class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
793799
}
794800
};
795801

796-
void addWindowsDefines(const llvm::Triple &Triple, const LangOptions &Opts,
797-
MacroBuilder &Builder);
802+
798803

799804
// Windows target
800805
template <typename Target>

clang/lib/Basic/Targets/X86.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -826,10 +826,11 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo
826826
"i64:64-i128:128-f80:128-n8:16:32:64-S128");
827827
}
828828

829-
void getTargetDefines(const LangOptions &Opts,
830-
MacroBuilder &Builder) const override {
831-
getOSDefines(Opts, X86TargetInfo::getTriple(), Builder);
832-
}
829+
// void getTargetDefines(const LangOptions &Opts,
830+
// MacroBuilder &Builder) const override {
831+
// getOSDefines(Opts, X86TargetInfo::getTriple(), Builder);
832+
// Builder.defineMacro("__x86_64__");
833+
// }
833834

834835
BuiltinVaListKind getBuiltinVaListKind() const override {
835836
return TargetInfo::CharPtrBuiltinVaList;

llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,14 @@ static MCAsmInfo *createX86MCAsmInfo(const MCRegisterInfo &MRI,
445445
// Force the use of an ELF container.
446446
MAI = new X86ELFMCAsmInfo(TheTriple);
447447
} else if (TheTriple.isWindowsMSVCEnvironment() ||
448-
TheTriple.isWindowsCoreCLREnvironment()) {
448+
TheTriple.isWindowsCoreCLREnvironment() || TheTriple.isUEFI()) {
449449
if (Options.getAssemblyLanguage().equals_insensitive("masm"))
450450
MAI = new X86MCAsmInfoMicrosoftMASM(TheTriple);
451451
else
452452
MAI = new X86MCAsmInfoMicrosoft(TheTriple);
453453
} else if (TheTriple.isOSCygMing() ||
454454
TheTriple.isWindowsItaniumEnvironment()) {
455455
MAI = new X86MCAsmInfoGNUCOFF(TheTriple);
456-
} else if (TheTriple.isUEFI()) {
457-
MAI = new X86MCAsmInfoGNUCOFF(TheTriple);
458456
} else {
459457
// The default is ELF.
460458
MAI = new X86ELFMCAsmInfo(TheTriple);

llvm/lib/Target/X86/X86CallingConv.td

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,24 @@ def RetCC_X86_64 : CallingConv<[
488488
CCIfSubtarget<"isTargetWin64()", CCIfRegCallv4<CCDelegateTo<RetCC_X86_Win64_RegCallv4>>>>,
489489

490490
CCIfCC<"CallingConv::X86_RegCall",
491-
CCIfSubtarget<"isTargetWin64()",
491+
CCIfSubtarget<"isTargetUEFI64()", CCIfRegCallv4<CCDelegateTo<RetCC_X86_Win64_RegCallv4>>>>,
492+
493+
CCIfCC<"CallingConv::X86_RegCall",
494+
CCIfSubtarget<"isTargetWin64()",
492495
CCDelegateTo<RetCC_X86_Win64_RegCall>>>,
496+
497+
CCIfCC<"CallingConv::X86_RegCall",
498+
CCIfSubtarget<"isTargetUEFI64()",
499+
CCDelegateTo<RetCC_X86_Win64_RegCall>>>,
500+
493501
CCIfCC<"CallingConv::X86_RegCall", CCDelegateTo<RetCC_X86_SysV64_RegCall>>,
494502

495503
// Mingw64 and native Win64 use Win64 CC
496504
CCIfSubtarget<"isTargetWin64()", CCDelegateTo<RetCC_X86_Win64_C>>,
497505

506+
// UEFI64 uses Win64 CC
507+
CCIfSubtarget<"isTargetUEFI64()", CCDelegateTo<RetCC_X86_Win64_C>>,
508+
498509
// Otherwise, drop to normal X86-64 CC
499510
CCDelegateTo<RetCC_X86_64_C>
500511
]>;
@@ -1079,6 +1090,10 @@ def CC_X86_64 : CallingConv<[
10791090
CCIfSubtarget<"isTargetWin64()", CCIfRegCallv4<CCDelegateTo<CC_X86_Win64_RegCallv4>>>>,
10801091
CCIfCC<"CallingConv::X86_RegCall",
10811092
CCIfSubtarget<"isTargetWin64()", CCDelegateTo<CC_X86_Win64_RegCall>>>,
1093+
CCIfCC<"CallingConv::X86_RegCall",
1094+
CCIfSubtarget<"isTargetUEFI64()", CCIfRegCallv4<CCDelegateTo<CC_X86_Win64_RegCallv4>>>>,
1095+
CCIfCC<"CallingConv::X86_RegCall",
1096+
CCIfSubtarget<"isTargetUEFI64()", CCDelegateTo<CC_X86_Win64_RegCall>>>,
10821097
CCIfCC<"CallingConv::X86_RegCall", CCDelegateTo<CC_X86_SysV64_RegCall>>,
10831098
CCIfCC<"CallingConv::PreserveNone", CCDelegateTo<CC_X86_64_Preserve_None>>,
10841099
CCIfCC<"CallingConv::X86_INTR", CCCustom<"CC_X86_Intr">>,

llvm/lib/Target/X86/X86FrameLowering.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,11 +1534,16 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
15341534
MachineBasicBlock &MBB) const {
15351535
assert(&STI == &MF.getSubtarget<X86Subtarget>() &&
15361536
"MF used frame lowering for wrong subtarget");
1537+
15371538
MachineBasicBlock::iterator MBBI = MBB.begin();
15381539
MachineFrameInfo &MFI = MF.getFrameInfo();
15391540
const Function &Fn = MF.getFunction();
1541+
15401542
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
15411543
uint64_t MaxAlign = calculateMaxStackAlign(MF); // Desired stack alignment.
1544+
1545+
// errs() << "********** MaxAlign size " << MaxAlign;
1546+
15421547
uint64_t StackSize = MFI.getStackSize(); // Number of bytes to allocate.
15431548
bool IsFunclet = MBB.isEHFuncletEntry();
15441549
EHPersonality Personality = EHPersonality::Unknown;
@@ -1549,6 +1554,12 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
15491554
bool IsClrFunclet = IsFunclet && FnHasClrFunclet;
15501555
bool HasFP = hasFP(MF);
15511556
bool IsWin64Prologue = isWin64Prologue(MF);
1557+
1558+
// if(IsWin64Prologue) {
1559+
// errs() << "********** IsWin64Prologue TRUE ";
1560+
// } else {
1561+
// errs() << "********** IsWin64Prologue FALSE FALSE FALSE ";
1562+
// }
15521563
bool NeedsWin64CFI = IsWin64Prologue && Fn.needsUnwindTableEntry();
15531564
// FIXME: Emit FPO data for EH funclets.
15541565
bool NeedsWinFPO = !IsFunclet && STI.isTargetWin32() &&
@@ -1672,6 +1683,12 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
16721683
// pointer, calls, or dynamic alloca then we do not need to adjust the
16731684
// stack pointer (we fit in the Red Zone). We also check that we don't
16741685
// push and pop from the stack.
1686+
1687+
// if (has128ByteRedZone(MF)) {
1688+
// errs() << "********** has128ByteRedZone TRUE ";
1689+
// } else {
1690+
// errs() << "********** has128ByteRedZone FALSE FALSE FALSE ";
1691+
// }
16751692
if (has128ByteRedZone(MF) && !TRI->hasStackRealignment(MF) &&
16761693
!MFI.hasVarSizedObjects() && // No dynamic alloca.
16771694
!MFI.adjustsStack() && // No calls.
@@ -1680,6 +1697,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
16801697
!MF.shouldSplitStack()) { // Regular stack
16811698
uint64_t MinSize =
16821699
X86FI->getCalleeSavedFrameSize() - X86FI->getTCReturnAddrDelta();
1700+
16831701
if (HasFP)
16841702
MinSize += SlotSize;
16851703
X86FI->setUsesRedZone(MinSize > 0 || StackSize > 0);
@@ -1895,7 +1913,9 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
18951913
Opc == X86::PUSH2 || Opc == X86::PUSH2P;
18961914
};
18971915

1916+
// uint64_t cont3 = 1;
18981917
while (IsCSPush(MBBI)) {
1918+
// llvm::outs() << "\n*********** cont3 " << cont3++;
18991919
PushedRegs = true;
19001920
Register Reg = MBBI->getOperand(0).getReg();
19011921
LastCSPush = MBBI;

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
576576
// FIXME - use subtarget debug flags
577577
if (!Subtarget.isTargetDarwin() && !Subtarget.isTargetELF() &&
578578
!Subtarget.isTargetCygMing() && !Subtarget.isTargetWin64() &&
579+
!Subtarget.isTargetUEFI64() &&
579580
TM.Options.ExceptionModel != ExceptionHandling::SjLj) {
580581
setOperationAction(ISD::EH_LABEL, MVT::Other, Expand);
581582
}
@@ -2521,7 +2522,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
25212522
setOperationAction(ISD::FSINCOS, MVT::f32, Custom);
25222523
}
25232524

2524-
if (Subtarget.isTargetWin64()) {
2525+
if (Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64()) {
25252526
setOperationAction(ISD::SDIV, MVT::i128, Custom);
25262527
setOperationAction(ISD::UDIV, MVT::i128, Custom);
25272528
setOperationAction(ISD::SREM, MVT::i128, Custom);
@@ -19487,7 +19488,8 @@ SDValue X86TargetLowering::LowerSINT_TO_FP(SDValue Op,
1948719488
else if (isLegalConversion(SrcVT, true, Subtarget))
1948819489
return Op;
1948919490

19490-
if (Subtarget.isTargetWin64() && SrcVT == MVT::i128)
19491+
if ((Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64()) &&
19492+
SrcVT == MVT::i128)
1949119493
return LowerWin64_INT128_TO_FP(Op, DAG);
1949219494

1949319495
if (SDValue Extract = vectorizeExtractedCast(Op, dl, DAG, Subtarget))
@@ -19994,7 +19996,8 @@ SDValue X86TargetLowering::LowerUINT_TO_FP(SDValue Op,
1999419996
if (DstVT.isVector())
1999519997
return lowerUINT_TO_FP_vec(Op, dl, DAG, Subtarget);
1999619998

19997-
if (Subtarget.isTargetWin64() && SrcVT == MVT::i128)
19999+
if ((Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64()) &&
20000+
SrcVT == MVT::i128)
1999820001
return LowerWin64_INT128_TO_FP(Op, DAG);
1999920002

2000020003
if (SDValue Extract = vectorizeExtractedCast(Op, dl, DAG, Subtarget))
@@ -27626,7 +27629,6 @@ Register X86TargetLowering::getRegisterByName(const char* RegName, LLT VT,
2762627629
.Case("r14", X86::R14)
2762727630
.Case("r15", X86::R15)
2762827631
.Default(0);
27629-
2763027632
if (Reg == X86::EBP || Reg == X86::RBP) {
2763127633
if (!TFI.hasFP(MF))
2763227634
report_fatal_error("register " + StringRef(RegName) +
@@ -27670,7 +27672,7 @@ Register X86TargetLowering::getExceptionSelectorRegister(
2767027672
}
2767127673

2767227674
bool X86TargetLowering::needsFixedCatchObjects() const {
27673-
return Subtarget.isTargetWin64();
27675+
return Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64();
2767427676
}
2767527677

2767627678
SDValue X86TargetLowering::LowerEH_RETURN(SDValue Op, SelectionDAG &DAG) const {
@@ -29224,7 +29226,8 @@ static SDValue LowerMULO(SDValue Op, const X86Subtarget &Subtarget,
2922429226
}
2922529227

2922629228
SDValue X86TargetLowering::LowerWin64_i128OP(SDValue Op, SelectionDAG &DAG) const {
29227-
assert(Subtarget.isTargetWin64() && "Unexpected target");
29229+
assert((Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64()) &&
29230+
"Unexpected target");
2922829231
EVT VT = Op.getValueType();
2922929232
assert(VT.isInteger() && VT.getSizeInBits() == 128 &&
2923029233
"Unexpected return type for lowering");
@@ -29291,7 +29294,8 @@ SDValue X86TargetLowering::LowerWin64_i128OP(SDValue Op, SelectionDAG &DAG) cons
2929129294
SDValue X86TargetLowering::LowerWin64_FP_TO_INT128(SDValue Op,
2929229295
SelectionDAG &DAG,
2929329296
SDValue &Chain) const {
29294-
assert(Subtarget.isTargetWin64() && "Unexpected target");
29297+
assert((Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64()) &&
29298+
"Unexpected target");
2929529299
EVT VT = Op.getValueType();
2929629300
bool IsStrict = Op->isStrictFPOpcode();
2929729301

@@ -29324,7 +29328,8 @@ SDValue X86TargetLowering::LowerWin64_FP_TO_INT128(SDValue Op,
2932429328

2932529329
SDValue X86TargetLowering::LowerWin64_INT128_TO_FP(SDValue Op,
2932629330
SelectionDAG &DAG) const {
29327-
assert(Subtarget.isTargetWin64() && "Unexpected target");
29331+
assert((Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64()) &&
29332+
"Unexpected target");
2932829333
EVT VT = Op.getValueType();
2932929334
bool IsStrict = Op->isStrictFPOpcode();
2933029335

@@ -33564,7 +33569,8 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
3356433569
return;
3356533570
}
3356633571

33567-
if (VT == MVT::i128 && Subtarget.isTargetWin64()) {
33572+
if (VT == MVT::i128 &&
33573+
(Subtarget.isTargetWin64() || Subtarget.isTargetUEFI64())) {
3356833574
SDValue Chain;
3356933575
SDValue V = LowerWin64_FP_TO_INT128(SDValue(N, 0), DAG, Chain);
3357033576
Results.push_back(V);
@@ -36945,6 +36951,8 @@ X86TargetLowering::EmitSjLjDispatchBlock(MachineInstr &MI,
3694536951
// N.B. the order the invoke BBs are processed in doesn't matter here.
3694636952
SmallVector<MachineBasicBlock *, 64> MBBLPads;
3694736953
const MCPhysReg *SavedRegs = MF->getRegInfo().getCalleeSavedRegs();
36954+
// llvm::outs() << "Callee saved regs from isellowering " <<
36955+
// SavedRegs->
3694836956
for (MachineBasicBlock *MBB : InvokeBBs) {
3694936957
// Remove the landing pad successor from the invoke block and replace it
3695036958
// with the new dispatch block.
@@ -60153,8 +60161,8 @@ bool X86TargetLowering::hasStackProbeSymbol(const MachineFunction &MF) const {
6015360161
/// Returns true if stack probing through inline assembly is requested.
6015460162
bool X86TargetLowering::hasInlineStackProbe(const MachineFunction &MF) const {
6015560163

60156-
// No inline stack probe for Windows, they have their own mechanism.
60157-
if (Subtarget.isOSWindows() ||
60164+
// No inline stack probe for Windows and UEFI, they have their own mechanism.
60165+
if (Subtarget.isOSWindows() || Subtarget.isUEFI() ||
6015860166
MF.getFunction().hasFnAttribute("no-stack-arg-probe"))
6015960167
return false;
6016060168

@@ -60178,9 +60186,10 @@ X86TargetLowering::getStackProbeSymbolName(const MachineFunction &MF) const {
6017860186
if (MF.getFunction().hasFnAttribute("probe-stack"))
6017960187
return MF.getFunction().getFnAttribute("probe-stack").getValueAsString();
6018060188

60181-
// Generally, if we aren't on Windows, the platform ABI does not include
60182-
// support for stack probes, so don't emit them.
60183-
if (!Subtarget.isOSWindows() || Subtarget.isTargetMachO() ||
60189+
// Generally, if we aren't on Windows or UEFI, the platform ABI does not
60190+
// include support for stack probes, so don't emit them.
60191+
if (!(Subtarget.isOSWindows() || Subtarget.isUEFI()) ||
60192+
Subtarget.isTargetMachO() ||
6018460193
MF.getFunction().hasFnAttribute("no-stack-arg-probe"))
6018560194
return "";
6018660195

llvm/lib/Target/X86/X86RegisterInfo.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ X86RegisterInfo::X86RegisterInfo(const Triple &TT)
6262
// Cache some information.
6363
Is64Bit = TT.isArch64Bit();
6464
IsWin64 = Is64Bit && TT.isOSWindows();
65+
IsUEFI64 = Is64Bit && TT.isUEFI();
6566

6667
// Use a callee-saved register as the base pointer. These registers must
6768
// not conflict with any ABI requirements. For example, in 32-bit mode PIC
@@ -238,7 +239,7 @@ bool X86RegisterInfo::shouldRewriteCopySrc(const TargetRegisterClass *DefRC,
238239
const TargetRegisterClass *
239240
X86RegisterInfo::getGPRsForTailCall(const MachineFunction &MF) const {
240241
const Function &F = MF.getFunction();
241-
if (IsWin64 || (F.getCallingConv() == CallingConv::Win64))
242+
if (IsWin64 || IsUEFI64 || (F.getCallingConv() == CallingConv::Win64))
242243
return &X86::GR64_TCW64RegClass;
243244
else if (Is64Bit)
244245
return &X86::GR64_TCRegClass;
@@ -340,7 +341,7 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
340341
}
341342
case CallingConv::X86_RegCall:
342343
if (Is64Bit) {
343-
if (IsWin64) {
344+
if (IsWin64 || IsUEFI64) {
344345
return (HasSSE ? CSR_Win64_RegCall_SaveList :
345346
CSR_Win64_RegCall_NoSSE_SaveList);
346347
} else {
@@ -400,7 +401,7 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
400401
return IsWin64 ? CSR_Win64_SwiftError_SaveList
401402
: CSR_64_SwiftError_SaveList;
402403

403-
if (IsWin64)
404+
if (IsWin64 || IsUEFI64)
404405
return HasSSE ? CSR_Win64_SaveList : CSR_Win64_NoSSE_SaveList;
405406
if (CallsEHReturn)
406407
return CSR_64EHRet_SaveList;
@@ -462,7 +463,7 @@ X86RegisterInfo::getCallPreservedMask(const MachineFunction &MF,
462463
}
463464
case CallingConv::X86_RegCall:
464465
if (Is64Bit) {
465-
if (IsWin64) {
466+
if (IsWin64 || IsUEFI64) {
466467
return (HasSSE ? CSR_Win64_RegCall_RegMask :
467468
CSR_Win64_RegCall_NoSSE_RegMask);
468469
} else {
@@ -520,7 +521,7 @@ X86RegisterInfo::getCallPreservedMask(const MachineFunction &MF,
520521
if (IsSwiftCC)
521522
return IsWin64 ? CSR_Win64_SwiftError_RegMask : CSR_64_SwiftError_RegMask;
522523

523-
return IsWin64 ? CSR_Win64_RegMask : CSR_64_RegMask;
524+
return (IsWin64 || IsUEFI64) ? CSR_Win64_RegMask : CSR_64_RegMask;
524525
}
525526

526527
return CSR_32_RegMask;

llvm/lib/Target/X86/X86RegisterInfo.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ class X86RegisterInfo final : public X86GenRegisterInfo {
2727
///
2828
bool Is64Bit;
2929

30-
/// IsWin64 - Is the target on of win64 flavours
30+
/// IsWin64 - Is the target one of win64 flavours
3131
///
3232
bool IsWin64;
3333

34+
/// IsUEFI64 - Is this UEFI 64 bit target
35+
///
36+
bool IsUEFI64;
37+
3438
/// SlotSize - Stack slot size in bytes.
3539
///
3640
unsigned SlotSize;

llvm/lib/Target/X86/X86Subtarget.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,11 @@ class X86Subtarget final : public X86GenSubtargetInfo {
321321

322322
bool isOSWindows() const { return TargetTriple.isOSWindows(); }
323323

324-
bool isTargetWin64() const { return Is64Bit && isOSWindows(); }
324+
bool isUEFI() const { return TargetTriple.isUEFI(); }
325+
326+
bool isTargetUEFI64() const { return Is64Bit && isUEFI(); }
327+
328+
bool isTargetWin64() const { return Is64Bit && (isOSWindows() || isUEFI()); }
325329

326330
bool isTargetWin32() const { return !Is64Bit && isOSWindows(); }
327331

@@ -335,8 +339,11 @@ class X86Subtarget final : public X86GenSubtargetInfo {
335339
bool isPositionIndependent() const;
336340

337341
bool isCallingConvWin64(CallingConv::ID CC) const {
342+
// llvm::outs() << "\nIn isCallingConvWin64 check calling
343+
// convention******************* ";
338344
switch (CC) {
339-
// On Win64, all these conventions just use the default convention.
345+
// On Win64 and UEFI64, all these conventions just use the default
346+
// convention.
340347
case CallingConv::C:
341348
case CallingConv::Fast:
342349
case CallingConv::Tail:
@@ -347,9 +354,11 @@ class X86Subtarget final : public X86GenSubtargetInfo {
347354
case CallingConv::X86_ThisCall:
348355
case CallingConv::X86_VectorCall:
349356
case CallingConv::Intel_OCL_BI:
350-
return isTargetWin64();
357+
return isTargetWin64() || isTargetUEFI64();
351358
// This convention allows using the Win64 convention on other targets.
352359
case CallingConv::Win64:
360+
// llvm::outs() << "\nReturning true for Win64 calling
361+
// convention******************* ";
353362
return true;
354363
// This convention allows using the SysV convention on Windows targets.
355364
case CallingConv::X86_64_SysV:

0 commit comments

Comments
 (0)