4045 mov(rscratch1, matrix->stride_jint()); 4046 // Address is _matrix[to * stride + from] 4047 madd(tmp, tmp, rscratch1, tmp2); 4048 mov(rscratch1, matrix->magic_offset()); 4049 Address loc(tmp, rscratch1); 4050 4051 ldrb(tmp2, loc); 4052 cbnz(tmp2, done); 4053 mov(tmp2, 1); 4054 strb(tmp2, loc); 4055 bind(done); 4056 } 4057 4058 void MacroAssembler::keep_alive_barrier(Register val, 4059 Register thread, 4060 Register tmp) { 4061 4062 if (UseG1GC) { 4063 // Generate the G1 pre-barrier code to log the value of 4064 // the referent field in an SATB buffer. 4065 enter(); // g1_write may call runtime 4066 g1_write_barrier_pre(noreg, 4067 val /* pre_val */, 4068 thread /* thread */, 4069 tmp, 4070 true /* tosca_live */, 4071 true /* expand_call */); 4072 leave(); 4073 } else if (UseShenandoahGC && ShenandoahKeepAliveBarrier) { 4074 shenandoah_write_barrier_pre(noreg, 4075 val /* pre_val */, 4076 thread /* thread */, 4077 tmp, 4078 true /* tosca_live */, 4079 true /* expand_call */); 4080 } 4081 } 4082 4083 void MacroAssembler::shenandoah_write_barrier(Register dst) { 4084 assert(UseShenandoahGC && (ShenandoahWriteBarrier || ShenandoahStoreValWriteBarrier), "Should be enabled"); 4085 assert(dst != rscratch1, "need rscratch1"); 4086 assert(dst != rscratch2, "need rscratch2"); 4087 4088 Label done; 4089 4090 // Check for evacuation-in-progress 4091 Address evacuation_in_progress = Address(rthread, in_bytes(JavaThread::evacuation_in_progress_offset())); 4092 ldrb(rscratch1, evacuation_in_progress); | 4045 mov(rscratch1, matrix->stride_jint()); 4046 // Address is _matrix[to * stride + from] 4047 madd(tmp, tmp, rscratch1, tmp2); 4048 mov(rscratch1, matrix->magic_offset()); 4049 Address loc(tmp, rscratch1); 4050 4051 ldrb(tmp2, loc); 4052 cbnz(tmp2, done); 4053 mov(tmp2, 1); 4054 strb(tmp2, loc); 4055 bind(done); 4056 } 4057 4058 void MacroAssembler::keep_alive_barrier(Register val, 4059 Register thread, 4060 Register tmp) { 4061 4062 if (UseG1GC) { 4063 // Generate the G1 pre-barrier code to log the value of 4064 // the referent field in an SATB buffer. 4065 g1_write_barrier_pre(noreg, 4066 val /* pre_val */, 4067 thread /* thread */, 4068 tmp, 4069 true /* tosca_live */, 4070 true /* expand_call */); 4071 } else if (UseShenandoahGC && ShenandoahKeepAliveBarrier) { 4072 shenandoah_write_barrier_pre(noreg, 4073 val /* pre_val */, 4074 thread /* thread */, 4075 tmp, 4076 true /* tosca_live */, 4077 true /* expand_call */); 4078 } 4079 } 4080 4081 void MacroAssembler::shenandoah_write_barrier(Register dst) { 4082 assert(UseShenandoahGC && (ShenandoahWriteBarrier || ShenandoahStoreValWriteBarrier), "Should be enabled"); 4083 assert(dst != rscratch1, "need rscratch1"); 4084 assert(dst != rscratch2, "need rscratch2"); 4085 4086 Label done; 4087 4088 // Check for evacuation-in-progress 4089 Address evacuation_in_progress = Address(rthread, in_bytes(JavaThread::evacuation_in_progress_offset())); 4090 ldrb(rscratch1, evacuation_in_progress); |