< prev index next >

src/hotspot/cpu/sparc/macroAssembler_sparc.cpp

Print this page

        

@@ -988,11 +988,11 @@
 AddressLiteral MacroAssembler::constant_oop_address(jobject obj) {
 #ifdef ASSERT
   {
     ThreadInVMfromUnknown tiv;
     assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
-    assert(Universe::heap()->is_in(JNIHandles::resolve(obj)), "not an oop");
+    assert(Universe::heap()->is_in_reserved(JNIHandles::resolve(obj)), "not an oop");
   }
 #endif
   int oop_index = oop_recorder()->find_index(obj);
   return AddressLiteral(obj, oop_Relocation::spec(oop_index));
 }

@@ -2450,19 +2450,19 @@
   // Biased locking
   // See whether the lock is currently biased toward our thread and
   // whether the epoch is still valid
   // Note that the runtime guarantees sufficient alignment of JavaThread
   // pointers to allow age to be placed into low bits
-  assert(markWord::age_shift == markWord::lock_bits + markWord::biased_lock_bits, "biased locking makes assumptions about bit layout");
-  and3(mark_reg, markWord::biased_lock_mask_in_place, temp_reg);
-  cmp_and_brx_short(temp_reg, markWord::biased_lock_pattern, Assembler::notEqual, Assembler::pn, cas_label);
+  assert(markOopDesc::age_shift == markOopDesc::lock_bits + markOopDesc::biased_lock_bits, "biased locking makes assumptions about bit layout");
+  and3(mark_reg, markOopDesc::biased_lock_mask_in_place, temp_reg);
+  cmp_and_brx_short(temp_reg, markOopDesc::biased_lock_pattern, Assembler::notEqual, Assembler::pn, cas_label);
 
   load_klass(obj_reg, temp_reg);
   ld_ptr(Address(temp_reg, Klass::prototype_header_offset()), temp_reg);
   or3(G2_thread, temp_reg, temp_reg);
   xor3(mark_reg, temp_reg, temp_reg);
-  andcc(temp_reg, ~((int) markWord::age_mask_in_place), temp_reg);
+  andcc(temp_reg, ~((int) markOopDesc::age_mask_in_place), temp_reg);
   if (counters != NULL) {
     cond_inc(Assembler::equal, (address) counters->biased_lock_entry_count_addr(), mark_reg, temp_reg);
     // Reload mark_reg as we may need it later
     ld_ptr(Address(obj_reg, oopDesc::mark_offset_in_bytes()), mark_reg);
   }

@@ -2481,11 +2481,11 @@
   // header.
 
   // If the low three bits in the xor result aren't clear, that means
   // the prototype header is no longer biased and we have to revoke
   // the bias on this object.
-  btst(markWord::biased_lock_mask_in_place, temp_reg);
+  btst(markOopDesc::biased_lock_mask_in_place, temp_reg);
   brx(Assembler::notZero, false, Assembler::pn, try_revoke_bias);
 
   // Biasing is still enabled for this data type. See whether the
   // epoch of the current bias is still valid, meaning that the epoch
   // bits of the mark word are equal to the epoch bits of the

@@ -2493,21 +2493,21 @@
   // only change at a safepoint.) If not, attempt to rebias the object
   // toward the current thread. Note that we must be absolutely sure
   // that the current epoch is invalid in order to do this because
   // otherwise the manipulations it performs on the mark word are
   // illegal.
-  delayed()->btst(markWord::epoch_mask_in_place, temp_reg);
+  delayed()->btst(markOopDesc::epoch_mask_in_place, temp_reg);
   brx(Assembler::notZero, false, Assembler::pn, try_rebias);
 
   // The epoch of the current bias is still valid but we know nothing
   // about the owner; it might be set or it might be clear. Try to
   // acquire the bias of the object using an atomic operation. If this
   // fails we will go in to the runtime to revoke the object's bias.
   // Note that we first construct the presumed unbiased header so we
   // don't accidentally blow away another thread's valid bias.
   delayed()->and3(mark_reg,
-                  markWord::biased_lock_mask_in_place | markWord::age_mask_in_place | markWord::epoch_mask_in_place,
+                  markOopDesc::biased_lock_mask_in_place | markOopDesc::age_mask_in_place | markOopDesc::epoch_mask_in_place,
                   mark_reg);
   or3(G2_thread, mark_reg, temp_reg);
   cas_ptr(mark_addr.base(), mark_reg, temp_reg);
   // If the biasing toward our thread failed, this means that
   // another thread succeeded in biasing it toward itself and we

