< prev index next >

src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp

Print this page

 91 
 92   // Make sure dst has the return value.
 93   if (dst != r0) {
 94     __ mov(dst, r0);
 95   }
 96 
 97   __ pop_call_clobbered_registers_except(RegSet::of(dst));
 98   __ leave();
 99 
100   __ bind(done);
101 }
102 
103 #ifdef ASSERT
104 
105 void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
106                                         DecoratorSet decorators,
107                                         BasicType type,
108                                         Address dst,
109                                         Register val,
110                                         Register tmp1,
111                                         Register tmp2) {

112   // Verify value
113   if (is_reference_type(type)) {
114     // Note that src could be noreg, which means we
115     // are storing null and can skip verification.
116     if (val != noreg) {
117       Label done;
118 
119       // tmp1 and tmp2 are often set to noreg.
120       RegSet savedRegs = RegSet::of(rscratch1);
121       __ push(savedRegs, sp);
122 
123       __ ldr(rscratch1, address_bad_mask_from_thread(rthread));
124       __ tst(val, rscratch1);
125       __ br(Assembler::EQ, done);
126       __ stop("Verify oop store failed");
127       __ should_not_reach_here();
128       __ bind(done);
129       __ pop(savedRegs, sp);
130     }
131   }

 91 
 92   // Make sure dst has the return value.
 93   if (dst != r0) {
 94     __ mov(dst, r0);
 95   }
 96 
 97   __ pop_call_clobbered_registers_except(RegSet::of(dst));
 98   __ leave();
 99 
100   __ bind(done);
101 }
102 
103 #ifdef ASSERT
104 
105 void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
106                                         DecoratorSet decorators,
107                                         BasicType type,
108                                         Address dst,
109                                         Register val,
110                                         Register tmp1,
111                                         Register tmp2,
112                                         Register tmp3) {
113   // Verify value
114   if (is_reference_type(type)) {
115     // Note that src could be noreg, which means we
116     // are storing null and can skip verification.
117     if (val != noreg) {
118       Label done;
119 
120       // tmp1 and tmp2 are often set to noreg.
121       RegSet savedRegs = RegSet::of(rscratch1);
122       __ push(savedRegs, sp);
123 
124       __ ldr(rscratch1, address_bad_mask_from_thread(rthread));
125       __ tst(val, rscratch1);
126       __ br(Assembler::EQ, done);
127       __ stop("Verify oop store failed");
128       __ should_not_reach_here();
129       __ bind(done);
130       __ pop(savedRegs, sp);
131     }
132   }
< prev index next >