< prev index next >

src/hotspot/cpu/sparc/macroAssembler_sparc.cpp

Print this page
rev 50535 : [mq]: rename_IN_ROOT


 159       case bpr_op2: {
 160         if (is_cbcond(inst)) {
 161           r = inv_wdisp10(inst, pos);
 162         } else {
 163           r = inv_wdisp16(inst, pos);
 164         }
 165         break;
 166       }
 167       default: ShouldNotReachHere();
 168     }
 169   }
 170   return r;
 171 }
 172 
 173 void MacroAssembler::resolve_jobject(Register value, Register tmp) {
 174   Label done, not_weak;
 175   br_null(value, false, Assembler::pn, done); // Use NULL as-is.
 176   delayed()->andcc(value, JNIHandles::weak_tag_mask, G0); // Test for jweak
 177   brx(Assembler::zero, true, Assembler::pt, not_weak);
 178   delayed()->nop();
 179   access_load_at(T_OBJECT, IN_ROOT | ON_PHANTOM_OOP_REF,
 180                  Address(value, -JNIHandles::weak_tag_value), value, tmp);
 181   verify_oop(value);
 182   br (Assembler::always, true, Assembler::pt, done);
 183   delayed()->nop();
 184   bind(not_weak);
 185   access_load_at(T_OBJECT, IN_CONCURRENT_ROOT,
 186                  Address(value, 0), value, tmp);
 187   verify_oop(value);
 188   bind(done);
 189 }
 190 
 191 void MacroAssembler::null_check(Register reg, int offset) {
 192   if (needs_explicit_null_check((intptr_t)offset)) {
 193     // provoke OS NULL exception if reg = NULL by
 194     // accessing M[reg] w/o changing any registers
 195     ld_ptr(reg, 0, G0);
 196   }
 197   else {
 198     // nothing to do, (later) access of M[reg + offset]
 199     // will provoke OS NULL exception if reg = NULL




 159       case bpr_op2: {
 160         if (is_cbcond(inst)) {
 161           r = inv_wdisp10(inst, pos);
 162         } else {
 163           r = inv_wdisp16(inst, pos);
 164         }
 165         break;
 166       }
 167       default: ShouldNotReachHere();
 168     }
 169   }
 170   return r;
 171 }
 172 
 173 void MacroAssembler::resolve_jobject(Register value, Register tmp) {
 174   Label done, not_weak;
 175   br_null(value, false, Assembler::pn, done); // Use NULL as-is.
 176   delayed()->andcc(value, JNIHandles::weak_tag_mask, G0); // Test for jweak
 177   brx(Assembler::zero, true, Assembler::pt, not_weak);
 178   delayed()->nop();
 179   access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF,
 180                  Address(value, -JNIHandles::weak_tag_value), value, tmp);
 181   verify_oop(value);
 182   br (Assembler::always, true, Assembler::pt, done);
 183   delayed()->nop();
 184   bind(not_weak);
 185   access_load_at(T_OBJECT, IN_CONCURRENT_ROOT,
 186                  Address(value, 0), value, tmp);
 187   verify_oop(value);
 188   bind(done);
 189 }
 190 
 191 void MacroAssembler::null_check(Register reg, int offset) {
 192   if (needs_explicit_null_check((intptr_t)offset)) {
 193     // provoke OS NULL exception if reg = NULL by
 194     // accessing M[reg] w/o changing any registers
 195     ld_ptr(reg, 0, G0);
 196   }
 197   else {
 198     // nothing to do, (later) access of M[reg + offset]
 199     // will provoke OS NULL exception if reg = NULL


< prev index next >