Hacker News new | ask | show | jobs
by scoutt 1616 days ago
> you can say “this set of math operations shouldn’t overflow”

This is the same as putting an "if" statement to check for sizes (before or after the operation); the thing that other languages automatically do for you at runtime (with its performance implications).

> The existence of the overflow bits and that overflow continues to remain a common security flaw

What do you propose for a new CPU architecture/instruction set/register types?

How would you implement it? Signed registers?

> how CPU designers imagine you write code.

Write a program in assembler. You'll be checking carry/overflow bits in no-time.