4 ms·
(Mill team) With apologies to those tired of hearing about the new Mill CPU let me explain how the Mill traps on integer overflow: For overflow-able arithmeti
by willvarfar 12y ago
(Mill team)
With apologies to those tired of hearing about the new Mill CPU let me explain how the Mill traps on integer overflow:
For overflow-able arithmetic operations, we support four modes:
* truncate
* except
* saturate
* double-width
With excepting overflow, the result is marked as invalid (we term it "Not-a-Result (NaR)").
As these invalid results are used in further computation, the NaR propagates.
When you finally use the result in non-speculatively e.g. store it or branch on it then the hardware faults.
NaRs have lots of other uses.
This is described in the Metadata talk http://millcomputing.com/topic/metadata/ http://millcomputing.com/topic/metadata/
And http://millcomputing.com/topic/introduction-to-the-mill-cpu-programming-model-2/ http://millcomputing.com/topic/introduction-to-the-mill-cpu-... for a broader overview.