Just tagged libo 0.1, a library for fast integer overflow detection.
The major interface change in this version is that instead of writing
smulo32(...) for detecting signed 32-bit multiplication overflow,
you just call overflow_mul(...), and it will figure out the type
for you (using black magic).
I have also added a unit test using Google Test. It would be great if you can help generate and test ARM/PowerPC implementations.
To give you a sense of how efficient libo is, below is libo’s
implementation of overflow_mul() for long on x86_64:
|
on ppc:
|
For a comparison, this is the implementation from CERT’s IntegerLib.
|