8199511: Do not generate g1_{pre|post}_barrier_slow_id without CardTable-enabled barrier set
Reviewed-by: rkennke, kvn, pliden, stefank
--- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp Tue Mar 13 15:29:55 2018 -0700
+++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp Wed Mar 14 10:38:02 2018 +0100
@@ -1162,6 +1162,14 @@
{
StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
+ BarrierSet* bs = Universe::heap()->barrier_set();
+ if (bs->kind() != BarrierSet::G1BarrierSet) {
+ __ mov(r0, (int)id);
+ __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0);
+ __ should_not_reach_here();
+ break;
+ }
+
// arg0: store_address
Address store_addr(rfp, 2*BytesPerWord);
--- a/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp Tue Mar 13 15:29:55 2018 -0700
+++ b/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp Wed Mar 14 10:38:02 2018 +0100
@@ -540,6 +540,14 @@
__ set_info("g1_pre_barrier_slow_id", dont_gc_arguments);
+ BarrierSet* bs = Universe::heap()->barrier_set();
+ if (bs->kind() != BarrierSet::G1BarrierSet) {
+ __ mov(R0, (int)id);
+ __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), R0);
+ __ should_not_reach_here();
+ break;
+ }
+
// save at least the registers that need saving if the runtime is called
#ifdef AARCH64
__ raw_push(R0, R1);
@@ -612,6 +620,14 @@
__ set_info("g1_post_barrier_slow_id", dont_gc_arguments);
+ BarrierSet* bs = Universe::heap()->barrier_set();
+ if (bs->kind() != BarrierSet::G1BarrierSet) {
+ __ mov(R0, (int)id);
+ __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), R0);
+ __ should_not_reach_here();
+ break;
+ }
+
Label done;
Label recheck;
Label runtime;
--- a/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp Tue Mar 13 15:29:55 2018 -0700
+++ b/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp Wed Mar 14 10:38:02 2018 +0100
@@ -1632,6 +1632,13 @@
{
StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
+ BarrierSet* bs = Universe::heap()->barrier_set();
+ if (bs->kind() != BarrierSet::G1BarrierSet) {
+ __ movptr(rax, (int)id);
+ __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
+ __ should_not_reach_here();
+ break;
+ }
// arg0: store_address
Address store_addr(rbp, 2*BytesPerWord);