[clang] [Clang][AArch64] Define __USER_LABEL_PREFIX__ to # for ARM64EC (PR #78913)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 21 12:42:42 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-backend-aarch64
Author: Billy Laws (bylaws)
<details>
<summary>Changes</summary>
This is required so that the linker knows that any symbols defined in assembly code are ARM64EC rather than X86_64.
CC: @<!-- -->cjacek
---
Full diff: https://github.com/llvm/llvm-project/pull/78913.diff
1 Files Affected:
- (modified) clang/lib/Basic/Targets/AArch64.cpp (+6-4)
``````````diff
diff --git a/clang/lib/Basic/Targets/AArch64.cpp b/clang/lib/Basic/Targets/AArch64.cpp
index d47181bfca4fc86..4f57c30279a91fb 100644
--- a/clang/lib/Basic/Targets/AArch64.cpp
+++ b/clang/lib/Basic/Targets/AArch64.cpp
@@ -1462,10 +1462,12 @@ WindowsARM64TargetInfo::WindowsARM64TargetInfo(const llvm::Triple &Triple,
}
void WindowsARM64TargetInfo::setDataLayout() {
- resetDataLayout(Triple.isOSBinFormatMachO()
- ? "e-m:o-i64:64-i128:128-n32:64-S128"
- : "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128",
- Triple.isOSBinFormatMachO() ? "_" : "");
+ if (Triple.isOSBinFormatMachO()) {
+ resetDataLayout("e-m:o-i64:64-i128:128-n32:64-S128", "_");
+ } else {
+ resetDataLayout("e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128",
+ Triple.isWindowsArm64EC() ? "#" : "");
+ }
}
TargetInfo::BuiltinVaListKind
``````````
</details>
https://github.com/llvm/llvm-project/pull/78913
More information about the cfe-commits
mailing list