Skip to content

Commit c4ba9ff

Browse files
committed
[llvm] No inline stackprobe for UEFI
UEFI targets must be excluded from inline stack probes.
1 parent 501dcab commit c4ba9ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62039,7 +62039,7 @@ bool X86TargetLowering::hasStackProbeSymbol(const MachineFunction &MF) const {
6203962039
bool X86TargetLowering::hasInlineStackProbe(const MachineFunction &MF) const {
6204062040

6204162041
// No inline stack probe for Windows, they have their own mechanism.
62042-
if (Subtarget.isOSWindows() ||
62042+
if (Subtarget.isOSWindows() || Subtarget.isUEFI() ||
6204362043
MF.getFunction().hasFnAttribute("no-stack-arg-probe"))
6204462044
return false;
6204562045

@@ -62065,7 +62065,8 @@ X86TargetLowering::getStackProbeSymbolName(const MachineFunction &MF) const {
6206562065

6206662066
// Generally, if we aren't on Windows, the platform ABI does not include
6206762067
// support for stack probes, so don't emit them.
62068-
if (!Subtarget.isOSWindows() || Subtarget.isTargetMachO() ||
62068+
if ((!Subtarget.isOSWindows() && !Subtarget.isUEFI()) ||
62069+
Subtarget.isTargetMachO() ||
6206962070
MF.getFunction().hasFnAttribute("no-stack-arg-probe"))
6207062071
return "";
6207162072

0 commit comments

Comments
 (0)