Re: detecting long multiply overflow

2014-07-04 Thread Edward Nevill
On Fri, 2014-07-04 at 18:17 +0200, Ard Biesheuvel wrote: > On 4 July 2014 18:13, Edward Nevill wrote: > If you are saying AArch64, I am assuming you can use inline asm and umulh, no? > Thank you, thank you, thank you, You just saved me some very messy coding, Ed. __

Re: detecting long multiply overflow

2014-07-04 Thread Ard Biesheuvel
On 4 July 2014 18:13, Edward Nevill wrote: > Hi, > > Does anyone know of a nice way to detect 64 x 64 -> 64 multiply overflow on > aarch64? > > On x86 you can just use the V flag, but aarch64 seems to have no option to > set the flags after a MUL instruction which I find very odd. > > The only s

detecting long multiply overflow

2014-07-04 Thread Edward Nevill
Hi, Does anyone know of a nice way to detect 64 x 64 -> 64 multiply overflow on aarch64? On x86 you can just use the V flag, but aarch64 seems to have no option to set the flags after a MUL instruction which I find very odd. The only solution I can think of is to do the equivalent of r = a