aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorXiaolin Zhao <zhaoxiaolin@loongson.cn>2024-06-06 14:25:38 +0800
committerGopher Robot <gobot@golang.org>2024-08-03 03:27:43 +0000
commit3ae819ad1c962e5b4e6d4a7d855477b02755951b (patch)
tree0c9d72f822411c450dfe3a1b879c3f5822cec11b /src/cmd/asm
parent40876244739f787fd9a4eb06503cc122b6c5ce52 (diff)
downloadgo-3ae819ad1c962e5b4e6d4a7d855477b02755951b.tar.xz
cmd/internal/obj/loong64: add support for instructions FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D}
These instructions convert floating-point numbers to fixed-point numbers with the specified rounding pattern. Go asm syntax: FTINT{RM/RP/RZ/RNE}{W/V}{F/D} FJ, FD Equivalent platform assembler syntax: ftint{rm/rp/rz/rne}.{w/l}.{s/d} fd, fj Ref: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html Change-Id: I6d650d1b48b10296d01a98fadf9d806206f9b96e Reviewed-on: https://go-review.googlesource.com/c/go/+/590995 Auto-Submit: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/asm/testdata/loong64enc1.s17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/loong64enc1.s b/src/cmd/asm/internal/asm/testdata/loong64enc1.s
index 57f16839eb..ba3327d4e8 100644
--- a/src/cmd/asm/internal/asm/testdata/loong64enc1.s
+++ b/src/cmd/asm/internal/asm/testdata/loong64enc1.s
@@ -292,3 +292,20 @@ lable2:
FTINTWD F0, F1 // 01081b01
FTINTVF F0, F1 // 01241b01
FTINTVD F0, F1 // 01281b01
+
+ FTINTRMWF F0, F2 // 02041a01
+ FTINTRMWD F0, F2 // 02081a01
+ FTINTRMVF F0, F2 // 02241a01
+ FTINTRMVD F0, F2 // 02281a01
+ FTINTRPWF F0, F2 // 02441a01
+ FTINTRPWD F0, F2 // 02481a01
+ FTINTRPVF F0, F2 // 02641a01
+ FTINTRPVD F0, F2 // 02681a01
+ FTINTRZWF F0, F2 // 02841a01
+ FTINTRZWD F0, F2 // 02881a01
+ FTINTRZVF F0, F2 // 02a41a01
+ FTINTRZVD F0, F2 // 02a81a01
+ FTINTRNEWF F0, F2 // 02c41a01
+ FTINTRNEWD F0, F2 // 02c81a01
+ FTINTRNEVF F0, F2 // 02e41a01
+ FTINTRNEVD F0, F2 // 02e81a01