-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Implement INIT/ADJUST_TRAMPOLINE
Add support for llvm.init.trampoline and llvm.adjust.trampoline intrinsics for AArch64. Fixes #65573 Fixes #76927 Fixes #83555 Updates #66157
- Loading branch information
Showing
6 changed files
with
127 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
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
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,19 @@ | ||
; RUN: llc -mtriple=aarch64-- < %s | FileCheck %s | ||
|
||
declare void @llvm.init.trampoline(ptr, ptr, ptr); | ||
declare ptr @llvm.adjust.trampoline(ptr); | ||
|
||
define i64 @f(ptr nest %c, i64 %x, i64 %y) { | ||
%sum = add i64 %x, %y | ||
ret i64 %sum | ||
} | ||
|
||
define i64 @main() { | ||
%val = alloca i64 | ||
%nval = bitcast ptr %val to ptr | ||
%tramp = alloca [36 x i8], align 8 | ||
; CHECK: bl __trampoline_setup | ||
call void @llvm.init.trampoline(ptr %tramp, ptr @f, ptr %nval) | ||
%fp = call ptr @llvm.adjust.trampoline(ptr %tramp) | ||
ret i64 0 | ||
} |