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

Commit 46a9dbb

Browse files
linsinan1995sinan-lin
authored andcommitted
set swap16 and smbb32 alias to pkbt16 and mulsr64
1 parent 0b294e0 commit 46a9dbb

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
@@ -1012,8 +1012,6 @@
10121012
#define MASK_SUNPKD832 0xfff0707f
10131013
#define MATCH_SWAP8 0xad800077
10141014
#define MASK_SWAP8 0xfff0707f
1015-
#define MATCH_SWAP16 0xad900077
1016-
#define MASK_SWAP16 0xfff0707f
10171015
#define MATCH_UCLIP8 0x8d000077
10181016
#define MASK_UCLIP8 0xff80707f
10191017
#define MATCH_UCLIP16 0x85000077
@@ -1218,8 +1216,6 @@
12181216
#define MASK_SLLI32 0xfe00707f
12191217
#define MATCH_SMAX32 0x92002077
12201218
#define MASK_SMAX32 0xfe00707f
1221-
#define MATCH_SMBB32 0x08002077
1222-
#define MASK_SMBB32 0xfe00707f
12231219
#define MATCH_SMBT32 0x18002077
12241220
#define MASK_SMBT32 0xfe00707f
12251221
#define MATCH_SMTT32 0x28002077
@@ -2019,7 +2015,6 @@ DECLARE_INSN(sunpkd830, MATCH_SUNPKD830, MASK_SUNPKD830)
20192015
DECLARE_INSN(sunpkd831, MATCH_SUNPKD831, MASK_SUNPKD831)
20202016
DECLARE_INSN(sunpkd832, MATCH_SUNPKD832, MASK_SUNPKD832)
20212017
DECLARE_INSN(swap8, MATCH_SWAP8, MASK_SWAP8)
2022-
DECLARE_INSN(swap16, MATCH_SWAP16, MASK_SWAP16)
20232018
DECLARE_INSN(uclip8, MATCH_UCLIP8, MASK_UCLIP8)
20242019
DECLARE_INSN(uclip16, MATCH_UCLIP16, MASK_UCLIP16)
20252020
DECLARE_INSN(uclip32, MATCH_UCLIP32, MASK_UCLIP32)
@@ -2123,7 +2118,6 @@ DECLARE_INSN(rsub32, MATCH_RSUB32, MASK_RSUB32)
21232118
DECLARE_INSN(sll32, MATCH_SLL32, MASK_SLL32)
21242119
DECLARE_INSN(slli32, MATCH_SLLI32, MASK_SLLI32)
21252120
DECLARE_INSN(smax32, MATCH_SMAX32, MASK_SMAX32)
2126-
DECLARE_INSN(smbb32, MATCH_SMBB32, MASK_SMBB32)
21272121
DECLARE_INSN(smbt32, MATCH_SMBT32, MASK_SMBT32)
21282122
DECLARE_INSN(smtt32, MATCH_SMTT32, MASK_SMTT32)
21292123
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
@@ -1023,7 +1023,7 @@ const struct riscv_opcode riscv_opcodes[] =
10231023
{"sunpkd831", 0, INSN_CLASS_ZPN, "d,s", MATCH_SUNPKD831, MASK_SUNPKD831, match_opcode, 0 },
10241024
{"sunpkd832", 0, INSN_CLASS_ZPN, "d,s", MATCH_SUNPKD832, MASK_SUNPKD832, match_opcode, 0 },
10251025
{"swap8", 0, INSN_CLASS_ZPN, "d,s", MATCH_SWAP8, MASK_SWAP8, match_opcode, 0 },
1026-
{"swap16", 0, INSN_CLASS_ZPN, "d,s", MATCH_SWAP16, MASK_SWAP16, match_opcode, 0 },
1026+
{"swap16", 0, INSN_CLASS_ZPN, "d,s,t", MATCH_PKBT16, MASK_PKBT16, match_rs1_eq_rs2, INSN_ALIAS },
10271027
{"uclip8", 0, INSN_CLASS_ZPN, "d,s,nds_i3u", MATCH_UCLIP8, MASK_UCLIP8, match_opcode, 0 },
10281028
{"uclip16", 0, INSN_CLASS_ZPN, "d,s,nds_i4u", MATCH_UCLIP16, MASK_UCLIP16, match_opcode, 0 },
10291029
{"uclip32", 0, INSN_CLASS_ZPN, "d,s,nds_i5u", MATCH_UCLIP32, MASK_UCLIP32, match_opcode, 0 },
@@ -1128,7 +1128,7 @@ const struct riscv_opcode riscv_opcodes[] =
11281128
{"sll32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SLL32, MASK_SLL32, match_opcode, 0 },
11291129
{"slli32", 64, INSN_CLASS_ZPRV, "d,s,nds_i5u", MATCH_SLLI32, MASK_SLLI32, match_opcode, 0 },
11301130
{"smax32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMAX32, MASK_SMAX32, match_opcode, 0 },
1131-
{"smbb32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMBB32, MASK_SMBB32, match_opcode, 0 },
1131+
{"smbb32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_MULSR64, MASK_MULSR64, match_opcode, INSN_ALIAS },
11321132
{"smbt32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMBT32, MASK_SMBT32, match_opcode, 0 },
11331133
{"smtt32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMTT32, MASK_SMTT32, match_opcode, 0 },
11341134
{"smds32", 64, INSN_CLASS_ZPRV, "d,s,t", MATCH_SMDS32, MASK_SMDS32, match_opcode, 0 },

0 commit comments

Comments
 (0)