Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC][llvm] Create UEFI helper function #132462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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