News for hackers. Stuff that matters.
Re:RISC-V Stumbling Blocks by ncmncm on Thursday January 02, 2020 @06:37AM (#21934563)
In other words, two more instructions, instead of zero.

That compilers fail to do clever masking tricks to avoid branches frequently results in 2x slower programs.

Re:RISC-V Stumbling Blocks by avianes on Thursday January 02, 2020 @07:53AM (#21934947)
No, as jleahy said, it cost a single instruction to transform 0 to 0b00..00 and 1 to 0b11..11 - SUB X, $0, X.

And your proposal - using the zero register as a flag register - breaks way more micro-optimizations (like the simple ones described in "The RISC-V Reader" book) than it allows