Skip to content

Commit

Permalink
RISC-V: Fix T-Head Fmv vendor extension encoding
Browse files Browse the repository at this point in the history
A recent change in the XTheadFmv spec fixed an encoding bug in the
document. This patch changes the code to follow this bugfix.

Spec patch can be found here:
  T-head-Semi/thead-extension-spec#11

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
cmuellner authored and ouuleilei-bot committed Dec 16, 2022
1 parent 9dff6a5 commit f6a61fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gas/testsuite/gas/riscv/x-thead-fmv.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
Disassembly of section .text:

0+000 <target>:
[ ]+[0-9a-f]+:[ ]+6005950b[ ]+th.fmv.hw.x[ ]+a0,fa1
[ ]+[0-9a-f]+:[ ]+5005158b[ ]+th.fmv.x.hw[ ]+a1,fa0
[ ]+[0-9a-f]+:[ ]+5005950b[ ]+th.fmv.hw.x[ ]+a0,fa1
[ ]+[0-9a-f]+:[ ]+6005158b[ ]+th.fmv.x.hw[ ]+a1,fa0
4 changes: 2 additions & 2 deletions include/opcode/riscv-opc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2209,9 +2209,9 @@
#define MATCH_TH_FSURW 0x5000700b
#define MASK_TH_FSURW 0xf800707f
/* Vendor-specific (T-Head) XTheadFmv instructions. */
#define MATCH_TH_FMV_HW_X 0x6000100b
#define MATCH_TH_FMV_HW_X 0x5000100b
#define MASK_TH_FMV_HW_X 0xfff0707f
#define MATCH_TH_FMV_X_HW 0x5000100b
#define MATCH_TH_FMV_X_HW 0x6000100b
#define MASK_TH_FMV_X_HW 0xfff0707f
/* Vendor-specific (T-Head) XTheadInt instructions. */
#define MATCH_TH_IPOP 0x0050000b
Expand Down

0 comments on commit f6a61fe

Please sign in to comment.