From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80270 invoked by alias); 27 Jul 2017 05:47:17 -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 79500 invoked by uid 89); 27 Jul 2017 05:47:16 -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=Hx-languages-length:937, H*f:nBdyaTNAPMOGd, H*f:yXCZAP3qT9NTr4, H*f:sk:EoBd2w9 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 05:47:15 +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 1dabdh-0005hk-J7; Thu, 27 Jul 2017 07:47:13 +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 1dabdh-0000XN-CL; Thu, 27 Jul 2017 07:47:13 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A91CB2A001D; Thu, 27 Jul 2017 07:47:20 +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 NDgQ0YqCMb7A; Thu, 27 Jul 2017 07:47:19 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 35F4F2A004F; Thu, 27 Jul 2017 07:47:19 +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 qgC-2v3znc1k; Thu, 27 Jul 2017 07:47:19 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 24A0A2A001D; Thu, 27 Jul 2017 07:47:19 +0200 (CEST) Subject: Re: [PATCH v2 3/3] Add ffsl(), ffsll(), fls(), flsl(), flsll() 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> From: Sebastian Huber Message-ID: <9bddffb3-3ae2-566e-c412-331de1e616a9@embedded-brains.de> Date: Thu, 27 Jul 2017 05:47: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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00657.txt.bz2 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 file=20 is compiled with -fno-builtin, so it some other optimization. Maybe we=20 need something like __attribute__ ((__optimize__=20 ("-fno-tree-loop-distribute-patterns"))) as in string/local.h. --=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.