3 ms·
Indeed it is weird to see the trend in hardware to remove overflow checking when the trend in programming languages is to have more. While MIPS can trap on ove
by Findecanor 3y ago
Indeed it is weird to see the trend in hardware to remove overflow checking when the trend in programming languages is to have more.
While MIPS can trap on overflow, most architectures can at least set flags for conditional branch.
PowerPC OR's the overflow flag into another flag, so you can choose to check that flag for overflow first after a block of calculations.
I really want Mill to become successful. It has "NaR" (Not A Result) - like NaN but for integers. For every arithmetic instruction, there is has a variant that can set NaR. Like a NaN it is carried through the data-flow, and there's a trap first when it reaches a store or conditional instruction.