public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Schlie <schlie@comcast.net>
To: Robert Dewar <dewar@gnat.com>
Cc: <gcc@gcc.gnu.org>
Subject: Re: INT_MIN % -1
Date: Wed, 01 Dec 2004 03:22:00 -0000	[thread overview]
Message-ID: <BDD2A300.819B%schlie@comcast.net> (raw)
In-Reply-To: <41AD12C6.4010402@gnat.com>

> From: Robert Dewar <dewar@gnat.com>
> 
> Paul Schlie wrote:
>> With reference to the below:
>> 
>> I would guess that rather than attempting to expose a check for a / or % by
>> -1 to the compiler, I would assume that it's best handled by the back end
>> during code generations, as the most efficient solution is target specific:
> 
> Indeed, but remember we would need to have both operations, one with the
> special handling and one without.

Understood, as ADA programs may bound the domain of it's variables
guaranteeing that the operation would be well behaved within the bounds of
it's operands; but wonder if saving a few cycles out of the likely several
required for a divide or modulo operation would likely be worth the added,
albeit minor, complexity?



  reply	other threads:[~2004-12-01  3:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-30  4:25 Paul Schlie
2004-11-30  7:02 ` Robert Dewar
2004-11-30 22:47   ` Paul Schlie
2004-12-01  0:39     ` Robert Dewar
2004-12-01  3:22       ` Paul Schlie [this message]
2004-12-01 11:40         ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2004-11-29 23:38 Morten Welinder
2004-11-30  0:24 ` David Daney
2004-11-30  0:45 ` Andreas Schwab

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=BDD2A300.819B%schlie@comcast.net \
    --to=schlie@comcast.net \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.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).