aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>2015-01-19 14:28:59 +0000
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>2015-01-26 19:56:46 +0000
commit85d604af5f96c32734af9974ec6ddb625b6716a2 (patch)
tree63b12215c9d770e7129ede77387c56caf5931972 /docs
parent40a1f64b468ee247fca3b237f0b89f066e59626c (diff)
target-tricore: split up suov32 into suov32_pos and suov32_neg
suov checks unsigned for an overflow and an underflow, after some arithmetic operations and saturates the result to either max_uint32 or 0. So far we handled this by expanding to the next bigger data type and compare whether the result is > max_uint32 or < 0. However this approach can fail for an 32 bit multiplication, if both operands of the multiplication are 0x80000000. This sets the sign bit of the 64 bit integer and would result in a false saturation to 0. Since unsigned operations, e.g add, sub, mul always result in either a positive or negative overflow, we split the functions for suov32 up into two functions (suov32_pos, suov32_neg) for each case. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions