public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc.hall at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug inline-asm/49611] Inline asm should support input/output of flags
Date: Mon, 20 Jul 2015 09:20:00 -0000 [thread overview]
Message-ID: <bug-49611-4-Y1A4IttyHR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49611-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611
--- Comment #17 from Jeremy <gcc.hall at gmail dot com> ---
Did you mean "stc" rather than "setc" ???
But yes, it looks like its working well.
On 20 July 2015 at 10:05, gccbugzilla at limegreensocks dot com <
gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611
>
> --- Comment #16 from David <gccbugzilla at limegreensocks dot com> ---
> I've tried it now and it seems to do good things. This code:
>
> int main(int argc, char *argv[])
> {
> char x;
>
> asm("setc" : "=@ccc"(x));
>
> if (!x)
> return 6;
> else
> return argc;
> }
>
> produces this output (-O3):
>
> movl $6, %eax
> /APP
> # 6 "./r.cpp" 1
> setc
> # 0 "" 2
> /NO_APP
> cmovc %ebx, %eax
> addq $32, %rsp
> popq %rbx
> ret
>
> Although a minor variation (change "return argc" to "return 7") ends up
> doing
> setc+cmpb, so it's not a perfect solution.
>
> Still, if I were Richard, I'd be closing this bug. If someone has
> optimization
> issues with his solution, that's a new bug.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
prev parent reply other threads:[~2015-07-20 9:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-02 0:02 [Bug inline-asm/49611] New: " scovich at gmail dot com
2011-07-02 12:37 ` [Bug inline-asm/49611] " rguenth at gcc dot gnu.org
2011-07-04 20:32 ` scovich at gmail dot com
2012-04-12 16:39 ` scovich at gmail dot com
2012-06-28 16:06 ` jbemmel at zonnet dot nl
2014-05-30 11:38 ` gcc.hall at gmail dot com
2014-06-01 23:45 ` andi-gcc at firstfloor dot org
2014-06-02 11:29 ` scovich at gmail dot com
2015-07-17 5:21 ` gccbugzilla at limegreensocks dot com
2015-07-17 5:41 ` gccbugzilla at limegreensocks dot com
2015-07-17 7:33 ` gcc.hall at gmail dot com
2015-07-17 10:58 ` pinskia at gcc dot gnu.org
2015-07-17 21:24 ` gccbugzilla at limegreensocks dot com
2015-07-19 18:02 ` gcc.hall at gmail dot com
2015-07-20 9:05 ` gccbugzilla at limegreensocks dot com
2015-07-20 9:20 ` gcc.hall at gmail dot com [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=bug-49611-4-Y1A4IttyHR@http.gcc.gnu.org/bugzilla/ \
--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).