[Bug c++/12590] New: inline asm impossible constraint in `asm'
giffordj at linkline dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 12 18:03:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12590
Summary: inline asm impossible constraint in `asm'
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: giffordj at linkline dot com
CC: gcc-bugs at gcc dot gnu dot org
Compiles fine with no -O, but gives impossible constraint in `asm' when
compiled with -O2 or -O3.
Code
inline jlong atomic::compare_and_exchange_long(jlong exchange_value, jlong*
dest, jlong compare_value) {
jlong old_value;
__asm__ volatile ( "pushl %%ebx;mov 4+%1,%%ecx;mov
%1,%%ebx;lock;cmpxchg8b (%3);popl %%ebx"
: "=A" (old_value)
: "o" (exchange_value), "A" (compare_value), "r" (dest)
: "%ebx", "%ecx", "memory");
return old_value;
}
More information about the Gcc-bugs
mailing list