]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/loong64: add support of VMOVQ and XVMOVQ
authorGuoqi Chen <chenguoqi@loongson.cn>
Mon, 4 Nov 2024 10:14:00 +0000 (18:14 +0800)
committerabner chenc <chenguoqi@loongson.cn>
Wed, 13 Nov 2024 00:56:19 +0000 (00:56 +0000)
commit65ba6f94b3a69a71c830044cf0c0f63d4f3601f7
tree01acf4c8b2f32a03c9a590376cff44b64ca1f320
parent0ff1d425075ce830a1f1c5ef3bf54ae812312bc3
cmd/internal/obj/loong64: add support of VMOVQ and XVMOVQ

This CL refers to the implementation of ARM64 and adds support for the following
types of SIMD instructions:
1. Move general-purpose register to a vector element, e.g.:
      VMOVQ  Rj, <Vd>.<T>[index]
      <T> can have the following values:
       B, H, W, V
2. Move vector element to general-purpose register, e.g.:
      VMOVQ     <Vj>.<T>[index], Rd
      <T> can have the following values:
       B, BU, H, HU, W, WU, VU
3. Duplicate general-purpose register to vector, e.g.:
      VMOVQ    Rj, <Vd>.<T>
      <T> can have the following values:
       B16, H8, W4, V2, B32, H16, W8, V4
4. Move vector, e.g.:
      XVMOVQ    Xj, <Xd>.<T>
      <T> can have the following values:
       B16, H8, W4, V2, Q1
5. Move vector element to scalar, e.g.:
      XVMOVQ  Xj, <Xd>.<T>[index]
      XVMOVQ  Xj.<T>[index], Xd
      <T> can have the following values:
       W, V
6. Move vector element to vector register, e.g.:
       VMOVQ     <Vn>.<T>[index], Vn.<T>
      <T> can have the following values:
       B, H, W, V

This CL only adds syntax and doesn't break any assembly that already exists.

Change-Id: I7656efac6def54da6c5ae182f39c2a21bfdf92bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/616258
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/asm/internal/arch/loong64.go
src/cmd/asm/internal/asm/parse.go
src/cmd/asm/internal/asm/testdata/loong64enc1.s
src/cmd/internal/obj/link.go
src/cmd/internal/obj/loong64/a.out.go
src/cmd/internal/obj/loong64/asm.go
src/cmd/internal/obj/loong64/cnames.go
src/cmd/internal/obj/loong64/doc.go
src/cmd/internal/obj/loong64/list.go
src/cmd/internal/obj/util.go