--- old/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp 2014-09-11 23:19:44.000000000 +0200 +++ new/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp 2014-09-11 23:19:44.000000000 +0200 @@ -88,6 +88,14 @@ return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest); } +inline jbyte Atomic::cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value) { + int mp = os::is_MP(); + __asm__ volatile (LOCK_IF_MP(%4) "cmpxchgb %1,(%3)" + : "=a" (exchange_value) + : "q" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp) + : "cc", "memory"); + return exchange_value; +} inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value) { int mp = os::is_MP();