[llvm] r215862 - ARM: improve RTABI 4.2 conformance on Linux

Joerg Sonnenberger joerg at britannica.bec.de
Fri Aug 22 06:56:50 PDT 2014


On Fri, Aug 22, 2014 at 01:22:59PM +0100, Renato Golin wrote:
> On 22 August 2014 12:18, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> > One open issue is that the standard EABI doesn't provide modulo only,
> > which is somewhat faster than div+mod.
> 
> That's not going to change. The reason being that, to get the mod you
> need to divide and subtract, which is the same as divmod in EABI
> terms. And, since you return in registers, and don't need the extra
> write.

If you have hardware division, it doesn't make a difference. If you have
to do the division in software, computing modulo only requires 3
instructions in the critical path per bit vs 4 instructions when
computing div+mod.

Joerg



More information about the llvm-commits mailing list