[llvm] [llvm] Create UEFI helper function (PR #132462)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 21 12:59:40 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Prabhuk (OOO till April 2nd Week) (Prabhuk)

<details>
<summary>Changes</summary>

Create useful helper function for UEFI 64 bit target that can be used in
tablegen files in future changes.


---
Full diff: https://github.com/llvm/llvm-project/pull/132462.diff


1 Files Affected:

- (modified) llvm/lib/Target/X86/X86Subtarget.h (+3-1) 


``````````diff
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index 8f2d326a69398..78615fabee5a5 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -331,7 +331,9 @@ class X86Subtarget final : public X86GenSubtargetInfo {
 
   bool isOSWindows() const { return TargetTriple.isOSWindows(); }
 
-  bool isOSWindowsOrUEFI() const { return isOSWindows() || isUEFI(); }
+  bool isOSWindowsOrUEFI() const { return TargetTriple.isOSWindowsOrUEFI(); }
+
+  bool isTargetUEFI64() const { return Is64Bit && isUEFI(); }
 
   bool isTargetWin64() const { return Is64Bit && isOSWindows(); }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/132462


More information about the llvm-commits mailing list