forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SystemZ][XRay] Implement XRay instrumentation for SystemZ (llvm#113253)
Expands pseudo instructions PATCHABLE_FUNCTION_ENTER and PATCHABLE_RET into a small instruction sequence which calls into the XRay library.
- Loading branch information
Showing
6 changed files
with
161 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,44 @@ | ||
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck --check-prefixes=CHECK,NOVECTOR %s | ||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z15 | FileCheck --check-prefixes=CHECK,VECTOR %s | ||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z15 -mattr=+soft-float | FileCheck --check-prefixes=CHECK,NOVECTOR %s | ||
|
||
|
||
define signext i32 @foo() "function-instrument"="xray-always" { | ||
; CHECK-LABEL: .Lxray_sled_0: | ||
; CHECK: j .Ltmp[[#l:]] | ||
; CHECK: bcr 0, %r0 | ||
; CHECK: llilf %r2, 0 | ||
; NOVECTOR: brasl %r14, __xray_FunctionEntry@PLT | ||
; VECTOR: brasl %r14, __xray_FunctionEntryVec@PLT | ||
; CHECK: .Ltmp[[#l]]: | ||
ret i32 0 | ||
; CHECK-LABEL: .Lxray_sled_1: | ||
; CHECK: br %r14 | ||
; CHECK: bc 0, 0 | ||
; CHECK: llilf %r2, 0 | ||
; NOVECtOR: j __xray_FunctionExit@PLT | ||
; VECTOR: j __xray_FunctionExitVec@PLT | ||
} | ||
|
||
; CHECK: .section xray_instr_map,"ao",@progbits,foo | ||
; CHECK: .Lxray_sleds_start0: | ||
; CHECK: [[TMP1:.Ltmp[0-9]+]]: | ||
; CHECK: .quad .Lxray_sled_0-[[TMP1]] | ||
; CHECK: .quad .Lfunc_begin0-([[TMP1]]+8) | ||
; CHECK: .byte 0x00 | ||
; CHECK: .byte 0x01 | ||
; CHECK: .byte 0x02 | ||
; CHECK: .space 13 | ||
; CHECK: [[TMP2:.Ltmp[0-9]+]]: | ||
; CHECK: .quad .Lxray_sled_1-[[TMP2]] | ||
; CHECK: .quad .Lfunc_begin0-([[TMP2]]+8) | ||
; CHECK: .byte 0x01 | ||
; CHECK: .byte 0x01 | ||
; CHECK: .byte 0x02 | ||
; CHECK: .space 13 | ||
; CHECK: .Lxray_sleds_end0: | ||
; CHECK: .section xray_fn_idx,"ao",@progbits,foo | ||
; CHECK: .p2align 4 | ||
; CHECK: .Lxray_fn_idx0: | ||
; CHECK: .quad .Lxray_sleds_start0-.Lxray_fn_idx0 | ||
; CHECK: .quad 2 |