| // Copyright 2024 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Non-floating point vector intruction encodings. |
| |
| format VMem[32] : Inst32Format { |
| fields: |
| unsigned nf[3]; |
| unsigned mew[1]; |
| unsigned mop[2]; |
| unsigned vm[1]; |
| unsigned rs2[5]; |
| unsigned rs1[5]; |
| unsigned width[3]; |
| unsigned vd[5]; |
| unsigned opcode[7]; |
| overlays: |
| unsigned lumop[5] = rs2; |
| unsigned sumop[5] = rs2; |
| unsigned vs2[5] = rs2; |
| unsigned vs3[5] = vd; |
| }; |
| |
| format VArith[32] : Inst32Format { |
| fields: |
| unsigned func6[6]; |
| unsigned vm[1]; |
| unsigned vs2[5]; |
| unsigned vs1[5]; |
| unsigned func3[3]; |
| unsigned vd[5]; |
| unsigned opcode[7]; |
| overlays: |
| unsigned uimm5[5] = vs1; |
| signed simm5[5] = vs1; |
| unsigned rd[5] = vd; |
| unsigned rs1[5] = vs1; |
| unsigned vd_mask[5] = vd; |
| }; |
| |
| format VConfig[32] : Inst32Format { |
| fields: |
| unsigned top12[12]; |
| unsigned rs1[5]; |
| unsigned func3[3]; |
| unsigned rd[5]; |
| unsigned opcode[7]; |
| overlays: |
| signed zimm11[11] = top12[10..0]; |
| unsigned func1[1] = top12[11]; |
| unsigned func2[2] = top12[11..10]; |
| unsigned func7[7] = top12[11..5]; |
| signed zimm10[10] = top12[9..0]; |
| unsigned uimm5[5] = rs1; |
| unsigned rs2[5] = top12[4..0]; |
| }; |
| |
| instruction group RiscVVInst32[32] : Inst32Format { |
| //opcfg : VArith : func6 == 0bxxx'xxx, func3 == 0b111, opcode == 0b101'0111; |
| vsetvli_xn : VConfig : rs1 != 0, func1 == 0, func3 == 0b111, opcode == 0b101'0111; |
| vsetvli_nz : VConfig : rd != 0, rs1 == 0, func1 == 0, func3 == 0b111, opcode == 0b101'0111; |
| vsetvli_zz : VConfig : rd == 0, rs1 == 0, func1 == 0, func3 == 0b111, opcode == 0b101'0111; |
| vsetivli : VConfig : func2 == 0b11, func3 == 0b111, opcode == 0b101'0111; |
| vsetvl_xn : VConfig : rs1 != 0, func7 == 0b100'0000, func3 == 0b111, opcode == 0b101'0111; |
| vsetvl_nz : VConfig : rd != 0, rs1 == 0, func7 == 0b100'0000, func3 == 0b111, opcode == 0b101'0111; |
| vsetvl_zz : VConfig : rd == 0, rs1 == 0, func7 == 0b100'0000, func3 == 0b111, opcode == 0b101'0111; |
| |
| // Unit stride, masked (vm=0). |
| vle8 : VMem : vm == 0, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b000, opcode == 0b000'0111; |
| vle16 : VMem : vm == 0, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b101, opcode == 0b000'0111; |
| vle32 : VMem : vm == 0, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b110, opcode == 0b000'0111; |
| vle64 : VMem : vm == 0, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b111, opcode == 0b000'0111; |
| // Unit stride, unmasked (vm=1). |
| vle8_vm1 : VMem : vm == 1, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b000, opcode == 0b000'0111; |
| vle16_vm1 : VMem : vm == 1, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b101, opcode == 0b000'0111; |
| vle32_vm1 : VMem : vm == 1, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b110, opcode == 0b000'0111; |
| vle64_vm1 : VMem : vm == 1, nf == 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b111, opcode == 0b000'0111; |
| // Mask load. |
| vlm : VMem : nf == 0, mew == 0, mop == 0b00, lumop == 0b01011, width == 0b000, opcode == 0b000'0111; |
| // Unit stride, fault first. |
| vle8ff : VMem : nf == 0, mew == 0, mop == 0b00, lumop == 0b10000, width == 0b000, opcode == 0b000'0111; |
| vle16ff : VMem : nf == 0, mew == 0, mop == 0b00, lumop == 0b10000, width == 0b101, opcode == 0b000'0111; |
| vle32ff : VMem : nf == 0, mew == 0, mop == 0b00, lumop == 0b10000, width == 0b110, opcode == 0b000'0111; |
| vle64ff : VMem : nf == 0, mew == 0, mop == 0b00, lumop == 0b10000, width == 0b111, opcode == 0b000'0111; |
| // Unit stride, whole register load. |
| vl1re8 : VMem : nf == 0, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b000, opcode == 0b000'0111; |
| vl1re16 : VMem : nf == 0, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b101, opcode == 0b000'0111; |
| vl1re32 : VMem : nf == 0, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b110, opcode == 0b000'0111; |
| vl1re64 : VMem : nf == 0, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b111, opcode == 0b000'0111; |
| vl2re8 : VMem : nf == 1, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b000, opcode == 0b000'0111; |
| vl2re16 : VMem : nf == 1, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b101, opcode == 0b000'0111; |
| vl2re32 : VMem : nf == 1, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b110, opcode == 0b000'0111; |
| vl2re64 : VMem : nf == 1, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b111, opcode == 0b000'0111; |
| vl4re8 : VMem : nf == 3, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b000, opcode == 0b000'0111; |
| vl4re16 : VMem : nf == 3, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b101, opcode == 0b000'0111; |
| vl4re32 : VMem : nf == 3, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b110, opcode == 0b000'0111; |
| vl4re64 : VMem : nf == 3, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b111, opcode == 0b000'0111; |
| vl8re8 : VMem : nf == 7, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b000, opcode == 0b000'0111; |
| vl8re16 : VMem : nf == 7, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b101, opcode == 0b000'0111; |
| vl8re32 : VMem : nf == 7, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b110, opcode == 0b000'0111; |
| vl8re64 : VMem : nf == 7, mop == 0b00, vm == 1, lumop == 0b01000, width == 0b111, opcode == 0b000'0111; |
| // Vector load strided. |
| vlse8 : VMem : nf == 0, mew == 0, mop == 0b10, width == 0b000, opcode == 0b000'0111; |
| vlse16 : VMem : nf == 0, mew == 0, mop == 0b10, width == 0b101, opcode == 0b000'0111; |
| vlse32 : VMem : nf == 0, mew == 0, mop == 0b10, width == 0b110, opcode == 0b000'0111; |
| vlse64 : VMem : nf == 0, mew == 0, mop == 0b10, width == 0b111, opcode == 0b000'0111; |
| // Vector load indexed, unordered. |
| vluxei8 : VMem : nf == 0, mew == 0, mop == 0b01, width == 0b000, opcode == 0b000'0111; |
| vluxei16: VMem : nf == 0, mew == 0, mop == 0b01, width == 0b101, opcode == 0b000'0111; |
| vluxei32: VMem : nf == 0, mew == 0, mop == 0b01, width == 0b110, opcode == 0b000'0111; |
| vluxei64: VMem : nf == 0, mew == 0, mop == 0b01, width == 0b111, opcode == 0b000'0111; |
| // Vector load indexed, ordered. |
| vloxei8 : VMem : nf == 0, mew == 0, mop == 0b11, width == 0b000, opcode == 0b000'0111; |
| vloxei16: VMem : nf == 0, mew == 0, mop == 0b11, width == 0b101, opcode == 0b000'0111; |
| vloxei32: VMem : nf == 0, mew == 0, mop == 0b11, width == 0b110, opcode == 0b000'0111; |
| vloxei64: VMem : nf == 0, mew == 0, mop == 0b11, width == 0b111, opcode == 0b000'0111; |
| // Vector segment load, unit stride. |
| vlsege8: VMem : nf != 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b000, opcode == 0b000'0111; |
| vlsege16: VMem : nf != 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b101, opcode == 0b000'0111; |
| vlsege32: VMem : nf != 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b110, opcode == 0b000'0111; |
| vlsege64: VMem : nf != 0, mew == 0, mop == 0b00, lumop == 0b00000, width == 0b111, opcode == 0b000'0111; |
| // Vector segment load, strided. |
| vlssege8: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b000, opcode == 0b000'0111; |
| vlssege16: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b101, opcode == 0b000'0111; |
| vlssege32: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b110, opcode == 0b000'0111; |
| vlssege64: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b111, opcode == 0b000'0111; |
| // Vector segment load, indexed, unordered. |
| vluxsegei8: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b000, opcode == 0b000'0111; |
| vluxsegei16: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b101, opcode == 0b000'0111; |
| vluxsegei32: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b110, opcode == 0b000'0111; |
| vluxsegei64: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b111, opcode == 0b000'0111; |
| // Vector segement load, indexed, ordered. |
| vloxsegei8: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b000, opcode == 0b000'0111; |
| vloxsegei16: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b101, opcode == 0b000'0111; |
| vloxsegei32: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b110, opcode == 0b000'0111; |
| vloxsegei64: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b111, opcode == 0b000'0111; |
| |
| |
| // VECTOR STORES |
| |
| // Unit stride. |
| vse8 : VMem : mew == 0, mop == 0b00, sumop == 0b00000, width == 0b000, opcode == 0b010'0111; |
| vse16 : VMem : mew == 0, mop == 0b00, sumop == 0b00000, width == 0b101, opcode == 0b010'0111; |
| vse32 : VMem : mew == 0, mop == 0b00, sumop == 0b00000, width == 0b110, opcode == 0b010'0111; |
| vse64 : VMem : mew == 0, mop == 0b00, sumop == 0b00000, width == 0b111, opcode == 0b010'0111; |
| // Mask store. |
| vsm : VMem : mew == 0, mop == 0b00, sumop == 0b01011, width == 0b000, opcode == 0b010'0111; |
| // Unit stride, fault first. |
| vse8ff : VMem : mew == 0, mop == 0b00, sumop == 0b10000, width == 0b000, opcode == 0b010'0111; |
| vse16ff : VMem : mew == 0, mop == 0b00, sumop == 0b10000, width == 0b101, opcode == 0b010'0111; |
| vse32ff : VMem : mew == 0, mop == 0b00, sumop == 0b10000, width == 0b110, opcode == 0b010'0111; |
| vse64ff : VMem : mew == 0, mop == 0b00, sumop == 0b10000, width == 0b111, opcode == 0b010'0111; |
| // Unit stride, whole register store. |
| vs1re8 : VMem : nf == 0, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b000, opcode == 0b010'0111; |
| vs1re16 : VMem : nf == 0, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b101, opcode == 0b010'0111; |
| vs1re32 : VMem : nf == 0, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b110, opcode == 0b010'0111; |
| vs1re64 : VMem : nf == 0, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b111, opcode == 0b010'0111; |
| vs2re8 : VMem : nf == 1, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b000, opcode == 0b010'0111; |
| vs2re16 : VMem : nf == 1, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b101, opcode == 0b010'0111; |
| vs2re32 : VMem : nf == 1, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b110, opcode == 0b010'0111; |
| vs2re64 : VMem : nf == 1, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b111, opcode == 0b010'0111; |
| vs4re8 : VMem : nf == 3, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b000, opcode == 0b010'0111; |
| vs4re16 : VMem : nf == 3, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b101, opcode == 0b010'0111; |
| vs4re32 : VMem : nf == 3, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b110, opcode == 0b010'0111; |
| vs4re64 : VMem : nf == 3, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b111, opcode == 0b010'0111; |
| vs8re8 : VMem : nf == 7, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b000, opcode == 0b010'0111; |
| vs8re16 : VMem : nf == 7, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b101, opcode == 0b010'0111; |
| vs8re32 : VMem : nf == 7, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b110, opcode == 0b010'0111; |
| vs8re64 : VMem : nf == 7, mop == 0b00, vm == 1, sumop == 0b01000, width == 0b111, opcode == 0b010'0111; |
| // Store strided. |
| vsse8 : VMem : mew == 0, mop == 0b10, width == 0b000, opcode == 0b010'0111; |
| vsse16 : VMem : mew == 0, mop == 0b10, width == 0b101, opcode == 0b010'0111; |
| vsse32 : VMem : mew == 0, mop == 0b10, width == 0b110, opcode == 0b010'0111; |
| vsse64 : VMem : mew == 0, mop == 0b10, width == 0b111, opcode == 0b010'0111; |
| // Store indexed, unordered. |
| vsuxei8 : VMem : mew == 0, mop == 0b01, width == 0b000, opcode == 0b010'0111; |
| vsuxei16: VMem : mew == 0, mop == 0b01, width == 0b101, opcode == 0b010'0111; |
| vsuxei32: VMem : mew == 0, mop == 0b01, width == 0b110, opcode == 0b010'0111; |
| vsuxei64: VMem : mew == 0, mop == 0b01, width == 0b111, opcode == 0b010'0111; |
| // Store indexed, ordered. |
| vsoxei8 : VMem : mew == 0, mop == 0b11, width == 0b000, opcode == 0b010'0111; |
| vsoxei16: VMem : mew == 0, mop == 0b11, width == 0b101, opcode == 0b010'0111; |
| vsoxei32: VMem : mew == 0, mop == 0b11, width == 0b110, opcode == 0b010'0111; |
| vsoxei64: VMem : mew == 0, mop == 0b11, width == 0b111, opcode == 0b010'0111; |
| // Vector segment store, unit stride. |
| vssege8: VMem : nf != 0, mew == 0, mop == 0b00, sumop == 0b00000, width == 0b000, opcode == 0b010'0111; |
| vssege16: VMem : nf != 0, mew == 0, mop == 0b00, sumop == 0b00000, width == 0b101, opcode == 0b010'0111; |
| vssege32: VMem : nf != 0, mew == 0, mop == 0b00, sumop == 0b00000, width == 0b110, opcode == 0b010'0111; |
| vssege64: VMem : nf != 0, mew == 0, mop == 0b00, sumop == 0b00000, width == 0b111, opcode == 0b010'0111; |
| // Vector segment store, strided. |
| vsssege8: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b000, opcode == 0b010'0111; |
| vsssege16: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b101, opcode == 0b010'0111; |
| vsssege32: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b110, opcode == 0b010'0111; |
| vsssege64: VMem : nf != 0, mew == 0, mop == 0b10, width == 0b111, opcode == 0b010'0111; |
| // Vector segment store, indexed, unordered. |
| vsuxsegei8: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b000, opcode == 0b010'0111; |
| vsuxsegei16: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b101, opcode == 0b010'0111; |
| vsuxsegei32: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b110, opcode == 0b010'0111; |
| vsuxsegei64: VMem : nf != 0, mew == 0, mop == 0b01, width == 0b111, opcode == 0b010'0111; |
| // Vector segement store, indexed, ordered. |
| vsoxsegei8: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b000, opcode == 0b010'0111; |
| vsoxsegei16: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b101, opcode == 0b010'0111; |
| vsoxsegei32: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b110, opcode == 0b010'0111; |
| vsoxsegei64: VMem : nf != 0, mew == 0, mop == 0b11, width == 0b111, opcode == 0b010'0111; |
| |
| // Integer: OPIVV, OPIVX, OPIVI |
| //opivv : VArith : func6 == 0bxxx'xxx, func3 == 0b000, opcode == 0b101'0111; |
| //opivx : VArith : func6 == 0bxxx'xxx, func3 == 0b100, opcode == 0b101'0111; |
| //opivi : VArith : func6 == 0bxxx'xxx, func3 == 0b011, opcode == 0b101'0111; |
| |
| vadd_vv : VArith : func6 == 0b000'000, func3 == 0b000, opcode == 0b101'0111; |
| vadd_vx : VArith : func6 == 0b000'000, func3 == 0b100, opcode == 0b101'0111; |
| vadd_vi : VArith : func6 == 0b000'000, func3 == 0b011, opcode == 0b101'0111; |
| vsub_vv : VArith : func6 == 0b000'010, func3 == 0b000, opcode == 0b101'0111; |
| vsub_vx : VArith : func6 == 0b000'010, func3 == 0b100, opcode == 0b101'0111; |
| vrsub_vx : VArith : func6 == 0b000'011, func3 == 0b100, opcode == 0b101'0111; |
| vrsub_vi : VArith : func6 == 0b000'011, func3 == 0b011, opcode == 0b101'0111; |
| vminu_vv : VArith : func6 == 0b000'100, func3 == 0b000, opcode == 0b101'0111; |
| vminu_vx : VArith : func6 == 0b000'100, func3 == 0b100, opcode == 0b101'0111; |
| vmin_vv : VArith : func6 == 0b000'101, func3 == 0b000, opcode == 0b101'0111; |
| vmin_vx : VArith : func6 == 0b000'101, func3 == 0b100, opcode == 0b101'0111; |
| vmaxu_vv : VArith : func6 == 0b000'110, func3 == 0b000, opcode == 0b101'0111; |
| vmaxu_vx : VArith : func6 == 0b000'110, func3 == 0b100, opcode == 0b101'0111; |
| vmax_vv : VArith : func6 == 0b000'111, func3 == 0b000, opcode == 0b101'0111; |
| vmax_vx : VArith : func6 == 0b000'111, func3 == 0b100, opcode == 0b101'0111; |
| vand_vv : VArith : func6 == 0b001'001, func3 == 0b000, opcode == 0b101'0111; |
| vand_vx : VArith : func6 == 0b001'001, func3 == 0b100, opcode == 0b101'0111; |
| vand_vi : VArith : func6 == 0b001'001, func3 == 0b011, opcode == 0b101'0111; |
| vor_vv : VArith : func6 == 0b001'010, func3 == 0b000, opcode == 0b101'0111; |
| vor_vx : VArith : func6 == 0b001'010, func3 == 0b100, opcode == 0b101'0111; |
| vor_vi : VArith : func6 == 0b001'010, func3 == 0b011, opcode == 0b101'0111; |
| vxor_vv : VArith : func6 == 0b001'011, func3 == 0b000, opcode == 0b101'0111; |
| vxor_vx : VArith : func6 == 0b001'011, func3 == 0b100, opcode == 0b101'0111; |
| vxor_vi : VArith : func6 == 0b001'011, func3 == 0b011, opcode == 0b101'0111; |
| vrgather_vv : VArith : func6 == 0b001'100, func3 == 0b000, opcode == 0b101'0111; |
| vrgather_vx : VArith : func6 == 0b001'100, func3 == 0b100, opcode == 0b101'0111; |
| vrgather_vi : VArith : func6 == 0b001'100, func3 == 0b011, opcode == 0b101'0111; |
| vslideup_vx : VArith : func6 == 0b001'110, func3 == 0b100, opcode == 0b101'0111; |
| vslideup_vi : VArith : func6 == 0b001'110, func3 == 0b011, opcode == 0b101'0111; |
| vrgatherei16_vv : VArith : func6 == 0b001'110, func3 == 0b000, opcode == 0b101'0111; |
| vslidedown_vx : VArith : func6 == 0b001'111, func3 == 0b100, opcode == 0b101'0111; |
| vslidedown_vi : VArith : func6 == 0b001'111, func3 == 0b011, opcode == 0b101'0111; |
| vadc_vv : VArith : func6 == 0b010'000, vd != 0, vm == 0, func3 == 0b000, opcode == 0b101'0111; |
| vadc_vx : VArith : func6 == 0b010'000, vd != 0, vm == 0, func3 == 0b100, opcode == 0b101'0111; |
| vadc_vi : VArith : func6 == 0b010'000, vd != 0, vm == 0, func3 == 0b011, opcode == 0b101'0111; |
| vmadc_vv : VArith : func6 == 0b010'001, func3 == 0b000, opcode == 0b101'0111; |
| vmadc_vx : VArith : func6 == 0b010'001, func3 == 0b100, opcode == 0b101'0111; |
| vmadc_vi : VArith : func6 == 0b010'001, func3 == 0b011, opcode == 0b101'0111; |
| vsbc_vv : VArith : func6 == 0b010'010, vd != 0, vm == 0, func3 == 0b000, opcode == 0b101'0111; |
| vsbc_vx : VArith : func6 == 0b010'010, vd != 0, vm == 0, func3 == 0b100, opcode == 0b101'0111; |
| vmsbc_vv : VArith : func6 == 0b010'011, func3 == 0b000, opcode == 0b101'0111; |
| vmsbc_vx : VArith : func6 == 0b010'011, func3 == 0b100, opcode == 0b101'0111; |
| vmerge_vv : VArith : func6 == 0b010'111, vm == 0, func3 == 0b000, opcode == 0b101'0111; |
| vmerge_vx : VArith : func6 == 0b010'111, vm == 0, func3 == 0b100, opcode == 0b101'0111; |
| vmerge_vi : VArith : func6 == 0b010'111, vm == 0, func3 == 0b011, opcode == 0b101'0111; |
| vmv_vv : VArith : func6 == 0b010'111, vm == 1, vs2 == 0, func3 == 0b000, opcode == 0b101'0111; |
| vmv_vx : VArith : func6 == 0b010'111, vm == 1, vs2 == 0, func3 == 0b100, opcode == 0b101'0111; |
| vmv_vi : VArith : func6 == 0b010'111, vm == 1, vs2 == 0, func3 == 0b011, opcode == 0b101'0111; |
| vmseq_vv : VArith : func6 == 0b011'000, func3 == 0b000, opcode == 0b101'0111; |
| vmseq_vx : VArith : func6 == 0b011'000, func3 == 0b100, opcode == 0b101'0111; |
| vmseq_vi : VArith : func6 == 0b011'000, func3 == 0b011, opcode == 0b101'0111; |
| vmsne_vv : VArith : func6 == 0b011'001, func3 == 0b000, opcode == 0b101'0111; |
| vmsne_vx : VArith : func6 == 0b011'001, func3 == 0b100, opcode == 0b101'0111; |
| vmsne_vi : VArith : func6 == 0b011'001, func3 == 0b011, opcode == 0b101'0111; |
| vmsltu_vv : VArith : func6 == 0b011'010, func3 == 0b000, opcode == 0b101'0111; |
| vmsltu_vx : VArith : func6 == 0b011'010, func3 == 0b100, opcode == 0b101'0111; |
| vmslt_vv : VArith : func6 == 0b011'011, func3 == 0b000, opcode == 0b101'0111; |
| vmslt_vx : VArith : func6 == 0b011'011, func3 == 0b100, opcode == 0b101'0111; |
| vmsleu_vv : VArith : func6 == 0b011'100, func3 == 0b000, opcode == 0b101'0111; |
| vmsleu_vx : VArith : func6 == 0b011'100, func3 == 0b100, opcode == 0b101'0111; |
| vmsleu_vi : VArith : func6 == 0b011'100, func3 == 0b011, opcode == 0b101'0111; |
| vmsle_vv : VArith : func6 == 0b011'101, func3 == 0b000, opcode == 0b101'0111; |
| vmsle_vx : VArith : func6 == 0b011'101, func3 == 0b100, opcode == 0b101'0111; |
| vmsle_vi : VArith : func6 == 0b011'101, func3 == 0b011, opcode == 0b101'0111; |
| vmsgtu_vx : VArith : func6 == 0b011'110, func3 == 0b100, opcode == 0b101'0111; |
| vmsgtu_vi : VArith : func6 == 0b011'110, func3 == 0b011, opcode == 0b101'0111; |
| vmsgt_vx : VArith : func6 == 0b011'111, func3 == 0b100, opcode == 0b101'0111; |
| vmsgt_vi : VArith : func6 == 0b011'111, func3 == 0b011, opcode == 0b101'0111; |
| vsaddu_vv : VArith : func6 == 0b100'000, func3 == 0b000, opcode == 0b101'0111; |
| vsaddu_vx : VArith : func6 == 0b100'000, func3 == 0b100, opcode == 0b101'0111; |
| vsaddu_vi : VArith : func6 == 0b100'000, func3 == 0b011, opcode == 0b101'0111; |
| vsadd_vv : VArith : func6 == 0b100'001, func3 == 0b000, opcode == 0b101'0111; |
| vsadd_vx : VArith : func6 == 0b100'001, func3 == 0b100, opcode == 0b101'0111; |
| vsadd_vi : VArith : func6 == 0b100'001, func3 == 0b011, opcode == 0b101'0111; |
| vssubu_vv : VArith : func6 == 0b100'010, func3 == 0b000, opcode == 0b101'0111; |
| vssubu_vx : VArith : func6 == 0b100'010, func3 == 0b100, opcode == 0b101'0111; |
| vssub_vv : VArith : func6 == 0b100'011, func3 == 0b000, opcode == 0b101'0111; |
| vssub_vx : VArith : func6 == 0b100'011, func3 == 0b100, opcode == 0b101'0111; |
| vsll_vv : VArith : func6 == 0b100'101, func3 == 0b000, opcode == 0b101'0111; |
| vsll_vx : VArith : func6 == 0b100'101, func3 == 0b100, opcode == 0b101'0111; |
| vsll_vi : VArith : func6 == 0b100'101, func3 == 0b011, opcode == 0b101'0111; |
| vsmul_vv : VArith : func6 == 0b100'111, func3 == 0b000, opcode == 0b101'0111; |
| vsmul_vx : VArith : func6 == 0b100'111, func3 == 0b100, opcode == 0b101'0111; |
| vmv1r_vi : VArith : func6 == 0b100'111, uimm5 == 0, func3 == 0b011, opcode == 0b101'0111; |
| vmv2r_vi : VArith : func6 == 0b100'111, uimm5 == 1, func3 == 0b011, opcode == 0b101'0111; |
| vmv4r_vi : VArith : func6 == 0b100'111, uimm5 == 3, func3 == 0b011, opcode == 0b101'0111; |
| vmv8r_vi : VArith : func6 == 0b100'111, uimm5 == 7, func3 == 0b011, opcode == 0b101'0111; |
| vsrl_vv : VArith : func6 == 0b101'000, func3 == 0b000, opcode == 0b101'0111; |
| vsrl_vx : VArith : func6 == 0b101'000, func3 == 0b100, opcode == 0b101'0111; |
| vsrl_vi : VArith : func6 == 0b101'000, func3 == 0b011, opcode == 0b101'0111; |
| vsra_vv : VArith : func6 == 0b101'001, func3 == 0b000, opcode == 0b101'0111; |
| vsra_vx : VArith : func6 == 0b101'001, func3 == 0b100, opcode == 0b101'0111; |
| vsra_vi : VArith : func6 == 0b101'001, func3 == 0b011, opcode == 0b101'0111; |
| vssrl_vv : VArith : func6 == 0b101'010, func3 == 0b000, opcode == 0b101'0111; |
| vssrl_vx : VArith : func6 == 0b101'010, func3 == 0b100, opcode == 0b101'0111; |
| vssrl_vi : VArith : func6 == 0b101'010, func3 == 0b011, opcode == 0b101'0111; |
| vssra_vv : VArith : func6 == 0b101'011, func3 == 0b000, opcode == 0b101'0111; |
| vssra_vx : VArith : func6 == 0b101'011, func3 == 0b100, opcode == 0b101'0111; |
| vssra_vi : VArith : func6 == 0b101'011, func3 == 0b011, opcode == 0b101'0111; |
| vnsrl_vv : VArith : func6 == 0b101'100, func3 == 0b000, opcode == 0b101'0111; |
| vnsrl_vx : VArith : func6 == 0b101'100, func3 == 0b100, opcode == 0b101'0111; |
| vnsrl_vi : VArith : func6 == 0b101'100, func3 == 0b011, opcode == 0b101'0111; |
| vnsra_vv : VArith : func6 == 0b101'101, func3 == 0b000, opcode == 0b101'0111; |
| vnsra_vx : VArith : func6 == 0b101'101, func3 == 0b100, opcode == 0b101'0111; |
| vnsra_vi : VArith : func6 == 0b101'101, func3 == 0b011, opcode == 0b101'0111; |
| vnclipu_vv : VArith : func6 == 0b101'110, func3 == 0b000, opcode == 0b101'0111; |
| vnclipu_vx : VArith : func6 == 0b101'110, func3 == 0b100, opcode == 0b101'0111; |
| vnclipu_vi : VArith : func6 == 0b101'110, func3 == 0b011, opcode == 0b101'0111; |
| vnclip_vv : VArith : func6 == 0b101'111, func3 == 0b000, opcode == 0b101'0111; |
| vnclip_vx : VArith : func6 == 0b101'111, func3 == 0b100, opcode == 0b101'0111; |
| vnclip_vi : VArith : func6 == 0b101'111, func3 == 0b011, opcode == 0b101'0111; |
| vwredsumu_vv : VArith : func6 == 0b110'000, func3 == 0b000, opcode == 0b101'0111; |
| vwredsum_vv : VArith : func6 == 0b110'001, func3 == 0b000, opcode == 0b101'0111; |
| |
| // Integer: OPMVV, OPMVX |
| //opmvv : VArith : func6 == 0bxxx'xxx, func3 == 0b010, opcode == 0b101'0111; |
| //opmvx : VArith : func6 == 0bxxx'xxx, func3 == 0b110, opcode == 0b101'0111; |
| |
| vredsum_vv : VArith : func6 == 0b000'000, func3 == 0b010, opcode == 0b101'0111; |
| vredand_vv : VArith : func6 == 0b000'001, func3 == 0b010, opcode == 0b101'0111; |
| vredor_vv : VArith : func6 == 0b000'010, func3 == 0b010, opcode == 0b101'0111; |
| vredxor_vv : VArith : func6 == 0b000'011, func3 == 0b010, opcode == 0b101'0111; |
| vredminu_vv : VArith : func6 == 0b000'100, func3 == 0b010, opcode == 0b101'0111; |
| vredmin_vv : VArith : func6 == 0b000'101, func3 == 0b010, opcode == 0b101'0111; |
| vredmaxu_vv : VArith : func6 == 0b000'110, func3 == 0b010, opcode == 0b101'0111; |
| vredmax_vv : VArith : func6 == 0b000'111, func3 == 0b010, opcode == 0b101'0111; |
| vaaddu_vv : VArith : func6 == 0b001'000, func3 == 0b010, opcode == 0b101'0111; |
| vaaddu_vx : VArith : func6 == 0b001'000, func3 == 0b110, opcode == 0b101'0111; |
| vaadd_vv : VArith : func6 == 0b001'001, func3 == 0b010, opcode == 0b101'0111; |
| vaadd_vx : VArith : func6 == 0b001'001, func3 == 0b110, opcode == 0b101'0111; |
| vasubu_vv : VArith : func6 == 0b001'010, func3 == 0b010, opcode == 0b101'0111; |
| vasubu_vx : VArith : func6 == 0b001'010, func3 == 0b110, opcode == 0b101'0111; |
| vasub_vv : VArith : func6 == 0b001'011, func3 == 0b010, opcode == 0b101'0111; |
| vasub_vx : VArith : func6 == 0b001'011, func3 == 0b110, opcode == 0b101'0111; |
| vslide1up_vx : VArith : func6 == 0b001'110, func3 == 0b110, opcode == 0b101'0111; |
| vslide1down_vx : VArith : func6 == 0b001'111, func3 == 0b110, opcode == 0b101'0111; |
| vcompress_vv : VArith : func6 == 0b010'111, func3 == 0b010, opcode == 0b101'0111; |
| vmandnot_vv : VArith : func6 == 0b011'000, func3 == 0b010, opcode == 0b101'0111; |
| vmand_vv : VArith : func6 == 0b011'001, func3 == 0b010, opcode == 0b101'0111; |
| vmor_vv : VArith : func6 == 0b011'010, func3 == 0b010, opcode == 0b101'0111; |
| vmxor_vv : VArith : func6 == 0b011'011, func3 == 0b010, opcode == 0b101'0111; |
| vmornot_vv : VArith : func6 == 0b011'100, func3 == 0b010, opcode == 0b101'0111; |
| vmnand_vv : VArith : func6 == 0b011'101, func3 == 0b010, opcode == 0b101'0111; |
| vmnor_vv : VArith : func6 == 0b011'110, func3 == 0b010, opcode == 0b101'0111; |
| vmxnor_vv : VArith : func6 == 0b011'111, func3 == 0b010, opcode == 0b101'0111; |
| |
| vdivu_vv : VArith : func6 == 0b100'000, func3 == 0b010, opcode == 0b101'0111; |
| vdivu_vx : VArith : func6 == 0b100'000, func3 == 0b110, opcode == 0b101'0111; |
| vdiv_vv : VArith : func6 == 0b100'001, func3 == 0b010, opcode == 0b101'0111; |
| vdiv_vx : VArith : func6 == 0b100'001, func3 == 0b110, opcode == 0b101'0111; |
| vremu_vv : VArith : func6 == 0b100'010, func3 == 0b010, opcode == 0b101'0111; |
| vremu_vx : VArith : func6 == 0b100'010, func3 == 0b110, opcode == 0b101'0111; |
| vrem_vv : VArith : func6 == 0b100'011, func3 == 0b010, opcode == 0b101'0111; |
| vrem_vx : VArith : func6 == 0b100'011, func3 == 0b110, opcode == 0b101'0111; |
| vmulhu_vv : VArith : func6 == 0b100'100, func3 == 0b010, opcode == 0b101'0111; |
| vmulhu_vx : VArith : func6 == 0b100'100, func3 == 0b110, opcode == 0b101'0111; |
| vmul_vv : VArith : func6 == 0b100'101, func3 == 0b010, opcode == 0b101'0111; |
| vmul_vx : VArith : func6 == 0b100'101, func3 == 0b110, opcode == 0b101'0111; |
| vmulhsu_vv : VArith : func6 == 0b100'110, func3 == 0b010, opcode == 0b101'0111; |
| vmulhsu_vx : VArith : func6 == 0b100'110, func3 == 0b110, opcode == 0b101'0111; |
| vmulh_vv : VArith : func6 == 0b100'111, func3 == 0b010, opcode == 0b101'0111; |
| vmulh_vx : VArith : func6 == 0b100'111, func3 == 0b110, opcode == 0b101'0111; |
| vmadd_vv : VArith : func6 == 0b101'001, func3 == 0b010, opcode == 0b101'0111; |
| vmadd_vx : VArith : func6 == 0b101'001, func3 == 0b110, opcode == 0b101'0111; |
| vnmsub_vv : VArith : func6 == 0b101'011, func3 == 0b010, opcode == 0b101'0111; |
| vnmsub_vx : VArith : func6 == 0b101'011, func3 == 0b110, opcode == 0b101'0111; |
| vmacc_vv : VArith : func6 == 0b101'101, func3 == 0b010, opcode == 0b101'0111; |
| vmacc_vx : VArith : func6 == 0b101'101, func3 == 0b110, opcode == 0b101'0111; |
| vnmsac_vv : VArith : func6 == 0b101'111, func3 == 0b010, opcode == 0b101'0111; |
| vnmsac_vx : VArith : func6 == 0b101'111, func3 == 0b110, opcode == 0b101'0111; |
| vwaddu_vv : VArith : func6 == 0b110'000, func3 == 0b010, opcode == 0b101'0111; |
| vwaddu_vx : VArith : func6 == 0b110'000, func3 == 0b110, opcode == 0b101'0111; |
| vwadd_vv : VArith : func6 == 0b110'001, func3 == 0b010, opcode == 0b101'0111; |
| vwadd_vx : VArith : func6 == 0b110'001, func3 == 0b110, opcode == 0b101'0111; |
| vwsubu_vv : VArith : func6 == 0b110'010, func3 == 0b010, opcode == 0b101'0111; |
| vwsubu_vx : VArith : func6 == 0b110'010, func3 == 0b110, opcode == 0b101'0111; |
| vwsub_vv : VArith : func6 == 0b110'011, func3 == 0b010, opcode == 0b101'0111; |
| vwsub_vx : VArith : func6 == 0b110'011, func3 == 0b110, opcode == 0b101'0111; |
| vwaddu_w_vv : VArith : func6 == 0b110'100, func3 == 0b010, opcode == 0b101'0111; |
| vwaddu_w_vx : VArith : func6 == 0b110'100, func3 == 0b110, opcode == 0b101'0111; |
| vwadd_w_vv : VArith : func6 == 0b110'101, func3 == 0b010, opcode == 0b101'0111; |
| vwadd_w_vx : VArith : func6 == 0b110'101, func3 == 0b110, opcode == 0b101'0111; |
| vwsubu_w_vv : VArith : func6 == 0b110'110, func3 == 0b010, opcode == 0b101'0111; |
| vwsubu_w_vx : VArith : func6 == 0b110'110, func3 == 0b110, opcode == 0b101'0111; |
| vwsub_w_vv : VArith : func6 == 0b110'111, func3 == 0b010, opcode == 0b101'0111; |
| vwsub_w_vx : VArith : func6 == 0b110'111, func3 == 0b110, opcode == 0b101'0111; |
| vwmulu_vv : VArith : func6 == 0b111'000, func3 == 0b010, opcode == 0b101'0111; |
| vwmulu_vx : VArith : func6 == 0b111'000, func3 == 0b110, opcode == 0b101'0111; |
| vwmulsu_vv : VArith : func6 == 0b111'010, func3 == 0b010, opcode == 0b101'0111; |
| vwmulsu_vx : VArith : func6 == 0b111'010, func3 == 0b110, opcode == 0b101'0111; |
| vwmul_vv : VArith : func6 == 0b111'011, func3 == 0b010, opcode == 0b101'0111; |
| vwmul_vx : VArith : func6 == 0b111'011, func3 == 0b110, opcode == 0b101'0111; |
| vwmaccu_vv : VArith : func6 == 0b111'100, func3 == 0b010, opcode == 0b101'0111; |
| vwmaccu_vx : VArith : func6 == 0b111'100, func3 == 0b110, opcode == 0b101'0111; |
| vwmacc_vv : VArith : func6 == 0b111'101, func3 == 0b010, opcode == 0b101'0111; |
| vwmacc_vx : VArith : func6 == 0b111'101, func3 == 0b110, opcode == 0b101'0111; |
| vwmaccus_vv : VArith : func6 == 0b111'110, func3 == 0b010, opcode == 0b101'0111; |
| vwmaccus_vx : VArith : func6 == 0b111'110, func3 == 0b110, opcode == 0b101'0111; |
| vwmaccsu_vv : VArith : func6 == 0b111'111, func3 == 0b010, opcode == 0b101'0111; |
| vwmaccsu_vx : VArith : func6 == 0b111'111, func3 == 0b110, opcode == 0b101'0111; |
| |
| // VWXUNARY0 vv: VArith : func6 == 0b010'000, func3 == 0b010, opcode == 0b101'0111; |
| vmv_x_s : VArith : func6 == 0b010'000, vs1 == 0b00000, func3 == 0b010, opcode == 0b101'0111; |
| vcpop : VArith : func6 == 0b010'000, vs1 == 0b10000, func3 == 0b010, opcode == 0b101'0111; |
| vfirst : VArith : func6 == 0b010'000, vs1 == 0b10001, func3 == 0b010, opcode == 0b101'0111; |
| |
| // VRXUNARY0 vx: VArith : func6 == 0b010'000, func3 == 0b110, opcode == 0b101'0111; |
| vmv_s_x : VArith : func6 == 0b010'000, vs2 == 0, func3 == 0b110, opcode == 0b101'0111; |
| |
| // VXUNARY0 vv : VArith : func6 == 0b010'010, func3 == 0b010, opcode == 0b101'0111; |
| vzext_vf8: VArith : func6 == 0b010'010, vs1 == 0b00010, func3 == 0b010, opcode == 0b101'0111; |
| vsext_vf8: VArith : func6 == 0b010'010, vs1 == 0b00011, func3 == 0b010, opcode == 0b101'0111; |
| vzext_vf4: VArith : func6 == 0b010'010, vs1 == 0b00100, func3 == 0b010, opcode == 0b101'0111; |
| vsext_vf4: VArith : func6 == 0b010'010, vs1 == 0b00101, func3 == 0b010, opcode == 0b101'0111; |
| vzext_vf2: VArith : func6 == 0b010'010, vs1 == 0b00110, func3 == 0b010, opcode == 0b101'0111; |
| vsext_vf2: VArith : func6 == 0b010'010, vs1 == 0b00111, func3 == 0b010, opcode == 0b101'0111; |
| |
| // VMUNARY vv : VArith : func6 == 0b010'100, func3 == 0b010, opcode == 0b101'0111; |
| vmsbf : VArith : func6 == 0b010'100, vs1 == 0b00001, func3 == 0b010, opcode == 0b101'0111; |
| vmsof : VArith : func6 == 0b010'100, vs1 == 0b00010, func3 == 0b010, opcode == 0b101'0111; |
| vmsif : VArith : func6 == 0b010'100, vs1 == 0b00011, func3 == 0b010, opcode == 0b101'0111; |
| viota : VArith : func6 == 0b010'100, vs1 == 0b10000, func3 == 0b010, opcode == 0b101'0111; |
| vid : VArith : func6 == 0b010'100, vs1 == 0b10001, func3 == 0b010, opcode == 0b101'0111; |
| }; |