[LLVMdev] [cfe-dev] ARM EABI and modulo

Renato Golin renato.golin at linaro.org
Mon Dec 9 06:42:08 PST 2013


On 9 December 2013 14:17, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> ...but it should be using __aeabi_*mod in that case.

There are no __aeabi_*mod variants.

EABI 4.3.1:

Aside: Separate modulo functions would have little value because
modulo on its own is rare. Division by a constant and
constant modulo can be inlined efficiently using (64-bit)
multiplication. For implementations in C, __value_in_regs can be
emulated by tail-calling an assembler function that receives the
values to be returned as arguments and, itself, returns
immediately.

cheers,
--renato



More information about the llvm-dev mailing list