Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SystemZ][z/OS] Add llvm.read_register() intrinsic support for zOS
Differential Revision: https://reviews.llvm.org/D127412
- Loading branch information
Yusra Syeda
committed
Jun 10, 2022
1 parent
117e103
commit 487ace4
Showing
2 changed files
with
26 additions
and
5 deletions.
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,16 @@ | ||
; RUN: llc < %s -mtriple=s390x-ibm-zos | FileCheck %s | ||
|
||
; CHECK-LABEL: get_stack: | ||
; CHECK: lgr 3, 4 | ||
; CHECK: b 2(7) | ||
|
||
define i8* @get_stack() nounwind { | ||
entry: | ||
%0 = call i64 @llvm.read_register.i64(metadata !0) | ||
%1 = inttoptr i64 %0 to i8* | ||
ret i8* %1 | ||
} | ||
|
||
declare i64 @llvm.read_register.i64(metadata) nounwind | ||
|
||
!0 = !{!"r4"} |