public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: James Hogan <james.hogan@imgtec.com>
Cc: rostedt@goodmis.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-metag@vger.kernel.org
Subject: Re: [PATCH] arch: metag: lib: add "umoddi3.S" file for __umoddi3()
Date: Fri, 20 Dec 2013 19:51:31 +0800	[thread overview]
Message-ID: <52B42F43.7040606@gmail.com> (raw)
In-Reply-To: <52B4208B.1080801@imgtec.com>

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

      reply	other threads:[~2013-12-20 11:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 12:05 [PATCH] arch: metag: lib: add "umoddi3.S" file for __umoddi3() Chen Gang
2013-12-19 12:17 ` James Hogan
2013-12-19 13:37   ` Chen Gang
2013-12-19 13:47     ` James Hogan
2013-12-20  1:44       ` Chen Gang
2013-12-20  9:30         ` James Hogan
2013-12-20 10:20           ` Chen Gang
2013-12-20 10:48             ` James Hogan
2013-12-20 11:51               ` Chen Gang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B42F43.7040606@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-metag@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox