fwsGonzo / libriscv

The fastest RISC-V sandbox
BSD 3-Clause "New" or "Revised" License
526 stars 46 forks source link

JAL might not be as fast as it can be #98

Closed fwsGonzo closed 8 months ago

fwsGonzo commented 8 months ago

Looking at the JAL rewrites, it looks like it mostly turns into a 32-bit unchecked jump with lookup. It's a bit faster if it's an unchecked relative jump. It's probably faster to change FAST_JAL to always work like this.

fwsGonzo commented 8 months ago

Even though I am skeptical about the benefits, I did the change here: https://github.com/fwsGonzo/libriscv/commit/e8284b1044fd9d6053c6705ee45d854115ce3dd5 . Also verified with fuzzing.