On 03/19/2014 03:29 PM, Olivier Danet wrote: > + if ((int32_t) x0 != x0) { > + x0 = x0 < 0 ? 0x80000000 : 0x7fffffff; > + overflow = 1; > + }
Actually, there's an existing bug here that we might as well fix. ## ... the 32-bit result is sign-extended to 64 bits and ## written into register R[rd]. That 0x80000000 is not going to promote properly to 64-bits. We might as well go ahead and use INT32_MIN and INT32_MAX here at the same time. r~