< prev index next >

src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp

Print this page
@@ -271,12 +271,12 @@
      }
    }
    return oop_map;
  }
  
- static OopMap* save_live_registers(StubAssembler* sasm,
-                                    bool save_fpu_registers = true) {
+ static void save_live_registers_no_oop_map(StubAssembler* sasm,
+                                               bool save_fpu_registers = true) {
    __ block_comment("save_live_registers");
  
    __ push(RegSet::range(r0, r29), sp);         // integer registers except lr & sp
  
    if (save_fpu_registers) {

@@ -286,11 +286,15 @@
            as_FloatRegister(i), __ T1D, Address(sp));
      }
    } else {
      __ add(sp, sp, -32 * wordSize);
    }
+ }
  
+ static OopMap* save_live_registers(StubAssembler* sasm,
+                                    bool save_fpu_registers = true) {
+   save_live_registers_no_oop_map(sasm, save_fpu_registers);
    return generate_oop_map(sasm, save_fpu_registers);
  }
  
  static void restore_live_registers(StubAssembler* sasm, bool restore_fpu_registers = true) {
    if (restore_fpu_registers) {

@@ -669,10 +673,20 @@
          // r0,: new instance
        }
  
        break;
  
+     case load_klass_id:
+       {
+         StubFrame f(sasm, "load_klass", dont_gc_arguments);
+         save_live_registers_no_oop_map(sasm, true);
+         f.load_argument(0, r0); // obj
+         __ call_VM_leaf(CAST_FROM_FN_PTR(address, oopDesc::load_nklass_runtime), r0);
+         restore_live_registers_except_r0(sasm, true);
+       }
+       break;
+ 
      case counter_overflow_id:
        {
          Register bci = r0, method = r1;
          __ enter();
          OopMap* map = save_live_registers(sasm);

@@ -857,14 +871,13 @@
          StubFrame f(sasm, "monitorenter", dont_gc_arguments);
          OopMap* map = save_live_registers(sasm, save_fpu_registers);
  
          // Called with store_parameter and not C abi
  
-         f.load_argument(1, r0); // r0,: object
-         f.load_argument(0, r1); // r1,: lock address
+         f.load_argument(0, r0); // r0,: object
  
-         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorenter), r0, r1);
+         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorenter), r0);
  
          oop_maps = new OopMapSet();
          oop_maps->add_gc_map(call_offset, map);
          restore_live_registers(sasm, save_fpu_registers);
        }

@@ -878,11 +891,11 @@
          StubFrame f(sasm, "monitorexit", dont_gc_arguments);
          OopMap* map = save_live_registers(sasm, save_fpu_registers);
  
          // Called with store_parameter and not C abi
  
-         f.load_argument(0, r0); // r0,: lock address
+         f.load_argument(0, r0); // r0: object
  
          // note: really a leaf routine but must setup last java sp
          //       => use call_RT for now (speed can be improved by
          //       doing last java sp setup manually)
          int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorexit), r0);
< prev index next >