public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Kito Cheng <kito.cheng@gmail.com>, newlib@sourceware.org
Subject: Re: [PATCH v2 3/3] Add ffsl(), ffsll(), fls(), flsl(), flsll()
Date: Thu, 27 Jul 2017 06:21:00 -0000	[thread overview]
Message-ID: <9dbceb47-3a48-b8f9-056e-875597024d2c@embedded-brains.de> (raw)
In-Reply-To: <9bddffb3-3ae2-566e-c412-331de1e616a9@embedded-brains.de>

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 
> file is compiled with -fno-builtin, so it some other optimization. 
> Maybe we need something like __attribute__ ((__optimize__ 
> ("-fno-tree-loop-distribute-patterns"))) as in string/local.h.
>

I tried to build a riscv32 GCC, but apparently there is no RISC-V 
support in upstream Newlib:

n file included from 
/home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/sys/config.h:4:0,
                  from 
/home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/_ansi.h:16,
                  from 
/home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/sys/unistd.h:8,
                  from 
/home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/unistd.h:4,
                  from 
/home/EB/sebastian_h/archive/gcc-git/newlib/libc/include/pthread.h:25,
                  from ./gthr-default.h:31,
                  from 
/home/EB/sebastian_h/archive/gcc-git/libgcc/gthr.h:148,
                  from 
/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:428:2: 
error: #error Endianess not declared!!
  #error Endianess not declared!!
   ^~~~~

Do you have plans to add RISC-V support to upstream Newlib?

-- 
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äftliche Mitteilung im Sinne des EHUG.

  reply	other threads:[~2017-07-27  6:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 13:34 [PATCH 1/3] Implement bzero() via memset() Sebastian Huber
2017-07-04 13:34 ` [PATCH 3/3] Add ffsl(), ffsll(), fls(), flsl(), flsll() Sebastian Huber
2017-07-05  6:06   ` Sebastian Huber
2017-07-05  8:42     ` Corinna Vinschen
2017-07-05  8:54   ` [PATCH v2 " Sebastian Huber
2017-07-05 11:26     ` Corinna Vinschen
2017-07-27  1:40       ` Kito Cheng
2017-07-27  5:47         ` Sebastian Huber
2017-07-27  6:21           ` Sebastian Huber [this message]
2017-07-27  6:38             ` Kito Cheng
2017-07-27  6:40               ` Kito Cheng
2017-07-27  6:50         ` Sebastian Huber
2017-07-27  6:53           ` Kito Cheng
2017-07-27  7:09             ` Sebastian Huber
2017-07-27  7:21               ` Sebastian Huber
2017-07-04 13:34 ` [PATCH 2/3] Synchronize <strings.h> with latest FreeBSD Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9dbceb47-3a48-b8f9-056e-875597024d2c@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=kito.cheng@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).