[go] WIP

0 views
Skip to first unread message

Junyang Shao (Gerrit)

unread,
Apr 14, 2026, 4:10:27 PM (19 hours ago) Apr 14
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, David Chase, Cherry Mui, golang-co...@googlegroups.com

Junyang Shao submitted the change

Change information

Commit message:
cmd/asm, cmd/internal/obj/arm64: support register list ranges for SVE

This CL is generated by CL 765322.

This CL supports register range list addressing mode:
[reg1.T-reg2.T]
Change-Id: I850827f36cc07f0ee0e082eda6e295d757bbbdcc
Reviewed-by: David Chase <drc...@google.com>
Files:
  • M src/cmd/asm/internal/asm/parse.go
  • M src/cmd/asm/internal/asm/testdata/arm64sveenc.s
  • M src/cmd/asm/internal/asm/testdata/arm64sveerror.s
  • M src/cmd/internal/obj/arm64/anames_gen.go
  • M src/cmd/internal/obj/arm64/asm7.go
  • M src/cmd/internal/obj/arm64/encoding_gen.go
  • M src/cmd/internal/obj/arm64/goops_gen.go
  • M src/cmd/internal/obj/arm64/inst.go
  • M src/cmd/internal/obj/arm64/inst_gen.go
  • M src/cmd/internal/obj/arm64/list7.go
Change size: XL
Delta: 10 files changed, 1714 insertions(+), 29 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I850827f36cc07f0ee0e082eda6e295d757bbbdcc
Gerrit-Change-Number: 765442
Gerrit-PatchSet: 7
Gerrit-Owner: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
open
diffy
satisfied_requirement

Junyang Shao (Gerrit)

unread,
Apr 14, 2026, 4:10:30 PM (19 hours ago) Apr 14
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, David Chase, Cherry Mui, golang-co...@googlegroups.com

Junyang Shao submitted the change with unreviewed changes

Unreviewed changes

3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: arm64/instgen/generator.go
Insertions: 16, Deletions: 21.

@@ -260,6 +260,17 @@
return ops
}

+func convertToGoID(v string) string {
+ v = strings.ReplaceAll(v, " :: ", "_")
+ v = strings.ReplaceAll(v, "(", "")
+ v = strings.ReplaceAll(v, ")", "")
+ v = strings.ReplaceAll(v, "[", "")
+ v = strings.ReplaceAll(v, "]", "")
+ v = strings.ReplaceAll(v, "#", "c")
+ v = strings.ReplaceAll(v, "-", "_")
+ return v
+}
+
// formatAndFlush executes the given template and writes it to the given file,
// the go file is formatted using gofmt.
// If outputDir is empty, it does nothing.
@@ -435,15 +446,7 @@
if sym == "" || sym == "nil" {
enc = "enc_NIL"
} else {
- v := sym
- v = strings.ReplaceAll(v, " :: ", "_")
- v = strings.ReplaceAll(v, "(", "")
- v = strings.ReplaceAll(v, ")", "")
- v = strings.ReplaceAll(v, "[", "")
- v = strings.ReplaceAll(v, "]", "")
- v = strings.ReplaceAll(v, "#", "c")
- v = strings.ReplaceAll(v, "-", "_")
- enc = fmt.Sprintf("enc_%s", v)
+ enc = fmt.Sprintf("enc_%s", convertToGoID(sym))
}
}
arg.Elms = append(arg.Elms, elmData{
@@ -494,21 +497,13 @@

var constants []constantData
for _, v := range uniqueEncodedIn {
- v0 := v
- v = strings.ReplaceAll(v, " :: ", "_")
- v = strings.ReplaceAll(v, "(", "")
- v = strings.ReplaceAll(v, ")", "")
- v = strings.ReplaceAll(v, "[", "")
- v = strings.ReplaceAll(v, "]", "")
- v = strings.ReplaceAll(v, "#", "c")
- v = strings.ReplaceAll(v, "-", "_")
- name := fmt.Sprintf("enc_%s", v)
- encodedInMap[v0] = name
+ name := fmt.Sprintf("enc_%s", convertToGoID(v))
+ encodedInMap[v] = name
// Only add to output if used
- if neededEncodedIn[v0] {
+ if neededEncodedIn[v] {
constants = append(constants, constantData{
ConstName: name,
- BinName: v0,
+ BinName: v,
})
}
}
```

Change information

Commit message:
arm64/instgen: support register range list for SVE

This CL generates CL 765442.
Change-Id: I965fca8fee36de77e54f467184ef21823b62ca9e
Reviewed-by: David Chase <drc...@google.com>
Files:
  • M arm64/instgen/encodings.go
  • M arm64/instgen/generator.go
Change size: L
Delta: 2 files changed, 305 insertions(+), 40 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: arch
Gerrit-Branch: master
Gerrit-Change-Id: I965fca8fee36de77e54f467184ef21823b62ca9e
Gerrit-Change-Number: 765322
Gerrit-PatchSet: 5
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages