< prev index next >

src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp

Print this page
*** 147,17 ***
  
    __ build_frame(initial_frame_size_in_bytes(), bang_size_in_bytes());
    Register OSR_buf = osrBufferPointer()->as_pointer_register();
  
    assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
!   int monitor_offset = (method()->max_locals() + 2 * (number_of_locks - 1)) * BytesPerWord;
    for (int i = 0; i < number_of_locks; i++) {
!     int slot_offset = monitor_offset - (i * 2 * BytesPerWord);
!     __ ldr(R1, Address(OSR_buf, slot_offset + 0*BytesPerWord));
!     __ ldr(R2, Address(OSR_buf, slot_offset + 1*BytesPerWord));
-     __ str(R1, frame_map()->address_for_monitor_lock(i));
-     __ str(R2, frame_map()->address_for_monitor_object(i));
    }
  }
  
  
  int LIR_Assembler::check_icache() {
--- 147,15 ---
  
    __ build_frame(initial_frame_size_in_bytes(), bang_size_in_bytes());
    Register OSR_buf = osrBufferPointer()->as_pointer_register();
  
    assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
!   int monitor_offset = (method()->max_locals() + (number_of_locks - 1)) * BytesPerWord;
    for (int i = 0; i < number_of_locks; i++) {
!     int slot_offset = monitor_offset - (i * BytesPerWord);
!     __ ldr(R1, Address(OSR_buf, slot_offset));
!     __ str(R1, frame_map()->address_for_monitor_object(i));
    }
  }
  
  
  int LIR_Assembler::check_icache() {

*** 241,12 ***
  
    // Perform needed unlocking
    MonitorExitStub* stub = NULL;
    if (method()->is_synchronized()) {
      monitor_address(0, FrameMap::R0_opr);
!     stub = new MonitorExitStub(FrameMap::R0_opr, true, 0);
!     __ unlock_object(R2, R1, R0, *stub->entry());
      __ bind(*stub->continuation());
    }
  
    // remove the activation and dispatch to the unwind handler
    __ remove_frame(initial_frame_size_in_bytes()); // restores FP and LR
--- 239,13 ---
  
    // Perform needed unlocking
    MonitorExitStub* stub = NULL;
    if (method()->is_synchronized()) {
      monitor_address(0, FrameMap::R0_opr);
!     __ ldr(R1, Address(R0, BasicObjectLock::obj_offset_in_bytes()));
!     stub = new MonitorExitStub(FrameMap::R1_opr);
+     __ b(*stub->entry());
      __ bind(*stub->continuation());
    }
  
    // remove the activation and dispatch to the unwind handler
    __ remove_frame(initial_frame_size_in_bytes()); // restores FP and LR

*** 969,11 ***
      __ allocate_array(op->obj()->as_register(),
                        op->len()->as_register(),
                        op->tmp1()->as_register(),
                        op->tmp2()->as_register(),
                        op->tmp3()->as_register(),
!                       arrayOopDesc::header_size(op->type()),
                        type2aelembytes(op->type()),
                        op->klass()->as_register(),
                        *op->stub()->entry());
    }
    __ bind(*op->stub()->continuation());
--- 968,11 ---
      __ allocate_array(op->obj()->as_register(),
                        op->len()->as_register(),
                        op->tmp1()->as_register(),
                        op->tmp2()->as_register(),
                        op->tmp3()->as_register(),
!                       arrayOopDesc::base_offset_in_bytes(op->type()),
                        type2aelembytes(op->type()),
                        op->klass()->as_register(),
                        *op->stub()->entry());
    }
    __ bind(*op->stub()->continuation());

*** 2429,27 ***
  void LIR_Assembler::emit_lock(LIR_OpLock* op) {
    Register obj = op->obj_opr()->as_pointer_register();
    Register hdr = op->hdr_opr()->as_pointer_register();
    Register lock = op->lock_opr()->as_pointer_register();
  
!   if (UseHeavyMonitors) {
!     if (op->info() != NULL) {
-       add_debug_info_for_null_check_here(op->info());
-       __ null_check(obj);
-     }
-     __ b(*op->stub()->entry());
-   } else if (op->code() == lir_lock) {
-     assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
-     int null_check_offset = __ lock_object(hdr, obj, lock, *op->stub()->entry());
-     if (op->info() != NULL) {
-       add_debug_info_for_null_check(null_check_offset, op->info());
-     }
-   } else if (op->code() == lir_unlock) {
-     __ unlock_object(hdr, obj, lock, *op->stub()->entry());
-   } else {
-     ShouldNotReachHere();
-   }
    __ bind(*op->stub()->continuation());
  }
  
  void LIR_Assembler::emit_load_klass(LIR_OpLoadKlass* op) {
    Register obj = op->obj()->as_pointer_register();
--- 2428,12 ---
  void LIR_Assembler::emit_lock(LIR_OpLock* op) {
    Register obj = op->obj_opr()->as_pointer_register();
    Register hdr = op->hdr_opr()->as_pointer_register();
    Register lock = op->lock_opr()->as_pointer_register();
  
!   // TODO: Implement fast-locking.
!   __ b(*op->stub()->entry());
    __ bind(*op->stub()->continuation());
  }
  
  void LIR_Assembler::emit_load_klass(LIR_OpLoadKlass* op) {
    Register obj = op->obj()->as_pointer_register();

*** 2572,11 ***
    Unimplemented();
  }
  
  
  void LIR_Assembler::monitor_address(int monitor_no, LIR_Opr dst) {
!   Address mon_addr = frame_map()->address_for_monitor_lock(monitor_no);
    __ add_slow(dst->as_pointer_register(), mon_addr.base(), mon_addr.disp());
  }
  
  
  void LIR_Assembler::align_backward_branch_target() {
--- 2556,11 ---
    Unimplemented();
  }
  
  
  void LIR_Assembler::monitor_address(int monitor_no, LIR_Opr dst) {
!   Address mon_addr = frame_map()->address_for_monitor_object(monitor_no);
    __ add_slow(dst->as_pointer_register(), mon_addr.base(), mon_addr.disp());
  }
  
  
  void LIR_Assembler::align_backward_branch_target() {
< prev index next >