riscv / riscv-p-spec

RISC-V Packed SIMD Extension
https://jira.riscv.org/browse/RVG-129
Creative Commons Attribution 4.0 International
141 stars 38 forks source link

RV32 vs. RV64 strategy for register-pair instructions #61

Open aswaterman opened 3 years ago

aswaterman commented 3 years ago

In the current design, some opcodes (e.g. KADD64) are defined to operate on 64 bits: i.e., a register pair in RV32, or a single register in RV64. This seems awkward to implement in configurable-XLEN processors: which/how many registers are accessed becomes a function of XLEN.

IMO, we should consider an alternate design that distinguishes the register-pair instructions and otherwise mimics the base ISA, e.g.:

marcfedorow commented 3 years ago

I think that for the purposes of the P extension, the presence of KADD32 instruction (presumably RV64 only while KADD does the same thing on RV32) is necessary anyway. Thus IMO next line should be added to this suggestion:

I am not sure if KADDW insn is necessary but it might be expected while SRAIW.u is presented in spec.