public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Mao Han <han_mao@c-sky.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com,
	libc-alpha@sourceware.org
Subject: Re: [PATCH v4 00/13] port C-SKY to glibc
Date: Thu, 13 Sep 2018 08:14:00 -0000	[thread overview]
Message-ID: <20180913081354.GA4004@vmh-VirtualBox> (raw)
In-Reply-To: <alpine.DEB.2.21.1809121217510.28943@digraph.polyomino.org.uk>

On Wed, Sep 12, 2018 at 12:31:24PM +0000, Joseph Myers wrote:
> On Wed, 12 Sep 2018, Mao Han wrote:
> 
> > 38245425a9add7bd22f8732219e0085432f223b6 (6 sep). Two abi combinations
> > are supported with this patch: C-SKY ABIV2 with (soft float & little endian,
> > hard float & little endian). CK807(ef), CK810(ef), CK860 are the
> 
> Could you please clarify whether those are the same ABI (compatible for 
> function calling, structure layout for types from glibc headers, etc.) or 
> different ABIs?
>
> If they are different ABIs, they should have different dynamic linker 
> names (of course you need to make the GCC port reflect the dynamic linker 
> name used for each ABI), and your bits/fenv.h should disable most of its 
> contents for soft float, like e.g. MIPS does (define only __FE_UNDEFINED 
> and FE_TONEAREST as rounding modes in that case, define FE_ALL_EXCEPT to 0 
> and no other exception macros, do not define FE_NOMASK_ENV).  Then you 
> shouldn't need math-tests-exceptions.h and math-tests-rounding.h in the 
> nofpu directory because things will be handled automatically when 
> bits/fenv.h avoids defining unsupported things.
> 
> If they are the same ABI, I don't see any use for the CSKY_HARD_FLOAT 
> macro defined in preconfigure; nothing seems to test it, so it's only 
> relevant if shlib-versions is testing it (i.e. if they are different ABIs 
> with different dynamic linker names).

Hard float will use to vr to pass arguments, the ABI is imcompatible if the
function has any float-point arguments. I use the same dynamic linker names
because there is no float in ldso, the same ldso can be used on system with
soft float/hard float. Seems I still need to use different dynamic linker
names even if they are compatible, and distinct soft float/hard float in
bits/fenv.h to make glibc have correct definitions?
> 
> Does C-SKY hard float support exception traps or not?  math-tests-trap.h 
> has a comment saying not.  But you have an implementation of 
> feenableexcept that implies it does support exception traps.
> 
> * If exception traps are never supported, everything related to them 
> (including the definition of FE_NOMASK_ENV) should be removed; the default 
> feenableexcept and fedisableexcept and fegetexcept implementations should 
> suffice.
> 
> * If exception traps are always supported, your math-tests-trap.h is wrong 
> and should be removed.
> 
> * If they are conditionally supported, like on Arm and AArch64, your 
> math-tests-trap.h is appropriate with a different comment explaining the 
> conditional support - but various fenv.h functions like feenableexcept 
> need to check for the support and give errors if asked to enable 
> exception traps they are unable to enable (this includes fesetenv and 
> feupdateenv passed FE_NOMASK_ENV - see Arm and AArch64 for examples).
>

Exception traps is design to be conditionally supported, seems define to no
for compatibility. All the cpu with fpu have exception traps support at
present and I have no method to check whether hardware support that, so I
prefer to remove math-tests-trap.h.

> > Several patches will be post to GCC and Binutils to fix some testcase fail
> > later this month, while the follow results have these patches applied.
> 
> Note that glibc ports can't go in while they depend on such non-upstream 
> patches for good results (see the ARC port discussion).  You can send a 
> list of all the patches required to get the given test results, but 
> they'll need to be upstream (as will the Linux kernel port) before the 
> port can go into glibc.
>

I can understand the glibc patch and test-result should base on upstreamed
gcc/binutils/linux. The purpose for this submission is to make sure there
is no big issue in this patchset itself. Once other components are ready
I can test the patch again and resubmit it easily.
I'v got another issue while using build-many-glibcs.py. 
csky-linux-gnuabiv2-gcc can not recognise -profile during the make check
stage and stoped. but it can recognise --profile. Is this a problem will
block the c-sky glibc port goes in.
 
> > 5. The following cases fail due to gcc optimize change the sequence of
> >    -a * b to -(a * b) and got 1ulps error.
> >    math/test-double-tgamma
> >    math/test-float-tgamma
> >    math/test-float32-tgamma
> >    math/test-float32x-tgamma
> >    math/test-float64-tgamma
> >    math/test-ldouble-tgamma
> 
> So that needs a GCC bug fix (just like when the Arm and AArch64 ports of 
> GCC used to have such a bug).
>

