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

ISA extension spec probably should not require intrinsics #109

Open marcfedorow opened 3 years ago

marcfedorow commented 3 years ago

Neither bitmanip nor crypto specks require intrinsics. This is probably not an argument against intrinsics: most of bitmanip instructions are emitted by compiler and crypto finds its usage in such libraries as OpenSSL (where generics are already written).

The main argument against intrinsics -- generic code could probably be optimized better than one with intrinsics. I.e.

#if __riscv_zpn
asm("...");
#else
generic();
#endif

is presumably better than multiple intrinsic calls.

Intrinsics are about software but not about instruction set architecture -- so they should be probably developing in riscv-software task group (as it was discussed about crypto intrinsics at the latest meeting).