Re:RISC-V Stumbling Blocks
by ncmncm on Thursday January 02, 2020 @07:06AM
(#21934718)
I know it does not have condition codes. Instead, it has a mess of very complex compare-and-branch instructions.
[ Parent
| on HN ]
It has exactly 6 = != < >= and signed < >= - hardly "a mess" or particularly "complex"
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