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>
This commit is contained in:
Guoqi Chen 2026-01-21 17:32:49 +08:00 committed by Gopher Robot
parent 6ba3494e16
commit c61a48619f

View file

@ -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