public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "melkov at comptek dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/13413] New: need "o" inline asm constraint
Date: Tue, 16 Dec 2003 17:17:00 -0000	[thread overview]
Message-ID: <20031216171349.13413.melkov@comptek.ru> (raw)

I think that having no "o" constraint is asm for i386 target is unfair, because 
in effect all the "m" values are actually offsetable.
For example, when I write:
movl 4+%5, %2
- I always get correct code.
The only problem here is that I get gas warning each time %5 happens to be a 
base register without an offset, i.e. something like (%ebx) turns the above 
line into
movl 4+(%ebx), %eax

If there was "o" constraing that behaves like "m" in most cases but prints zero 
in case of zero offset, some people like me would be happy.

What I want, once again:
%5 == (%ebx)
"m" prints (%ebx)
"o" prints 0(%ebx)
-> quite correct movl 4+0(%ebx), %eax in "o" case.

%5 == 12(%ebx)
both "m" and "o" print (%ebx)
-> still correct movl 4+12(%ebx), %eax code.

I hope that's easy to do. Thanks in advance :)

-- 
           Summary: need "o" inline asm constraint
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: melkov at comptek dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-freebsd-gnu
  GCC host triplet: i686-freebsd-gnu
GCC target triplet: i686-freebsd-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13413


             reply	other threads:[~2003-12-16 17:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-16 17:17 melkov at comptek dot ru [this message]
2003-12-16 17:50 ` [Bug inline-asm/13413] " bangerth at dealii dot org
2003-12-16 20:07 ` [Bug target/13413] " pinskia at gcc dot gnu dot org
2003-12-19  8:06 ` pinskia at gcc dot gnu dot org
2003-12-20  0:45 ` melkov at comptek dot ru

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=20031216171349.13413.melkov@comptek.ru \
    --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).