aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorXiaolin Zhao <zhaoxiaolin@loongson.cn>2024-12-13 17:20:38 +0800
committerabner chenc <chenguoqi@loongson.cn>2025-03-16 20:39:28 -0700
commitf41fdd962db3264e62ec6acb4a8f5e40d22bdfed (patch)
treef22be30cab3e697e22f2c18a1fd8b5ddb3c9741a /src/cmd/asm
parent38d146d57229a8e432d7570a0391f07b8cbf9393 (diff)
downloadgo-f41fdd962db3264e62ec6acb4a8f5e40d22bdfed.tar.xz
cmd/internal/obj/loong64: add {V,XV}NEG{B/H/W/V} instructions support
Go asm syntax: VNEG{B/H/W/V} VJ, VD XVNEG{B/H/W/V} XJ, XD Equivalent platform assembler syntax: vneg.{b/h/w/d} vd, vj xvneg.{b/h/w/d} xd, xj Change-Id: Ie0a82a434b0ffbcb77425a65b96eff56e030028c Reviewed-on: https://go-review.googlesource.com/c/go/+/635935 Reviewed-by: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/asm/testdata/loong64enc1.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/loong64enc1.s b/src/cmd/asm/internal/asm/testdata/loong64enc1.s
index 60e253cec3..8da4824dbc 100644
--- a/src/cmd/asm/internal/asm/testdata/loong64enc1.s
+++ b/src/cmd/asm/internal/asm/testdata/loong64enc1.s
@@ -849,3 +849,13 @@ lable2:
XVFRECIPD X2, X1 // 41f89c76
XVFRSQRTF X2, X1 // 41049d76
XVFRSQRTD X2, X1 // 41089d76
+
+ // [X]VNEG{B/H/W/V} instructions
+ VNEGB V1, V2 // 22309c72
+ VNEGH V1, V2 // 22349c72
+ VNEGW V1, V2 // 22389c72
+ VNEGV V1, V2 // 223c9c72
+ XVNEGB X2, X1 // 41309c76
+ XVNEGH X2, X1 // 41349c76
+ XVNEGW X2, X1 // 41389c76
+ XVNEGV X2, X1 // 413c9c76