[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52B42F43.7040606@gmail.com>
Date: Fri, 20 Dec 2013 19:51:31 +0800
From: Chen Gang <gang.chen.5i5j@...il.com>
To: James Hogan <james.hogan@...tec.com>
CC: rostedt@...dmis.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-metag@...r.kernel.org
Subject: Re: [PATCH] arch: metag: lib: add "umoddi3.S" file for __umoddi3()
On 12/20/2013 06:48 PM, James Hogan wrote:
> On 20/12/13 10:20, Chen Gang wrote:
>> Hmm... but do you know why we need some 64-bit functions which are
>> implemented under "arch/metag/lib/*.S"? can we use <linux/math64.h>
>> instead of them? (e.g 64-bit '/').
>
> If you look at linux/math64.h you'll see it only implements division
> operations. The other 64 bit operations like shift, compare, and
> multiply are relatively cheap so are implemented as intrinsics instead.
>
OK, thanks. tomorrow, I will send related patch: use 'div64_u64_rem'
instead of umoddi3 ('%'). :-)
And I guess, in kernel wide, we need remove all 'umoddi3' and 'udivdi3'.
umoddi3 ('%'): frv, ia64, parisc, tile, xtensa
udivdi3 ('/'): frv, ia64, parisc, tile, xtensa, sh, sparc.
especially, sh and sparc only provide '/', do not provide '%'.
BTW: originally, I make a mistake -- treat 'udevsi3' as 'udevdi3'.
Thanks.
--
Chen Gang
Open, share and attitude like air, water and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists