Skip to content

Commit 4ce9698

Browse files
authored
merge main into amd-staging (llvm#2846)
passed all but aompSmoke smoke-fort-limbo openmp-ver
2 parents 4f1b362 + d41f5fe commit 4ce9698

File tree

174 files changed

+4559
-1457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+4559
-1457
lines changed

bolt/lib/Passes/BinaryPasses.cpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,27 +1765,26 @@ Error PrintProgramStats::runOnFunctions(BinaryContext &BC) {
17651765

17661766
if (opts::ShowDensity) {
17671767
double Density = 0.0;
1768-
// Sorted by the density in descending order.
1769-
llvm::stable_sort(FuncDensityList,
1770-
[&](const std::pair<double, uint64_t> &A,
1771-
const std::pair<double, uint64_t> &B) {
1772-
if (A.first != B.first)
1773-
return A.first > B.first;
1774-
return A.second < B.second;
1775-
});
1768+
llvm::sort(FuncDensityList);
17761769

17771770
uint64_t AccumulatedSamples = 0;
1778-
uint32_t I = 0;
17791771
assert(opts::ProfileDensityCutOffHot <= 1000000 &&
17801772
"The cutoff value is greater than 1000000(100%)");
1781-
while (AccumulatedSamples <
1782-
TotalSampleCount *
1783-
static_cast<float>(opts::ProfileDensityCutOffHot) /
1784-
1000000 &&
1785-
I < FuncDensityList.size()) {
1786-
AccumulatedSamples += FuncDensityList[I].second;
1787-
Density = FuncDensityList[I].first;
1788-
I++;
1773+
// Subtract samples in zero-density functions (no fall-throughs) from
1774+
// TotalSampleCount (not used anywhere below).
1775+
for (const auto [CurDensity, CurSamples] : FuncDensityList) {
1776+
if (CurDensity != 0.0)
1777+
break;
1778+
TotalSampleCount -= CurSamples;
1779+
}
1780+
const uint64_t CutoffSampleCount =
1781+
1.f * TotalSampleCount * opts::ProfileDensityCutOffHot / 1000000;
1782+
// Process functions in decreasing density order
1783+
for (const auto [CurDensity, CurSamples] : llvm::reverse(FuncDensityList)) {
1784+
if (AccumulatedSamples >= CutoffSampleCount)
1785+
break;
1786+
AccumulatedSamples += CurSamples;
1787+
Density = CurDensity;
17891788
}
17901789
if (Density == 0.0) {
17911790
BC.errs() << "BOLT-WARNING: the output profile is empty or the "

bolt/lib/Passes/PAuthGadgetScanner.cpp

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,90 @@ shouldReportReturnGadget(const BinaryContext &BC, const MCInstReference &Inst,
13191319
return make_gadget_report(RetKind, Inst, *RetReg);
13201320
}
13211321

1322+
/// While BOLT already marks some of the branch instructions as tail calls,
1323+
/// this function tries to detect less obvious cases, assuming false positives
1324+
/// are acceptable as long as there are not too many of them.
1325+
///
1326+
/// It is possible that not all the instructions classified as tail calls by
1327+
/// this function are safe to be considered as such for the purpose of code
1328+
/// transformations performed by BOLT. The intention of this function is to
1329+
/// spot some of actually missed tail calls (and likely a number of unrelated
1330+
/// indirect branch instructions) as long as this doesn't increase the amount
1331+
/// of false positive reports unacceptably.
1332+
static bool shouldAnalyzeTailCallInst(const BinaryContext &BC,
1333+
const BinaryFunction &BF,
1334+
const MCInstReference &Inst) {
1335+
// Some BC.MIB->isXYZ(Inst) methods simply delegate to MCInstrDesc::isXYZ()
1336+
// (such as isBranch at the time of writing this comment), some don't (such
1337+
// as isCall). For that reason, call MCInstrDesc's methods explicitly when
1338+
// it is important.
1339+
const MCInstrDesc &Desc =
1340+
BC.MII->get(static_cast<const MCInst &>(Inst).getOpcode());
1341+
// Tail call should be a branch (but not necessarily an indirect one).
1342+
if (!Desc.isBranch())
1343+
return false;
1344+
1345+
// Always analyze the branches already marked as tail calls by BOLT.
1346+
if (BC.MIB->isTailCall(Inst))
1347+
return true;
1348+
1349+
// Try to also check the branches marked as "UNKNOWN CONTROL FLOW" - the
1350+
// below is a simplified condition from BinaryContext::printInstruction.
1351+
bool IsUnknownControlFlow =
1352+
BC.MIB->isIndirectBranch(Inst) && !BC.MIB->getJumpTable(Inst);
1353+
1354+
if (BF.hasCFG() && IsUnknownControlFlow)
1355+
return true;
1356+
1357+
return false;
1358+
}
1359+
1360+
static std::optional<PartialReport<MCPhysReg>>
1361+
shouldReportUnsafeTailCall(const BinaryContext &BC, const BinaryFunction &BF,
1362+
const MCInstReference &Inst, const SrcState &S) {
1363+
static const GadgetKind UntrustedLRKind(
1364+
"untrusted link register found before tail call");
1365+
1366+
if (!shouldAnalyzeTailCallInst(BC, BF, Inst))
1367+
return std::nullopt;
1368+
1369+
// Not only the set of registers returned by getTrustedLiveInRegs() can be
1370+
// seen as a reasonable target-independent _approximation_ of "the LR", these
1371+
// are *exactly* those registers used by SrcSafetyAnalysis to initialize the
1372+
// set of trusted registers on function entry.
1373+
// Thus, this function basically checks that the precondition expected to be
1374+
// imposed by a function call instruction (which is hardcoded into the target-
1375+
// specific getTrustedLiveInRegs() function) is also respected on tail calls.
1376+
SmallVector<MCPhysReg> RegsToCheck = BC.MIB->getTrustedLiveInRegs();
1377+
LLVM_DEBUG({
1378+
traceInst(BC, "Found tail call inst", Inst);
1379+
traceRegMask(BC, "Trusted regs", S.TrustedRegs);
1380+
});
1381+
1382+
// In musl on AArch64, the _start function sets LR to zero and calls the next
1383+
// stage initialization function at the end, something along these lines:
1384+
//
1385+
// _start:
1386+
// mov x30, #0
1387+
// ; ... other initialization ...
1388+
// b _start_c ; performs "exit" system call at some point
1389+
//
1390+
// As this would produce a false positive for every executable linked with
1391+
// such libc, ignore tail calls performed by ELF entry function.
1392+
if (BC.StartFunctionAddress &&
1393+
*BC.StartFunctionAddress == Inst.getFunction()->getAddress()) {
1394+
LLVM_DEBUG({ dbgs() << " Skipping tail call in ELF entry function.\n"; });
1395+
return std::nullopt;
1396+
}
1397+
1398+
// Returns at most one report per instruction - this is probably OK...
1399+
for (auto Reg : RegsToCheck)
1400+
if (!S.TrustedRegs[Reg])
1401+
return make_gadget_report(UntrustedLRKind, Inst, Reg);
1402+
1403+
return std::nullopt;
1404+
}
1405+
13221406
static std::optional<PartialReport<MCPhysReg>>
13231407
shouldReportCallGadget(const BinaryContext &BC, const MCInstReference &Inst,
13241408
const SrcState &S) {
@@ -1478,6 +1562,9 @@ void FunctionAnalysisContext::findUnsafeUses(
14781562
if (PacRetGadgetsOnly)
14791563
return;
14801564

1565+
if (auto Report = shouldReportUnsafeTailCall(BC, BF, Inst, S))
1566+
Reports.push_back(*Report);
1567+
14811568
if (auto Report = shouldReportCallGadget(BC, Inst, S))
14821569
Reports.push_back(*Report);
14831570
if (auto Report = shouldReportSigningOracle(BC, Inst, S))

bolt/test/X86/zero-density.s

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Check that trampoline functions are excluded from density computation.
2+
3+
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
4+
# RUN: ld.lld %t.o -o %t
5+
# RUN: link_fdata %s %t %t.preagg PREAGG
6+
# RUN: llvm-strip -NLjmp %t
7+
# RUN: perf2bolt %t -p %t.preagg --pa -o %t.fdata | FileCheck %s
8+
# CHECK: Functions with density >= {{.*}} account for 99.00% total sample counts.
9+
# CHECK-NOT: the output profile is empty or the --profile-density-cutoff-hot option is set too low.
10+
11+
.text
12+
.globl trampoline
13+
trampoline:
14+
mov main,%rax
15+
jmpq *%rax
16+
.size trampoline,.-trampoline
17+
# PREAGG: f #trampoline# #trampoline# 2
18+
19+
.globl main
20+
main:
21+
.cfi_startproc
22+
vmovaps %zmm31,%zmm3
23+
24+
add $0x4,%r9
25+
add $0x40,%r10
26+
dec %r14
27+
Ljmp:
28+
jne main
29+
# PREAGG: T #Ljmp# #main# #Ljmp# 10
30+
ret
31+
.cfi_endproc
32+
.size main,.-main

bolt/test/binary-analysis/AArch64/gs-pacret-autiasp.s

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ f1:
1818
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
1919
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
2020
// CHECK-NEXT: This happens in the following basic block:
21+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
22+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
23+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
24+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
2125
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
2226
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
2327
// CHECK-NEXT: {{[0-9a-f]+}}: ret
@@ -40,6 +44,10 @@ f_intermediate_overwrite1:
4044
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
4145
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
4246
// CHECK-NEXT: This happens in the following basic block:
47+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
48+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
49+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
50+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
4351
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
4452
// CHECK-NEXT: {{[0-9a-f]+}}: autiasp
4553
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
@@ -63,6 +71,10 @@ f_intermediate_overwrite2:
6371
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
6472
// CHECK-NEXT: 1. {{[0-9a-f]+}}: mov x30, x0
6573
// CHECK-NEXT: This happens in the following basic block:
74+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
75+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
76+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
77+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
6678
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
6779
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
6880
// CHECK-NEXT: {{[0-9a-f]+}}: autiasp
@@ -102,6 +114,10 @@ f_intermediate_overwrite3:
102114
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
103115
// CHECK-NEXT: 1. {{[0-9a-f]+}}: mov w30, w0
104116
// CHECK-NEXT: This happens in the following basic block:
117+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
118+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
119+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
120+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
105121
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
106122
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
107123
// CHECK-NEXT: {{[0-9a-f]+}}: autiasp
@@ -126,6 +142,10 @@ f_nonx30_ret:
126142
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
127143
// CHECK-NEXT: 1. {{[0-9a-f]+}}: mov x16, x30
128144
// CHECK-NEXT: This happens in the following basic block:
145+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
146+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
147+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
148+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
129149
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
130150
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
131151
// CHECK-NEXT: {{[0-9a-f]+}}: mov x16, x30
@@ -325,6 +345,10 @@ f_autia1716:
325345
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
326346
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
327347
// CHECK-NEXT: This happens in the following basic block:
348+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
349+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
350+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
351+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
328352
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
329353
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
330354
// CHECK-NEXT: {{[0-9a-f]+}}: autia1716
@@ -347,6 +371,10 @@ f_autib1716:
347371
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
348372
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
349373
// CHECK-NEXT: This happens in the following basic block:
374+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
375+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
376+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
377+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
350378
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
351379
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
352380
// CHECK-NEXT: {{[0-9a-f]+}}: autib1716
@@ -369,6 +397,10 @@ f_autiax12:
369397
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
370398
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
371399
// CHECK-NEXT: This happens in the following basic block:
400+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
401+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
402+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
403+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
372404
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
373405
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
374406
// CHECK-NEXT: {{[0-9a-f]+}}: autia x12, sp
@@ -391,6 +423,10 @@ f_autibx12:
391423
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
392424
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
393425
// CHECK-NEXT: This happens in the following basic block:
426+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
427+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
428+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
429+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
394430
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
395431
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
396432
// CHECK-NEXT: {{[0-9a-f]+}}: autib x12, sp
@@ -442,6 +478,10 @@ f_autdax12:
442478
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
443479
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
444480
// CHECK-NEXT: This happens in the following basic block:
481+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
482+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
483+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
484+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
445485
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
446486
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
447487
// CHECK-NEXT: {{[0-9a-f]+}}: autda x12, sp
@@ -464,6 +504,10 @@ f_autdbx12:
464504
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
465505
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
466506
// CHECK-NEXT: This happens in the following basic block:
507+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
508+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
509+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
510+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
467511
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
468512
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
469513
// CHECK-NEXT: {{[0-9a-f]+}}: autdb x12, sp
@@ -515,6 +559,10 @@ f_autizax12:
515559
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
516560
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
517561
// CHECK-NEXT: This happens in the following basic block:
562+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
563+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
564+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
565+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
518566
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
519567
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
520568
// CHECK-NEXT: {{[0-9a-f]+}}: autiza x12
@@ -537,6 +585,10 @@ f_autizbx12:
537585
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
538586
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
539587
// CHECK-NEXT: This happens in the following basic block:
588+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
589+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
590+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
591+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
540592
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
541593
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
542594
// CHECK-NEXT: {{[0-9a-f]+}}: autizb x12
@@ -588,6 +640,10 @@ f_autdzax12:
588640
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
589641
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
590642
// CHECK-NEXT: This happens in the following basic block:
643+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
644+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
645+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
646+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
591647
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
592648
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
593649
// CHECK-NEXT: {{[0-9a-f]+}}: autdza x12
@@ -610,6 +666,10 @@ f_autdzbx12:
610666
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
611667
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
612668
// CHECK-NEXT: This happens in the following basic block:
669+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
670+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
671+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
672+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
613673
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
614674
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
615675
// CHECK-NEXT: {{[0-9a-f]+}}: autdzb x12
@@ -868,6 +928,10 @@ f_autia171615:
868928
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
869929
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
870930
// CHECK-NEXT: This happens in the following basic block:
931+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
932+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
933+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
934+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
871935
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
872936
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
873937
// CHECK-NEXT: {{[0-9a-f]+}}: autia171615
@@ -890,10 +954,20 @@ f_autib171615:
890954
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
891955
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
892956
// CHECK-NEXT: This happens in the following basic block:
957+
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
958+
// CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-0x10]!
959+
// CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
960+
// CHECK-NEXT: {{[0-9a-f]+}}: bl g
893961
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
894962
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
895963
// CHECK-NEXT: {{[0-9a-f]+}}: autib171615
896964
// CHECK-NEXT: {{[0-9a-f]+}}: ret
897965
ret
898966
.size f_autib171615, .-f_autib171615
899967

968+
.globl g
969+
.type g,@function
970+
g:
971+
nop
972+
ret
973+
.size g, .-g

0 commit comments

Comments
 (0)