Hi,
MADD(W-form) [1] and UMADDL[2] does 32-bit multiplication and adds multiplication results to a 64-bit integer.
My question is, do these two instructions handle possible overflow (2 32-bit integers gives a 64-bit result) correctly? I think this is true based on https://godbolt.org/z/rEWd7a76q (gcc uses `umaddl`) but didn't see it mentioned explicitly in the documentation ([1] and [2]), so would like to confirm. Thank you!
[1] https://developer.arm.com/documentation/dui0802/a/A64-General-Instructions/MADD?lang=en
[2] https://developer.arm.com/documentation/dui0802/a/UMADDL
Yes I mean truncation/wrapping --> for example, results `(numeric_limits<uint32_t>::max() - 2) * ((uint32_t) 2)` will wrap around.
Finding pseudo code is indeed the solution. Thanks!