unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Vineet Gupta <vineet.gupta1@synopsys.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Claudiu Zissulescu <claudiu.zissulescu@synopsys.com>,
	<libc-alpha@sourceware.org>, <linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH 07/21] ARC: math soft float support
Date: Thu, 20 Dec 2018 17:08:06 -0800	[thread overview]
Message-ID: <e59bc8c5-cf0f-9968-cecf-caaf8b6def7a@synopsys.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1812182315580.30183@digraph.polyomino.org.uk>

On 12/18/18 3:23 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
> 
>> +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__)
> 
> Missing spaces before '(' (should have such spaces in most cases between 
> an identifier or keyword and '(' - calls to "defined", calls to functions, 
> calls to macros, __attribute__, etc. - except for a few cases of calls to 
> macros such as ElfW where the result is logically used like an 
> identifier).

OK, I removed the parens in this case (update: removed the guard altogether, see
below).

>> +/* In the soft-float case, only rounding to nearest is supported, with
>> +   no exceptions.  */
> 
> To confirm: hard-float and soft-float are always different ABIs; you don't 
> support hard-float compilation using the soft-float function calling ABI 
> (like is supported for ARM and RISC-V, for example)? 

I'm still ramping up on hard-float, so pardon some of my naivety. It seems the
function calling convention is no different for soft-float vs. hard-float. We have
a single register file (hard FP instructions inherently use an additional
accumulator but that isn't really passed around so doesn't affect calling
convention). Other than that SP values go normally in a reg, DP go in reg pair
just as any 64bit value.

