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()

At least for AMD64 and i386 processors GCC creates awful to horrible
code for them: see <https://skanthak.homepage.t-online.de/gcc.html>
for some examples as well as the expected assembly.

The attached diff/patch provides better implementations.

Stefan

Attachment: libgcc2.diff
Description: Binary data

Reply via email to