Skip to content

Conversation

@Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented Mar 21, 2025

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

Create useful helper function for UEFI 64 bit target that can be used in
tablegen files in future changes.
@llvmbot
Copy link
Member

llvmbot commented Mar 21, 2025

@llvm/pr-subscribers-backend-x86

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

Changes

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 --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(); }
 

@Prabhuk Prabhuk changed the title [llvm] Create UEFI helper function [NFC][llvm] Create UEFI helper function Mar 21, 2025
@Prabhuk Prabhuk merged commit 04b6f54 into llvm:main Apr 14, 2025
13 checks passed
@Prabhuk Prabhuk deleted the x86_64_be_2 branch May 14, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants