Re:RISC-V Stumbling Blocks
by Taniwha on Thursday January 02, 2020 @07:42AM
(#21934899)
It has exactly 6 = != < >= and signed < >= - hardly "a mess" or particularly "complex"
[ Parent
| on HN ]
These do not seem, to you, complex instructions?
I boggle.
Pretty much all architectures have those as a natural consequence of the way 2's complement arithmetic works? Even the tiny 6502 spends eight of its 256 opcodes on eight different branch-if-comparison opcodes.
The RISC-V compare-and-branch instructions are objectively a great deal more complex than the 6502 instructions.
No, compare and branch is kind of the expected instruction in an architecture that has no condition codes (mips has compare with 0 but essentially the same 6) - compare works well in an out of order pipe
If I was going to change anything I'd add compare eq/ne with an immediate