[{"id":1761702,"web_url":"http://patchwork.ozlabs.org/comment/1761702/","msgid":"<3xkKq71dbNz9t42@ozlabs.org>","date":"2017-09-01T13:29:54","subject":"Re: [1/4] powerpc/32: add memset16()","submitter":{"id":69509,"url":"http://patchwork.ozlabs.org/api/people/69509/","name":"Michael Ellerman","email":"patch-notifications@ellerman.id.au"},"content":"On Wed, 2017-08-23 at 14:54:32 UTC, Christophe Leroy wrote:\n> Commit 694fc88ce271f (\"powerpc/string: Implement optimized\n> memset variants\") added memset16(), memset32() and memset64()\n> for the 64 bits PPC.\n> \n> On 32 bits, memset64() is not relevant, and as shown below,\n> the generic version of memset32() gives a good code, so only\n> memset16() is candidate for an optimised version.\n> \n> 000009c0 <memset32>:\n>  9c0:   2c 05 00 00     cmpwi   r5,0\n>  9c4:   39 23 ff fc     addi    r9,r3,-4\n>  9c8:   4d 82 00 20     beqlr\n>  9cc:   7c a9 03 a6     mtctr   r5\n>  9d0:   94 89 00 04     stwu    r4,4(r9)\n>  9d4:   42 00 ff fc     bdnz    9d0 <memset32+0x10>\n>  9d8:   4e 80 00 20     blr\n> \n> The last part of memset() handling the not 4-bytes multiples\n> operates on bytes, making it unsuitable for handling word without\n> modification. As it would increase memset() complexity, it is\n> better to implement memset16() from scratch. In addition it\n> has the advantage of allowing a more optimised memset16() than what\n> we would have by using the memset() function.\n> \n> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>\n\nSeries applied to powerpc next, thanks.\n\nhttps://git.kernel.org/powerpc/c/da74f659205ea08cb0fd0b3050637b\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkL8q0gYmz9rvt\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 23:45:15 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xkL8p6mbwzDrDg\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 23:45:14 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xkKq752w6zDqk0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 23:29:55 +1000 (AEST)","by ozlabs.org (Postfix, from userid 1034)\n\tid 3xkKq71dbNz9t42; Fri,  1 Sep 2017 23:29:54 +1000 (AEST)"],"X-powerpc-patch-notification":"thanks","X-powerpc-patch-commit":"da74f659205ea08cb0fd0b3050637b0e0eb31520","In-Reply-To":"<118f28ccb9be59c72f4c7a2a0ce3c8591dea6582.1503277387.git.christophe.leroy@c-s.fr>","To":"Christophe Leroy <christophe.leroy@c-s.fr>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>,\n\tPaul Mackerras <paulus@samba.org>, Scott Wood <oss@buserror.net>","From":"Michael Ellerman <patch-notifications@ellerman.id.au>","Subject":"Re: [1/4] powerpc/32: add memset16()","Message-Id":"<3xkKq71dbNz9t42@ozlabs.org>","Date":"Fri,  1 Sep 2017 23:29:54 +1000 (AEST)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"\"Naveen N. Rao\" <naveen.n.rao@linux.vnet.ibm.com>,\n\tlinuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]