From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by sourceware.org (Postfix) with ESMTPS id 9D5143858D20 for ; Sat, 18 Nov 2023 07:05:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9D5143858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.alibaba.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9D5143858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=115.124.30.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700291112; cv=none; b=B1Km36E/ortGIRO3I/nkbQeuZMa4E10AnxW0i3rwZSJXtlg8M38dp1dzXGPTvTSb1fShCrhdoYQJLKz950YX46LJD3up25IVzu1pVLufaER5bpvC8ASTlp4jWoYS2BgB8cJSPfWaVDOtSKDlrhHCOOKwjEXvWbQWscC61hDo7fg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700291112; c=relaxed/simple; bh=vLSnkuJZUNeLmOeDayGBQc1bW0bwqGe5jQ64Zmwf8Cc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=iDNnqa/YYwFroFPFFXkoNAmwOVPMGwe0GgFZF9niRqwbQnMEr53xJFgGUqKONu5IWHDbmUcLUJbrEeXlDtyB/Ju0jAwnz/A0Oytfch/MVS95VCz2mQYtjRO25TsuL7LwiR3vnPDVYQHCLLm/yhpIzyVxfXK+fqkO8sg3Tr9pS50= ARC-Authentication-Results: i=1; server2.sourceware.org X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=jinma@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VwbhObi_1700291100; Received: from localhost.localdomain(mailfrom:jinma@linux.alibaba.com fp:SMTPD_---0VwbhObi_1700291100) by smtp.aliyun-inc.com; Sat, 18 Nov 2023 15:05:02 +0800 From: Jin Ma To: binutils@sourceware.org, nelson@rivosinc.com Cc: christoph.muellner@vrull.eu, lifang_xia@linux.alibaba.com, jinma.contrib@gmail.com, Jin Ma Subject: [PATCH v2 04/12] RISC-V: Add load/store instructions for T-Head VECTOR vendor extension Date: Sat, 18 Nov 2023 15:04:50 +0800 Message-Id: <20231118070450.1249-1-jinma@linux.alibaba.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20231118064928.849-1-jinma@linux.alibaba.com> References: <20231118064928.849-1-jinma@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-20.4 required=5.0 tests=BAYES_00,ENV_AND_HDR_SPF_MATCH,GIT_PATCH_0,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: T-Head has a range of vendor-specific instructions. Therefore it makes sense to group them into smaller chunks in form of vendor extensions. This patch adds load/store instructions for the "XTheadVector" extension. The 'th' prefix and the "XTheadVector" extension are documented in a PR for the RISC-V toolchain conventions ([1]). [1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19 Co-developed-by: Lifang Xia Co-developed-by: Christoph Müllner gas/ChangeLog: * testsuite/gas/riscv/x-thead-vector.d: Add tests for load/store instructions. * testsuite/gas/riscv/x-thead-vector.s: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_TH_VLBV): New. opcodes/ChangeLog: * riscv-opc.c: Likewise. --- gas/testsuite/gas/riscv/x-thead-vector.d | 132 ++++++++++++++++++++++ gas/testsuite/gas/riscv/x-thead-vector.s | 136 +++++++++++++++++++++++ include/opcode/riscv-opc.h | 33 ++++++ opcodes/riscv-opc.c | 44 ++++++++ 4 files changed, 345 insertions(+) diff --git a/gas/testsuite/gas/riscv/x-thead-vector.d b/gas/testsuite/gas/riscv/x-thead-vector.d index e509ed0971b..d7cb1e1a457 100644 --- a/gas/testsuite/gas/riscv/x-thead-vector.d +++ b/gas/testsuite/gas/riscv/x-thead-vector.d @@ -10,3 +10,135 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+80c5f557[ ]+th.vsetvl[ ]+a0,a1,a2 [ ]+[0-9a-f]+:[ ]+0005f557[ ]+th.vsetvli[ ]+a0,a1,e8,m1,tu,mu [ ]+[0-9a-f]+:[ ]+7ff5f557[ ]+th.vsetvli[ ]+a0,a1,2047 +[ ]+[0-9a-f]+:[ ]+12050207[ ]+th.vlb.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+12050207[ ]+th.vlb.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+10050207[ ]+th.vlb.v[ ]+v4,\(a0\),v0.t +[ ]+[0-9a-f]+:[ ]+12055207[ ]+th.vlh.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+12055207[ ]+th.vlh.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+10055207[ ]+th.vlh.v[ ]+v4,\(a0\),v0.t +[ ]+[0-9a-f]+:[ ]+12056207[ ]+th.vlw.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+12056207[ ]+th.vlw.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+10056207[ ]+th.vlw.v[ ]+v4,\(a0\),v0.t +[ ]+[0-9a-f]+:[ ]+02050207[ ]+th.vlbu.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+02050207[ ]+th.vlbu.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+00050207[ 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,\(a0\) +[ ]+[0-9a-f]+:[ ]+01050207[ ]+th.vlbuff.v[ ]+v4,\(a0\),v0.t +[ ]+[0-9a-f]+:[ ]+03055207[ ]+th.vlhuff.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+03055207[ ]+th.vlhuff.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+01055207[ ]+th.vlhuff.v[ ]+v4,\(a0\),v0.t +[ ]+[0-9a-f]+:[ ]+03056207[ ]+th.vlwuff.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+03056207[ ]+th.vlwuff.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+01056207[ ]+th.vlwuff.v[ ]+v4,\(a0\),v0.t +[ ]+[0-9a-f]+:[ ]+03057207[ ]+th.vleff.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+03057207[ ]+th.vleff.v[ ]+v4,\(a0\) +[ ]+[0-9a-f]+:[ ]+01057207[ ]+th.vleff.v[ ]+v4,\(a0\),v0.t diff --git a/gas/testsuite/gas/riscv/x-thead-vector.s b/gas/testsuite/gas/riscv/x-thead-vector.s index ffea0a6f9f9..c65e9e8790c 100644 --- a/gas/testsuite/gas/riscv/x-thead-vector.s +++ b/gas/testsuite/gas/riscv/x-thead-vector.s @@ -1,3 +1,139 @@ th.vsetvl a0, a1, a2 th.vsetvli a0, a1, 0 th.vsetvli a0, a1, 0x7ff + + th.vlb.v v4, (a0) + th.vlb.v v4, 0(a0) + th.vlb.v v4, (a0), v0.t + th.vlh.v v4, (a0) + th.vlh.v v4, 0(a0) + th.vlh.v v4, (a0), v0.t + th.vlw.v v4, (a0) + th.vlw.v v4, 0(a0) + th.vlw.v v4, (a0), v0.t + th.vlbu.v v4, (a0) + th.vlbu.v v4, 0(a0) + th.vlbu.v v4, (a0), v0.t + th.vlhu.v v4, (a0) + th.vlhu.v v4, 0(a0) + th.vlhu.v v4, (a0), v0.t + th.vlwu.v v4, (a0) + th.vlwu.v v4, 0(a0) + th.vlwu.v v4, (a0), v0.t + th.vle.v v4, (a0) + th.vle.v v4, 0(a0) + th.vle.v v4, (a0), v0.t + th.vsb.v v4, (a0) + th.vsb.v v4, 0(a0) + th.vsb.v v4, (a0), v0.t + th.vsh.v v4, (a0) + th.vsh.v v4, 0(a0) + th.vsh.v v4, (a0), v0.t + th.vsw.v v4, (a0) + th.vsw.v v4, 0(a0) + th.vsw.v v4, (a0), v0.t + th.vse.v v4, (a0) + th.vse.v v4, 0(a0) + th.vse.v v4, (a0), v0.t + + th.vlsb.v v4, (a0), a1 + th.vlsb.v v4, 0(a0), a1 + th.vlsb.v v4, (a0), a1, v0.t + th.vlsh.v v4, (a0), a1 + th.vlsh.v v4, 0(a0), a1 + th.vlsh.v v4, (a0), a1, v0.t + th.vlsw.v v4, (a0), a1 + th.vlsw.v v4, 0(a0), a1 + th.vlsw.v v4, (a0), a1, v0.t + th.vlsbu.v v4, (a0), a1 + th.vlsbu.v v4, 0(a0), a1 + th.vlsbu.v v4, (a0), a1, v0.t + th.vlshu.v v4, (a0), a1 + th.vlshu.v v4, 0(a0), a1 + th.vlshu.v v4, (a0), a1, v0.t + th.vlswu.v v4, (a0), a1 + th.vlswu.v v4, 0(a0), a1 + th.vlswu.v v4, (a0), a1, v0.t + th.vlse.v v4, (a0), a1 + th.vlse.v v4, 0(a0), a1 + th.vlse.v v4, (a0), a1, v0.t + th.vssb.v v4, (a0), a1 + th.vssb.v v4, 0(a0), a1 + th.vssb.v v4, (a0), a1, v0.t + th.vssh.v v4, (a0), a1 + th.vssh.v v4, 0(a0), a1 + th.vssh.v v4, (a0), a1, v0.t + th.vssw.v v4, (a0), a1 + th.vssw.v v4, 0(a0), a1 + th.vssw.v v4, (a0), a1, v0.t + th.vsse.v v4, (a0), a1 + th.vsse.v v4, 0(a0), a1 + th.vsse.v v4, (a0), a1, v0.t + + th.vlxb.v v4, (a0), v12 + th.vlxb.v v4, 0(a0), v12 + th.vlxb.v v4, (a0), v12, v0.t + th.vlxh.v v4, (a0), v12 + th.vlxh.v v4, 0(a0), v12 + th.vlxh.v v4, (a0), v12, v0.t + th.vlxw.v v4, (a0), v12 + th.vlxw.v v4, 0(a0), v12 + th.vlxw.v v4, (a0), v12, v0.t + th.vlxbu.v v4, (a0), v12 + th.vlxbu.v v4, 0(a0), v12 + th.vlxbu.v v4, (a0), v12, v0.t + th.vlxhu.v v4, (a0), v12 + th.vlxhu.v v4, 0(a0), v12 + th.vlxhu.v v4, (a0), v12, v0.t + th.vlxwu.v v4, (a0), v12 + th.vlxwu.v v4, 0(a0), v12 + th.vlxwu.v v4, (a0), v12, v0.t + th.vlxe.v v4, (a0), v12 + th.vlxe.v v4, 0(a0), v12 + th.vlxe.v v4, (a0), v12, v0.t + th.vsxb.v v4, (a0), v12 + th.vsxb.v v4, 0(a0), v12 + th.vsxb.v v4, (a0), v12, v0.t + th.vsxh.v v4, (a0), v12 + th.vsxh.v v4, 0(a0), v12 + th.vsxh.v v4, (a0), v12, v0.t + th.vsxw.v v4, (a0), v12 + th.vsxw.v v4, 0(a0), v12 + th.vsxw.v v4, (a0), v12, v0.t + th.vsxe.v v4, (a0), v12 + th.vsxe.v v4, 0(a0), v12 + th.vsxe.v v4, (a0), v12, v0.t + th.vsuxb.v v4, (a0), v12 + th.vsuxb.v v4, 0(a0), v12 + th.vsuxb.v v4, (a0), v12, v0.t + th.vsuxh.v v4, (a0), v12 + th.vsuxh.v v4, 0(a0), v12 + th.vsuxh.v v4, (a0), v12, v0.t + th.vsuxw.v v4, (a0), v12 + th.vsuxw.v v4, 0(a0), v12 + th.vsuxw.v v4, (a0), v12, v0.t + th.vsuxe.v v4, (a0), v12 + th.vsuxe.v v4, 0(a0), v12 + th.vsuxe.v v4, (a0), v12, v0.t + + th.vlbff.v v4, (a0) + th.vlbff.v v4, 0(a0) + th.vlbff.v v4, (a0), v0.t + th.vlhff.v v4, (a0) + th.vlhff.v v4, 0(a0) + th.vlhff.v v4, (a0), v0.t + th.vlwff.v v4, (a0) + th.vlwff.v v4, 0(a0) + th.vlwff.v v4, (a0), v0.t + th.vlbuff.v v4, (a0) + th.vlbuff.v v4, 0(a0) + th.vlbuff.v v4, (a0), v0.t + th.vlhuff.v v4, (a0) + th.vlhuff.v v4, 0(a0) + th.vlhuff.v v4, (a0), v0.t + th.vlwuff.v v4, (a0) + th.vlwuff.v v4, 0(a0) + th.vlwuff.v v4, (a0), v0.t + th.vleff.v v4, (a0) + th.vleff.v v4, 0(a0) + th.vleff.v v4, (a0), v0.t diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index ed29384e825..792958b8925 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -2648,6 +2648,39 @@ #define MASK_TH_SYNC_IS 0xffffffff #define MATCH_TH_SYNC_S 0x0190000b #define MASK_TH_SYNC_S 0xffffffff +/* Vendor-specific (T-Head) XTheadVector instructions. */ +#define MATCH_TH_VLBV 0x10000007 +#define MASK_TH_VLBV 0xfdf0707f +#define MATCH_TH_VLHV 0x10005007 +#define MASK_TH_VLHV 0xfdf0707f +#define MATCH_TH_VLWV 0x10006007 +#define MASK_TH_VLWV 0xfdf0707f +#define MATCH_TH_VLSBV 0x18000007 +#define MASK_TH_VLSBV 0xfc00707f +#define MATCH_TH_VLSHV 0x18005007 +#define MASK_TH_VLSHV 0xfc00707f +#define MATCH_TH_VLSWV 0x18006007 +#define MASK_TH_VLSWV 0xfc00707f +#define MATCH_TH_VLXBV 0x1c000007 +#define MASK_TH_VLXBV 0xfc00707f +#define MATCH_TH_VLXHV 0x1c005007 +#define MASK_TH_VLXHV 0xfc00707f +#define MATCH_TH_VLXWV 0x1c006007 +#define MASK_TH_VLXWV 0xfc00707f +#define MATCH_TH_VSUXBV 0x1c000027 +#define MASK_TH_VSUXBV 0xfc00707f +#define MATCH_TH_VSUXHV 0x1c005027 +#define MASK_TH_VSUXHV 0xfc00707f +#define MATCH_TH_VSUXWV 0x1c006027 +#define MASK_TH_VSUXWV 0xfc00707f +#define MATCH_TH_VSUXEV 0x1c007027 +#define MASK_TH_VSUXEV 0xfc00707f +#define MATCH_TH_VLBFFV 0x11000007 +#define MASK_TH_VLBFFV 0xfdf0707f +#define MATCH_TH_VLHFFV 0x11005007 +#define MASK_TH_VLHFFV 0xfdf0707f +#define MATCH_TH_VLWFFV 0x11006007 +#define MASK_TH_VLWFFV 0xfdf0707f /* Vendor-specific (Ventana Microsystems) XVentanaCondOps instructions */ #define MATCH_VT_MASKC 0x607b #define MASK_VT_MASKC 0xfe00707f diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c index 4c2a9b5abef..54c1e8a62d9 100644 --- a/opcodes/riscv-opc.c +++ b/opcodes/riscv-opc.c @@ -2237,6 +2237,50 @@ const struct riscv_opcode riscv_opcodes[] = /* Vendor-specific (T-Head) XTheadVector instructions. */ {"th.vsetvl", 0, INSN_CLASS_XTHEADVECTOR, "d,s,t", MATCH_VSETVL, MASK_VSETVL, match_opcode, 0}, {"th.vsetvli", 0, INSN_CLASS_XTHEADVECTOR, "d,s,Vc", MATCH_VSETVLI, MASK_VSETVLI, match_opcode, 0}, +{"th.vlb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_TH_VLBV, MASK_TH_VLBV, match_opcode, INSN_DREF }, +{"th.vlh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_TH_VLHV, MASK_TH_VLHV, match_opcode, INSN_DREF }, +{"th.vlw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_TH_VLWV, MASK_TH_VLWV, match_opcode, INSN_DREF }, +{"th.vlbu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE8V, MASK_VLE8V, match_opcode, INSN_DREF }, +{"th.vlhu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE16V, MASK_VLE16V, match_opcode, INSN_DREF }, +{"th.vlwu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE32V, MASK_VLE32V, match_opcode, INSN_DREF }, +{"th.vle.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE64V, MASK_VLE64V, match_opcode, INSN_DREF }, +{"th.vsb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VSE8V, MASK_VSE8V, match_opcode, INSN_DREF }, +{"th.vsh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VSE16V, MASK_VSE16V, match_opcode, INSN_DREF }, +{"th.vsw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VSE32V, MASK_VSE32V, match_opcode, INSN_DREF }, +{"th.vse.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VSE64V, MASK_VSE64V, match_opcode, INSN_DREF }, +{"th.vlsb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_TH_VLSBV, MASK_TH_VLSBV, match_opcode, INSN_DREF }, +{"th.vlsh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_TH_VLSHV, MASK_TH_VLSHV, match_opcode, INSN_DREF }, +{"th.vlsw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_TH_VLSWV, MASK_TH_VLSWV, match_opcode, INSN_DREF }, +{"th.vlsbu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VLSE8V, MASK_VLSE8V, match_opcode, INSN_DREF }, +{"th.vlshu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VLSE16V, MASK_VLSE16V, match_opcode, INSN_DREF }, +{"th.vlswu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VLSE32V, MASK_VLSE32V, match_opcode, INSN_DREF }, +{"th.vlse.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VLSE64V, MASK_VLSE64V, match_opcode, INSN_DREF }, +{"th.vssb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VSSE8V, MASK_VSSE8V, match_opcode, INSN_DREF }, +{"th.vssh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VSSE16V, MASK_VSSE16V, match_opcode, INSN_DREF }, +{"th.vssw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VSSE32V, MASK_VSSE32V, match_opcode, INSN_DREF }, +{"th.vsse.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),tVm", MATCH_VSSE64V, MASK_VSSE64V, match_opcode, INSN_DREF }, +{"th.vlxb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VLXBV, MASK_TH_VLXBV, match_opcode, INSN_DREF }, +{"th.vlxh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VLXHV, MASK_TH_VLXHV, match_opcode, INSN_DREF }, +{"th.vlxw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VLXWV, MASK_TH_VLXWV, match_opcode, INSN_DREF }, +{"th.vlxbu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VLOXEI8V, MASK_VLOXEI8V, match_opcode, INSN_DREF }, +{"th.vlxhu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VLOXEI16V, MASK_VLOXEI16V, match_opcode, INSN_DREF }, +{"th.vlxwu.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VLOXEI32V, MASK_VLOXEI32V, match_opcode, INSN_DREF }, +{"th.vlxe.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VLOXEI64V, MASK_VLOXEI64V, match_opcode, INSN_DREF }, +{"th.vsxb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VSOXEI8V, MASK_VSOXEI8V, match_opcode, INSN_DREF }, +{"th.vsxh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VSOXEI16V, MASK_VSOXEI16V, match_opcode, INSN_DREF }, +{"th.vsxw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VSOXEI32V, MASK_VSOXEI32V, match_opcode, INSN_DREF }, +{"th.vsxe.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_VSOXEI64V, MASK_VSOXEI64V, match_opcode, INSN_DREF }, +{"th.vsuxb.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VSUXBV, MASK_TH_VSUXBV, match_opcode, INSN_DREF }, +{"th.vsuxh.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VSUXHV, MASK_TH_VSUXHV, match_opcode, INSN_DREF }, +{"th.vsuxw.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VSUXWV, MASK_TH_VSUXWV, match_opcode, INSN_DREF }, +{"th.vsuxe.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s),VtVm", MATCH_TH_VSUXEV, MASK_TH_VSUXEV, match_opcode, INSN_DREF }, +{"th.vlbff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_TH_VLBFFV, MASK_TH_VLBFFV, match_opcode, INSN_DREF }, +{"th.vlhff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_TH_VLHFFV, MASK_TH_VLHFFV, match_opcode, INSN_DREF }, +{"th.vlwff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_TH_VLWFFV, MASK_TH_VLWFFV, match_opcode, INSN_DREF }, +{"th.vlbuff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE8FFV, MASK_VLE8FFV, match_opcode, INSN_DREF }, +{"th.vlhuff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE16FFV, MASK_VLE16FFV, match_opcode, INSN_DREF }, +{"th.vlwuff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE32FFV, MASK_VLE32FFV, match_opcode, INSN_DREF }, +{"th.vleff.v", 0, INSN_CLASS_XTHEADVECTOR, "Vd,0(s)Vm", MATCH_VLE64FFV, MASK_VLE64FFV, match_opcode, INSN_DREF }, /* Vendor-specific (Ventana Microsystems) XVentanaCondOps instructions */ {"vt.maskc", 64, INSN_CLASS_XVENTANACONDOPS, "d,s,t", MATCH_VT_MASKC, MASK_VT_MASKC, match_opcode, 0 }, -- 2.17.1