diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-06-17 14:33:42 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2023-06-18 01:23:45 -0700 |
commit | b043cc1d7430d6a4d982aa4d2b07b44dd4b2366c (patch) | |
tree | 896d65d4f1fa310dfd07f5d6799f2b182e9b2727 /riscv/insns | |
parent | fff2699cfdcf9a2fe7e004ca92c299a2c11c37a1 (diff) | |
download | riscv-isa-sim-b043cc1d7430d6a4d982aa4d2b07b44dd4b2366c.zip riscv-isa-sim-b043cc1d7430d6a4d982aa4d2b07b44dd4b2366c.tar.gz riscv-isa-sim-b043cc1d7430d6a4d982aa4d2b07b44dd4b2366c.tar.bz2 |
Remove Xbitmanip from instructions that belong to multiple extensions
Diffstat (limited to 'riscv/insns')
-rw-r--r-- | riscv/insns/cmix.h | 2 | ||||
-rw-r--r-- | riscv/insns/fsr.h | 3 | ||||
-rw-r--r-- | riscv/insns/fsri.h | 3 | ||||
-rw-r--r-- | riscv/insns/fsrw.h | 2 | ||||
-rw-r--r-- | riscv/insns/gorci.h | 3 | ||||
-rw-r--r-- | riscv/insns/grevi.h | 3 | ||||
-rw-r--r-- | riscv/insns/pack.h | 6 | ||||
-rw-r--r-- | riscv/insns/packh.h | 5 | ||||
-rw-r--r-- | riscv/insns/packu.h | 4 | ||||
-rw-r--r-- | riscv/insns/packw.h | 5 | ||||
-rw-r--r-- | riscv/insns/shfli.h | 3 | ||||
-rw-r--r-- | riscv/insns/unshfli.h | 3 | ||||
-rw-r--r-- | riscv/insns/xperm4.h | 2 | ||||
-rw-r--r-- | riscv/insns/xperm8.h | 2 |
14 files changed, 16 insertions, 30 deletions
diff --git a/riscv/insns/cmix.h b/riscv/insns/cmix.h index 98eb0bc..f3b7977 100644 --- a/riscv/insns/cmix.h +++ b/riscv/insns/cmix.h @@ -1,2 +1,2 @@ -require_either_extension(EXT_ZBPBO, EXT_XZBT); +require_extension(EXT_ZBPBO); WRITE_RD((RS1 & RS2) | (RS3 & ~RS2)); diff --git a/riscv/insns/fsr.h b/riscv/insns/fsr.h index dfb26f1..d94f922 100644 --- a/riscv/insns/fsr.h +++ b/riscv/insns/fsr.h @@ -1,4 +1,5 @@ -require_either_extension(xlen == 32 ? EXT_ZBPBO : EXT_XZBT, EXT_XZBT); +require_rv32; +require_extension(EXT_ZBPBO); int shamt = RS2 & (2*xlen-1); reg_t a = RS1, b = RS3; if (shamt >= xlen) { diff --git a/riscv/insns/fsri.h b/riscv/insns/fsri.h index f7186f1..ced2364 100644 --- a/riscv/insns/fsri.h +++ b/riscv/insns/fsri.h @@ -1,4 +1,5 @@ -require_either_extension(xlen == 32 ? EXT_ZBPBO : EXT_XZBT, EXT_XZBT); +require_rv32; +require_extension(EXT_ZBPBO); int shamt = SHAMT & (2*xlen-1); reg_t a = RS1, b = RS3; if (shamt >= xlen) { diff --git a/riscv/insns/fsrw.h b/riscv/insns/fsrw.h index 494fe26..9471e36 100644 --- a/riscv/insns/fsrw.h +++ b/riscv/insns/fsrw.h @@ -1,5 +1,5 @@ require_rv64; -require_either_extension(EXT_ZBPBO, EXT_XZBT); +require_extension(EXT_ZBPBO); int shamt = RS2 & 63; reg_t a = RS1, b = RS3; if (shamt >= 32) { diff --git a/riscv/insns/gorci.h b/riscv/insns/gorci.h index d3017f4..a4656fa 100644 --- a/riscv/insns/gorci.h +++ b/riscv/insns/gorci.h @@ -1,6 +1,5 @@ // Zbb contains orc.b but not general gorci -require(((SHAMT == 7) && p->extension_enabled(EXT_ZBB)) - || p->extension_enabled(EXT_XZBP)); +require(((SHAMT == 7) && p->extension_enabled(EXT_ZBB))); require(SHAMT < xlen); reg_t x = RS1; int shamt = SHAMT; diff --git a/riscv/insns/grevi.h b/riscv/insns/grevi.h index d471814..c37f59b 100644 --- a/riscv/insns/grevi.h +++ b/riscv/insns/grevi.h @@ -4,8 +4,7 @@ int shamt = SHAMT; require(((shamt == xlen - 8) && (p->extension_enabled(EXT_ZBB) || p->extension_enabled(EXT_ZBKB))) //rev8 || ((shamt == 7) && p->extension_enabled(EXT_ZBKB)) // rev8.b || ((shamt == 8) && p->extension_enabled(EXT_ZPN)) // rev8.h - || ((shamt == xlen - 1) && p->extension_enabled(EXT_ZPN)) // rev - || p->extension_enabled(EXT_XZBP)); + || ((shamt == xlen - 1) && p->extension_enabled(EXT_ZPN))); require(shamt < xlen); reg_t x = RS1; if (shamt & 1) x = ((x & 0x5555555555555555LL) << 1) | ((x & 0xAAAAAAAAAAAAAAAALL) >> 1); diff --git a/riscv/insns/pack.h b/riscv/insns/pack.h index 2140f91..0622b92 100644 --- a/riscv/insns/pack.h +++ b/riscv/insns/pack.h @@ -1,11 +1,7 @@ // RV32Zbb contains zext.h but not general pack require(((xlen == 32) && (insn.rs2() == 0) && p->extension_enabled(EXT_ZBB)) || p->extension_enabled(EXT_ZPN) - || p->extension_enabled(EXT_ZBKB) - || p->extension_enabled(EXT_XZBP) - || p->extension_enabled(EXT_XZBE) - || p->extension_enabled(EXT_XZBF) - || ((xlen == 64) && p->extension_enabled(EXT_XZBM))); + || p->extension_enabled(EXT_ZBKB)); reg_t lo = zext_xlen(RS1 << (xlen/2)) >> (xlen/2); reg_t hi = zext_xlen(RS2 << (xlen/2)); WRITE_RD(sext_xlen(lo | hi)); diff --git a/riscv/insns/packh.h b/riscv/insns/packh.h index 82886e3..0f3de5b 100644 --- a/riscv/insns/packh.h +++ b/riscv/insns/packh.h @@ -1,7 +1,4 @@ -require(p->extension_enabled(EXT_ZBKB) || - p->extension_enabled(EXT_XZBP) || - p->extension_enabled(EXT_XZBE) || - p->extension_enabled(EXT_XZBF)); +require_extension(EXT_ZBKB); reg_t lo = zext_xlen(RS1 << (xlen-8)) >> (xlen-8); reg_t hi = zext_xlen(RS2 << (xlen-8)) >> (xlen-16); WRITE_RD(sext_xlen(lo | hi)); diff --git a/riscv/insns/packu.h b/riscv/insns/packu.h index 441207c..0676429 100644 --- a/riscv/insns/packu.h +++ b/riscv/insns/packu.h @@ -1,6 +1,4 @@ -require(p->extension_enabled(EXT_ZPN) || - p->extension_enabled(EXT_XZBP) || - ((xlen == 64) && p->extension_enabled(EXT_XZBM))); +require_extension(EXT_ZPN); reg_t lo = zext_xlen(RS1) >> (xlen/2); reg_t hi = zext_xlen(RS2) >> (xlen/2) << (xlen/2); WRITE_RD(sext_xlen(lo | hi)); diff --git a/riscv/insns/packw.h b/riscv/insns/packw.h index 084c190..dd78717 100644 --- a/riscv/insns/packw.h +++ b/riscv/insns/packw.h @@ -1,9 +1,6 @@ // RV64Zbb contains zext.h but not general packw require(((insn.rs2() == 0) && p->extension_enabled(EXT_ZBB)) - || p->extension_enabled(EXT_ZBKB) - || p->extension_enabled(EXT_XZBP) - || p->extension_enabled(EXT_XZBE) - || p->extension_enabled(EXT_XZBF)); + || p->extension_enabled(EXT_ZBKB)); require_rv64; reg_t lo = zext32(RS1 << 16) >> 16; reg_t hi = zext32(RS2 << 16); diff --git a/riscv/insns/shfli.h b/riscv/insns/shfli.h index f863619..bb21d2c 100644 --- a/riscv/insns/shfli.h +++ b/riscv/insns/shfli.h @@ -1,6 +1,5 @@ // Zbkb contains zip but not general shfli -require(((insn.rs2() == (xlen / 2 - 1)) && p->extension_enabled(EXT_ZBKB)) - || p->extension_enabled(EXT_XZBP)); +require(((insn.rs2() == (xlen / 2 - 1)) && p->extension_enabled(EXT_ZBKB))); require(SHAMT < (xlen/2)); reg_t x = RS1; int shamt = SHAMT & ((xlen-1) >> 1); diff --git a/riscv/insns/unshfli.h b/riscv/insns/unshfli.h index 26920f1..5a9cff1 100644 --- a/riscv/insns/unshfli.h +++ b/riscv/insns/unshfli.h @@ -1,6 +1,5 @@ // Zbkb contains unzip but not general unshfli -require(((insn.rs2() == (xlen / 2 - 1)) && p->extension_enabled(EXT_ZBKB)) - || p->extension_enabled(EXT_XZBP)); +require(((insn.rs2() == (xlen / 2 - 1)) && p->extension_enabled(EXT_ZBKB))); require(SHAMT < (xlen/2)); reg_t x = RS1; int shamt = SHAMT & ((xlen-1) >> 1); diff --git a/riscv/insns/xperm4.h b/riscv/insns/xperm4.h index 38800f3..a9d685f 100644 --- a/riscv/insns/xperm4.h +++ b/riscv/insns/xperm4.h @@ -1,2 +1,2 @@ -require_either_extension(EXT_ZBKX, EXT_XZBP); +require_extension(EXT_ZBKX); WRITE_RD(sext_xlen(xperm(RS1, RS2, 2, xlen))); diff --git a/riscv/insns/xperm8.h b/riscv/insns/xperm8.h index c272d66..1ba48ef 100644 --- a/riscv/insns/xperm8.h +++ b/riscv/insns/xperm8.h @@ -1,2 +1,2 @@ -require_either_extension(EXT_ZBKX, EXT_XZBP); +require_extension(EXT_ZBKX); WRITE_RD(sext_xlen(xperm(RS1, RS2, 3, xlen))); |