mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj/loong64: add VPERMI.W, XVPERMI.{W,V,Q} instruction support
Go asm syntax:
VPERMIW $0x1b, vj, vd
XVPERMI{W,V,Q} $0x1b, xj, xd
Equivalent platform assembler syntax:
vpermi.w vd, vj, $0x1b
xvpermi.{w,d,q} xd, xj, $0x1b
Change-Id: Ie23b2fdd09b4c93801dc804913206f1c5a496268
Reviewed-on: https://go-review.googlesource.com/c/go/+/716800
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
e2c6a2024c
commit
dadbac0c9e
5 changed files with 44 additions and 0 deletions
|
|
@ -1778,6 +1778,7 @@ func buildop(ctxt *obj.Link) {
|
|||
opset(AVSHUF4IH, r0)
|
||||
opset(AVSHUF4IW, r0)
|
||||
opset(AVSHUF4IV, r0)
|
||||
opset(AVPERMIW, r0)
|
||||
|
||||
case AXVANDB:
|
||||
opset(AXVORB, r0)
|
||||
|
|
@ -1787,6 +1788,9 @@ func buildop(ctxt *obj.Link) {
|
|||
opset(AXVSHUF4IH, r0)
|
||||
opset(AXVSHUF4IW, r0)
|
||||
opset(AXVSHUF4IV, r0)
|
||||
opset(AXVPERMIW, r0)
|
||||
opset(AXVPERMIV, r0)
|
||||
opset(AXVPERMIQ, r0)
|
||||
|
||||
case AVANDV:
|
||||
opset(AVORV, r0)
|
||||
|
|
@ -4362,6 +4366,14 @@ func (c *ctxt0) opirr(a obj.As) uint32 {
|
|||
return 0x1de6 << 18 // xvshuf4i.w
|
||||
case AXVSHUF4IV:
|
||||
return 0x1de7 << 18 // xvshuf4i.d
|
||||
case AVPERMIW:
|
||||
return 0x1cf9 << 18 // vpermi.w
|
||||
case AXVPERMIW:
|
||||
return 0x1df9 << 18 // xvpermi.w
|
||||
case AXVPERMIV:
|
||||
return 0x1dfa << 18 // xvpermi.d
|
||||
case AXVPERMIQ:
|
||||
return 0x1dfb << 18 // xvpermi.q
|
||||
case AVBITCLRB:
|
||||
return 0x1CC4<<18 | 0x1<<13 // vbitclri.b
|
||||
case AVBITCLRH:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue