From 2e2476304516945da407727d56944672d2b56698 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Mon, 16 Oct 2023 20:59:40 -0700 Subject: [PATCH 1/4] vamo: remove from building list Signed-off-by: Chih-Min Chao --- riscv/riscv.mk.in | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index 3a0333c544..ecf4fa0166 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -795,44 +795,6 @@ riscv_insn_ext_v_alu_fp = \ vmfne_vf \ vmfne_vv \ -riscv_insn_ext_v_amo = \ - vamoswapei8_v \ - vamoaddei8_v \ - vamoandei8_v \ - vamomaxei8_v \ - vamomaxuei8_v \ - vamominei8_v \ - vamominuei8_v \ - vamoorei8_v \ - vamoxorei8_v \ - vamoswapei16_v \ - vamoaddei16_v \ - vamoandei16_v \ - vamomaxei16_v \ - vamomaxuei16_v \ - vamominei16_v \ - vamominuei16_v \ - vamoorei16_v \ - vamoxorei16_v \ - vamoswapei32_v \ - vamoaddei32_v \ - vamoandei32_v \ - vamomaxei32_v \ - vamomaxuei32_v \ - vamominei32_v \ - vamominuei32_v \ - vamoorei32_v \ - vamoxorei32_v \ - vamoswapei64_v \ - vamoaddei64_v \ - vamoandei64_v \ - vamomaxei64_v \ - vamomaxuei64_v \ - vamominei64_v \ - vamominuei64_v \ - vamoorei64_v \ - vamoxorei64_v \ - riscv_insn_ext_v_ldst = \ vlm_v \ vle8_v \ @@ -901,7 +863,6 @@ riscv_insn_ext_v_ctrl = \ riscv_insn_ext_v = \ $(riscv_insn_ext_v_alu_fp) \ $(riscv_insn_ext_v_alu_int) \ - $(riscv_insn_ext_v_amo) \ $(riscv_insn_ext_v_ctrl) \ $(riscv_insn_ext_v_ldst) \ From 9705dc3ba82c283f4c6de78126ac0e36c1c3eb61 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Mon, 16 Oct 2023 20:59:21 -0700 Subject: [PATCH 2/4] vamo: remove instruction implementation Signed-off-by: Chih-Min Chao --- riscv/insns/vamoaddei16_v.h | 2 -- riscv/insns/vamoaddei32_v.h | 2 -- riscv/insns/vamoaddei64_v.h | 2 -- riscv/insns/vamoaddei8_v.h | 2 -- riscv/insns/vamoandei16_v.h | 2 -- riscv/insns/vamoandei32_v.h | 2 -- riscv/insns/vamoandei64_v.h | 2 -- riscv/insns/vamoandei8_v.h | 2 -- riscv/insns/vamomaxei16_v.h | 2 -- riscv/insns/vamomaxei32_v.h | 2 -- riscv/insns/vamomaxei64_v.h | 2 -- riscv/insns/vamomaxei8_v.h | 2 -- riscv/insns/vamomaxuei16_v.h | 2 -- riscv/insns/vamomaxuei32_v.h | 2 -- riscv/insns/vamomaxuei64_v.h | 2 -- riscv/insns/vamomaxuei8_v.h | 2 -- riscv/insns/vamominei16_v.h | 2 -- riscv/insns/vamominei32_v.h | 2 -- riscv/insns/vamominei64_v.h | 2 -- riscv/insns/vamominei8_v.h | 2 -- riscv/insns/vamominuei16_v.h | 2 -- riscv/insns/vamominuei32_v.h | 2 -- riscv/insns/vamominuei64_v.h | 2 -- riscv/insns/vamominuei8_v.h | 2 -- riscv/insns/vamoorei16_v.h | 2 -- riscv/insns/vamoorei32_v.h | 2 -- riscv/insns/vamoorei64_v.h | 2 -- riscv/insns/vamoorei8_v.h | 2 -- riscv/insns/vamoswapei16_v.h | 2 -- riscv/insns/vamoswapei32_v.h | 2 -- riscv/insns/vamoswapei64_v.h | 2 -- riscv/insns/vamoswapei8_v.h | 2 -- riscv/insns/vamoxorei16_v.h | 2 -- riscv/insns/vamoxorei32_v.h | 2 -- riscv/insns/vamoxorei64_v.h | 2 -- riscv/insns/vamoxorei8_v.h | 2 -- 36 files changed, 72 deletions(-) delete mode 100644 riscv/insns/vamoaddei16_v.h delete mode 100644 riscv/insns/vamoaddei32_v.h delete mode 100644 riscv/insns/vamoaddei64_v.h delete mode 100644 riscv/insns/vamoaddei8_v.h delete mode 100644 riscv/insns/vamoandei16_v.h delete mode 100644 riscv/insns/vamoandei32_v.h delete mode 100644 riscv/insns/vamoandei64_v.h delete mode 100644 riscv/insns/vamoandei8_v.h delete mode 100644 riscv/insns/vamomaxei16_v.h delete mode 100644 riscv/insns/vamomaxei32_v.h delete mode 100644 riscv/insns/vamomaxei64_v.h delete mode 100644 riscv/insns/vamomaxei8_v.h delete mode 100644 riscv/insns/vamomaxuei16_v.h delete mode 100644 riscv/insns/vamomaxuei32_v.h delete mode 100644 riscv/insns/vamomaxuei64_v.h delete mode 100644 riscv/insns/vamomaxuei8_v.h delete mode 100644 riscv/insns/vamominei16_v.h delete mode 100644 riscv/insns/vamominei32_v.h delete mode 100644 riscv/insns/vamominei64_v.h delete mode 100644 riscv/insns/vamominei8_v.h delete mode 100644 riscv/insns/vamominuei16_v.h delete mode 100644 riscv/insns/vamominuei32_v.h delete mode 100644 riscv/insns/vamominuei64_v.h delete mode 100644 riscv/insns/vamominuei8_v.h delete mode 100644 riscv/insns/vamoorei16_v.h delete mode 100644 riscv/insns/vamoorei32_v.h delete mode 100644 riscv/insns/vamoorei64_v.h delete mode 100644 riscv/insns/vamoorei8_v.h delete mode 100644 riscv/insns/vamoswapei16_v.h delete mode 100644 riscv/insns/vamoswapei32_v.h delete mode 100644 riscv/insns/vamoswapei64_v.h delete mode 100644 riscv/insns/vamoswapei8_v.h delete mode 100644 riscv/insns/vamoxorei16_v.h delete mode 100644 riscv/insns/vamoxorei32_v.h delete mode 100644 riscv/insns/vamoxorei64_v.h delete mode 100644 riscv/insns/vamoxorei8_v.h diff --git a/riscv/insns/vamoaddei16_v.h b/riscv/insns/vamoaddei16_v.h deleted file mode 100644 index 3cb3db709d..0000000000 --- a/riscv/insns/vamoaddei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoadde.v vd, (rs1), vs2, vd -VI_AMO({ return lhs + vs3; }, uint, e16); diff --git a/riscv/insns/vamoaddei32_v.h b/riscv/insns/vamoaddei32_v.h deleted file mode 100644 index 2bd77fcbd2..0000000000 --- a/riscv/insns/vamoaddei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoadde.v vd, (rs1), vs2, vd -VI_AMO({ return lhs + vs3; }, uint, e32); diff --git a/riscv/insns/vamoaddei64_v.h b/riscv/insns/vamoaddei64_v.h deleted file mode 100644 index 79ca748205..0000000000 --- a/riscv/insns/vamoaddei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoadde.v vd, (rs1), vs2, vd -VI_AMO({ return lhs + vs3; }, uint, e64); diff --git a/riscv/insns/vamoaddei8_v.h b/riscv/insns/vamoaddei8_v.h deleted file mode 100644 index 06b8c79302..0000000000 --- a/riscv/insns/vamoaddei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoadde.v vd, (rs1), vs2, vd -VI_AMO({ return lhs + vs3; }, uint, e8); diff --git a/riscv/insns/vamoandei16_v.h b/riscv/insns/vamoandei16_v.h deleted file mode 100644 index be119497f3..0000000000 --- a/riscv/insns/vamoandei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoande.v vd, (rs1), vs2, vd -VI_AMO({ return lhs & vs3; }, uint, e16); diff --git a/riscv/insns/vamoandei32_v.h b/riscv/insns/vamoandei32_v.h deleted file mode 100644 index 71506704ff..0000000000 --- a/riscv/insns/vamoandei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoande.v vd, (rs1), vs2, vd -VI_AMO({ return lhs & vs3; }, uint, e32); diff --git a/riscv/insns/vamoandei64_v.h b/riscv/insns/vamoandei64_v.h deleted file mode 100644 index 3efae3b59f..0000000000 --- a/riscv/insns/vamoandei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoande.v vd, (rs1), vs2, vd -VI_AMO({ return lhs & vs3; }, uint, e64); diff --git a/riscv/insns/vamoandei8_v.h b/riscv/insns/vamoandei8_v.h deleted file mode 100644 index c47645d3e0..0000000000 --- a/riscv/insns/vamoandei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoande.v vd, (rs1), vs2, vd -VI_AMO({ return lhs & vs3; }, uint, e8); diff --git a/riscv/insns/vamomaxei16_v.h b/riscv/insns/vamomaxei16_v.h deleted file mode 100644 index ca67893e99..0000000000 --- a/riscv/insns/vamomaxei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxe.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e16); diff --git a/riscv/insns/vamomaxei32_v.h b/riscv/insns/vamomaxei32_v.h deleted file mode 100644 index b6823cd042..0000000000 --- a/riscv/insns/vamomaxei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxe.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e32); diff --git a/riscv/insns/vamomaxei64_v.h b/riscv/insns/vamomaxei64_v.h deleted file mode 100644 index 46e8a3bbd1..0000000000 --- a/riscv/insns/vamomaxei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxe.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e64); diff --git a/riscv/insns/vamomaxei8_v.h b/riscv/insns/vamomaxei8_v.h deleted file mode 100644 index 9697b3a4cb..0000000000 --- a/riscv/insns/vamomaxei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxe.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e8); diff --git a/riscv/insns/vamomaxuei16_v.h b/riscv/insns/vamomaxuei16_v.h deleted file mode 100644 index e05971dfcf..0000000000 --- a/riscv/insns/vamomaxuei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e16); diff --git a/riscv/insns/vamomaxuei32_v.h b/riscv/insns/vamomaxuei32_v.h deleted file mode 100644 index 9b873543b9..0000000000 --- a/riscv/insns/vamomaxuei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e32); diff --git a/riscv/insns/vamomaxuei64_v.h b/riscv/insns/vamomaxuei64_v.h deleted file mode 100644 index bbfbc9f2a3..0000000000 --- a/riscv/insns/vamomaxuei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e64); diff --git a/riscv/insns/vamomaxuei8_v.h b/riscv/insns/vamomaxuei8_v.h deleted file mode 100644 index 357ba2454a..0000000000 --- a/riscv/insns/vamomaxuei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomaxue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e8); diff --git a/riscv/insns/vamominei16_v.h b/riscv/insns/vamominei16_v.h deleted file mode 100644 index 9d1ecac643..0000000000 --- a/riscv/insns/vamominei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomine.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e16); diff --git a/riscv/insns/vamominei32_v.h b/riscv/insns/vamominei32_v.h deleted file mode 100644 index 6cb8475e39..0000000000 --- a/riscv/insns/vamominei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomine.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e32); diff --git a/riscv/insns/vamominei64_v.h b/riscv/insns/vamominei64_v.h deleted file mode 100644 index 9ef3d4ee3b..0000000000 --- a/riscv/insns/vamominei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomine.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e64); diff --git a/riscv/insns/vamominei8_v.h b/riscv/insns/vamominei8_v.h deleted file mode 100644 index 5c035ea47b..0000000000 --- a/riscv/insns/vamominei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamomine.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e8); diff --git a/riscv/insns/vamominuei16_v.h b/riscv/insns/vamominuei16_v.h deleted file mode 100644 index d4a8f89292..0000000000 --- a/riscv/insns/vamominuei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamominue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e16); diff --git a/riscv/insns/vamominuei32_v.h b/riscv/insns/vamominuei32_v.h deleted file mode 100644 index 16296c5beb..0000000000 --- a/riscv/insns/vamominuei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamominue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e32); diff --git a/riscv/insns/vamominuei64_v.h b/riscv/insns/vamominuei64_v.h deleted file mode 100644 index fd850fd063..0000000000 --- a/riscv/insns/vamominuei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamominue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e64); diff --git a/riscv/insns/vamominuei8_v.h b/riscv/insns/vamominuei8_v.h deleted file mode 100644 index 3749d0525d..0000000000 --- a/riscv/insns/vamominuei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamominue.v vd, (rs1), vs2, vd -VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e8); diff --git a/riscv/insns/vamoorei16_v.h b/riscv/insns/vamoorei16_v.h deleted file mode 100644 index a5ba1caa74..0000000000 --- a/riscv/insns/vamoorei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs | vs3; }, uint, e16); diff --git a/riscv/insns/vamoorei32_v.h b/riscv/insns/vamoorei32_v.h deleted file mode 100644 index 94e4458e49..0000000000 --- a/riscv/insns/vamoorei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs | vs3; }, uint, e32); diff --git a/riscv/insns/vamoorei64_v.h b/riscv/insns/vamoorei64_v.h deleted file mode 100644 index 84e03944e5..0000000000 --- a/riscv/insns/vamoorei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs | vs3; }, uint, e64); diff --git a/riscv/insns/vamoorei8_v.h b/riscv/insns/vamoorei8_v.h deleted file mode 100644 index 364035dbb2..0000000000 --- a/riscv/insns/vamoorei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs | vs3; }, uint, e8); diff --git a/riscv/insns/vamoswapei16_v.h b/riscv/insns/vamoswapei16_v.h deleted file mode 100644 index 31ff021030..0000000000 --- a/riscv/insns/vamoswapei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoswape.v vd, (rs1), vs2, vd -VI_AMO({ return vs3; }, uint, e16); diff --git a/riscv/insns/vamoswapei32_v.h b/riscv/insns/vamoswapei32_v.h deleted file mode 100644 index a5741929ab..0000000000 --- a/riscv/insns/vamoswapei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoswape.v vd, (rs1), vs2, vd -VI_AMO({ return vs3; }, uint, e32); diff --git a/riscv/insns/vamoswapei64_v.h b/riscv/insns/vamoswapei64_v.h deleted file mode 100644 index 58bd035217..0000000000 --- a/riscv/insns/vamoswapei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoswape.v vd, (rs1), vs2, vd -VI_AMO({ return vs3; }, uint, e64); diff --git a/riscv/insns/vamoswapei8_v.h b/riscv/insns/vamoswapei8_v.h deleted file mode 100644 index af37c8c3f8..0000000000 --- a/riscv/insns/vamoswapei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoswape.v vd, (rs1), vs2, vd -VI_AMO({ return vs3; }, uint, e8); diff --git a/riscv/insns/vamoxorei16_v.h b/riscv/insns/vamoxorei16_v.h deleted file mode 100644 index 61e8c3272c..0000000000 --- a/riscv/insns/vamoxorei16_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs ^ vs3; }, uint, e16); diff --git a/riscv/insns/vamoxorei32_v.h b/riscv/insns/vamoxorei32_v.h deleted file mode 100644 index d48d951504..0000000000 --- a/riscv/insns/vamoxorei32_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs ^ vs3; }, uint, e32); diff --git a/riscv/insns/vamoxorei64_v.h b/riscv/insns/vamoxorei64_v.h deleted file mode 100644 index f7a3ca42e1..0000000000 --- a/riscv/insns/vamoxorei64_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs ^ vs3; }, uint, e64); diff --git a/riscv/insns/vamoxorei8_v.h b/riscv/insns/vamoxorei8_v.h deleted file mode 100644 index 4b6c79824c..0000000000 --- a/riscv/insns/vamoxorei8_v.h +++ /dev/null @@ -1,2 +0,0 @@ -//vamoore.v vd, (rs1), vs2, vd -VI_AMO({ return lhs ^ vs3; }, uint, e8); From 9ffcbc3556a00a1ac228b96c09051f9bbbe90e1c Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Mon, 16 Oct 2023 21:00:27 -0700 Subject: [PATCH 3/4] vamo: remove related loop macro Signed-off-by: Chih-Min Chao --- riscv/v_ext_macros.h | 54 -------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/riscv/v_ext_macros.h b/riscv/v_ext_macros.h index 908ff16c28..b198d54b62 100644 --- a/riscv/v_ext_macros.h +++ b/riscv/v_ext_macros.h @@ -1399,60 +1399,6 @@ reg_t index[P.VU.vlmax]; \ } \ P.VU.vstart->write(0); -// -// vector: amo -// -#define VI_AMO(op, type, idx_type) \ - require_vector(false); \ - require_align(insn.rd(), P.VU.vflmul); \ - require(P.VU.vsew <= P.get_xlen() && P.VU.vsew >= 32); \ - require_align(insn.rd(), P.VU.vflmul); \ - float vemul = ((float)idx_type / P.VU.vsew * P.VU.vflmul); \ - require(vemul >= 0.125 && vemul <= 8); \ - require_align(insn.rs2(), vemul); \ - if (insn.v_wd()) { \ - require_vm; \ - if (idx_type > P.VU.vsew) { \ - if (insn.rd() != insn.rs2()) \ - require_noover(insn.rd(), P.VU.vflmul, insn.rs2(), vemul); \ - } else if (idx_type < P.VU.vsew) { \ - if (vemul < 1) { \ - require_noover(insn.rd(), P.VU.vflmul, insn.rs2(), vemul); \ - } else { \ - require_noover_widen(insn.rd(), P.VU.vflmul, insn.rs2(), vemul); \ - } \ - } \ - } \ - VI_DUPLICATE_VREG(insn.rs2(), idx_type); \ - const reg_t vl = P.VU.vl->read(); \ - const reg_t baseAddr = RS1; \ - const reg_t vd = insn.rd(); \ - for (reg_t i = P.VU.vstart->read(); i < vl; ++i) { \ - VI_ELEMENT_SKIP; \ - VI_STRIP(i); \ - P.VU.vstart->write(i); \ - switch (P.VU.vsew) { \ - case e32: { \ - auto vs3 = P.VU.elt< type ## 32_t>(vd, vreg_inx); \ - auto val = MMU.amo(baseAddr + index[i], [&](type ## 32_t UNUSED lhs) { op }); \ - if (insn.v_wd()) \ - P.VU.elt< type ## 32_t>(vd, vreg_inx, true) = val; \ - } \ - break; \ - case e64: { \ - auto vs3 = P.VU.elt< type ## 64_t>(vd, vreg_inx); \ - auto val = MMU.amo(baseAddr + index[i], [&](type ## 64_t UNUSED lhs) { op }); \ - if (insn.v_wd()) \ - P.VU.elt< type ## 64_t>(vd, vreg_inx, true) = val; \ - } \ - break; \ - default: \ - require(0); \ - break; \ - } \ - } \ - P.VU.vstart->write(0); - // vector: sign/unsiged extension #define VI_VV_EXT(div, type) \ require(insn.rd() != insn.rs2()); \ From e84ef9385ceae7d30b4dd196931a8fa23919d1a2 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Mon, 16 Oct 2023 23:09:06 -0700 Subject: [PATCH 4/4] vamo: remove disassembler Signed-off-by: Chih-Min Chao --- disasm/disasm.cc | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/disasm/disasm.cc b/disasm/disasm.cc index 15e767ee64..8188b08aa3 100644 --- a/disasm/disasm.cc +++ b/disasm/disasm.cc @@ -1795,41 +1795,6 @@ void disassembler_t::add_instructions(const isa_parser_t* isa) #undef DISASM_OPIV_S__INSN #undef DISASM_OPIV_W__INSN #undef DISASM_VFUNARY0_INSN - - // vector amo - std::vector v_fmt_amo_wd = {&vd, &v_address, &vs2, &vd, opt, &vm}; - std::vector v_fmt_amo = {&x0, &v_address, &vs2, &vd, opt, &vm}; - for (size_t elt = 0; elt <= 3; ++elt) { - const custom_fmt_t template_insn[] = { - {match_vamoaddei8_v | mask_wd, mask_vamoaddei8_v | mask_wd, - "%sei%d.v", v_fmt_amo_wd}, - {match_vamoaddei8_v, mask_vamoaddei8_v | mask_wd, - "%sei%d.v", v_fmt_amo}, - }; - std::pair amo_map[] = { - {"vamoswap", 0x01ul << 27}, - {"vamoadd", 0x00ul << 27}, - {"vamoxor", 0x04ul << 27}, - {"vamoand", 0x0cul << 27}, - {"vamoor", 0x08ul << 27}, - {"vamomin", 0x10ul << 27}, - {"vamomax", 0x14ul << 27}, - {"vamominu", 0x18ul << 27}, - {"vamomaxu", 0x1cul << 27}}; - const reg_t elt_map[] = {0x0ul << 12, 0x5ul << 12, - 0x6ul <<12, 0x7ul << 12}; - - for (size_t idx = 0; idx < sizeof(amo_map) / sizeof(amo_map[0]); ++idx) { - for (auto item : template_insn) { - char buf[128]; - snprintf(buf, sizeof(buf), item.fmt, amo_map[idx].first, 8 << elt); - add_insn(new disasm_insn_t(buf, - item.match | amo_map[idx].second | elt_map[elt], - item.mask, - item.arg)); - } - } - } } if (isa->extension_enabled(EXT_ZVFBFMIN)) {