Text file
src/runtime/cgo/trampoline_test_arm64.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 || windows)
6
7 #include "textflag.h"
8 #include "abi_arm64.h"
9
10 // Called on g0 by cgoCallTrampoline with a PC buffer in R0, its size
11 // in R1, and runtime.Callers in R2. Set up the ABIInternal arguments
12 // for Callers(0, buf) and preserve the host's callee-saved registers.
13 TEXT ·trampolineCallers(SB),NOSPLIT,$192-0
14 SAVE_R19_TO_R28(48)
15 SAVE_F8_TO_F15(128)
16 MOVD R2, R9
17 MOVD R1, R3
18 MOVD R1, R2
19 MOVD R0, R1
20 MOVD ZR, R0
21 CALL (R9)
22 RESTORE_F8_TO_F15(128)
23 RESTORE_R19_TO_R28(48)
24 RET
25
View as plain text