1.1 --- a/src/cpu/mips/vm/templateTable_mips_64.cpp Mon Oct 23 17:07:19 2017 +0800 1.2 +++ b/src/cpu/mips/vm/templateTable_mips_64.cpp Tue Oct 24 14:04:09 2017 +0800 1.3 @@ -101,6 +101,85 @@ 1.4 return Address(BCP, offset); 1.5 } 1.6 1.7 +// Miscelaneous helper routines 1.8 +// Store an oop (or NULL) at the address described by obj. 1.9 +// If val == noreg this means store a NULL 1.10 + 1.11 +static void do_oop_store(InterpreterMacroAssembler* _masm, 1.12 + Address obj, 1.13 + Register val, 1.14 + BarrierSet::Name barrier, 1.15 + bool precise) { 1.16 + assert(val == noreg || val == V0, "parameter is just for looks"); 1.17 + switch (barrier) { 1.18 +#if INCLUDE_ALL_GCS 1.19 +// case BarrierSet::G1SATBCT: 1.20 +// case BarrierSet::G1SATBCTLogging: 1.21 +// { 1.22 +// // flatten object address if needed 1.23 +// if (obj.index() == noreg && obj.disp() == 0) { 1.24 +// if (obj.base() != rdx) { 1.25 +// __ movq(rdx, obj.base()); 1.26 +// } 1.27 +// } else { 1.28 +// __ leaq(rdx, obj); 1.29 +// } 1.30 +// __ g1_write_barrier_pre(rdx /* obj */, 1.31 +// rbx /* pre_val */, 1.32 +// r15_thread /* thread */, 1.33 +// r8 /* tmp */, 1.34 +// val != noreg /* tosca_live */, 1.35 +// false /* expand_call */); 1.36 +// if (val == noreg) { 1.37 +// __ store_heap_oop_null(Address(rdx, 0)); 1.38 +// } else { 1.39 +// // G1 barrier needs uncompressed oop for region cross check. 1.40 +// Register new_val = val; 1.41 +// if (UseCompressedOops) { 1.42 +// new_val = rbx; 1.43 +// __ movptr(new_val, val); 1.44 +// } 1.45 +// __ store_heap_oop(Address(rdx, 0), val); 1.46 +// __ g1_write_barrier_post(rdx /* store_adr */, 1.47 +// new_val /* new_val */, 1.48 +// r15_thread /* thread */, 1.49 +// r8 /* tmp */, 1.50 +// rbx /* tmp2 */); 1.51 +// } 1.52 +// } 1.53 + break; 1.54 +#endif // INCLUDE_ALL_GCS 1.55 + case BarrierSet::CardTableModRef: 1.56 + case BarrierSet::CardTableExtension: 1.57 + { 1.58 + if (val == noreg) { 1.59 + __ store_heap_oop_null(obj); 1.60 + } else { 1.61 + __ store_heap_oop(obj, val); 1.62 + // flatten object address if needed 1.63 + if (!precise || (obj.index() == noreg && obj.disp() == 0)) { 1.64 + __ store_check(obj.base()); 1.65 + } else { 1.66 + //__ leaq(rdx, obj); 1.67 + //__ store_check(rdx); 1.68 + } 1.69 + } 1.70 + } 1.71 + break; 1.72 + case BarrierSet::ModRef: 1.73 + case BarrierSet::Other: 1.74 + if (val == noreg) { 1.75 + __ store_heap_oop_null(obj); 1.76 + } else { 1.77 + __ store_heap_oop(obj, val); 1.78 + } 1.79 + break; 1.80 + default : 1.81 + ShouldNotReachHere(); 1.82 + 1.83 + } 1.84 +} 1.85 + 1.86 // bytecode folding 1.87 void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg, 1.88 Register tmp_reg, bool load_bc_into_bc_reg/*=true*/,