Austin Clements | 99e9be8 | 2018-06-21 12:08:36 -0400 | [diff] [blame] | 1 | // 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 Clements | 99e9be8 | 2018-06-21 12:08:36 -0400 | [diff] [blame] | 5 | package runtime |
| 6 | |
Russ Cox | 0d94f98 | 2021-01-30 07:07:42 -0500 | [diff] [blame] | 7 | import "unsafe" |
| 8 | |
Josh Bleecher Snyder | 8114242 | 2020-03-24 22:14:02 -0700 | [diff] [blame] | 9 | // Called from compiled code; declared for vet; do NOT call from Go. |
| 10 | func gcWriteBarrierCX() |
| 11 | func gcWriteBarrierDX() |
| 12 | func gcWriteBarrierBX() |
| 13 | func gcWriteBarrierBP() |
| 14 | func gcWriteBarrierSI() |
| 15 | func gcWriteBarrierR8() |
| 16 | func gcWriteBarrierR9() |
| 17 | |
Austin Clements | 99e9be8 | 2018-06-21 12:08:36 -0400 | [diff] [blame] | 18 | // stackcheck checks that SP is in range [g->stack.lo, g->stack.hi). |
| 19 | func stackcheck() |
Russ Cox | fe67ce2 | 2019-05-08 13:16:05 -0400 | [diff] [blame] | 20 | |
| 21 | // Called from assembly only; declared for go vet. |
| 22 | func settls() // argument in DI |
Russ Cox | fc8a633 | 2020-01-17 13:54:30 -0500 | [diff] [blame] | 23 | |
| 24 | // Retpolines, used by -spectre=ret flag in cmd/asm, cmd/compile. |
| 25 | func retpolineAX() |
| 26 | func retpolineCX() |
| 27 | func retpolineDX() |
| 28 | func retpolineBX() |
| 29 | func retpolineBP() |
| 30 | func retpolineSI() |
| 31 | func retpolineDI() |
| 32 | func retpolineR8() |
| 33 | func retpolineR9() |
| 34 | func retpolineR10() |
| 35 | func retpolineR11() |
| 36 | func retpolineR12() |
| 37 | func retpolineR13() |
| 38 | func retpolineR14() |
| 39 | func retpolineR15() |
Russ Cox | 0d94f98 | 2021-01-30 07:07:42 -0500 | [diff] [blame] | 40 | |
| 41 | //go:noescape |
| 42 | func asmcgocall_no_g(fn, arg unsafe.Pointer) |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 43 | |
| 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. |
| 48 | func spillArgs() |
| 49 | func unspillArgs() |