Re:Box64 and RISC-V in 2024: What It Takes to Run the Witche...
by Suppafly on Tuesday August 27, 2024 @02:26PM
(#41371005)
>quite a few RISC-style instructions require multiple (sometimes many) clock cycles to complete, such as mul/div, floating point math
Which seems like stuff you want support for, but this is seemingly arguing against?
Re:Box64 and RISC-V in 2024: What It Takes to Run the Witche...
by enragedcacti on Tuesday August 27, 2024 @02:59PM
(#41371452)
It seems contradictory because the "one clock per instruction" is mostly a misconception, at least with respect to anything even remotely modern.
Re:Box64 and RISC-V in 2024: What It Takes to Run the Witche...
by Closi on Wednesday August 28, 2024 @04:15AM
(#41377218)
Got it, so it's more about removing microcode.
Re:Box64 and RISC-V in 2024: What It Takes to Run the Witche...
by Symmetry on Wednesday August 28, 2024 @07:16AM
(#41378274)
The biggest divide is that no more than a single exception can occur in a RISC instruction, but you can have an indefinite number of page faults in something like an x86 rep mov.
Re:Box64 and RISC-V in 2024: What It Takes to Run the Witche...
by FullyFunctional on Wednesday August 28, 2024 @08:22PM
(#41385881)
That's not even true as you can get lots of exceptions for the same instruction. For example a load can all of these and more (but only one will be reported at a time): instruction fetch page fault, load misaligned, and load page fault.
More characteristic are assumptions about side effects (none for integer, and cumulative flags for FP) and number of register file ports needed.
Sure, addition and moving bits between registers takes one clock cycle, but those kinds of instructions take one clock cycle on CISC as well. And very tiny RISC microcontrollers can take more than one cycle for adds and shifts if you're really stingy with the silicon.
(Memory operations will of course take multiple cycles too, but that's not the CPU's fault.)