From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Nasrallah Date: Wed, 18 Dec 2019 06:06:12 +0000 Subject: Re: can someone solve string_32.h issue for SH ? Message-Id: <622503158.752777.1576649172224@mail.yahoo.com> List-Id: References: <339916914.636876.1576627652112.ref@mail.yahoo.com> <339916914.636876.1576627652112@mail.yahoo.com> <87tv5yjssb.wl-kuninori.morimoto.gx@renesas.com> <2107393677.694216.1576641363699@mail.yahoo.com> <87a77qjjjp.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <87a77qjjjp.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: kuninori.morimoto.gx@renesas.com Cc: dalias@libc.org, geert@linux-m68k.org, ysato@users.sourceforge.jp, linux-sh@vger.kernel.org, linux-renesas-soc@vger.kernel.org Hi, > Hi Karl > > Thank you for your help > > > Or, can we use general strncpy() instead of SH assemble one ? >(snip) > > Though ultimately I do not have a say in that, it would appear that string_32.h is in arch/sh/include/asm > > and has been there for a very long time. > > In fact, it appears that x86 also has similar utility functions defined in inline assembly: > > see arch/x86/include/asm. As straightforward as it would be to make C versions, there may be a reason > > that they are in inline assembly--optimization would be my guess--and converting it all to C may require> > > an overhaul of the string.h backend (something I would not be much help with given that I am unable to get > > modern Linux booting on my machine, which is a Sega Dreamcast). > > I also do not know what the performance implications of switching it all to C would be, if there even are any. > > > > Hopefully this information may be useful and my asm version is alright for the time being; > > I have not been able to unearth much more on the topic of why this is structured the way it is, > > How about this ? > You / I post each patch > (= Me:  use generic strnpy() patch >  You: fixup SH strnpy() patch) > And follow SH maintainer's judge That sounds fine to me! However, I may need to find a better way to send e-mails than via this webclient before doing so. It would appear I've been mucking up pretty badly with reply formatting (sorry!!! I don't know how to fix this thread in the mailing list archives... I had no idea that replying like a normal e-mail was a terrible thing to do!!). -Karl Nasrallah From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FF3BC43603 for ; Wed, 18 Dec 2019 06:06:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FA1C20717 for ; Wed, 18 Dec 2019 06:06:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=aol.com header.i=@aol.com header.b="g5tnVEIK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725799AbfLRGGT (ORCPT ); Wed, 18 Dec 2019 01:06:19 -0500 Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:44553 "EHLO sonic307-56.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbfLRGGT (ORCPT ); Wed, 18 Dec 2019 01:06:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1576649177; bh=YQKJf1wZ9nXo3g23WvjNw1Bq9D4YFDFQzc6OT4L2iwI=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=g5tnVEIKtQKWQmNUruEw85hKCtj8mkP409e8Iu9JRkiyNl/QpKGnx32l9hjT6ns59+muu9V6PjcvITs0YSXwSC8iMgwIDCfE6fCY6dzJXylHGLG560eikvbFVXeq001maRiX03TMkTkCfnuV8zcty44Rpi+zFieCPFwpb5/5U6vl7VS/S9LQXAJjCPNa2JZg9p6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EQht28B3nzPOat6mZ7SPUS0nR0OlqjeyqCboYJHdBs_OLLrgJvc7WIILgP Aw7qlwVPtcUaNDWfv5GTUF5C.D26vttiXTfqKNjQHd9WFaW1Dwkxw_owixy7uWJYaIlPEQdK_TiQ _SghPs_bj.Qw0gb4eV6dmhDZAyl1RoDT7T4JbZsghWPLTFFWkdAiqVMTqaP824ZnTHA0FO.HYkmm gSHYAV0UDHqB5l85QNFxYKyiFnXZnzdW5U2721yWMhicrxL2o8erl7MgYN8kZ8.0nPYQCpxLo_jH nHZGv7Qqzh2IqA2dni1nVCq2JCIKrFQi1p8qdWGvn5OV7vFafM6Sr7VnwJK.vwKhK2tL_ssWpHbV BoahxnWU.A2yuHpBwJK3.6m0f4u2o36bbtZr63OlUmWxc8TjH5FG0fKC6jXVa Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Wed, 18 Dec 2019 06:06:17 +0000 Date: Wed, 18 Dec 2019 06:06:12 +0000 (UTC) From: Karl Nasrallah To: kuninori.morimoto.gx@renesas.com Cc: dalias@libc.org, geert@linux-m68k.org, ysato@users.sourceforge.jp, linux-sh@vger.kernel.org, linux-renesas-soc@vger.kernel.org Message-ID: <622503158.752777.1576649172224@mail.yahoo.com> In-Reply-To: <87a77qjjjp.wl-kuninori.morimoto.gx@renesas.com> References: <339916914.636876.1576627652112.ref@mail.yahoo.com> <339916914.636876.1576627652112@mail.yahoo.com> <87tv5yjssb.wl-kuninori.morimoto.gx@renesas.com> <2107393677.694216.1576641363699@mail.yahoo.com> <87a77qjjjp.wl-kuninori.morimoto.gx@renesas.com> Subject: Re: can someone solve string_32.h issue for SH ? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.14873 aolwebmail Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi, > Hi Karl > > Thank you for your help > > > Or, can we use general strncpy() instead of SH assemble one ? >(snip) > > Though ultimately I do not have a say in that, it would appear that str= ing_32.h is in arch/sh/include/asm > > and has been there for a very long time. > > In fact, it appears that x86 also has similar utility functions defined= in inline assembly: > > see arch/x86/include/asm. As straightforward as it would be to make C v= ersions, there may be a reason > > that they are in inline assembly--optimization would be my guess--and c= onverting it all to C may require> > > an overhaul of the string.h backend (something I would not be much help= with given that I am unable to get > > modern Linux booting on my machine, which is a Sega Dreamcast). > > I also do not know what the performance implications of switching it al= l to C would be, if there even are any. > > > > Hopefully this information may be useful and my asm version is alright = for the time being; > > I have not been able to unearth much more on the topic of why this is s= tructured the way it is, > > How about this ? > You / I post each patch > (=3D Me:=C2=A0 use generic strnpy() patch >=C2=A0 You: fixup SH strnpy() patch) > And follow SH maintainer's judge That sounds fine to me! However, I may need to find a better way to send e-mails than via this webc= lient before doing so. It would appear I've been mucking up pretty badly wi= th reply formatting (sorry!!! I don't know how to fix this thread in the ma= iling list archives... I had no idea that replying like a normal e-mail was= a terrible thing to do!!). -Karl Nasrallah