From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3399 invoked by alias); 27 Jul 2017 06:21:19 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 3161 invoked by uid 89); 27 Jul 2017 06:20:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.3 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT autolearn=no version=3.3.2 spammy=H*f:nBdyaTNAPMOGd, H*f:yXCZAP3qT9NTr4, H*f:sk:EoBd2w9, Kito X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Jul 2017 06:20:53 +0000 Received: from [88.198.220.131] (helo=sslproxy02.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dacA9-0006v7-0k; Thu, 27 Jul 2017 08:20:45 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy02.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dacA8-0003iQ-Pk; Thu, 27 Jul 2017 08:20:44 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 612D82A001D; Thu, 27 Jul 2017 08:20:53 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Wy4KfaJ0WmIE; Thu, 27 Jul 2017 08:20:51 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 989DC2A004F; Thu, 27 Jul 2017 08:20:51 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CaWbeGTrZf6l; Thu, 27 Jul 2017 08:20:51 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 832DA2A001D; Thu, 27 Jul 2017 08:20:51 +0200 (CEST) Subject: Re: [PATCH v2 3/3] Add ffsl(), ffsll(), fls(), flsl(), flsll() From: Sebastian Huber To: Kito Cheng , newlib@sourceware.org References: <20170704133435.9840-3-sebastian.huber@embedded-brains.de> <20170705085414.12755-1-sebastian.huber@embedded-brains.de> <20170705112609.GD30902@calimero.vinschen.de> <9bddffb3-3ae2-566e-c412-331de1e616a9@embedded-brains.de> Message-ID: <9dbceb47-3a48-b8f9-056e-875597024d2c@embedded-brains.de> Date: Thu, 27 Jul 2017 06:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9bddffb3-3ae2-566e-c412-331de1e616a9@embedded-brains.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00658.txt.bz2 On 27/07/17 07:47, Sebastian Huber wrote: > On 27/07/17 03:40, Kito Cheng wrote: > >> I am testing with RISC-V with newlib/trunk and just hang on ffs, >> after investigate, I saw gcc just generate a ffs call in ffs for riscv64 >> and I guess riscv64 is not the only target will hit this bug, >> so maybe we can revert the part of this patch, at least for ffs.c? > > We should first investigate why GCC performs this optimization. The=20 > file is compiled with -fno-builtin, so it some other optimization.=20 > Maybe we need something like __attribute__ ((__optimize__=20 > ("-fno-tree-loop-distribute-patterns"))) as in string/local.h. > I tried to build a riscv32 GCC, but apparently there is no RISC-V=20 support in upstream Newlib: n file included from=20 /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/sys/config.h:4:0, from=20 /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/_ansi.h:16, from=20 /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/sys/unistd.h:8, from=20 /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/unistd.h:4, from=20 /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/pthread.h:25, from ./gthr-default.h:31, from=20 /home/EB/sebastian_h/archive/gcc-git/libgcc/gthr.h:148, from=20 /home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2.c:37: /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/machine/ieeefp.h:4= 28:2:=20 error: #error Endianess not declared!! #error Endianess not declared!! ^~~~~ Do you have plans to add RISC-V support to upstream Newlib? --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG.