aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa
diff options
context:
space:
mode:
authorGuoqi Chen <chenguoqi@loongson.cn>2026-01-21 17:32:49 +0800
committerGopher Robot <gobot@golang.org>2026-01-22 12:34:32 -0800
commitc61a48619ff2d26543d0f4874ab495bbbfdc701f (patch)
treec1f9ef0abc402def4def5790c5e6ad1dfd5a4617 /src/cmd/compile/internal/ssa
parent6ba3494e16f2611dcca0e4ce629cd06b5c0c0969 (diff)
downloadgo-c61a48619ff2d26543d0f4874ab495bbbfdc701f.tar.xz
cmd/compile: allow Bswap{64,32,16} on loong64
On Loong64, Bswap{64,32,16} has been implemented with REVB{2H, 2W,V} instruction Change-Id: Ia7f40ef3b1a85bfb0b20563098cb792b00cec498 Reviewed-on: https://go-review.googlesource.com/c/go/+/737841 Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa')
-rw-r--r--src/cmd/compile/internal/ssa/config.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go
index 9cfaa58839..e796071fe8 100644
--- a/src/cmd/compile/internal/ssa/config.go
+++ b/src/cmd/compile/internal/ssa/config.go
@@ -304,6 +304,9 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize, softfloat boo
c.LinkReg = linkRegLOONG64
c.hasGReg = true
c.unalignedOK = true
+ c.haveBswap64 = true
+ c.haveBswap32 = true
+ c.haveBswap16 = true
c.haveCondSelect = true
case "s390x":
c.PtrSize = 8