public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
	 Andrew Pinski <pinskia@gmail.com>
Cc: Ramana Radhakrishnan <ramana.radhakrishnan@foss.arm.com>,
	 "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>
Subject: Re: [Patch AArch64] Add cpu_defines.h for AArch64.
Date: Thu, 21 May 2015 11:10:00 -0000	[thread overview]
Message-ID: <555DB561.50004@arm.com> (raw)
In-Reply-To: <CAJA7tRZujirL9zXbWEuKKfXub-ZTYijWxqnWQtpfOK263YQX5A@mail.gmail.com>

On 19/05/15 17:03, Ramana Radhakrishnan wrote:
> On Tue, May 19, 2015 at 4:54 PM,  <pinskia@gmail.com> wrote:
>>> On May 19, 2015, at 5:54 AM, Ramana Radhakrishnan <ramana.radhakrishnan@foss.arm.com> wrote:
>>> Like the ARM port, the AArch64 ports needs to set glibc_integral_traps to false as integer divide instructions do not trap.
>>>
>>> Bootstrapped and regression tested on aarch64-none-linux-gnu
>>>
>>> Ok to apply ?
>>
>> Not really questioning your patch but questioning libstdc++'s defaults.
>>  I wonder if this should be the default as most targets don't trap, only a few that does. And it should be safer default to say they don't trap too?
> 
> How about we  #error out if targets do *not* define some of these
> defaults in libstdc++  ?

__glibcxx_integral_traps seems to be used for the 'traps'
numeric_limits<T> member.

i think it can only be meaningful if LIA-1 is properly supported
(eg. div-by-zero is never optimized away) otherwise the standard
dictates UB and anything can happen. (Note that LIA-1 also requires
well-defined semantics for signed int overflow).

i don't see a way for conforming c++ code to use traps, or for
the library to guarantee either traps==true or traps==false on
any machine.

      reply	other threads:[~2015-05-21 10:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 13:04 Ramana Radhakrishnan
2015-05-19 16:00 ` pinskia
2015-05-19 16:12   ` Ramana Radhakrishnan
2015-05-21 11:10     ` Szabolcs Nagy [this message]

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=555DB561.50004@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=Ramana.Radhakrishnan@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=pinskia@gmail.com \
    --cc=ramana.radhakrishnan@foss.arm.com \
    /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).