Text file
src/runtime/cgo/trampoline_test_s390x.s
1 // Copyright 2026 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 //go:build goexperiment.runtimecgopurego && !msan && !tsan && unix
6
7 #include "textflag.h"
8
9 // Called on g0 by cgoCallTrampoline with a PC buffer in R2, its size
10 // in R3, and runtime.Callers in R4. Set up the ABIInternal arguments
11 // for Callers(0, buf) and preserve the host's callee-saved registers.
12 TEXT ·trampolineCallers(SB),NOSPLIT,$160-0
13 STMG R6, R12, 40(R15)
14 MOVD g, 96(R15)
15 FMOVD F8, 104(R15)
16 FMOVD F9, 112(R15)
17 FMOVD F10, 120(R15)
18 FMOVD F11, 128(R15)
19 FMOVD F12, 136(R15)
20 FMOVD F13, 144(R15)
21 FMOVD F14, 152(R15)
22 FMOVD F15, 160(R15)
23 MOVD R4, R1
24 MOVD R3, R5
25 MOVD R3, R4
26 MOVD R2, R3
27 MOVD $0, R2
28 XOR R0, R0
29 BL R1
30 FMOVD 104(R15), F8
31 FMOVD 112(R15), F9
32 FMOVD 120(R15), F10
33 FMOVD 128(R15), F11
34 FMOVD 136(R15), F12
35 FMOVD 144(R15), F13
36 FMOVD 152(R15), F14
37 FMOVD 160(R15), F15
38 MOVD 96(R15), g
39 LMG 40(R15), R6, R12
40 XOR R0, R0
41 RET
42
View as plain text