Inline ASM Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any suggestions out there.
errors as constraint error in 'asm'

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;
}


----
Jim Gifford

jim@xxxxxxxxx
giffordj@xxxxxxxxxxxx


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux