Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not having dedicated overflow checking instructions doesn't mean that you can't check overflows. You can.

There is no problem because checking overflows doesn't in practice cause significant overhead, especially in the kinds of superscalar CPUs that are in mobile devices and laptops and PCs and servers these days. Most of the time those wide OoO CPUs are looking in vain for more parallelism. Adding a few overflow-checking instructions just gives them something to do with execution slots they otherwise often can't use.

If there is a actual problem -- which needs to be PROVEN not just hand-waved -- then analyse it in the real world, document it, propose an ISA extension that would actually make things better in real-world applications, not just some hand-picked tiny loop or function.



Indeed, the overhead of checking overflow (which generally amounts to a few percentage points) is all about missed optimization opportunities due to the need for precise reporting of overflow errors. It has nothing whatsoever to do with the actual ISA, at least assuming a reasonable compiler.


>It has nothing whatsoever to do with the actual ISA

RISC-V doesn't have a flags register. This is an actual advantage: Superscalar microarchitecture implementations do not need to keep track of who set what flag.

This was a very conscious, carefully weighted decision, which presents a net win. One decision of many RISC-V designers had to make.

There's better and worse ways for an ISA to do something. For every ISA decision, implementations (small and large) will either benefit or have to work around.

You'll hear a lot of people insist that ISA doesn't matter; they're provably clueless.


>You'll hear a lot of people insist that ISA doesn't matter; they're provably clueless.

One of them being Torvalds, the transmeta guy (also known for Git, and a couple other hobby projects)

Now I tend to fall on your side of this argument, but I have to say I'd like to see the formal proof of cluelessness :)

Having read previous iterations of the same arguments, I've yet to see anything quite that decisive.


On ISA design, it is just so wrong to endorse the opinion of a single person. ISA design has three significant parties of interest: IC designers, compiler authors, and software developers.

No one can master these three fields all at once. No one. Not even Linus (who would be a master software developer + a decent compiler specialist).


>One of them being Torvalds, the transmeta guy (also known for Git, and a couple other hobby projects)

A very capable person no doubt, but also one that's well-known to be wrong[0] about topics he is not an expert at.

0. https://www.cosy.sbg.ac.at/~clausen/PVSE2006/linus-rebuttal....


Jim Keller has said ISA doesn't really matter beyond something like 15 necessary extensions.


Same Jim Keller has great things to say about RISC-V.

Which, by the way, includes mention of much attention these few important instructions (not extensions) got.


It is low overhead. But the 'zero cost abstractions'/'zero overhead [...]' crowd continues to blanch even at such low overhead. When you design a CPU for the masses, it is your responsibility to consider what they will do with it. The social factors are significant; not just the technical ones.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: