< prev index next >
src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
Print this page
*** 37,46 ****
--- 37,50 ----
#include "ci/ciTypeArrayKlass.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "vmreg_aarch64.inline.hpp"
+ #if INCLUDE_ALL_GCS
+ #include "gc_implementation/shenandoah/c1/shenandoahBarrierSetC1.hpp"
+ #endif
+
#ifdef ASSERT
#define __ gen()->lir(__FILE__, __LINE__)->
#else
#define __ gen()->lir()->
#endif
*** 828,850 ****
}
LIR_Opr result = rlock_result(x);
LIR_Opr ill = LIR_OprFact::illegalOpr; // for convenience
! if (type == objectType)
__ cas_obj(addr, cmp.result(), val.result(), new_register(T_INT), new_register(T_INT),
result);
! else if (type == intType)
! __ cas_int(addr, cmp.result(), val.result(), ill, ill);
else if (type == longType)
! __ cas_long(addr, cmp.result(), val.result(), ill, ill);
else {
ShouldNotReachHere();
}
- __ logical_xor(FrameMap::r8_opr, LIR_OprFact::intConst(1), result);
-
if (type == objectType) { // Write-barrier needed for Object fields.
// Seems to be precise
post_barrier(addr, val.result());
}
}
--- 832,853 ----
}
LIR_Opr result = rlock_result(x);
LIR_Opr ill = LIR_OprFact::illegalOpr; // for convenience
!
! if (type == objectType) {
__ cas_obj(addr, cmp.result(), val.result(), new_register(T_INT), new_register(T_INT),
result);
! } else if (type == intType)
! __ cas_int(addr, cmp.result(), val.result(), ill, ill, result);
else if (type == longType)
! __ cas_long(addr, cmp.result(), val.result(), ill, ill, result);
else {
ShouldNotReachHere();
}
if (type == objectType) { // Write-barrier needed for Object fields.
// Seems to be precise
post_barrier(addr, val.result());
}
}
*** 1435,1444 ****
--- 1438,1453 ----
__ add(src.result(), off.result(), ptr);
pre_barrier(ptr, LIR_OprFact::illegalOpr /* pre_val */,
true /* do_load */, false /* patch */, NULL);
}
__ xchg(LIR_OprFact::address(addr), data, dst, tmp);
+ #if INCLUDE_ALL_GCS
+ if (UseShenandoahGC && is_obj) {
+ LIR_Opr tmp = ShenandoahBarrierSet::barrier_set()->bsc1()->load_reference_barrier(this, dst, LIR_OprFact::addressConst(0));
+ __ move(tmp, dst);
+ }
+ #endif
if (is_obj) {
post_barrier(ptr, data);
}
}
}
< prev index next >