From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH] arch: metag: lib: add "umoddi3.S" file for __umoddi3() Date: Fri, 20 Dec 2013 19:51:31 +0800 Message-ID: <52B42F43.7040606@gmail.com> References: <52B2E0FA.7090805@gmail.com> <52B2E3DB.7010008@imgtec.com> <52B2F6B7.1050802@gmail.com> <52B2F8DC.8060006@imgtec.com> <52B3A0EA.9010801@gmail.com> <52B40E44.9040603@imgtec.com> <52B419DE.8050706@gmail.com> <52B4208B.1080801@imgtec.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=SwkoFPFSM+3jOjrp1bWejsVPbMN3gStTX7R/2sJXIJU=; b=EnMBwzgAsIH3E3Vl54o2gBlDil197Z2QvugH4xApZw9+TtJ2lAaqcsB40FplZhfAZQ B3XXfcwhuZ6uXZMnwh8YfYr/0x4ghgRV42pZ7jFds+Xowz3G6Z7Jkf0JOPVx9pymx7T9 NNcwyiiZsTvRc92NRbnzdW9pxzvv0bLYoa120YZLTuxsMFIy7UAA6mqFuvnhL55NludF crfazFFWXAaQGmnpUAWDlqyAX5NoPJTOOe52PmdTT7FrcY1gaVB/W+4ovAduSIhRyDwi elhHgXnGirbuMfhUHwm6EUX0Ad7nxLfpKKOvCpB9Mcwrx/E0T5QkTonr7he1AkE8YIK8 vaCQ== In-Reply-To: <52B4208B.1080801-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> Sender: linux-metag-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: James Hogan Cc: rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org, "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 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 >> 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-metag" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756661Ab3LTLve (ORCPT ); Fri, 20 Dec 2013 06:51:34 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:43138 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756064Ab3LTLvd (ORCPT ); Fri, 20 Dec 2013 06:51:33 -0500 Message-ID: <52B42F43.7040606@gmail.com> Date: Fri, 20 Dec 2013 19:51:31 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: James Hogan CC: rostedt@goodmis.org, "linux-kernel@vger.kernel.org" , linux-metag@vger.kernel.org Subject: Re: [PATCH] arch: metag: lib: add "umoddi3.S" file for __umoddi3() References: <52B2E0FA.7090805@gmail.com> <52B2E3DB.7010008@imgtec.com> <52B2F6B7.1050802@gmail.com> <52B2F8DC.8060006@imgtec.com> <52B3A0EA.9010801@gmail.com> <52B40E44.9040603@imgtec.com> <52B419DE.8050706@gmail.com> <52B4208B.1080801@imgtec.com> In-Reply-To: <52B4208B.1080801@imgtec.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> 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