News for hackers. Stuff that matters.
Re:RISC-V Stumbling Blocks by pjc50 on Thursday January 02, 2020 @10:13AM (#21935958)
You left out the paragraph introducing this in the footnote:

> We did not include special instruction-set support for overflow checks on integer arithmetic operations in the base instruction set, as many overflow checks can be cheaply implemented using RISC-V branches.

So this boils down to "there's no platform overflow (V) flag", which is also a problem on other RISC systems, and is in any case rarely used in C code because it doesn't check for overflow.

Re:RISC-V Stumbling Blocks by Taniwha on Thursday January 02, 2020 @03:57PM (#21939745)
yes, exactly - if you want to add 2 registers use:

add t0, t1, t2

in the occasional case where you want overflow as well add the other 3 instructions - if you're hand coding in assembler you probably know which you want, if you're using a compiler, it can map it's semantics where appropriate