|ANSI portable overflow detection davids@ICSI.Berkeley.EDU (1994-05-12)|
|Re: ANSI portable overflow detection email@example.com (1994-05-13)|
|Re: ANSI portable overflow detection firstname.lastname@example.org (1994-05-13)|
|Re: ANSI portable overflow detection Roger@natron.demon.co.uk (1994-05-18)|
|From:||davids@ICSI.Berkeley.EDU (David Petrie Stoutamire)|
|Organization:||International Computer Science Institute, Berkeley, CA, U.S.A.|
|Date:||Thu, 12 May 1994 20:32:44 GMT|
The Sather language provides optional dynamic overflow checking for
integer operations. I'm writing a back-end that generates ANSI C, and I
need to emit code to check for overflow in a portable way. Addition and
subtraction are easy, but I don't know of an efficient solution for
multiplication. Can anyone tell me a way to do this that isn't much
slower than the original multiply (such as checking with a division, or
manually constructing the most significant word of the result)?
Return to the
Search the comp.compilers archives again.