Skip to content

Commit f2e7285

Browse files
committed
[AArch64][PtrAuth] Fix unwind state for tail calls
When generating unwind tables for code which uses return-address signing, we need to toggle the RA_SIGN_STATE DWARF register around any tail-calls, because these require the return address to be authenticated before the call, and could throw an exception. This is done using the .cfi_negate_ra_state directive before the call, and .cfi_restore_state at the start of the next basic block. However, since D153098, the .cfi_restore_state isn't being inserted, because the CFIFixup pass isn't being run. This re-enables that pass when return-adress signing is enabled. Reviewed By: ikudrin, MaskRay Differential Revision: https://reviews.llvm.org/D156428
1 parent b3b2a92 commit f2e7285

File tree

5 files changed

+212
-29
lines changed

5 files changed

+212
-29
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,6 +1908,7 @@ static void InsertReturnAddressAuth(MachineFunction &MF, MachineBasicBlock &MBB,
19081908
return;
19091909
const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
19101910
const TargetInstrInfo *TII = Subtarget.getInstrInfo();
1911+
bool EmitAsyncCFI = MFI.needsAsyncDwarfUnwindInfo(MF);
19111912

19121913
MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator();
19131914
DebugLoc DL;
@@ -1933,11 +1934,13 @@ static void InsertReturnAddressAuth(MachineFunction &MF, MachineBasicBlock &MBB,
19331934
TII->get(MFI.shouldSignWithBKey() ? AArch64::AUTIBSP : AArch64::AUTIASP))
19341935
.setMIFlag(MachineInstr::FrameDestroy);
19351936

1936-
unsigned CFIIndex =
1937-
MF.addFrameInst(MCCFIInstruction::createNegateRAState(nullptr));
1938-
BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
1939-
.addCFIIndex(CFIIndex)
1940-
.setMIFlags(MachineInstr::FrameDestroy);
1937+
if (EmitAsyncCFI) {
1938+
unsigned CFIIndex =
1939+
MF.addFrameInst(MCCFIInstruction::createNegateRAState(nullptr));
1940+
BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
1941+
.addCFIIndex(CFIIndex)
1942+
.setMIFlags(MachineInstr::FrameDestroy);
1943+
}
19411944
if (NeedsWinCFI) {
19421945
*HasWinCFI = true;
19431946
BuildMI(MBB, MBBI, DL, TII->get(AArch64::SEH_PACSignLR))

llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-regsave.mir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
# CHECK: BL @[[OUTLINED_FUNCTION]]
3333
# CHECK: bb.5:
3434
# CHECK: frame-destroy AUTIBSP
35-
# CHECK-NEXT: frame-destroy CFI_INSTRUCTION negate_ra_sign_state
3635
# CHECK-NEXT: RET
3736
name: foo
3837
tracksRegLiveness: true

llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ define i32 @a() #0 {
1414
; CHECK-NEXT: .cfi_negate_ra_state
1515
; V8A: hint #29
1616
; V83A: autiasp
17-
; CHECK-NEXT: .cfi_negate_ra_state
1817
; CHECK-NEXT: ret
1918
entry:
2019
%call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)
@@ -30,7 +29,6 @@ define i32 @b() #0 {
3029
; CHECK-NEXT: .cfi_negate_ra_state
3130
; V8A: hint #29
3231
; V83A: autiasp
33-
; CHECK-NEXT: .cfi_negate_ra_state
3432
; CHECK-NEXT: ret
3533
entry:
3634
%call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)
@@ -46,7 +44,6 @@ define hidden i32 @c(ptr %fptr) #0 {
4644
; CHECK-NEXT: .cfi_negate_ra_state
4745
; V8A: hint #29
4846
; V83A: autiasp
49-
; CHECK-NEXT: .cfi_negate_ra_state
5047
; CHECK-NEXT: ret
5148
entry:
5249
%call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)
@@ -62,7 +59,6 @@ define hidden i32 @d(ptr %fptr) #0 {
6259
; CHECK-NEXT: .cfi_negate_ra_state
6360
; V8A: hint #29
6461
; V83A: autiasp
65-
; CHECK-NEXT: .cfi_negate_ra_state
6662
; CHECK-NEXT: ret
6763
entry:
6864
%call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)
Lines changed: 204 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,47 @@
1-
; RUN: llc -mtriple=aarch64 < %s | FileCheck --check-prefixes CHECK,CHECK-V8A %s
2-
; RUN: llc -mtriple=aarch64 -mattr=v8.3a < %s | FileCheck --check-prefixes CHECK,CHECK-V83A %s
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2+
; RUN: llc -mtriple=aarch64 < %s | FileCheck --check-prefixes CHECK-V8A %s
3+
; RUN: llc -mtriple=aarch64 -mattr=v8.3a < %s | FileCheck --check-prefixes CHECK-V83A %s
34
; RUN: llc -mtriple=aarch64 -filetype=obj -o - <%s | llvm-dwarfdump -v - | FileCheck --check-prefix=CHECK-DUMP %s
45

