diff options
| author | Cherry Mui <cherryyz@google.com> | 2026-03-31 12:38:26 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2026-04-01 11:16:35 -0700 |
| commit | f9e319fee80e3f212ca09653153bc2161df4968c (patch) | |
| tree | 19aa84f1fd1cc97fabdbb466ad099de08eb30d4f /src | |
| parent | 676dfe4d72c3c05485a6615995eb452e676630e0 (diff) | |
| download | go-f9e319fee80e3f212ca09653153bc2161df4968c.tar.xz | |
cmd/internal/goobj: regenerate builtin list, add retpoline and tls_g symbols
Add retpoline and tls_g symbols as the assembler generates direct
reference to them.
Change-Id: I569eab6d81798866263da9240d702139d3567d57
Reviewed-on: https://go-review.googlesource.com/c/go/+/761464
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/internal/goobj/builtinlist.go | 36 | ||||
| -rw-r--r-- | src/cmd/internal/goobj/mkbuiltin.go | 27 |
2 files changed, 59 insertions, 4 deletions
diff --git a/src/cmd/internal/goobj/builtinlist.go b/src/cmd/internal/goobj/builtinlist.go index 918ade191d..5d44074178 100644 --- a/src/cmd/internal/goobj/builtinlist.go +++ b/src/cmd/internal/goobj/builtinlist.go @@ -140,12 +140,19 @@ var builtins = [...]struct { {"runtime.makeslice64", 1}, {"runtime.makeslicecopy", 1}, {"runtime.growslice", 1}, + {"runtime.growsliceBuf", 1}, + {"runtime.growsliceBufNoAlias", 1}, + {"runtime.growsliceNoAlias", 1}, {"runtime.unsafeslicecheckptr", 1}, {"runtime.panicunsafeslicelen", 1}, {"runtime.panicunsafeslicenilptr", 1}, {"runtime.unsafestringcheckptr", 1}, {"runtime.panicunsafestringlen", 1}, {"runtime.panicunsafestringnilptr", 1}, + {"runtime.moveSlice", 1}, + {"runtime.moveSliceNoScan", 1}, + {"runtime.moveSliceNoCap", 1}, + {"runtime.moveSliceNoCapNoScan", 1}, {"runtime.memmove", 1}, {"runtime.memclrNoHeapPointers", 1}, {"runtime.memclrHasPointers", 1}, @@ -214,9 +221,10 @@ var builtins = [...]struct { {"runtime.libfuzzerHookStrCmp", 1}, {"runtime.libfuzzerHookEqualFold", 1}, {"runtime.addCovMeta", 1}, + {"runtime.x86HasAVX", 0}, + {"runtime.x86HasFMA", 0}, {"runtime.x86HasPOPCNT", 0}, {"runtime.x86HasSSE41", 0}, - {"runtime.x86HasFMA", 0}, {"runtime.armHasVFPv4", 0}, {"runtime.arm64HasATOMICS", 0}, {"runtime.loong64HasLAMCAS", 0}, @@ -224,18 +232,42 @@ var builtins = [...]struct { {"runtime.loong64HasLSX", 0}, {"runtime.riscv64HasZbb", 0}, {"runtime.asanregisterglobals", 1}, + {"runtime.KeepAlive", 1}, {"runtime.deferproc", 1}, {"runtime.deferprocStack", 1}, {"runtime.deferreturn", 1}, {"runtime.newproc", 1}, {"runtime.panicoverflow", 1}, {"runtime.sigpanic", 1}, - {"runtime.gcWriteBarrier", 1}, + {"runtime.gcWriteBarrier1", 1}, + {"runtime.gcWriteBarrier2", 1}, + {"runtime.gcWriteBarrier3", 1}, + {"runtime.gcWriteBarrier4", 1}, + {"runtime.gcWriteBarrier5", 1}, + {"runtime.gcWriteBarrier6", 1}, + {"runtime.gcWriteBarrier7", 1}, + {"runtime.gcWriteBarrier8", 1}, {"runtime.duffzero", 1}, {"runtime.duffcopy", 1}, {"runtime.morestack", 0}, {"runtime.morestackc", 0}, {"runtime.morestack_noctxt", 0}, + {"runtime.retpolineAX", 0}, + {"runtime.retpolineCX", 0}, + {"runtime.retpolineDX", 0}, + {"runtime.retpolineBX", 0}, + {"runtime.retpolineBP", 0}, + {"runtime.retpolineSI", 0}, + {"runtime.retpolineDI", 0}, + {"runtime.retpolineR8", 0}, + {"runtime.retpolineR9", 0}, + {"runtime.retpolineR10", 0}, + {"runtime.retpolineR11", 0}, + {"runtime.retpolineR12", 0}, + {"runtime.retpolineR13", 0}, + {"runtime.retpolineR14", 0}, + {"runtime.retpolineR15", 0}, + {"runtime.tls_g", 0}, {"type:int8", 0}, {"type:*int8", 0}, {"type:uint8", 0}, diff --git a/src/cmd/internal/goobj/mkbuiltin.go b/src/cmd/internal/goobj/mkbuiltin.go index 6d1e7bb429..8b73bb115b 100644 --- a/src/cmd/internal/goobj/mkbuiltin.go +++ b/src/cmd/internal/goobj/mkbuiltin.go @@ -50,7 +50,7 @@ func main() { } func mkbuiltin(w io.Writer) { - pkg := "runtime" + const pkg = "runtime" fset := token.NewFileSet() path := filepath.Join("..", "..", "compile", "internal", "typecheck", "_builtin", "runtime.go") f, err := parser.ParseFile(fset, path, nil, 0) @@ -149,7 +149,14 @@ var fextras = [...]extra{ {"sigpanic", 1}, // compiler backend inserted calls - {"gcWriteBarrier", 1}, + {"gcWriteBarrier1", 1}, + {"gcWriteBarrier2", 1}, + {"gcWriteBarrier3", 1}, + {"gcWriteBarrier4", 1}, + {"gcWriteBarrier5", 1}, + {"gcWriteBarrier6", 1}, + {"gcWriteBarrier7", 1}, + {"gcWriteBarrier8", 1}, {"duffzero", 1}, {"duffcopy", 1}, @@ -157,4 +164,20 @@ var fextras = [...]extra{ {"morestack", 0}, // asm function, ABI0 {"morestackc", 0}, // asm function, ABI0 {"morestack_noctxt", 0}, // asm function, ABI0 + {"retpolineAX", 0}, // asm function, ABI0, amd64 only + {"retpolineCX", 0}, // asm function, ABI0, amd64 only + {"retpolineDX", 0}, // asm function, ABI0, amd64 only + {"retpolineBX", 0}, // asm function, ABI0, amd64 only + {"retpolineBP", 0}, // asm function, ABI0, amd64 only + {"retpolineSI", 0}, // asm function, ABI0, amd64 only + {"retpolineDI", 0}, // asm function, ABI0, amd64 only + {"retpolineR8", 0}, // asm function, ABI0, amd64 only + {"retpolineR9", 0}, // asm function, ABI0, amd64 only + {"retpolineR10", 0}, // asm function, ABI0, amd64 only + {"retpolineR11", 0}, // asm function, ABI0, amd64 only + {"retpolineR12", 0}, // asm function, ABI0, amd64 only + {"retpolineR13", 0}, // asm function, ABI0, amd64 only + {"retpolineR14", 0}, // asm function, ABI0, amd64 only + {"retpolineR15", 0}, // asm function, ABI0, amd64 only + {"tls_g", 0}, // asm variable, amd64 and 386 only } |
