-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][Win] Emit SEH instructions for the swift async context-rela…
…ted instructions in the prologue and the epilogue. (#66967) This fixes an error from checkARM64Instructions() in MCWin64EH.cpp.
- Loading branch information
1 parent
59a67ea
commit 0ecd884
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; RUN: rm -rf %t && mkdir -p %t | ||
; RUN: llc -mtriple aarch64-unknown-windows-msvc %s -o - | FileCheck %s | ||
; RUN: llc -mtriple aarch64-unknown-windows-msvc -filetype obj %s -o %t/a.o | ||
|
||
; Check that the prologue/epilogue instructions for the swift async | ||
; context have an associated SEH instruction and that it doesn't error | ||
; when the output is an object file. | ||
|
||
; CHECK: orr x29, x29, #0x1000000000000000 | ||
; CHECK-NEXT: .seh_nop | ||
; CHECK: str x22, [sp, #16] | ||
; CHECK-NEXT: .seh_nop | ||
; CHECK: and x29, x29, #0xefffffffffffffff | ||
; CHECK-NEXT: .seh_nop | ||
|
||
declare ptr @llvm.swift.async.context.addr() | ||
|
||
define internal swifttailcc void @test(ptr nocapture readonly swiftasync %0) { | ||
entryresume.0: | ||
%1 = load ptr, ptr %0, align 8 | ||
%2 = tail call ptr @llvm.swift.async.context.addr() | ||
store ptr %1, ptr %2, align 8 | ||
ret void | ||
} |