On 7 April 2014 15:56, Avi Kivity <address@hidden> wrote:
On 04/06/2014 01:18 PM, Peter Maydell wrote:
The alternative would be to say that Int128 should have
undefined behaviour on underflow/overflow and the test
code is wrong, but that doesn't seem very useful to me.
Isn't the test broken here? It is trying to add (or shift) -2^127 and
something else, and the result truly overflows.
Well, the test code is assuming "semantics as per 2s
complement arithmetic" and checking various corner cases.
As I say, we could define that this is invalid and
rewrite the test cases.