This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/13413] need "o" inline asm constraint
- From: "melkov at comptek dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2003 21:35:56 -0000
- Subject: [Bug target/13413] need "o" inline asm constraint
- References: <20031216171349.13413.melkov@comptek.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From melkov at comptek dot ru 2003-12-19 21:35 -------
(In reply to comment #1)
> So this is what you want:
> int f(int *i){int t; asm("a %1":"=r"(t):"o"(*i)); return t;}
> 0(%eax) and not (%eax) which it currently is now, right?
Yes, that's right.
But that's not enough. Nowadays gcc doesn't like "o" at all, it says: "error:
impossible constraint in `asm'".
/usr/local/egcs-3/bin/c++ -O -Wall mo.cpp
mo.cpp: In function `int main(int, char**)':
mo.cpp:3: error: impossible constraint in `asm'
==> mo.cpp <==
int main(int argc, char *[]) {
long long A = argc;
asm volatile(
""
: "=o" (A)
:
: "cc"
);
return A;
}
With "m", it compiles fine. (note -O switch)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13413