blob: 687a506cdd92b51ab01bc853a6425f718279a0d2 [file] [log] [blame]
Austin Clements99e9be82018-06-21 12:08:36 -04001// Copyright 2018 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
Austin Clements99e9be82018-06-21 12:08:36 -04005package runtime
6
Russ Cox0d94f982021-01-30 07:07:42 -05007import "unsafe"
8
Josh Bleecher Snyder81142422020-03-24 22:14:02 -07009// Called from compiled code; declared for vet; do NOT call from Go.
10func gcWriteBarrierCX()
11func gcWriteBarrierDX()
12func gcWriteBarrierBX()
13func gcWriteBarrierBP()
14func gcWriteBarrierSI()
15func gcWriteBarrierR8()
16func gcWriteBarrierR9()
17
Austin Clements99e9be82018-06-21 12:08:36 -040018// stackcheck checks that SP is in range [g->stack.lo, g->stack.hi).
19func stackcheck()
Russ Coxfe67ce22019-05-08 13:16:05 -040020
21// Called from assembly only; declared for go vet.
22func settls() // argument in DI
Russ Coxfc8a6332020-01-17 13:54:30 -050023
24// Retpolines, used by -spectre=ret flag in cmd/asm, cmd/compile.
25func retpolineAX()
26func retpolineCX()
27func retpolineDX()
28func retpolineBX()
29func retpolineBP()
30func retpolineSI()
31func retpolineDI()
32func retpolineR8()
33func retpolineR9()
34func retpolineR10()
35func retpolineR11()
36func retpolineR12()
37func retpolineR13()
38func retpolineR14()
39func retpolineR15()
Russ Cox0d94f982021-01-30 07:07:42 -050040
41//go:noescape
42func asmcgocall_no_g(fn, arg unsafe.Pointer)
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000043
44// Used by reflectcall and the reflect package.
45//
46// Spills/loads arguments in registers to/from an internal/abi.RegArgs
47// respectively. Does not follow the Go ABI.
48func spillArgs()
49func unspillArgs()