src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp Thu Sep 11 23:19:45 2014
--- new/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp Thu Sep 11 23:19:45 2014
*** 66,75 ****
--- 66,77 ----
#endif // _LP64
extern "C" {
jint _Atomic_add(jint add_value, volatile jint* dest IS_MP_DECL());
jint _Atomic_xchg(jint exchange_value, volatile jint* dest);
+ jbyte _Atomic_cmpxchg_byte(jbyte exchange_value, volatile jbyte* dest,
+ jbyte compare_value IS_MP_DECL());
jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest,
jint compare_value IS_MP_DECL());
jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest,
jlong compare_value IS_MP_DECL());
}
*** 80,89 ****
--- 82,95 ----
inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) {
return _Atomic_xchg(exchange_value, dest);
}
+ inline jbyte Atomic::cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value) {
+ return _Atomic_cmpxchg_byte(exchange_value, dest, compare_value IS_MP_ARG());
+ }
+
inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value) {
return _Atomic_cmpxchg(exchange_value, dest, compare_value IS_MP_ARG());
}
inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value) {
*** 215,224 ****
--- 221,239 ----
: "r" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp)
: "cc", "memory");
return exchange_value;
}
+
+ inline jbyte _Atomic_cmpxchg_byte(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, int 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;
+ }
+
// This is the interface to the atomic instruction in solaris_i486.s.
jlong _Atomic_cmpxchg_long_gcc(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp);
inline jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp) {
#ifdef AMD64
src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File