Mon, 17 Oct 2016 23:04:01 -0400
Implement Atomic::store(integer-value, *dest) for 3A2000.
src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp Mon Oct 17 09:09:02 2016 -0400 1.2 +++ b/src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp Mon Oct 17 23:04:01 2016 -0400 1.3 @@ -37,7 +37,14 @@ 1.4 ///////////implementation of Atomic::store*////////////// 1.5 inline void Atomic::store (jbyte store_value, jbyte* dest) { *dest = store_value; } 1.6 inline void Atomic::store (jshort store_value, jshort* dest) { *dest = store_value;} 1.7 -inline void Atomic::store (jint store_value, jint* dest) { *dest = store_value; } 1.8 +inline void Atomic::store (jint store_value, jint* dest) { 1.9 + if (Use3A2000) { 1.10 + Atomic::xchg(store_value, (volatile jint*)dest); 1.11 + } else { 1.12 + *dest = store_value; 1.13 + } 1.14 +} 1.15 + 1.16 //no need to consider the unaligned double word load 1.17 inline void Atomic::store (jlong store_value, jlong* dest) { *dest = store_value; } 1.18 inline void Atomic::store_ptr (intptr_t store_value, intptr_t* dest) { *dest = store_value; } 1.19 @@ -45,7 +52,14 @@ 1.20 1.21 inline void Atomic::store (jbyte store_value, volatile jbyte* dest) { *dest = store_value; } 1.22 inline void Atomic::store (jshort store_value, volatile jshort* dest) { *dest = store_value; } 1.23 -inline void Atomic::store (jint store_value, volatile jint* dest) { *dest = store_value; } 1.24 +inline void Atomic::store (jint store_value, volatile jint* dest) { 1.25 + if (Use3A2000) { 1.26 + Atomic::xchg(store_value, dest); 1.27 + } else { 1.28 + *dest = store_value; 1.29 + } 1.30 +} 1.31 + 1.32 //no need to consider the unaligned double word load 1.33 inline void Atomic::store (jlong store_value, volatile jlong* dest) { *dest = store_value; } 1.34 inline void Atomic::store_ptr (intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; }