aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorXiaolin Zhao <zhaoxiaolin@loongson.cn>2024-12-16 10:53:00 +0800
committerabner chenc <chenguoqi@loongson.cn>2025-03-13 17:18:49 -0700
commit80f068928fd957935df3d61da319331e76a73b49 (patch)
tree172aa181be950ba51541db85259e652793e11ddd /src/cmd/asm
parent937368f84e545db15d3f39c2b33a267ba8ead4a4 (diff)
downloadgo-80f068928fd957935df3d61da319331e76a73b49.tar.xz
cmd/internal/obj/loong64: add {V,XV}{FSQRT/FRECIP/FRSQRT}.{S/D} instructions support
Go asm syntax: V{FSQRT/FRECIP/FRSQRT}{F/D} VJ, VD XV{FSQRT/FRECIP/FRSQRT}{F/D} XJ, XD Equivalent platform assembler syntax: v{fsqrt/frecip/frsqrt}.{s/d} vd, vj xv{fsqrt/frecip/frsqrt}.{s/d} xd, xj Change-Id: I3fdbe3193659d7532164451b087ccf725053172f Reviewed-on: https://go-review.googlesource.com/c/go/+/636395 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/asm/testdata/loong64enc1.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/loong64enc1.s b/src/cmd/asm/internal/asm/testdata/loong64enc1.s
index f85939afbc..60e253cec3 100644
--- a/src/cmd/asm/internal/asm/testdata/loong64enc1.s
+++ b/src/cmd/asm/internal/asm/testdata/loong64enc1.s
@@ -835,3 +835,17 @@ lable2:
XVMODHU X3, X2, X1 // 418ce674
XVMODWU X3, X2, X1 // 410ce774
XVMODVU X3, X2, X1 // 418ce774
+
+ // [X]VF{SQRT/RECIP/RSQRT}{F/D} instructions
+ VFSQRTF V1, V2 // 22e49c72
+ VFSQRTD V1, V2 // 22e89c72
+ VFRECIPF V1, V2 // 22f49c72
+ VFRECIPD V1, V2 // 22f89c72
+ VFRSQRTF V1, V2 // 22049d72
+ VFRSQRTD V1, V2 // 22089d72
+ XVFSQRTF X2, X1 // 41e49c76
+ XVFSQRTD X2, X1 // 41e89c76
+ XVFRECIPF X2, X1 // 41f49c76
+ XVFRECIPD X2, X1 // 41f89c76
+ XVFRSQRTF X2, X1 // 41049d76
+ XVFRSQRTD X2, X1 // 41089d76