Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit 7970eb9

Browse files
linsinan1995sinan-lin
authored andcommitted
set swap16 and smbb32 alias to pkbt16 and mulsr64
1 parent 014cda9 commit 7970eb9

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

gas/testsuite/gas/riscv/insn-dsp64.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Disassembly of section .text:
6666
[ ]+.*:[ ]+.*[ ]+kdmabb16[ ]+a1,a2,a3
6767
[ ]+.*:[ ]+.*[ ]+kdmabt16[ ]+a1,a2,a3
6868
[ ]+.*:[ ]+.*[ ]+kdmatt16[ ]+a1,a2,a3
69-
[ ]+.*:[ ]+.*[ ]+smbb32[ ]+a1,a2,a3
69+
[ ]+.*:[ ]+.*[ ]+mulsr64[ ]+a1,a2,a3
7070
[ ]+.*:[ ]+.*[ ]+smbt32[ ]+a1,a2,a3
7171
[ ]+.*:[ ]+.*[ ]+smtt32[ ]+a1,a2,a3
7272
[ ]+.*:[ ]+.*[ ]+kmabb32[ ]+a1,a2,a3

include/opcode/riscv-opc.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,6 @@
10141014
#define MASK_SUNPKD832 0xfff0707f
10151015
#define MATCH_SWAP8 0xad800077
10161016
#define MASK_SWAP8 0xfff0707f
1017-
#define MATCH_SWAP16 0xad900077
1018-
#define MASK_SWAP16 0xfff0707f
10191017
#define MATCH_UCLIP8 0x8d000077
10201018
#define MASK_UCLIP8 0xff80707f
10211019
#define MATCH_UCLIP16 0x85000077
@@ -1220,8 +1218,6 @@
12201218
#define MASK_SLLI32 0xfe00707f
12211219
#define MATCH_SMAX32 0x92002077
12221220
#define MASK_SMAX32 0xfe00707f
1223-
#define MATCH_SMBB32 0x08002077
1224-
#define MASK_SMBB32 0xfe00707f
12251221
#define MATCH_SMBT32 0x18002077
12261222
#define MASK_SMBT32 0xfe00707f
12271223
#define MATCH_SMTT32 0x28002077
@@ -2023,7 +2019,6 @@ DECLARE_INSN(sunpkd830, MATCH_SUNPKD830, MASK_SUNPKD830)
20232019
DECLARE_INSN(sunpkd831, MATCH_SUNPKD831, MASK_SUNPKD831)
20242020
DECLARE_INSN(sunpkd832, MATCH_SUNPKD832, MASK_SUNPKD832)
20252021
DECLARE_INSN(swap8, MATCH_SWAP8, MASK_SWAP8)
2026-
DECLARE_INSN(swap16, MATCH_SWAP16, MASK_SWAP16)
20272022
DECLARE_INSN(uclip8, MATCH_UCLIP8, MASK_UCLIP8)
20282023
DECLARE_INSN(uclip16, MATCH_UCLIP16, MASK_UCLIP16)
20292024
DECLARE_INSN(uclip32, MATCH_UCLIP32, MASK_UCLIP32)
@@ -2127,7 +2122,6 @@ DECLARE_INSN(rsub32, MATCH_RSUB32, MASK_RSUB32)
21272122
DECLARE_INSN(sll32, MATCH_SLL32, MASK_SLL32)
21282123
DECLARE_INSN(slli32, MATCH_SLLI32, MASK_SLLI32)
21292124
DECLARE_INSN(smax32, MATCH_SMAX32, MASK_SMAX32)
2130-
DECLARE_INSN(smbb32, MATCH_SMBB32, MASK_SMBB32)
21312125
DECLARE_INSN(smbt32, MATCH_SMBT32, MASK_SMBT32)
21322126
DECLARE_INSN(smtt32, MATCH_SMTT32, MASK_SMTT32)
21332127
DECLARE_INSN(smds32, MATCH_SMDS32, MASK_SMDS32)

opcodes/riscv-opc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ const struct riscv_opcode riscv_opcodes[] =
10251025
{"sunpkd831", 0, INSN_CLASS_ZPN, "d,s", MATCH_SUNPKD831, MASK_SUNPKD831, match_opcode, 0 },
10261026
{"sunpkd832", 0, INSN_CLASS_ZPN, "d,s", MATCH_SUNPKD832, MASK_SUNPKD832, match_opcode, 0 },
10271027
{"swap8", 0, INSN_CLASS_ZPN, "d,s", MATCH_SWAP8, MASK_SWAP8, match_opcode, 0 },
1028-
{"swap16", 0, INSN_CLASS_ZPN, "d,s", MATCH_SWAP16, MASK_SWAP16, match_opcode, 0 },
1028+
{"swap16", 0, INSN_CLASS_ZPN, "d,s,t", MATCH_PKBT16, MASK_PKBT16, match_rs1_eq_rs2, INSN_ALIAS },
10291029
{"uclip8", 0, INSN_CLASS_ZPN, "d,s,nds_i3u", MATCH_UCLIP8, MASK_UCLIP8, match_opcode, 0 },
10301030
{"uclip16", 0, INSN_CLASS_ZPN, "d,s,nds_i4u", MATCH_UCLIP16, MASK_UCLIP16, match_opcode, 0 },
10311031
{"uclip32", 0, INSN_CLASS_ZPN, "d,s,nds_i5u", MATCH_UCLIP32, MASK_UCLIP32, match_opcode, 0 },
@@ -1130,7 +1130,7 @@ const struct riscv_opcode riscv_opcodes[] =
11301130
{"sll32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SLL32, MASK_SLL32, match_opcode, 0 },
11311131
{"slli32", 64, INSN_CLASS_ZPRV, "d,s,nds_i5u", MATCH_SLLI32, MASK_SLLI32, match_opcode, 0 },
11321132
{"smax32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMAX32, MASK_SMAX32, match_opcode, 0 },
1133-
{"smbb32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMBB32, MASK_SMBB32, match_opcode, 0 },
1133+
{"smbb32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_MULSR64, MASK_MULSR64, match_opcode, INSN_ALIAS },
11341134
{"smbt32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMBT32, MASK_SMBT32, match_opcode, 0 },
11351135
{"smtt32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMTT32, MASK_SMTT32, match_opcode, 0 },
11361136
{"smds32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMDS32, MASK_SMDS32, match_opcode, 0 },

0 commit comments

Comments
 (0)