public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "raeburn at raeburn dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/30315] optimize unsigned-add overflow test on x86 to use cpu flags from addl
Date: Wed, 06 Jun 2007 14:51:00 -0000 [thread overview]
Message-ID: <20070606145106.26303.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30315-11337@http.gcc.gnu.org/bugzilla/>
------- Comment #6 from raeburn at raeburn dot org 2007-06-06 14:51 -------
Subject: Re: optimize unsigned-add overflow test on x86 to use cpu flags from
addl
On Jun 6, 2007, at 04:15, ubizjak at gmail dot com wrote:
> in config/i386/i386-modes.def, documentation says:
>
> Add CCGOC to indicate comparisons against zero that allows
> unspecified garbage in the Carry and Overflow flag. This
> mode is used to simulate comparisons of (a-b) and (a+b)
> against zero using sub/cmp/add operations.
>
> addl operates in CCGOCmode, but you are requesting GTU conditional
> jump that
> requires Carry flag=0 and Zero flag=0. GTU is incompatible with
> CCGOCmode due
> to Carry flag handling.
Actually, I think the test I want is just for the carry flag, which
can be done with one branch instruction using the flags set by addl.
If gcc's description of addl doesn't support that, well, then that's
what I'm requesting be enhanced. :-)
Rask's approach looks interesting, though I wouldn't want to have to
rewrite simple, portable tests for unsigned overflow to use wider
types, especially if I'm adding unsigned long long values, where I
don't have portable wider types.
Ken
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30315
next prev parent reply other threads:[~2007-06-06 14:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-28 7:09 [Bug target/30315] New: " raeburn at raeburn dot org
2007-06-06 3:39 ` [Bug target/30315] " scovich at gmail dot com
2007-06-06 8:16 ` ubizjak at gmail dot com
2007-06-06 9:10 ` Andrew Pinski
2007-06-06 9:10 ` pinskia at gmail dot com
2007-06-06 10:33 ` rask at sygehus dot dk
2007-06-06 13:00 ` ubizjak at gmail dot com
2007-06-06 14:51 ` raeburn at raeburn dot org [this message]
2007-06-13 13:37 ` rask at sygehus dot dk
2007-08-03 19:40 ` patchapp at dberlin dot org
2007-08-04 13:10 ` patchapp at dberlin dot org
2007-08-14 14:39 ` rask at gcc dot gnu dot org
2007-08-18 17:56 ` raeburn at raeburn dot org
2007-08-19 13:01 ` rask at gcc dot gnu dot org
2007-08-19 18:04 ` ubizjak at gmail dot com
2007-08-30 19:45 ` patchapp at dberlin dot org
2007-09-09 19:22 ` rask at gcc dot gnu dot org
2007-11-10 1:32 ` rask at gcc dot gnu dot org
2009-01-02 19:30 ` pinskia at gcc dot gnu dot org
2009-11-12 17:29 ` jparmele at wildbear dot com
2009-11-16 19:05 ` ubizjak at gmail dot com
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=20070606145106.26303.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).