@@ -2584,12 +2584,12 @@
   // First, the interpreter checks for IllegalMonitorStateException at
   // a higher level. Second, if the bias was revoked while we held the
   // lock, the object could not be rebiased toward another thread, so
   // the bias bit would be clear.
   ld_ptr(mark_addr, temp_reg);
-  and3(temp_reg, markWord::biased_lock_mask_in_place, temp_reg);
-  cmp(temp_reg, markWord::biased_lock_pattern);
+  and3(temp_reg, markOopDesc::biased_lock_mask_in_place, temp_reg);
+  cmp(temp_reg, markOopDesc::biased_lock_pattern);
   brx(Assembler::equal, allow_delay_slot_filling, Assembler::pt, done);
   delayed();
   if (!allow_delay_slot_filling) {
     nop();
   }

@@ -2601,16 +2601,16 @@
 // The code could be tightened up considerably.
 //
 // box->dhw disposition - post-conditions at DONE_LABEL.
 // -   Successful inflated lock:  box->dhw != 0.
 //     Any non-zero value suffices.
-//     Consider G2_thread, rsp, boxReg, or markWord::unused_mark()
+//     Consider G2_thread, rsp, boxReg, or markOopDesc::unused_mark()
 // -   Successful Stack-lock: box->dhw == mark.
 //     box->dhw must contain the displaced mark word value
 // -   Failure -- icc.ZFlag == 0 and box->dhw is undefined.
-//     The slow-path enter() is responsible for setting
-//     box->dhw = NonZero (typically markWord::unused_mark()).
+//     The slow-path fast_enter() and slow_enter() operators
+//     are responsible for setting box->dhw = NonZero (typically markOopDesc::unused_mark()).
 // -   Biased: box->dhw is undefined
 //
 // SPARC refworkload performance - specifically jetstream and scimark - are
 // extremely sensitive to the size of the code emitted by compiler_lock_object
 // and compiler_unlock_object.  Critically, the key factor is code size, not path

@@ -2656,11 +2656,11 @@
    //   ST box->dhw  = mark   -- save fetched mark in on-stack basiclock box
    //   ST obj->mark = box    -- overwrite transient 0 value
    // This presumes TSO, of course.
 
    mov(0, Rscratch);
-   or3(Rmark, markWord::unlocked_value, Rmark);
+   or3(Rmark, markOopDesc::unlocked_value, Rmark);
    assert(mark_addr.disp() == 0, "cas must take a zero displacement");
    cas_ptr(mark_addr.base(), Rmark, Rscratch);
 // prefetch (mark_addr, Assembler::severalWritesAndPossiblyReads);
    cmp(Rscratch, Rmark);
    brx(Assembler::notZero, false, Assembler::pn, Recursive);

@@ -2710,11 +2710,11 @@
    cas_ptr(Rmark, G0, Rscratch);
    andcc(Rscratch, Rscratch, G0);             // set ICCs for done: icc.zf iff success
    // set icc.zf : 1=success 0=failure
    // ST box->displaced_header = NonZero.
    // Any non-zero value suffices:
-   //    markWord::unused_mark(), G2_thread, RBox, RScratch, rsp, etc.
+   //    markOopDesc::unused_mark(), G2_thread, RBox, RScratch, rsp, etc.
    st_ptr(Rbox, Rbox, BasicLock::displaced_header_offset_in_bytes());
    // Intentional fall-through into done
 
    bind   (done);
 }
< prev index next >