We have this bug tracked internally. Also need to report a bug on gcc bugzilla? 

Thanks,
Han Mao

  reply	other threads:[~2018-09-13  8:14 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12  2:56 Mao Han
     [not found] ` <cover.1536720821.git.han_mao@c-sky.com>
2018-09-12  2:56   ` [PATCH v4 02/13] C-SKY: TLS support Mao Han
2018-09-12  2:56   ` [PATCH v4 03/13] C-SKY: Math support Mao Han
2018-09-17 21:49     ` Joseph Myers
2018-09-18  6:05       ` Mao Han
2018-09-12  2:56   ` [PATCH v4 01/13] C-SKY: ABI related code Mao Han
2018-09-12  4:16     ` H.J. Lu
2018-09-12  7:07       ` Mao Han
2018-09-12  8:23         ` Florian Weimer
2018-09-12  9:06           ` Mao Han
2018-09-29  1:46           ` Palmer Dabbelt
2018-09-30  9:04             ` Manuel A. Fernandez Montecelo
2018-10-01  8:18             ` Richard W.M. Jones
2018-09-17 21:46     ` Joseph Myers
2018-09-18  6:09       ` Mao Han
2018-09-12  2:56   ` [PATCH v4 05/13] C-SKY: Linux Syscall Interface Mao Han
2018-09-12  2:57   ` [PATCH v4 09/13] C-SKY: Add dynamic relocations to elf.h Mao Han
2018-09-12  2:57   ` [PATCH v4 11/13] C-SKY: Add ABI definitions in config.h.in Mao Han
2018-09-12  2:57   ` [PATCH v4 12/13] C-SKY: Add build-many-glibcs.py support Mao Han
2018-09-12  2:57   ` [PATCH v4 06/13] C-SKY: Linux ABI Mao Han
2018-09-12 13:40     ` Arnd Bergmann
2018-09-12 14:21       ` Joseph Myers
2018-09-12 15:34         ` Arnd Bergmann
2018-09-12 21:28           ` struct elf_prstatus and Y2038 (was: Re: [PATCH v4 06/13] C-SKY: Linux ABI) Florian Weimer
2018-09-13 10:48             ` Arnd Bergmann
2018-09-13 10:56               ` struct elf_prstatus and Y2038 Florian Weimer
2018-09-13  8:17       ` [PATCH v4 06/13] C-SKY: Linux ABI Mao Han
2018-09-13  8:46         ` Arnd Bergmann
2018-09-13 15:32           ` [gnu-csky] " Joseph Myers
2018-09-13 16:35             ` Joseph Myers
2018-09-13 20:47               ` Arnd Bergmann
2018-09-13 20:59                 ` Joseph Myers
2018-09-13 21:32                   ` Arnd Bergmann
2018-09-13 22:57                     ` Joseph Myers
2018-09-13 20:31             ` Arnd Bergmann
2018-09-13 20:49               ` Joseph Myers
2018-09-13 21:38                 ` Arnd Bergmann
2018-09-12  2:57   ` [PATCH v4 13/13] C-SKY: Skeleton documentation Mao Han
2018-09-12  2:57   ` [PATCH v4 08/13] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
2018-09-12  3:05   ` [PATCH v4 10/13] C-SKY: Build Infastructure Mao Han
2018-09-17 21:52     ` Joseph Myers
2018-09-18  6:02       ` Mao Han
2018-09-12  3:05   ` [PATCH v4 04/13] C-SKY: NPTL support and Atomic Mao Han
2018-09-12  3:05   ` [PATCH v4 07/13] C-SKY: ABI Lists Mao Han
2018-09-12  6:51     ` Andreas Schwab
2018-09-12  7:12       ` Mao Han
2018-09-12 12:35       ` Joseph Myers
2018-09-12 13:46         ` Andreas Schwab
2018-09-12 15:19           ` Joseph Myers
2018-09-13  8:23         ` Mao Han
2018-09-12  3:05 ` [PATCH 1/1] Update config.guess and config.sub to current versions Mao Han
2018-09-12 12:31 ` [PATCH v4 00/13] port C-SKY to glibc Joseph Myers
2018-09-13  8:14   ` Mao Han [this message]
2018-09-13 12:36     ` Joseph Myers
2018-09-18  6:22       ` Mao Han
2018-09-18  7:18         ` Mao Han
2018-09-18 11:43           ` Joseph Myers

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=20180913081354.GA4004@vmh-VirtualBox \
    --to=han_mao@c-sky.com \
    --cc=c-sky_gcc_upstream@c-sky.com \
    --cc=gnu-csky@mentor.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@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).