This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does MADD(W-form) and UMADDL handle overflow correctly?

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 

Parents Reply Children