public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "scovich 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, 02 Jun 2014 11:29:00 -0000	[thread overview]
Message-ID: <bug-49611-4-QIqybnwVzc@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 #9 from Ryan Johnson <scovich at gmail dot com> ---
(In reply to Andi Kleen from comment #7)
> You can do many of these things these days with asm goto, however it
> typically requires non-structured control flow (goto labels).
I filed this bug after determining that asm goto was unsuitable for this
purpose.

Goto labels are not a problem per se (actually kind of slick), but asm goto
requires all outputs to pass through memory and so is only good for control
flow (not computation plus exceptional case). It also requires the actual
branching and all attendant glue to happen in assembly. Both limitations
increase bulk and hamper the optimizer, and go against (what I thought was) the
intention that inline asm normally be used for very small snippets of code the
compiler can't handle. At some point you may as well just setcc and do a new
comparison/branch outside the asm block; less bug-prone and would probably
yield faster and cleaner code, too.


  parent reply	other threads:[~2014-06-02 11:29 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 [this message]
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

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-QIqybnwVzc@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).