←back to thread

366 points pabs3 | 1 comments | | HN request time: 0s | source
Show context
justahuman74 ◴[] No.41364800[source]
I hope they're able to get this ISA-level feedback to people at RVI
replies(2): >>41364827 #>>41364904 #
camel-cdr ◴[] No.41364904[source]
The scalar efficiency SIG has already been discussing bitfield insert and extract instructions.

We figured out yesterday [1], that the example in the article can already be done in four risc-v instructions, it's just a bit trickier to come up with it:

    # a0 = rax, a1 = rbx
    slli t0, a1, 64-8
    rori a0, a0, 16
    add a0, a0, t0
    rori a0, a0, 64-16
[1] https://www.reddit.com/r/RISCV/comments/1f1mnxf/box64_and_ri...
replies(2): >>41365275 #>>41369025 #
1. ksco ◴[] No.41369025[source]
Author here, we have adopted this approach as a fast path to box64: https://github.com/ptitSeb/box64/pull/1763, thank you very much!