Skip to content

Commit 18694a5

Browse files
committed
Fix write barrier slow path condition
fop working with c1 and interpreter
1 parent 6644d31 commit 18694a5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

openjdk/cpu/riscv/mmtkObjectBarrierSetAssembler_riscv.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ void MMTkObjectBarrierSetAssembler::object_reference_write_post(MacroAssembler*
6262
// tmp1 = tmp1 >> tmp2
6363
__ sraw(tmp1, tmp1, tmp2);
6464
// if ((tmp1 & 1) == 1) fall through to slowpath;
65+
// equivalently ((tmp1 & 1) == 0) go to done
6566
__ andi(tmp1, tmp1, 1);
66-
__ bnez(tmp1, done); // (tmp1 & 1) == 1 is equivalent to (tmp1 & 1) != 0
67+
__ beqz(tmp1, done);
6768
// setup calling convention
6869
__ mv(c_rarg0, obj);
6970
__ la(c_rarg1, dst);

openjdk/share/mmtkBarrierSet.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include CPU_HEADER(mmtkBarrierSetAssembler)
3939

4040
#define MMTK_ENABLE_ALLOCATION_FASTPATH true
41-
#define MMTK_ENABLE_BARRIER_FASTPATH false
41+
#define MMTK_ENABLE_BARRIER_FASTPATH true
4242

4343
const intptr_t ALLOC_BIT_BASE_ADDRESS = GLOBAL_ALLOC_BIT_ADDRESS;
4444

0 commit comments

Comments
 (0)