Comparing to round modes I introduced in the last post, overflow modes are rather simple.
There are only 3 overflow modes in cfelton's
saturate means that if overflow occurs, the value will remain maximum (minimum if underflow).
wrap behaves the same. If overflow occurs, it then builds up from minimum. Similarly, if underflow occurs, it goes down from maximum. For binary implementation, it is just reserve the last bits in its width.
We can see clearly in the original implementation: