[Patch] Overflow-trapping integer arithmetic routines7code: bloated and slooooow

Jonathan Wakely jwakely.gcc@gmail.com
Mon Oct 5 16:14:01 GMT 2020


On Mon, 5 Oct 2020 at 17:12, Stefan Kanthak <stefan.kanthak@nexgo.de> wrote:
>
> The implementation of the functions __absv?i2(), __addv?i3() etc. for
> trapping integer overflow provided in libgcc2.c is rather bad.
> Same for __cmp?i2() and __ucmp?i2()
>
> GCC creates awful to horrible code for them (at least for AMD64 and
> i386 processors): see <https://skanthak.homepage.t-online.de/gcc.html>
> for some examples.
>
> The attached diff/patch provides better implementations.


Patches should go to the gcc-patches list, see
https://gcc.gnu.org/contribute.html#patches


More information about the Gcc mailing list