File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1344,19 +1344,20 @@ AArch64AsmPrinter::getCodeViewJumpTableInfo(int JTI,
1344
1344
}
1345
1345
1346
1346
void AArch64AsmPrinter::emitFunctionEntryLabel () {
1347
- if (MF->getFunction ().getCallingConv () == CallingConv::AArch64_VectorCall ||
1348
- MF->getFunction ().getCallingConv () ==
1349
- CallingConv::AArch64_SVE_VectorCall ||
1350
- MF->getInfo <AArch64FunctionInfo>()->isSVECC ()) {
1347
+ const Triple &TT = TM.getTargetTriple ();
1348
+ if (TT.isOSBinFormatELF () &&
1349
+ (MF->getFunction ().getCallingConv () == CallingConv::AArch64_VectorCall ||
1350
+ MF->getFunction ().getCallingConv () ==
1351
+ CallingConv::AArch64_SVE_VectorCall ||
1352
+ MF->getInfo <AArch64FunctionInfo>()->isSVECC ())) {
1351
1353
auto *TS =
1352
1354
static_cast <AArch64TargetStreamer *>(OutStreamer->getTargetStreamer ());
1353
1355
TS->emitDirectiveVariantPCS (CurrentFnSym);
1354
1356
}
1355
1357
1356
1358
AsmPrinter::emitFunctionEntryLabel ();
1357
1359
1358
- if (TM.getTargetTriple ().isWindowsArm64EC () &&
1359
- !MF->getFunction ().hasLocalLinkage ()) {
1360
+ if (TT.isWindowsArm64EC () && !MF->getFunction ().hasLocalLinkage ()) {
1360
1361
// For ARM64EC targets, a function definition's name is mangled differently
1361
1362
// from the normal symbol, emit required aliases here.
1362
1363
auto emitFunctionAlias = [&](MCSymbol *Src, MCSymbol *Dst) {
Original file line number Diff line number Diff line change 1
1
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -o - %s | FileCheck %s --check-prefix=CHECK-ASM --strict-whitespace
2
+ ; RUN: llc -mtriple=arm64-apple-macosx -mattr=+sve -o - %s | FileCheck %s --check-prefix=CHECK-ASM-NON-ELF-TARGET
2
3
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -filetype=obj -o - %s \
3
4
; RUN: | llvm-readobj --symbols - | FileCheck %s --check-prefix=CHECK-OBJ
5
+ ; RUN: llc -mtriple=arm64-apple-macosx -mattr=+sve -filetype=obj -o - %s \
6
+ ; RUN: | llvm-readobj --symbols - | FileCheck %s --check-prefix=CHECK-OBJ-NON-ELF-TARGET
7
+
8
+ ; .variant_pcs directive should only be emitted for ELF targets.
9
+ ; CHECK-ASM-NON-ELF-TARGET-NOT: .variant_pcs
10
+ ; CHECK-OBJ-NON-ELF-TARGET-NOT: Other [ (0x80)
4
11
5
12
; Check we don't crash when using a Mach-O object format.
6
13
; RUN: llc -mtriple=arm64-apple-macosx15.0.0 -mattr=+sve -filetype=obj -o /dev/null %s
You can’t perform that action at this time.
0 commit comments