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

Align bitmanip instructions with v.1.00 and draft v.0.93 of the spec #267

Open
wants to merge 1 commit into
base: riscv-binutils-2.35-rvb
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 102 additions & 78 deletions include/opcode/riscv-opc.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,32 +195,40 @@
#define MASK_ORN 0xfe00707f
#define MATCH_XNOR 0x40004033
#define MASK_XNOR 0xfe00707f
#define MATCH_SLO 0x20001033
#define MASK_SLO 0xfe00707f
#define MATCH_SRO 0x20005033
#define MASK_SRO 0xfe00707f
#define MATCH_ROL 0x60001033
#define MASK_ROL 0xfe00707f
#define MATCH_ROR 0x60005033
#define MASK_ROR 0xfe00707f
#define MATCH_SBCLR 0x48001033
#define MASK_SBCLR 0xfe00707f
#define MATCH_SBSET 0x28001033
#define MASK_SBSET 0xfe00707f
#define MATCH_SBINV 0x68001033
#define MASK_SBINV 0xfe00707f
#define MATCH_SBEXT 0x48005033
#define MASK_SBEXT 0xfe00707f
#define MATCH_BCLR 0x48001033
#define MASK_BCLR 0xfe00707f
#define MATCH_BSET 0x28001033
#define MASK_BSET 0xfe00707f
#define MATCH_BINV 0x68001033
#define MASK_BINV 0xfe00707f
#define MATCH_BEXT 0x48005033
#define MASK_BEXT 0xfe00707f
#define MATCH_GORC 0x28005033
#define MASK_GORC 0xfe00707f
#define MATCH_GREV 0x68005033
#define MASK_GREV 0xfe00707f
#define MATCH_SLOI 0x20001013
#define MASK_SLOI 0xfc00707f
#define MATCH_SROI 0x20005013
#define MASK_SROI 0xfc00707f
#define MATCH_RORI 0x60005013
#define MASK_RORI 0xfc00707f
#define MATCH_SBCLRI 0x48001013
#define MASK_SBCLRI 0xfc00707f
#define MATCH_SBSETI 0x28001013
#define MASK_SBSETI 0xfc00707f
#define MATCH_SBINVI 0x68001013
#define MASK_SBINVI 0xfc00707f
#define MATCH_SBEXTI 0x48005013
#define MASK_SBEXTI 0xfc00707f
#define MATCH_BCLRI 0x48001013
#define MASK_BCLRI 0xfc00707f
#define MATCH_BSETI 0x28001013
#define MASK_BSETI 0xfc00707f
#define MATCH_BINVI 0x68001013
#define MASK_BINVI 0xfc00707f
#define MATCH_BEXTI 0x48005013
#define MASK_BEXTI 0xfc00707f
#define MATCH_GORCI 0x28005013
#define MASK_GORCI 0xfc00707f
#define MATCH_GREVI 0x68005013
Expand All @@ -239,8 +247,8 @@
#define MASK_CLZ 0xfff0707f
#define MATCH_CTZ 0x60101013
#define MASK_CTZ 0xfff0707f
#define MATCH_PCNT 0x60201013
#define MASK_PCNT 0xfff0707f
#define MATCH_CPOP 0x60201013
#define MASK_CPOP 0xfff0707f
#define MATCH_SEXT_B 0x60401013
#define MASK_SEXT_B 0xfff0707f
#define MATCH_SEXT_H 0x60501013
Expand Down Expand Up @@ -281,10 +289,10 @@
#define MASK_SHFL 0xfe00707f
#define MATCH_UNSHFL 0x8005033
#define MASK_UNSHFL 0xfe00707f
#define MATCH_BEXT 0x8006033
#define MASK_BEXT 0xfe00707f
#define MATCH_BDEP 0x48006033
#define MASK_BDEP 0xfe00707f
#define MATCH_BCOMPRESS 0x8006033
#define MASK_BCOMPRESS 0xfe00707f
#define MATCH_BDECOMPRESS 0x48006033
#define MASK_BDECOMPRESS 0xfe00707f
#define MATCH_PACK 0x8004033
#define MASK_PACK 0xfe00707f
#define MATCH_PACKU 0x48004033
Expand All @@ -307,34 +315,42 @@
#define MASK_BMATOR 0xfe00707f
#define MATCH_BMATXOR 0x48003033
#define MASK_BMATXOR 0xfe00707f
#define MATCH_SLLIU_W 0x800101b
#define MASK_SLLIU_W 0xfc00707f
#define MATCH_ADDU_W 0x800003b
#define MASK_ADDU_W 0xfe00707f
#define MATCH_SLLI_UW 0x800101b
#define MASK_SLLI_UW 0xfc00707f
#define MATCH_ADD_UW 0x800003b
#define MASK_ADD_UW 0xfe00707f
#define MATCH_SLOW 0x2000103b
#define MASK_SLOW 0xfe00707f
#define MATCH_SROW 0x2000503b
#define MASK_SROW 0xfe00707f
#define MATCH_ROLW 0x6000103b
#define MASK_ROLW 0xfe00707f
#define MATCH_RORW 0x6000503b
#define MASK_RORW 0xfe00707f
#define MATCH_SBCLRW 0x4800103b
#define MASK_SBCLRW 0xfe00707f
#define MATCH_SBSETW 0x2800103b
#define MASK_SBSETW 0xfe00707f
#define MATCH_SBINVW 0x6800103b
#define MASK_SBINVW 0xfe00707f
#define MATCH_SBEXTW 0x4800503b
#define MASK_SBEXTW 0xfe00707f
#define MATCH_BCLRW 0x4800103b
#define MASK_BCLRW 0xfe00707f
#define MATCH_BSETW 0x2800103b
#define MASK_BSETW 0xfe00707f
#define MATCH_BINVW 0x6800103b
#define MASK_BINVW 0xfe00707f
#define MATCH_BEXTW 0x4800503b
#define MASK_BEXTW 0xfe00707f
#define MATCH_GORCW 0x2800503b
#define MASK_GORCW 0xfe00707f
#define MATCH_GREVW 0x6800503b
#define MASK_GREVW 0xfe00707f
#define MATCH_SLOIW 0x2000101b
#define MASK_SLOIW 0xfe00707f
#define MATCH_SROIW 0x2000501b
#define MASK_SROIW 0xfe00707f
#define MATCH_RORIW 0x6000501b
#define MASK_RORIW 0xfe00707f
#define MATCH_SBCLRIW 0x4800101b
#define MASK_SBCLRIW 0xfe00707f
#define MATCH_SBSETIW 0x2800101b
#define MASK_SBSETIW 0xfe00707f
#define MATCH_SBINVIW 0x6800101b
#define MASK_SBINVIW 0xfe00707f
#define MATCH_BCLRIW 0x4800101b
#define MASK_BCLRIW 0xfe00707f
#define MATCH_BSETIW 0x2800101b
#define MASK_BSETIW 0xfe00707f
#define MATCH_BINVIW 0x6800101b
#define MASK_BINVIW 0xfe00707f
#define MATCH_GORCIW 0x2800501b
#define MASK_GORCIW 0xfe00707f
#define MATCH_GREVIW 0x6800501b
Expand All @@ -349,22 +365,22 @@
#define MASK_CLZW 0xfff0707f
#define MATCH_CTZW 0x6010101b
#define MASK_CTZW 0xfff0707f
#define MATCH_PCNTW 0x6020101b
#define MASK_PCNTW 0xfff0707f
#define MATCH_SH1ADDU_W 0x2000203b
#define MASK_SH1ADDU_W 0xfe00707f
#define MATCH_SH2ADDU_W 0x2000403b
#define MASK_SH2ADDU_W 0xfe00707f
#define MATCH_SH3ADDU_W 0x2000603b
#define MASK_SH3ADDU_W 0xfe00707f
#define MATCH_CPOPW 0x6020101b
#define MASK_CPOPW 0xfff0707f
#define MATCH_SH1ADD_UW 0x2000203b
#define MASK_SH1ADD_UW 0xfe00707f
#define MATCH_SH2ADD_UW 0x2000403b
#define MASK_SH2ADD_UW 0xfe00707f
#define MATCH_SH3ADD_UW 0x2000603b
#define MASK_SH3ADD_UW 0xfe00707f
#define MATCH_SHFLW 0x800103b
#define MASK_SHFLW 0xfe00707f
#define MATCH_UNSHFLW 0x800503b
#define MASK_UNSHFLW 0xfe00707f
#define MATCH_BEXTW 0x800603b
#define MASK_BEXTW 0xfe00707f
#define MATCH_BDEPW 0x4800603b
#define MASK_BDEPW 0xfe00707f
#define MATCH_BCOMPRESSW 0x800603b
#define MASK_BCOMPRESSW 0xfe00707f
#define MATCH_BDECOMPRESSW 0x4800603b
#define MASK_BDECOMPRESSW 0xfe00707f
#define MATCH_PACKW 0x800403b
#define MASK_PACKW 0xfe00707f
#define MATCH_PACKUW 0x4800403b
Expand Down Expand Up @@ -1121,19 +1137,23 @@ DECLARE_INSN(remuw, MATCH_REMUW, MASK_REMUW)
DECLARE_INSN(andn, MATCH_ANDN, MASK_ANDN)
DECLARE_INSN(orn, MATCH_ORN, MASK_ORN)
DECLARE_INSN(xnor, MATCH_XNOR, MASK_XNOR)
DECLARE_INSN(slo, MATCH_SLO, MASK_SLO)
DECLARE_INSN(sro, MATCH_SRO, MASK_SRO)
DECLARE_INSN(rol, MATCH_ROL, MASK_ROL)
DECLARE_INSN(ror, MATCH_ROR, MASK_ROR)
DECLARE_INSN(sbclr, MATCH_SBCLR, MASK_SBCLR)
DECLARE_INSN(sbset, MATCH_SBSET, MASK_SBSET)
DECLARE_INSN(sbinv, MATCH_SBINV, MASK_SBINV)
DECLARE_INSN(sbext, MATCH_SBEXT, MASK_SBEXT)
DECLARE_INSN(bclr, MATCH_BCLR, MASK_BCLR)
DECLARE_INSN(bset, MATCH_BSET, MASK_BSET)
DECLARE_INSN(binv, MATCH_BINV, MASK_BINV)
DECLARE_INSN(bext, MATCH_BEXT, MASK_BEXT)
DECLARE_INSN(gorc, MATCH_GORC, MASK_GORC)
DECLARE_INSN(grev, MATCH_GREV, MASK_GREV)
DECLARE_INSN(sloi, MATCH_SLOI, MASK_SLOI)
DECLARE_INSN(sroi, MATCH_SROI, MASK_SROI)
DECLARE_INSN(rori, MATCH_RORI, MASK_RORI)
DECLARE_INSN(sbclri, MATCH_SBCLRI, MASK_SBCLRI)
DECLARE_INSN(sbseti, MATCH_SBSETI, MASK_SBSETI)
DECLARE_INSN(sbinvi, MATCH_SBINVI, MASK_SBINVI)
DECLARE_INSN(sbexti, MATCH_SBEXTI, MASK_SBEXTI)
DECLARE_INSN(bclri, MATCH_BCLRI, MASK_BCLRI)
DECLARE_INSN(bseti, MATCH_BSETI, MASK_BSETI)
DECLARE_INSN(binvi, MATCH_BINVI, MASK_BINVI)
DECLARE_INSN(bexti, MATCH_BEXTI, MASK_BEXTI)
DECLARE_INSN(gorci, MATCH_GORCI, MASK_GORCI)
DECLARE_INSN(grevi, MATCH_GREVI, MASK_GREVI)
DECLARE_INSN(cmix, MATCH_CMIX, MASK_CMIX)
Expand All @@ -1143,7 +1163,7 @@ DECLARE_INSN(fsr, MATCH_FSR, MASK_FSR)
DECLARE_INSN(fsri, MATCH_FSRI, MASK_FSRI)
DECLARE_INSN(clz, MATCH_CLZ, MASK_CLZ)
DECLARE_INSN(ctz, MATCH_CTZ, MASK_CTZ)
DECLARE_INSN(pcnt, MATCH_PCNT, MASK_PCNT)
DECLARE_INSN(cpop, MATCH_CPOP, MASK_CPOP)
DECLARE_INSN(sext_b, MATCH_SEXT_B, MASK_SEXT_B)
DECLARE_INSN(sext_h, MATCH_SEXT_H, MASK_SEXT_H)
DECLARE_INSN(crc32_b, MATCH_CRC32_B, MASK_CRC32_B)
Expand All @@ -1164,8 +1184,8 @@ DECLARE_INSN(minu, MATCH_MINU, MASK_MINU)
DECLARE_INSN(maxu, MATCH_MAXU, MASK_MAXU)
DECLARE_INSN(shfl, MATCH_SHFL, MASK_SHFL)
DECLARE_INSN(unshfl, MATCH_UNSHFL, MASK_UNSHFL)
DECLARE_INSN(bext, MATCH_BEXT, MASK_BEXT)
DECLARE_INSN(bdep, MATCH_BDEP, MASK_BDEP)
DECLARE_INSN(bcompress, MATCH_BCOMPRESS, MASK_BCOMPRESS)
DECLARE_INSN(bdecompress, MATCH_BDECOMPRESS, MASK_BDECOMPRESS)
DECLARE_INSN(pack, MATCH_PACK, MASK_PACK)
DECLARE_INSN(packu, MATCH_PACKU, MASK_PACKU)
DECLARE_INSN(packh, MATCH_PACKH, MASK_PACKH)
Expand All @@ -1177,35 +1197,39 @@ DECLARE_INSN(crc32_d, MATCH_CRC32_D, MASK_CRC32_D)
DECLARE_INSN(crc32c_d, MATCH_CRC32C_D, MASK_CRC32C_D)
DECLARE_INSN(bmator, MATCH_BMATOR, MASK_BMATOR)
DECLARE_INSN(bmatxor, MATCH_BMATXOR, MASK_BMATXOR)
DECLARE_INSN(slliu_w, MATCH_SLLIU_W, MASK_SLLIU_W)
DECLARE_INSN(addu_w, MATCH_ADDU_W, MASK_ADDU_W)
DECLARE_INSN(slli_uw, MATCH_SLLI_UW, MASK_SLLI_UW)
DECLARE_INSN(add_uw, MATCH_ADD_UW, MASK_ADD_UW)
DECLARE_INSN(slow, MATCH_SLOW, MASK_SLOW)
DECLARE_INSN(srow, MATCH_SROW, MASK_SROW)
DECLARE_INSN(rolw, MATCH_ROLW, MASK_ROLW)
DECLARE_INSN(rorw, MATCH_RORW, MASK_RORW)
DECLARE_INSN(sbclrw, MATCH_SBCLRW, MASK_SBCLRW)
DECLARE_INSN(sbsetw, MATCH_SBSETW, MASK_SBSETW)
DECLARE_INSN(sbinvw, MATCH_SBINVW, MASK_SBINVW)
DECLARE_INSN(sbextw, MATCH_SBEXTW, MASK_SBEXTW)
DECLARE_INSN(bclrw, MATCH_BCLRW, MASK_BCLRW)
DECLARE_INSN(bsetw, MATCH_BSETW, MASK_BSETW)
DECLARE_INSN(binvw, MATCH_BINVW, MASK_BINVW)
DECLARE_INSN(bextw, MATCH_BEXTW, MASK_BEXTW)
DECLARE_INSN(gorcw, MATCH_GORCW, MASK_GORCW)
DECLARE_INSN(grevw, MATCH_GREVW, MASK_GREVW)
DECLARE_INSN(sloiw, MATCH_SLOIW, MASK_SLOIW)
DECLARE_INSN(sroiw, MATCH_SROIW, MASK_SROIW)
DECLARE_INSN(roriw, MATCH_RORIW, MASK_RORIW)
DECLARE_INSN(sbclriw, MATCH_SBCLRIW, MASK_SBCLRIW)
DECLARE_INSN(sbsetiw, MATCH_SBSETIW, MASK_SBSETIW)
DECLARE_INSN(sbinviw, MATCH_SBINVIW, MASK_SBINVIW)
DECLARE_INSN(bclriw, MATCH_BCLRIW, MASK_BCLRIW)
DECLARE_INSN(bsetiw, MATCH_BSETIW, MASK_BSETIW)
DECLARE_INSN(binviw, MATCH_BINVIW, MASK_BINVIW)
DECLARE_INSN(gorciw, MATCH_GORCIW, MASK_GORCIW)
DECLARE_INSN(greviw, MATCH_GREVIW, MASK_GREVIW)
DECLARE_INSN(fslw, MATCH_FSLW, MASK_FSLW)
DECLARE_INSN(fsrw, MATCH_FSRW, MASK_FSRW)
DECLARE_INSN(fsriw, MATCH_FSRIW, MASK_FSRIW)
DECLARE_INSN(clzw, MATCH_CLZW, MASK_CLZW)
DECLARE_INSN(ctzw, MATCH_CTZW, MASK_CTZW)
DECLARE_INSN(pcntw, MATCH_PCNTW, MASK_PCNTW)
DECLARE_INSN(sh1addu_w, MATCH_SH1ADDU_W, MASK_SH1ADDU_W)
DECLARE_INSN(sh2addu_w, MATCH_SH2ADDU_W, MASK_SH2ADDU_W)
DECLARE_INSN(sh3addu_w, MATCH_SH3ADDU_W, MASK_SH3ADDU_W)
DECLARE_INSN(cpopw, MATCH_CPOPW, MASK_CPOPW)
DECLARE_INSN(sh1add_uw, MATCH_SH1ADD_UW, MASK_SH1ADD_UW)
DECLARE_INSN(sh2add_uw, MATCH_SH2ADD_UW, MASK_SH2ADD_UW)
DECLARE_INSN(sh3add_uw, MATCH_SH3ADD_UW, MASK_SH3ADD_UW)
DECLARE_INSN(shflw, MATCH_SHFLW, MASK_SHFLW)
DECLARE_INSN(unshflw, MATCH_UNSHFLW, MASK_UNSHFLW)
DECLARE_INSN(bextw, MATCH_BEXTW, MASK_BEXTW)
DECLARE_INSN(bdepw, MATCH_BDEPW, MASK_BDEPW)
DECLARE_INSN(bcompressw, MATCH_BCOMPRESSW, MASK_BCOMPRESSW)
DECLARE_INSN(bdecompressw, MATCH_BDECOMPRESSW, MASK_BDECOMPRESSW)
DECLARE_INSN(packw, MATCH_PACKW, MASK_PACKW)
DECLARE_INSN(packuw, MATCH_PACKUW, MASK_PACKUW)
DECLARE_INSN(bfpw, MATCH_BFPW, MASK_BFPW)
Expand Down
Loading