File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ bool MarkRAStates::runOnFunction(BinaryFunction &BF) {
7373 BF.setIgnored ();
7474 return false ;
7575 }
76- // The signing instruction itself is unsinged, but the next will be
76+ // The signing instruction itself is unsigned, the next will be
7777 // signed.
7878 BC.MIB ->setRAUnsigned (Inst);
7979 } else if (BC.MIB ->isPAuthOnLR (Inst)) {
Original file line number Diff line number Diff line change 11# Checking th at .cfi - negate_ra_state directives are emitted in the same location as in the input in the case of no optimizations.
22
3+ # The foo and bar functions are a pair , with the first signing the return address ,
4+ # and the second authenticating it. We have a tailcall between the two.
5+ # This is testing th at BOLT can handle functions starting in signed RA state.
6+
37# RUN: llvm - mc - filetype=obj - triple aarch64 - unknown - unknown %s - o %t.o
48# RUN: %clang %cflags %t.o - o %t.exe - Wl ,- q
59# RUN: llvm - bolt %t.exe - o %t.exe.bolt -- no - threads -- print - all | FileCheck %s -- check - prefix=CHECK - BOLT
610
711# Check th at the negate - ra - state at the start of bar is not discarded.
812# If it was discarded , MarkRAState would report bar as having inconsistent RAStates.
13+ # This is testing the handling of initialRAState on the BinaryFunction.
914# CHECK - BOLT - NOT : BOLT - INFO: inconsistent RAStates in function foo
1015# CHECK - BOLT - NOT : BOLT - INFO: inconsistent RAStates in function bar
1116
6974 ret
7075 .cfi_endproc
7176 .size bar , . - bar
72-
73- . global _start
74- .type _start , %function
75- _start:
76- b foo
Original file line number Diff line number Diff line change 3636foo:
3737.cfi_startproc
3838.entry_bb:
39+ # FDATA: 1 foo #.entry_bb# 10
3940 paciasp
4041 .cfi_negate_ra_state // indicating that paciasp changed the RA state to signed
41- # FDATA: 1 foo #.entry_bb# 10
4242 cmp x0, #0
4343 b.eq .Lcold_bb1
44+ .Lfallthrough:
4445 autiasp
4546 .cfi_negate_ra_state // indicating that autiasp changed the RA state to unsigned
4647 ret
4748 .cfi_negate_ra_state // ret has unsigned RA state, but the next inst (autiasp) has signed RA state
48- .Lcold_bb1:
49+ .Lcold_bb1: // split point
4950 autiasp
5051 .cfi_negate_ra_state // indicating that autiasp changed the RA state to unsigned
5152 ret
You can’t perform that action at this time.
0 commit comments