[compiler-rt] r215295 - builtins: correct __umodsi3, __udivsi3 on ARM

Joerg Sonnenberger joerg at britannica.bec.de
Tue Aug 19 15:12:25 PDT 2014


On Tue, Aug 19, 2014 at 11:04:46PM +0100, Renato Golin wrote:
> Joerg may correct me, but I believe the intention was to implement a
> divmod, that happened to be in a badly named file (umod) and with a
> copy&paste mistake on the function name. So that one should actually
> be the divmod function, not the mod, and the latest Saleem's patch
> actually finished killing the original implementation at all, meaning
> that it's still divmod for armv4 but not for the rest, but being used
> as div/mod.

There is certainly C&P involved for the three variations (div, mod,
div/mod) as they all share the same core algorithm with minor
variations. I can't say anything about the working state of the idiv
path as I don't have any hardware for that. I remember asking for
testers of that. The code was carefully tested for the non-idiv
branches.

Joerg



More information about the llvm-commits mailing list