Skip to content

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

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

Merged
merged 1 commit into from
Apr 14, 2025
Merged

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
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
Create useful helper functions for UEFI 64 bit target that can be used in
tablegen files in future changes.
@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