aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJin Ma <jinma@linux.alibaba.com>2023-11-17 14:20:53 +0800
committerChristoph Müllner <christoph.muellner@vrull.eu>2023-12-14 09:54:19 +0100
commit8cb16b68584e14aade8de166c75e1d85e38507bd (patch)
tree05c2821251d0efffa731fa57d99f10d4b6046770 /gas
parente20298da05f212c04022c4f1a9991e09e2199c9a (diff)
downloadbinutils-8cb16b68584e14aade8de166c75e1d85e38507bd.zip
binutils-8cb16b68584e14aade8de166c75e1d85e38507bd.tar.gz
binutils-8cb16b68584e14aade8de166c75e1d85e38507bd.tar.bz2
RISC-V: Fix the wrong encoding and operand of the XTheadFmv extension.
The description of instructions 'th.fmv.hw.x' and 'th.fmv.x.hw' of the XTheadFmv extension in T-Head specific is incorrect, and it also has some impact on the implementation of the binutils, so this patch corrects this. For details see: https://github.com/T-head-Semi/thead-extension-spec/pull/34 gas/ChangeLog: * testsuite/gas/riscv/x-thead-fmv.d: Correct test. * testsuite/gas/riscv/x-thead-fmv.s: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_TH_FMV_HW_X): Correct coding. (MASK_TH_FMV_HW_X): Likewise. (MATCH_TH_FMV_X_HW): Likewise. (MASK_TH_FMV_X_HW): Likewise. opcodes/ChangeLog: * riscv-opc.c: Correct operands.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmv.d4
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmv.s2
2 files changed, 3 insertions, 3 deletions
diff --git a/gas/testsuite/gas/riscv/x-thead-fmv.d b/gas/testsuite/gas/riscv/x-thead-fmv.d
index af8ce0c..50ccc62 100644
--- a/gas/testsuite/gas/riscv/x-thead-fmv.d
+++ b/gas/testsuite/gas/riscv/x-thead-fmv.d
@@ -7,5 +7,5 @@
Disassembly of section .text:
0+000 <target>:
-[ ]+[0-9a-f]+:[ ]+5005950b[ ]+th.fmv.hw.x[ ]+a0,fa1
-[ ]+[0-9a-f]+:[ ]+6005158b[ ]+th.fmv.x.hw[ ]+a1,fa0
+[ ]+[0-9a-f]+:[ ]+a005158b[ ]+th.fmv.hw.x[ ]+fa1,a0
+[ ]+[0-9a-f]+:[ ]+c005158b[ ]+th.fmv.x.hw[ ]+a1,fa0
diff --git a/gas/testsuite/gas/riscv/x-thead-fmv.s b/gas/testsuite/gas/riscv/x-thead-fmv.s
index 250ba83..8ca2ec2 100644
--- a/gas/testsuite/gas/riscv/x-thead-fmv.s
+++ b/gas/testsuite/gas/riscv/x-thead-fmv.s
@@ -1,3 +1,3 @@
target:
- th.fmv.hw.x a0, fa1
+ th.fmv.hw.x fa1, a0
th.fmv.x.hw a1, fa0