support Go1.27 regabi - #103
Conversation
There was a problem hiding this comment.
Review: Go 1.27 support
Reviewed the hand-written changes; the ~240k lines of generated *_regabi_go127_*.s assembly were assessed at the mechanism level, not line-by-line.
Verified correct
float32reg_arch.gobuild tag (ppc64 || ppc64le || riscv64 || s390x) is the exact complement offloat32reg_generic.goand pairs with the existing.simplementations — no arch double-declared or missing.!go1.27constraints added consistently across all icall size dirs (icall{512..20480},internal/icall512,cmd/icall_gen/_data); each build dir has the full set of 5 newgo127_*files with matching constraints.- The
runtime·spillArgs/runtime·unspillArgs→ local·spillArgs/·unspillArgsrewrite pairs correctly with the appended helper bodies; MakeFunc call shape is unchanged (no per-call overhead). .github/workflows/go.yml:1.27.xpresent in all matrices, no leftover guards; actions pinned, no untrusted-input interpolation.README.mdversion-range update is accurate; no dangling#build-linkname-modeanchor.
No security or performance concerns. One robustness note inline.
| } | ||
| go127 := func(id, constraint, asm, helpers string) info { | ||
| if strings.HasPrefix(asm, "//go:build") { | ||
| asm = asm[strings.Index(asm, "\n\n")+2:] |
There was a problem hiding this comment.
Fragile build-tag stripping — silent corruption on unexpected input.
asm = asm[strings.Index(asm, "\n\n")+2:] is guarded only by HasPrefix(asm, "//go:build"). It's correct for all 5 current templates, but fails silently otherwise:
- If
\n\nis absent,strings.Indexreturns-1and+2yields index1, slicing off just the first byte instead of the header. - If a template's
//go:buildheader isn't followed by a blank line, the first blank line inside the body is matched, truncating real assembly.
Both cases produce a subtly broken .s file while generation still "succeeds." Consider asserting the index is >= 0 and returning an error otherwise (or stripping only the contiguous leading comment/build-tag lines), plus a one-line comment documenting the required template format.
No description provided.