Skip to content

Commit 2fcf270

Browse files
committed
Revert "Workaround the C2 bug in codegen"
This reverts commit 6086363.
1 parent 47990cf commit 2fcf270

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

openjdk/share/barriers/mmtkObjectBarrier.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,13 @@ void MMTkObjectBarrierSetC2::object_reference_write_post(GraphKit* kit, Node* sr
132132
shift = __ AndI(__ ConvL2I(shift), __ ConI(7));
133133
Node* result = __ AndI(__ URShiftI(byte, shift), __ ConI(1));
134134

135-
// XXX zixianc
136-
// Workaround C2 bug in compare-and-swap codegen on RISC-V
137135
__ if_then(result, BoolTest::ne, zero, unlikely); {
138-
const TypeFunc* tf = __ func_type(src->bottom_type());
139-
Node* x = __ make_leaf_call(tf, FN_ADDR(MMTkBarrierSetRuntime::object_reference_write_slow_call), "mmtk_barrier_call", src);
136+
const TypeFunc* tf = __ func_type(TypeOopPtr::BOTTOM, TypeOopPtr::BOTTOM, TypeOopPtr::BOTTOM);
137+
Node* x = __ make_leaf_call(tf, FN_ADDR(MMTkBarrierSetRuntime::object_reference_write_slow_call), "mmtk_barrier_call", src, slot, val);
140138
} __ end_if();
141139
#else
142-
const TypeFunc* tf = __ func_type(src->bottom_type());
143-
Node* x = __ make_leaf_call(tf, FN_ADDR(MMTkBarrierSetRuntime::object_reference_write_post_call), "mmtk_barrier_call", src);
140+
const TypeFunc* tf = __ func_type(TypeOopPtr::BOTTOM, TypeOopPtr::BOTTOM, TypeOopPtr::BOTTOM);
141+
Node* x = __ make_leaf_call(tf, FN_ADDR(MMTkBarrierSetRuntime::object_reference_write_post_call), "mmtk_barrier_call", src, slot, val);
144142
#endif
145143

146144
kit->final_sync(ideal); // Final sync IdealKit and GraphKit.

0 commit comments

Comments
 (0)