Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbbEZOZ5 (ORCPT ); Tue, 26 May 2015 10:25:57 -0400 Received: from smtp-out4.electric.net ([192.162.216.191]:51501 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbbEZOZv (ORCPT ); Tue, 26 May 2015 10:25:51 -0400 X-Greylist: delayed 1597 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 May 2015 10:25:51 EDT From: David Laight To: "'Scott Wood'" CC: "'Christophe Leroy'" , Benjamin Herrenschmidt , Paul Mackerras , "Michael Ellerman" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3 2/2] powerpc: add support for csum_add() Thread-Topic: [PATCH v3 2/2] powerpc: add support for csum_add() Thread-Index: AQHQkkqkelEqw9QfvkW74vO+INevup2IKrZggAAsFQCABfws0A== Date: Tue, 26 May 2015 13:57:32 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CB3EB5F@AcuExch.aculab.com> References: <1d1362c8aa696e316d3ba97dce2342df6f6ee6cf.1432047904.git.christophe.leroy@c-s.fr> <063D6719AE5E284EB5DD2968C1650D6D1CB3D471@AcuExch.aculab.com> <1432323162.27761.274.camel@freescale.com> In-Reply-To: <1432323162.27761.274.camel@freescale.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t4QEQ2LW012042 Content-Length: 554 Lines: 18 From: Scott Wood ... > > I'd also have thought that the 64bit C version above would be generally 'good'. > > It doesn't generate the addc/addze sequence. At least with GCC 4.8.2, > it does something like: > > mr tmp0, csum > li tmp1, 0 > li tmp2, 0 > addc tmp3, addend, tmp0 > adde csum, tmp2, tmp1 > add csum, csum, tmp3 I was thinking of all 64bit targets, not 32bit ones. David ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?