diff options
| author | David Chase <drchase@google.com> | 2025-08-21 17:07:13 -0400 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2025-09-02 10:50:34 -0700 |
| commit | 6890aa2e20067ec58ab41647814efe781fd36baf (patch) | |
| tree | 729fc5a512a1ce8628f92bc8b6029b13674383f5 /src/cmd/internal/obj | |
| parent | 5ebe2d05d52be797498314c20c93c9ef3fca568d (diff) | |
| download | go-6890aa2e20067ec58ab41647814efe781fd36baf.tar.xz | |
[dev.simd] cmd/compile: add instructions and rewrites for scalar-> vector moves
This required changes to the assembler so that VMOVSS and VMOVSD
could handle FP constants.
Change-Id: Iaa2f8df71867a3283bc058b7ec691b56a3e73621
Reviewed-on: https://go-review.googlesource.com/c/go/+/698240
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/x86/obj6.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go index 48287546b3..9c8e5e96f8 100644 --- a/src/cmd/internal/obj/x86/obj6.go +++ b/src/cmd/internal/obj/x86/obj6.go @@ -236,7 +236,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc) { // Rewrite float constants to values stored in memory. switch p.As { // Convert AMOVSS $(0), Xx to AXORPS Xx, Xx - case AMOVSS: + case AMOVSS, AVMOVSS: if p.From.Type == obj.TYPE_FCONST { // f == 0 can't be used here due to -0, so use Float64bits if f := p.From.Val.(float64); math.Float64bits(f) == 0 { @@ -272,7 +272,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc) { p.From.Offset = 0 } - case AMOVSD: + case AMOVSD, AVMOVSD: // Convert AMOVSD $(0), Xx to AXORPS Xx, Xx if p.From.Type == obj.TYPE_FCONST { // f == 0 can't be used here due to -0, so use Float64bits |
