[PATCH v2] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

Måns Rullgård mans at mansr.com
Tue Nov 12 09:40:01 EST 2013


Nicolas Pitre <nicolas.pitre at linaro.org> writes:

> On Tue, 12 Nov 2013, Ben Dooks wrote:
>
>> Given these are single instructoins for ARM, is it possible we could
>> make a table of all the callers and fix them up when we initialise
>> as we do for the SMP/UP case and for page-offset?
>
> Not really.  Calls to those functions are generated by the compiler 
> implicitly when a divisor operand is used and therefore we cannot 
> annotate those calls.  We'd have to use special accessors everywhere to 
> replace the standard division operand (like we do for 64 by 32 bit 
> divisions) but I doubt that people would accept that.

It might be possible to extract this information from relocation tables.

-- 
Måns Rullgård
mans at mansr.com



More information about the linux-arm-kernel mailing list