4 ms·
We Need Hardware Traps for Integer Overflow (2014)
- Someone 10y agoIf this will see the light of day, I expect that iOS will have it first. Reasons? Apple controls its own CPUs, and Swift's 'normal' operators trap on overflow. I also think that hardware support for tagged pointers (https://en.m.wikipedia.org/wiki/Tagged_pointer#Examples https://en.m.wikipedia.org/wiki/Tagged_pointer#Examples) may be worthwhile for iOS, but that need may decrease if ther will be a gradual move from Onjective-C to Swift.
- mhkool 10y agoThe Mill CPU that Mill Computing is developing, has signalling integer instructions. In fact, each integer operation has four modes that one can choose from: ignore, saturate, excepting and widening. The widening mode has a result that is double-wide as the operands width and hence never overflows. The Mill CPU is not available yet so have a little patience.