< prev index next >

src/hotspot/cpu/aarch64/aarch64.ad

Print this page
@@ -6620,20 +6620,34 @@
  
  // Load Narrow Klass Pointer
  instruct loadNKlass(iRegNNoSp dst, memory4 mem)
  %{
    match(Set dst (LoadNKlass mem));
-   predicate(!needs_acquiring_load(n));
+   predicate(!needs_acquiring_load(n) && !UseCompactObjectHeaders);
  
    ins_cost(4 * INSN_COST);
    format %{ "ldrw  $dst, $mem\t# compressed class ptr" %}
  
    ins_encode(aarch64_enc_ldrw(dst, mem));
  
    ins_pipe(iload_reg_mem);
  %}
  
+ instruct loadNKlassCompactHeaders(iRegNNoSp dst, memory4 mem, rFlagsReg cr)
+ %{
+   match(Set dst (LoadNKlass mem));
+   effect(KILL cr);
+   predicate(!needs_acquiring_load(n) && UseCompactObjectHeaders);
+ 
+   ins_cost(4 * INSN_COST);
+   format %{ "ldrw  $dst, $mem\t# compressed class ptr" %}
+   ins_encode %{
+     __ load_nklass_compact($dst$$Register, $mem$$base$$Register, $mem$$index$$Register, $mem$$scale, $mem$$disp);
+   %}
+   ins_pipe(pipe_slow);
+ %}
+ 
  // Load Float
  instruct loadF(vRegF dst, memory4 mem)
  %{
    match(Set dst (LoadF mem));
    predicate(!needs_acquiring_load(n));

@@ -15975,11 +15989,11 @@
  
    ins_cost(5 * INSN_COST);
    format %{ "fastlock $object,$box\t! kills $tmp,$tmp2,$tmp3" %}
  
    ins_encode %{
-     __ fast_lock_lightweight($object$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
+     __ fast_lock_lightweight($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
    %}
  
    ins_pipe(pipe_serial);
  %}
  

@@ -15991,11 +16005,11 @@
  
    ins_cost(5 * INSN_COST);
    format %{ "fastunlock $object,$box\t! kills $tmp, $tmp2, $tmp3" %}
  
    ins_encode %{
-     __ fast_unlock_lightweight($object$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
+     __ fast_unlock_lightweight($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
    %}
  
    ins_pipe(pipe_serial);
  %}
  
< prev index next >