How can I get the SICStus Prolog JIT to use any of the following ISA?
Intel BMI:
POPCNT
, LZCNT
, TZCNT
, PDEP
, PEXT
Intel CLMUL: PCLMULQDQ
ARM AArch64: RBIT
I need them for supercharging clpz. Right now, I got:
the non-ISO arithmetic function msb/1
.
For a start that's good, but I want more. Please help!
Unfortunately, there is no way for users to extend the JIT for cases like this.
I have been thinking about accessing the population count instructions (for some unrelated uses) from Prolog. The way to add this and other similar instructions would be:
is/2
. This needs to be supported by all our code, not just JIT-compiled code, so interpreter, WAM-emulator, various internal byte-code-processors, all the static analyzers in our IDE, etc. etc.(1) requires sufficient user demand (or explicit financing, of course). (3) requires convincing benchmarks. Currently neither of these are available, but that could change, of course.