56
@.str = private unnamed_addr constant [15 x i8] c"some exception\00", align 1
67
@_ZTIPKc = external dso_local constant ptr
78

8-
; CHECK: @_Z3fooi
9-
; CHECK-V8A: hint #25
10-
; CHECK-V83A: paciasp
11-
; CHECK-NEXT: .cfi_negate_ra_state
12-
; CHECK-NOT: .cfi_negate_ra_state
139
define dso_local i32 @_Z3fooi(i32 %x) #0 {
10+
; CHECK-V8A-LABEL: _Z3fooi:
11+
; CHECK-V8A: // %bb.0: // %entry
12+
; CHECK-V8A-NEXT: hint #25
13+
; CHECK-V8A-NEXT: .cfi_negate_ra_state
14+
; CHECK-V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
15+
; CHECK-V8A-NEXT: .cfi_def_cfa_offset 16
16+
; CHECK-V8A-NEXT: .cfi_offset w30, -16
17+
; CHECK-V8A-NEXT: str w0, [sp, #8]
18+
; CHECK-V8A-NEXT: mov w0, #8 // =0x8
19+
; CHECK-V8A-NEXT: bl __cxa_allocate_exception
20+
; CHECK-V8A-NEXT: adrp x8, .L.str
21+
; CHECK-V8A-NEXT: add x8, x8, :lo12:.L.str
22+
; CHECK-V8A-NEXT: adrp x1, _ZTIPKc
23+
; CHECK-V8A-NEXT: add x1, x1, :lo12:_ZTIPKc
24+
; CHECK-V8A-NEXT: mov x2, xzr
25+
; CHECK-V8A-NEXT: str x8, [x0]
26+
; CHECK-V8A-NEXT: bl __cxa_throw
27+
;
28+
; CHECK-V83A-LABEL: _Z3fooi:
29+
; CHECK-V83A: // %bb.0: // %entry
30+
; CHECK-V83A-NEXT: paciasp
31+
; CHECK-V83A-NEXT: .cfi_negate_ra_state
32+
; CHECK-V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
33+
; CHECK-V83A-NEXT: .cfi_def_cfa_offset 16
34+
; CHECK-V83A-NEXT: .cfi_offset w30, -16
35+
; CHECK-V83A-NEXT: str w0, [sp, #8]
36+
; CHECK-V83A-NEXT: mov w0, #8 // =0x8
37+
; CHECK-V83A-NEXT: bl __cxa_allocate_exception
38+
; CHECK-V83A-NEXT: adrp x8, .L.str
39+
; CHECK-V83A-NEXT: add x8, x8, :lo12:.L.str
40+
; CHECK-V83A-NEXT: adrp x1, _ZTIPKc
41+
; CHECK-V83A-NEXT: add x1, x1, :lo12:_ZTIPKc
42+
; CHECK-V83A-NEXT: mov x2, xzr
43+
; CHECK-V83A-NEXT: str x8, [x0]
44+
; CHECK-V83A-NEXT: bl __cxa_throw
1445
entry:
1546
%retval = alloca i32, align 4
1647
%x.addr = alloca i32, align 4
@@ -25,10 +56,175 @@ return: ; No predecessors!
2556
ret i32 %0
2657
}
2758

59+
; For asynchronous unwind tables, we need to flip the value of RA_SIGN_STATE
60+
; before and after the tail call.
61+
define hidden noundef i32 @baz_async(i32 noundef %a) #0 uwtable(async) {
62+
; CHECK-V8A-LABEL: baz_async:
63+
; CHECK-V8A: // %bb.0: // %entry
64+
; CHECK-V8A-NEXT: hint #25
65+
; CHECK-V8A-NEXT: .cfi_negate_ra_state
66+
; CHECK-V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
67+
; CHECK-V8A-NEXT: .cfi_def_cfa_offset 16
68+
; CHECK-V8A-NEXT: .cfi_offset w30, -16
69+
; CHECK-V8A-NEXT: .cfi_remember_state
70+
; CHECK-V8A-NEXT: cbz w0, .LBB1_2
71+
; CHECK-V8A-NEXT: // %bb.1: // %if.then
72+
; CHECK-V8A-NEXT: mov w0, wzr
73+
; CHECK-V8A-NEXT: bl _Z3bari
74+
; CHECK-V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
75+
; CHECK-V8A-NEXT: .cfi_def_cfa_offset 0
76+
; CHECK-V8A-NEXT: hint #29
77+
; CHECK-V8A-NEXT: .cfi_negate_ra_state
78+
; CHECK-V8A-NEXT: .cfi_restore w30
79+
; CHECK-V8A-NEXT: b _Z3bari
80+
; CHECK-V8A-NEXT: .LBB1_2: // %if.else
81+
; CHECK-V8A-NEXT: .cfi_restore_state
82+
; CHECK-V8A-NEXT: bl _Z4quuxi
83+
; CHECK-V8A-NEXT: add w0, w0, #1
84+
; CHECK-V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
85+
; CHECK-V8A-NEXT: .cfi_def_cfa_offset 0
86+
; CHECK-V8A-NEXT: hint #29
87+
; CHECK-V8A-NEXT: .cfi_negate_ra_state
88+
; CHECK-V8A-NEXT: .cfi_restore w30
89+
; CHECK-V8A-NEXT: ret
90+
;
91+
; CHECK-V83A-LABEL: baz_async:
92+
; CHECK-V83A: // %bb.0: // %entry
93+
; CHECK-V83A-NEXT: paciasp
94+
; CHECK-V83A-NEXT: .cfi_negate_ra_state
95+
; CHECK-V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
96+
; CHECK-V83A-NEXT: .cfi_def_cfa_offset 16
97+
; CHECK-V83A-NEXT: .cfi_offset w30, -16
98+
; CHECK-V83A-NEXT: .cfi_remember_state
99+
; CHECK-V83A-NEXT: cbz w0, .LBB1_2
100+
; CHECK-V83A-NEXT: // %bb.1: // %if.then
101+
; CHECK-V83A-NEXT: mov w0, wzr
102+
; CHECK-V83A-NEXT: bl _Z3bari
103+
; CHECK-V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
104+
; CHECK-V83A-NEXT: .cfi_def_cfa_offset 0
105+
; CHECK-V83A-NEXT: autiasp
106+
; CHECK-V83A-NEXT: .cfi_negate_ra_state
107+
; CHECK-V83A-NEXT: .cfi_restore w30
108+
; CHECK-V83A-NEXT: b _Z3bari
109+
; CHECK-V83A-NEXT: .LBB1_2: // %if.else
110+
; CHECK-V83A-NEXT: .cfi_restore_state
111+
; CHECK-V83A-NEXT: bl _Z4quuxi
112+
; CHECK-V83A-NEXT: add w0, w0, #1
113+
; CHECK-V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
114+
; CHECK-V83A-NEXT: .cfi_def_cfa_offset 0
115+
; CHECK-V83A-NEXT: .cfi_restore w30
116+
; CHECK-V83A-NEXT: retaa
117+
entry:
118+
%tobool.not = icmp eq i32 %a, 0
119+
br i1 %tobool.not, label %if.else, label %if.then
120+
121+
if.then: ; preds = %entry
122+
%call = tail call noundef i32 @_Z3bari(i32 noundef 0)
123+
%call1 = tail call noundef i32 @_Z3bari(i32 noundef %call)
124+
br label %return
125+
126+
if.else: ; preds = %entry
127+
%call2 = tail call noundef i32 @_Z4quuxi(i32 noundef 0)
128+
%add = add nsw i32 %call2, 1
129+
br label %return
130+
131+
return: ; preds = %if.else, %if.then
132+
%retval.0 = phi i32 [ %call1, %if.then ], [ %add, %if.else ]
133+
ret i32 %retval.0
134+
}
135+
136+
; For synchronous unwind tables, we don't need to update the unwind tables
137+
; around the tail call. The tail-called function might throw an exception, but
138+
; at this point we are set up to return into baz's caller, so the unwinder will
139+
; never see baz's unwind table for that exception.
140+
define hidden noundef i32 @baz_sync(i32 noundef %a) #0 uwtable(sync) {
141+
; CHECK-V8A-LABEL: baz_sync:
142+
; CHECK-V8A: // %bb.0: // %entry
143+
; CHECK-V8A-NEXT: hint #25
144+
; CHECK-V8A-NEXT: .cfi_negate_ra_state
145+
; CHECK-V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
146+
; CHECK-V8A-NEXT: .cfi_def_cfa_offset 16
147+
; CHECK-V8A-NEXT: .cfi_offset w30, -16
148+
; CHECK-V8A-NEXT: cbz w0, .LBB2_2
149+
; CHECK-V8A-NEXT: // %bb.1: // %if.then
150+
; CHECK-V8A-NEXT: mov w0, wzr
151+
; CHECK-V8A-NEXT: bl _Z3bari
152+
; CHECK-V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
153+
; CHECK-V8A-NEXT: hint #29
154+
; CHECK-V8A-NEXT: b _Z3bari
155+
; CHECK-V8A-NEXT: .LBB2_2: // %if.else
156+
; CHECK-V8A-NEXT: bl _Z4quuxi
157+
; CHECK-V8A-NEXT: add w0, w0, #1
158+
; CHECK-V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
159+
; CHECK-V8A-NEXT: hint #29
160+
; CHECK-V8A-NEXT: ret
161+
;
162+
; CHECK-V83A-LABEL: baz_sync:
163+
; CHECK-V83A: // %bb.0: // %entry
164+
; CHECK-V83A-NEXT: paciasp
165+
; CHECK-V83A-NEXT: .cfi_negate_ra_state
166+
; CHECK-V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
167+
; CHECK-V83A-NEXT: .cfi_def_cfa_offset 16
168+
; CHECK-V83A-NEXT: .cfi_offset w30, -16
169+
; CHECK-V83A-NEXT: cbz w0, .LBB2_2
170+
; CHECK-V83A-NEXT: // %bb.1: // %if.then
171+
; CHECK-V83A-NEXT: mov w0, wzr
172+
; CHECK-V83A-NEXT: bl _Z3bari
173+
; CHECK-V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
174+
; CHECK-V83A-NEXT: autiasp
175+
; CHECK-V83A-NEXT: b _Z3bari
176+
; CHECK-V83A-NEXT: .LBB2_2: // %if.else
177+
; CHECK-V83A-NEXT: bl _Z4quuxi
178+
; CHECK-V83A-NEXT: add w0, w0, #1
179+
; CHECK-V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
180+
; CHECK-V83A-NEXT: retaa
181+
entry:
182+
%tobool.not = icmp eq i32 %a, 0
183+
br i1 %tobool.not, label %if.else, label %if.then
184+
185+
if.then: ; preds = %entry
186+
%call = tail call noundef i32 @_Z3bari(i32 noundef 0)
187+
%call1 = tail call noundef i32 @_Z3bari(i32 noundef %call)
188+
br label %return
189+
190+
if.else: ; preds = %entry
191+
%call2 = tail call noundef i32 @_Z4quuxi(i32 noundef 0)
192+
%add = add nsw i32 %call2, 1
193+
br label %return
194+
195+
return: ; preds = %if.else, %if.then
196+
%retval.0 = phi i32 [ %call1, %if.then ], [ %add, %if.else ]
197+
ret i32 %retval.0
198+
}
199+
28200
declare dso_local ptr @__cxa_allocate_exception(i64)
29201

