12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- From 4046c346a88fd00f032e7ef6766a3fd0431e6c1a Mon Sep 17 00:00:00 2001
- From: LevyHsu <admin@levyhsu.com>
- Date: Tue, 8 Jun 2021 17:09:36 +0800
- Subject: [PATCH 08/28] [RISCV] Add support for bcompress
- Add coding for bcompress:
- #define MATCH_BCOMPRESS 0x8006033
- #define MASK_BCOMPRESS 0xfe00707f
- #define MATCH_BCOMPRESSW 0x4800603b
- #define MASK_BCOMPRESSW 0xfe00707f
- ---
- include/opcode/riscv-opc.h | 6 ++++++
- opcodes/riscv-opc.c | 2 ++
- 2 files changed, 8 insertions(+)
- diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
- index fc08a3be7e..8a25e90f65 100644
- --- a/include/opcode/riscv-opc.h
- +++ b/include/opcode/riscv-opc.h
- @@ -535,6 +535,8 @@
- #define MASK_UNSHFL 0xfe00707f
- #define MATCH_UNSHFLI 0x8005013
- #define MASK_UNSHFLI 0xfc00707f
- +#define MATCH_BCOMPRESS 0x8006033
- +#define MASK_BCOMPRESS 0xfe00707f
- #define MATCH_BDECOMPRESS 0x48006033
- #define MASK_BDECOMPRESS 0xfe00707f
- #define MATCH_SEXT_B 0x60401013
- @@ -663,6 +665,8 @@
- #define MASK_SHFLW 0xfe00707f
- #define MATCH_UNSHFLW 0x800503b
- #define MASK_UNSHFLW 0xfe00707f
- +#define MATCH_BCOMPRESSW 0x4800603b
- +#define MASK_BCOMPRESSW 0xfe00707f
- #define MATCH_BDECOMPRESSW 0x4800603b
- #define MASK_BDECOMPRESSW 0xfe00707f
- #define MATCH_BFPW 0x4800703b
- @@ -3264,6 +3268,7 @@ DECLARE_INSN(bset, MATCH_BSET, MASK_BSET)
- DECLARE_INSN(bclr, MATCH_BCLR, MASK_BCLR)
- DECLARE_INSN(binv, MATCH_BINV, MASK_BINV)
- DECLARE_INSN(bext, MATCH_BEXT, MASK_BEXT)
- +DECLARE_INSN(bcompress, MATCH_BCOMPRESS, MASK_BCOMPRESS)
- DECLARE_INSN(bdecompress, MATCH_BDECOMPRESS, MASK_BDECOMPRESS)
- DECLARE_INSN(bseti, MATCH_BSETI, MASK_BSETI)
- DECLARE_INSN(bclri, MATCH_BCLRI, MASK_BCLRI)
- @@ -3273,6 +3278,7 @@ DECLARE_INSN(bsetw, MATCH_BSETW, MASK_BSETW)
- DECLARE_INSN(bclrw, MATCH_BCLRW, MASK_BCLRW)
- DECLARE_INSN(binvw, MATCH_BINVW, MASK_BINVW)
- DECLARE_INSN(bextw, MATCH_BEXTW, MASK_BEXTW)
- +DECLARE_INSN(bcompressw, MATCH_BCOMPRESSW, MASK_BCOMPRESSW)
- DECLARE_INSN(bdecompressw, MATCH_BDECOMPRESSW, MASK_BDECOMPRESSW)
- DECLARE_INSN(bsetiw, MATCH_BSETIW, MASK_BSETIW)
- DECLARE_INSN(bclriw, MATCH_BCLRIW, MASK_BCLRIW)
- diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
- index 5783c79df9..ab2f80d00f 100644
- --- a/opcodes/riscv-opc.c
- +++ b/opcodes/riscv-opc.c
- @@ -1497,6 +1497,7 @@ const struct riscv_opcode riscv_opcodes[] =
- {"bclr", 0, INSN_CLASS_ZBS, "d,s,t", MATCH_BCLR, MASK_BCLR, match_opcode, 0 },
- {"binv", 0, INSN_CLASS_ZBS, "d,s,t", MATCH_BINV, MASK_BINV, match_opcode, 0 },
- {"bext", 0, INSN_CLASS_ZBS_OR_ZBE, "d,s,t", MATCH_BEXT, MASK_BEXT, match_opcode, 0 },
- +{"bcompress",0, INSN_CLASS_ZBE, "d,s,t", MATCH_BCOMPRESS, MASK_BCOMPRESS, match_opcode, 0 },
- {"bdecompress",0, INSN_CLASS_ZBE, "d,s,t", MATCH_BDECOMPRESS, MASK_BDECOMPRESS, match_opcode, 0 },
- {"bseti", 0, INSN_CLASS_ZBS, "d,s,>", MATCH_BSETI, MASK_BSETI, match_opcode, 0 },
- {"bclri", 0, INSN_CLASS_ZBS, "d,s,>", MATCH_BCLRI, MASK_BCLRI, match_opcode, 0 },
- @@ -1506,6 +1507,7 @@ const struct riscv_opcode riscv_opcodes[] =
- {"bclrw", 64, INSN_CLASS_ZBS, "d,s,t", MATCH_BCLRW, MASK_BCLRW, match_opcode, 0 },
- {"binvw", 64, INSN_CLASS_ZBS, "d,s,t", MATCH_BINVW, MASK_BINVW, match_opcode, 0 },
- {"bextw", 64, INSN_CLASS_ZBS_OR_ZBE, "d,s,t", MATCH_BEXTW, MASK_BEXTW, match_opcode, 0 },
- +{"bcompressw",64, INSN_CLASS_ZBE, "d,s,<", MATCH_BCOMPRESSW, MASK_BCOMPRESSW, match_opcode, 0 },
- {"bdecompressw",64, INSN_CLASS_ZBE, "d,s,<", MATCH_BDECOMPRESSW, MASK_BDECOMPRESSW, match_opcode, 0 },
- {"bsetiw", 64, INSN_CLASS_ZBS, "d,s,<", MATCH_BSETIW, MASK_BSETIW, match_opcode, 0 },
- {"bclriw", 64, INSN_CLASS_ZBS, "d,s,<", MATCH_BCLRIW, MASK_BCLRIW, match_opcode, 0 },
- --
- 2.33.0
|