This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13413] New: need "o" inline asm constraint


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]