30202
declare dso_local void @__cxa_throw(ptr, ptr, ptr)
31203

204+
declare dso_local noundef i32 @_Z3bari(i32 noundef) local_unnamed_addr
205+
declare dso_local noundef i32 @_Z4quuxi(i32 noundef) local_unnamed_addr
206+
32207
attributes #0 = { "sign-return-address"="all" }
33208

34-
;CHECK-DUMP: DW_CFA_AARCH64_negate_ra_state
209+
; foo
210+
; CHECK-DUMP-LABEL: FDE
211+
; CHECK-DUMP: DW_CFA_AARCH64_negate_ra_state:
212+
; CHECK-DUMP-NOT: DW_CFA_AARCH64_negate_ra_state
213+
; CHECK-DUMP-NOT: DW_CFA_remember_state
214+
; CHECK-DUMP-NOT: DW_CFA_restore_state
215+
216+
; baz_async
217+
; CHECK-DUMP-LABEL: FDE
218+
; CHECK-DUMP: Format: DWARF32
219+
; CHECK-DUMP: DW_CFA_AARCH64_negate_ra_state:
220+
; CHECK-DUMP: DW_CFA_remember_state:
221+
; CHECK-DUMP: DW_CFA_AARCH64_negate_ra_state:
222+
; CHECK-DUMP: DW_CFA_restore_state:
223+
; CHECK-DUMP: DW_CFA_AARCH64_negate_ra_state:
224+
225+
; baz_sync
226+
; CHECK-DUMP-LABEL: FDE
227+
; CHECK-DUMP: DW_CFA_AARCH64_negate_ra_state:
228+
; CHECK-DUMP-NOT: DW_CFA_AARCH64_negate_ra_state
229+
; CHECK-DUMP-NOT: DW_CFA_remember_state
230+
; CHECK-DUMP-NOT: DW_CFA_restore_state

