News for hackers. Stuff that matters.
Re:Box64 and RISC-V in 2024: What It Takes to Run the Witche... by gary_0 on Tuesday August 27, 2024 @01:56PM (#41370620)
That's not exactly it; quite a few RISC-style instructions require multiple (sometimes many) clock cycles to complete, such as mul/div, floating point math, and branching instructions can often take more than one clock cycle as well, and then once you throw in pipelining, caches, MMUs, atomics... "one clock cycle" doesn't really mean a lot. Especially since more advanced CPUs will ideally retire multiple instructions per clock.

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.)

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.

https://retrocomputing.stackexchange.com/a/14509

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.