loader: Build the preloader for ARM
nerv at dawncrow.de
Fri Feb 4 10:41:47 CST 2011
Am 04.02.2011 17:26, schrieb Marcus Meissner:
> On Fri, Feb 04, 2011 at 04:51:46PM +0100, André Hentschel wrote:
>> Am 04.02.2011 16:31, schrieb Alexandre Julliard:
>>> André Hentschel <nerv at dawncrow.de> writes:
>>>> +unsigned int wld_modulo( const unsigned int a, const Elf32_Word b )
>>>> +#ifdef __ARM_EABI__
>>>> + unsigned int i;
>>>> + if(b > a) return a;
>>>> + for(i = 0; i * b < a + b; i++)
>>>> + if(i * b > a - b) return (a - i * b);
>>>> + return 0;
>>> That's very inefficient, there are better ways...
>> Thanks for having a look at it.
>> The Problem is that i also can't use '/', otherwise it wants to link to __aeabi_uidiv .
>> That leads to some Problems, so i'll try to find some better math solution and if that fails i maybe try it the assembler way...
> modulo would be "%" btw,
> return a%b;
> but this might generate external functions too... hmm, try -Os as option?
> Ciao, Marcus
% and / both lead to external dependencies here...
maybe the euclidean algorithm helps, because -Os would need ugly changes to configure i guess.
Best Regards, André Hentschel
More information about the wine-devel