Skip to content

Commit 7324b6a

Browse files
committed
Tests: define callee function instead of referencing callee_ext
1 parent c9bc2c4 commit 7324b6a

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

bolt/test/binary-analysis/AArch64/gs-pauth-calls.s

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
.text
88

9+
.globl callee
10+
.type callee,@function
11+
callee:
12+
ret
13+
.size callee, .-callee
14+
915
.globl good_direct_call
1016
.type good_direct_call,@function
1117
good_direct_call:
@@ -14,7 +20,7 @@ good_direct_call:
1420
stp x29, x30, [sp, #-16]!
1521
mov x29, sp
1622

17-
bl callee_ext
23+
bl callee
1824

1925
ldp x29, x30, [sp], #16
2026
autiasp
@@ -431,7 +437,7 @@ bad_indirect_call_mem_chain_of_auts_multi_bb:
431437
.type good_direct_tailcall,@function
432438
good_direct_tailcall:
433439
// CHECK-NOT: good_direct_tailcall
434-
b callee_ext
440+
b callee
435441
.size good_direct_tailcall, .-good_direct_tailcall
436442

437443
.globl good_indirect_tailcall_mem
@@ -548,60 +554,59 @@ direct_call_invalidates_safety:
548554
// CHECK-LABEL: GS-PAUTH: non-protected call found in function direct_call_invalidates_safety, basic block {{[^,]+}}, at address
549555
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: blr x2
550556
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
551-
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl
552-
// FIXME: Print the destination of BL as callee_ext instead of .LtmpN
557+
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl callee
553558
// CHECK-LABEL: GS-PAUTH: non-protected call found in function direct_call_invalidates_safety, basic block {{[^,]+}}, at address
554559
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: blr x8
555560
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
556-
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl
561+
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl callee
557562
// CHECK-LABEL: GS-PAUTH: non-protected call found in function direct_call_invalidates_safety, basic block {{[^,]+}}, at address
558563
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: blr x10
559564
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
560-
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl
565+
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl callee
561566
// CHECK-LABEL: GS-PAUTH: non-protected call found in function direct_call_invalidates_safety, basic block {{[^,]+}}, at address
562567
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: blr x16
563568
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
564-
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl
569+
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl callee
565570
// CHECK-LABEL: GS-PAUTH: non-protected call found in function direct_call_invalidates_safety, basic block {{[^,]+}}, at address
566571
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: blr x18
567572
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
568-
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl
573+
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl callee
569574
// CHECK-LABEL: GS-PAUTH: non-protected call found in function direct_call_invalidates_safety, basic block {{[^,]+}}, at address
570575
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: blr x20
571576
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
572-
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl
577+
// CHECK-NEXT: 1. {{[0-9a-f]+}}: bl callee
573578
paciasp
574579
stp x29, x30, [sp, #-16]!
575580
mov x29, sp
576581

577582
mov x2, x0
578583
autiza x2
579-
bl callee_ext
584+
bl callee
580585
blr x2
581586

582587
mov x8, x0
583588
autiza x8
584-
bl callee_ext
589+
bl callee
585590
blr x8
586591

587592
mov x10, x0
588593
autiza x10
589-
bl callee_ext
594+
bl callee
590595
blr x10
591596

592597
mov x16, x0
593598
autiza x16
594-
bl callee_ext
599+
bl callee
595600
blr x16
596601

597602
mov x18, x0
598603
autiza x18
599-
bl callee_ext
604+
bl callee
600605
blr x18
601606

602607
mov x20, x0
603608
autiza x20
604-
bl callee_ext
609+
bl callee
605610
blr x20
606611

607612
ldp x29, x30, [sp], #16

0 commit comments

Comments
 (0)