]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.simd] simd: move template code generator into _gen
authorAustin Clements <austin@google.com>
Tue, 18 Nov 2025 17:08:40 +0000 (12:08 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 18 Nov 2025 23:13:45 +0000 (15:13 -0800)
The XED-driven generator lives in simd/_gen, so move the other
template-driven code generator in simd/_gen as well.

Change-Id: Iedf0cc11bf9862e2808e77292d9960818976c698
Reviewed-on: https://go-review.googlesource.com/c/go/+/721662
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Austin Clements <austin@google.com>

src/simd/_gen/tmplgen/main.go [moved from src/simd/genfiles.go with 98% similarity]
src/simd/no_tag.go

similarity index 98%
rename from src/simd/genfiles.go
rename to src/simd/_gen/tmplgen/main.go
index 7f1035f6cf88762c11d2a6e38c3ff6ab1ee45d32..6ec8d45b9b7c086948dbbd1c503cdf0985c82315 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build ignore
-
 package main
 
 // this generates type-instantiated boilerplate code for
@@ -814,15 +812,16 @@ func (x {{.VType}}) String() string {
 }
 `)
 
-const TD = "internal/simd_test/"
-const SSA = "../cmd/compile/internal/ssa/"
+const SIMD = "../../"
+const TD = "../../internal/simd_test/"
+const SSA = "../../../cmd/compile/internal/ssa/"
 
 func main() {
-       sl := flag.String("sl", "slice_gen_amd64.go", "file name for slice operations")
-       cm := flag.String("cm", "compare_gen_amd64.go", "file name for comparison operations")
-       mm := flag.String("mm", "maskmerge_gen_amd64.go", "file name for mask/merge operations")
-       op := flag.String("op", "other_gen_amd64.go", "file name for other operations")
-       ush := flag.String("ush", "unsafe_helpers.go", "file name for unsafe helpers")
+       sl := flag.String("sl", SIMD+"slice_gen_amd64.go", "file name for slice operations")
+       cm := flag.String("cm", SIMD+"compare_gen_amd64.go", "file name for comparison operations")
+       mm := flag.String("mm", SIMD+"maskmerge_gen_amd64.go", "file name for mask/merge operations")
+       op := flag.String("op", SIMD+"other_gen_amd64.go", "file name for other operations")
+       ush := flag.String("ush", SIMD+"unsafe_helpers.go", "file name for unsafe helpers")
        bh := flag.String("bh", TD+"binary_helpers_test.go", "file name for binary test helpers")
        uh := flag.String("uh", TD+"unary_helpers_test.go", "file name for unary test helpers")
        th := flag.String("th", TD+"ternary_helpers_test.go", "file name for ternary test helpers")
index 976a2155d9f3ab4094e85ba3bb0615f996404e71..65c191838fbc0278f0ffea351a010e5875ba1b4e 100644 (file)
@@ -6,4 +6,4 @@ package simd
 
 // This file has no build tag, so that go generate can run without a build tag.
 
-//go:generate go run genfiles.go
+//go:generate go run -C _gen/tmplgen .