llvm/test/CodeGen/AArch64/sign-return-address.ll

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ define i32 @leaf_sign_all(i32 %x) "sign-return-address"="all" {
2929
; COMPAT-NEXT: hint #25
3030
; COMPAT-NEXT: .cfi_negate_ra_state
3131
; COMPAT-NEXT: hint #29
32-
; COMPAT-NEXT: .cfi_negate_ra_state
3332
; COMPAT-NEXT: ret
3433
;
3534
; V83A-LABEL: leaf_sign_all:
@@ -53,7 +52,6 @@ define i64 @leaf_clobbers_lr(i64 %x) "sign-return-address"="non-leaf" {
5352
; COMPAT-NEXT: //NO_APP
5453
; COMPAT-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
5554
; COMPAT-NEXT: hint #29
56-
; COMPAT-NEXT: .cfi_negate_ra_state
5755
; COMPAT-NEXT: ret
5856
;
5957
; V83A-LABEL: leaf_clobbers_lr:
@@ -85,7 +83,6 @@ define i32 @non_leaf_sign_all(i32 %x) "sign-return-address"="all" {
8583
; COMPAT-NEXT: bl foo
8684
; COMPAT-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
8785
; COMPAT-NEXT: hint #29
88-
; COMPAT-NEXT: .cfi_negate_ra_state
8986
; COMPAT-NEXT: ret
9087
;
9188
; V83A-LABEL: non_leaf_sign_all:
@@ -113,7 +110,6 @@ define i32 @non_leaf_sign_non_leaf(i32 %x) "sign-return-address"="non-leaf" {
113110
; COMPAT-NEXT: bl foo
114111
; COMPAT-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
115112
; COMPAT-NEXT: hint #29
116-
; COMPAT-NEXT: .cfi_negate_ra_state
117113
; COMPAT-NEXT: ret
118114
;
119115
; V83A-LABEL: non_leaf_sign_non_leaf:
@@ -144,7 +140,6 @@ define i32 @non_leaf_scs(i32 %x) "sign-return-address"="non-leaf" shadowcallstac
144140
; CHECK-NEXT: bl foo
145141
; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
146142
; CHECK-NEXT: autiasp
147-
; CHECK-NEXT: .cfi_negate_ra_state
148143
; CHECK-NEXT: ldr x30, [x18, #-8]!
149144
; CHECK-NEXT: ret
150145
%call = call i32 @foo(i32 %x)
@@ -175,7 +170,6 @@ define fastcc void @spill_lr_and_tail_call(i64 %x) "sign-return-address"="all" {
175170
; COMPAT-NEXT: //NO_APP
176171
; COMPAT-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
177172
; COMPAT-NEXT: hint #29
178-
; COMPAT-NEXT: .cfi_negate_ra_state
179173
; COMPAT-NEXT: b bar
180174
;
181175
; V83A-LABEL: spill_lr_and_tail_call:
@@ -190,7 +184,6 @@ define fastcc void @spill_lr_and_tail_call(i64 %x) "sign-return-address"="all" {
190184
; V83A-NEXT: //NO_APP
191185
; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
192186
; V83A-NEXT: autiasp
193-
; V83A-NEXT: .cfi_negate_ra_state
194187
; V83A-NEXT: b bar
195188
call void asm sideeffect "mov x30, $0", "r,~{lr}"(i64 %x) #1
196189
tail call fastcc i64 @bar(i64 %x)
@@ -203,7 +196,6 @@ define i32 @leaf_sign_all_a_key(i32 %x) "sign-return-address"="all" "sign-return
203196
; COMPAT-NEXT: hint #25
204197
; COMPAT-NEXT: .cfi_negate_ra_state
205198
; COMPAT-NEXT: hint #29
206-
; COMPAT-NEXT: .cfi_negate_ra_state
207199
; COMPAT-NEXT: ret
208200
;
209201
; V83A-LABEL: leaf_sign_all_a_key:
@@ -221,7 +213,6 @@ define i32 @leaf_sign_all_b_key(i32 %x) "sign-return-address"="all" "sign-return
221213
; COMPAT-NEXT: hint #27
222214
; COMPAT-NEXT: .cfi_negate_ra_state
223215
; COMPAT-NEXT: hint #31
224-
; COMPAT-NEXT: .cfi_negate_ra_state
225216
; COMPAT-NEXT: ret
226217
;
227218
; V83A-LABEL: leaf_sign_all_b_key:
@@ -250,7 +241,6 @@ define i32 @leaf_sign_all_a_key_bti(i32 %x) "sign-return-address"="all" "sign-re
250241
; COMPAT-NEXT: hint #25
251242
; COMPAT-NEXT: .cfi_negate_ra_state
252243
; COMPAT-NEXT: hint #29
253-
; COMPAT-NEXT: .cfi_negate_ra_state
254244
; COMPAT-NEXT: ret
255245
;
256246
; V83A-LABEL: leaf_sign_all_a_key_bti:
@@ -269,7 +259,6 @@ define i32 @leaf_sign_all_b_key_bti(i32 %x) "sign-return-address"="all" "sign-re
269259
; COMPAT-NEXT: hint #27
270260
; COMPAT-NEXT: .cfi_negate_ra_state
271261
; COMPAT-NEXT: hint #31
272-
; COMPAT-NEXT: .cfi_negate_ra_state
273262
; COMPAT-NEXT: ret
274263
;
275264
; V83A-LABEL: leaf_sign_all_b_key_bti:

0 commit comments

Comments
 (0)