OTOH, the ARC libgcc float emulation code seems likely to be limited in terms of
rounding modes supported etc (the current code is dense math implemented in ARC
assembly (really not my cup of coffee) so I couldn't be sure :-(

At any rate, assuming it did limit the rounding modes etc, does that also lend
into the ABI we are talking about here ? Likely not.


> (If you support 
> hard-float compilation with the soft-float ABI, it would be problematic to 
> have different FE_TONEAREST values in the two cases - ARM and RISC-V both 
> define all the FE_* macros independently of whether hard or soft float is 
> used, because they support that case.)

I'd much rather have them be the same. The fenv.h I started with didn't
distinguish these (well it only had 1 rounding mode: FE_TONEAREST so was bogus at
best). When I revered it up, I added the various modes etc w/o the header guard
and ho behold all the math tests started failing. My knee jerk response was to
segregate them which likely papered over the issue.


>> diff --git a/sysdeps/arc/math_private.h b/sysdeps/arc/math_private.h
> 
> This file should not be needed now.

Ok deleted.


>> diff --git a/sysdeps/arc/nofpu/math-tests-exception.h b/sysdeps/arc/nofpu/math-tests-exception.h
> 
> This file does nothing (the name is wrong, the name actually used is 
> math-tests-exceptions.h).  And it should not be needed unless you support 
> hard-float compilation with the soft-float ABI (and thus define all the 
> FE_* names in bits/fenv.h even for soft-float).

File renamed and retained.

>> diff --git a/sysdeps/arc/nofpu/math-tests-rounding.h b/sysdeps/arc/nofpu/math-tests-rounding.h
> 
> Again, not needed unless hard-float compilation with the soft-float ABI is 
> supported and bits/fenv.h has corresponding contents.

ditto !

Now trying a rebuilt with these changes !

  parent reply	other threads:[~2018-12-21  1:08 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 21:04 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
2018-12-18 21:04 ` [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints Vineet Gupta
2018-12-18 22:56   ` Joseph Myers
2018-12-18 23:11     ` Vineet Gupta
2018-12-21 18:46   ` Joseph Myers
2018-12-21 19:07     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 02/21] ARC: add definitions to elf/elf.h Vineet Gupta
2018-12-18 21:04 ` [PATCH 03/21] ARC: ABI Implementation Vineet Gupta
2018-12-18 23:09   ` Joseph Myers
2018-12-19  2:00     ` Vineet Gupta
2018-12-19 17:40       ` Joseph Myers
2018-12-19 20:20         ` Vineet Gupta
2018-12-19 20:37           ` Joseph Myers
2019-01-28 23:03     ` ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation) Vineet Gupta
2019-01-28 23:13       ` Joseph Myers
2019-01-28 23:42         ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 04/21] ARC: startup and dynamic linking code Vineet Gupta
2018-12-18 23:24   ` Joseph Myers
2018-12-19  0:52     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 05/21] ARC: Thread Local Storage support Vineet Gupta
2018-12-18 21:04 ` [PATCH 06/21] ARC: Atomics and Locking primitives Vineet Gupta
2018-12-18 23:15   ` Joseph Myers
2019-01-15  0:40     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 07/21] ARC: math soft float support Vineet Gupta
2018-12-18 23:23   ` Joseph Myers
2018-12-19  0:01     ` Joseph Myers
2018-12-20 21:35       ` Vineet Gupta
2018-12-21  1:08     ` Vineet Gupta [this message]
2018-12-21  1:19       ` Joseph Myers
2018-12-18 21:04 ` [PATCH 08/21] ARC: Linux Syscall Interface Vineet Gupta
2018-12-18 23:30   ` Joseph Myers
2018-12-19  2:39     ` Vineet Gupta
2018-12-19 17:58       ` ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface) Vineet Gupta
2018-12-19 18:07         ` Joseph Myers
2018-12-19 22:00         ` Adhemerval Zanella
2018-12-19 22:23           ` Vineet Gupta
2018-12-20 11:19             ` Adhemerval Zanella
2018-12-20 12:06               ` Arnd Bergmann
2018-12-20 19:25                 ` Vineet Gupta
2018-12-20 12:40               ` Florian Weimer
2018-12-20 18:48                 ` Vineet Gupta
2019-01-03 13:10                   ` Florian Weimer
2018-12-20 19:23               ` Vineet Gupta
2018-12-20 20:06                 ` Adhemerval Zanella
2018-12-20 20:46                   ` Vineet Gupta
2018-12-21 12:05                     ` Adhemerval Zanella
2019-01-09 21:49                       ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 09/21] ARC: Linux ABI Vineet Gupta
2018-12-18 23:38   ` Joseph Myers
2018-12-19 19:57     ` Vineet Gupta
2018-12-19 20:36       ` Joseph Myers
2018-12-21 23:06         ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 10/21] ARC: Linux Startup and Dynamic Loading Vineet Gupta
2018-12-18 23:49   ` Joseph Myers
2018-12-19 20:26     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 11/21] ARC: ABI lists Vineet Gupta
2018-12-18 22:31   ` Andreas Schwab
2018-12-18 22:32     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
2018-12-18 21:26   ` Florian Weimer
2018-12-18 21:29     ` Vineet Gupta
2018-12-19  8:16       ` Florian Weimer
2018-12-18 21:04 ` [PATCH 13/21] ARC: Build Infrastructure Vineet Gupta
2018-12-18 23:44   ` Joseph Myers
2018-12-19 21:58     ` Vineet Gupta
2018-12-19 22:17       ` Joseph Myers
2018-12-20 23:21         ` Vineet Gupta
2018-12-20 23:24           ` Joseph Myers
2019-01-29 23:36             ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start Vineet Gupta
2018-12-18 21:28   ` Florian Weimer
2018-12-18 21:31     ` Vineet Gupta
2018-12-18 22:59       ` Joseph Myers
2018-12-18 23:08         ` Vineet Gupta
2018-12-19 20:36     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 15/21] ARC: testsuite fix: elf/check-initfini Vineet Gupta
2018-12-18 21:04 ` [PATCH 16/21] ARC: testsuite fix: sysvipc/* Vineet Gupta
2018-12-19 22:10   ` Adhemerval Zanella
2018-12-18 21:04 ` [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext Vineet Gupta
2018-12-18 22:36   ` Andreas Schwab
2019-01-21 22:32     ` Vineet Gupta
2018-12-18 21:04 ` [PATCH 18/21] ARC: testsuite fix: GD TLS issue Vineet Gupta
2018-12-18 21:04 ` [PATCH 19/21] ARC: fix several unwining and cancelation tests Vineet Gupta
2018-12-18 21:04 ` [PATCH 20/21] build-many-glibcs.py: Enable ARC builds Vineet Gupta
2018-12-18 21:04 ` [PATCH 21/21] NEWS: mention ARC port Vineet Gupta
2018-12-18 23:45   ` Joseph Myers
2018-12-19 18:30     ` Vineet Gupta
2018-12-18 22:52 ` [PATCH 00/21] glibc port to ARC processors Joseph Myers
2018-12-18 23:07   ` Vineet Gupta
2018-12-18 23:52     ` Joseph Myers
2018-12-21  1:55       ` Vineet Gupta
2018-12-21 14:32         ` Joseph Myers
2018-12-21 17:36           ` Vineet Gupta
2018-12-18 23:11 ` Joseph Myers
2018-12-19 23:45   ` Vineet Gupta
2018-12-20  0:14     ` Joseph Myers
2018-12-20  0:51       ` Vineet Gupta
2018-12-20 21:22 ` test related questions (was Re: [PATCH 00/21] glibc port to ARC processors) Vineet Gupta
2018-12-20 21:59   ` 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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=e59bc8c5-cf0f-9968-cecf-caaf8b6def7a@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=claudiu.zissulescu@synopsys.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-snps-arc@lists.infradead.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).