< prev index next >

src/hotspot/cpu/aarch64/aarch64.ad

Print this page

 6605 %}
 6606 
 6607 // Load Klass Pointer
 6608 instruct loadKlass(iRegPNoSp dst, memory8 mem)
 6609 %{
 6610   match(Set dst (LoadKlass mem));
 6611   predicate(!needs_acquiring_load(n));
 6612 
 6613   ins_cost(4 * INSN_COST);
 6614   format %{ "ldr  $dst, $mem\t# class" %}
 6615 
 6616   ins_encode(aarch64_enc_ldr(dst, mem));
 6617 
 6618   ins_pipe(iload_reg_mem);
 6619 %}
 6620 
 6621 // Load Narrow Klass Pointer
 6622 instruct loadNKlass(iRegNNoSp dst, memory4 mem)
 6623 %{
 6624   match(Set dst (LoadNKlass mem));
 6625   predicate(!needs_acquiring_load(n));
 6626 
 6627   ins_cost(4 * INSN_COST);
 6628   format %{ "ldrw  $dst, $mem\t# compressed class ptr" %}
 6629 
 6630   ins_encode(aarch64_enc_ldrw(dst, mem));
 6631 
 6632   ins_pipe(iload_reg_mem);
 6633 %}
 6634 














 6635 // Load Float
 6636 instruct loadF(vRegF dst, memory4 mem)
 6637 %{
 6638   match(Set dst (LoadF mem));
 6639   predicate(!needs_acquiring_load(n));
 6640 
 6641   ins_cost(4 * INSN_COST);
 6642   format %{ "ldrs  $dst, $mem\t# float" %}
 6643 
 6644   ins_encode( aarch64_enc_ldrs(dst, mem) );
 6645 
 6646   ins_pipe(pipe_class_memory);
 6647 %}
 6648 
 6649 // Load Double
 6650 instruct loadD(vRegD dst, memory8 mem)
 6651 %{
 6652   match(Set dst (LoadD mem));
 6653   predicate(!needs_acquiring_load(n));
 6654 

15960   ins_cost(5 * INSN_COST);
15961   format %{ "fastunlock $object,$box\t! kills $tmp, $tmp2" %}
15962 
15963   ins_encode %{
15964     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register);
15965   %}
15966 
15967   ins_pipe(pipe_serial);
15968 %}
15969 
15970 instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2, iRegPNoSp tmp3)
15971 %{
15972   predicate(LockingMode == LM_LIGHTWEIGHT);
15973   match(Set cr (FastLock object box));
15974   effect(TEMP tmp, TEMP tmp2, TEMP tmp3);
15975 
15976   ins_cost(5 * INSN_COST);
15977   format %{ "fastlock $object,$box\t! kills $tmp,$tmp2,$tmp3" %}
15978 
15979   ins_encode %{
15980     __ fast_lock_lightweight($object$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
15981   %}
15982 
15983   ins_pipe(pipe_serial);
15984 %}
15985 
15986 instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2, iRegPNoSp tmp3)
15987 %{
15988   predicate(LockingMode == LM_LIGHTWEIGHT);
15989   match(Set cr (FastUnlock object box));
15990   effect(TEMP tmp, TEMP tmp2, TEMP tmp3);
15991 
15992   ins_cost(5 * INSN_COST);
15993   format %{ "fastunlock $object,$box\t! kills $tmp, $tmp2, $tmp3" %}
15994 
15995   ins_encode %{
15996     __ fast_unlock_lightweight($object$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
15997   %}
15998 
15999   ins_pipe(pipe_serial);
16000 %}
16001 
16002 // ============================================================================
16003 // Safepoint Instructions
16004 
16005 // TODO
16006 // provide a near and far version of this code
16007 
16008 instruct safePoint(rFlagsReg cr, iRegP poll)
16009 %{
16010   match(SafePoint poll);
16011   effect(KILL cr);
16012 
16013   format %{
16014     "ldrw zr, [$poll]\t# Safepoint: poll for GC"
16015   %}
16016   ins_encode %{

 6605 %}
 6606 
 6607 // Load Klass Pointer
 6608 instruct loadKlass(iRegPNoSp dst, memory8 mem)
 6609 %{
 6610   match(Set dst (LoadKlass mem));
 6611   predicate(!needs_acquiring_load(n));
 6612 
 6613   ins_cost(4 * INSN_COST);
 6614   format %{ "ldr  $dst, $mem\t# class" %}
 6615 
 6616   ins_encode(aarch64_enc_ldr(dst, mem));
 6617 
 6618   ins_pipe(iload_reg_mem);
 6619 %}
 6620 
 6621 // Load Narrow Klass Pointer
 6622 instruct loadNKlass(iRegNNoSp dst, memory4 mem)
 6623 %{
 6624   match(Set dst (LoadNKlass mem));
 6625   predicate(!needs_acquiring_load(n) && !UseCompactObjectHeaders);
 6626 
 6627   ins_cost(4 * INSN_COST);
 6628   format %{ "ldrw  $dst, $mem\t# compressed class ptr" %}
 6629 
 6630   ins_encode(aarch64_enc_ldrw(dst, mem));
 6631 
 6632   ins_pipe(iload_reg_mem);
 6633 %}
 6634 
 6635 instruct loadNKlassCompactHeaders(iRegNNoSp dst, memory4 mem, rFlagsReg cr)
 6636 %{
 6637   match(Set dst (LoadNKlass mem));
 6638   effect(KILL cr);
 6639   predicate(!needs_acquiring_load(n) && UseCompactObjectHeaders);
 6640 
 6641   ins_cost(4 * INSN_COST);
 6642   format %{ "ldrw  $dst, $mem\t# compressed class ptr" %}
 6643   ins_encode %{
 6644     __ load_nklass_compact($dst$$Register, $mem$$base$$Register, $mem$$index$$Register, $mem$$scale, $mem$$disp);
 6645   %}
 6646   ins_pipe(pipe_slow);
 6647 %}
 6648 
 6649 // Load Float
 6650 instruct loadF(vRegF dst, memory4 mem)
 6651 %{
 6652   match(Set dst (LoadF mem));
 6653   predicate(!needs_acquiring_load(n));
 6654 
 6655   ins_cost(4 * INSN_COST);
 6656   format %{ "ldrs  $dst, $mem\t# float" %}
 6657 
 6658   ins_encode( aarch64_enc_ldrs(dst, mem) );
 6659 
 6660   ins_pipe(pipe_class_memory);
 6661 %}
 6662 
 6663 // Load Double
 6664 instruct loadD(vRegD dst, memory8 mem)
 6665 %{
 6666   match(Set dst (LoadD mem));
 6667   predicate(!needs_acquiring_load(n));
 6668 

15974   ins_cost(5 * INSN_COST);
15975   format %{ "fastunlock $object,$box\t! kills $tmp, $tmp2" %}
15976 
15977   ins_encode %{
15978     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register);
15979   %}
15980 
15981   ins_pipe(pipe_serial);
15982 %}
15983 
15984 instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2, iRegPNoSp tmp3)
15985 %{
15986   predicate(LockingMode == LM_LIGHTWEIGHT);
15987   match(Set cr (FastLock object box));
15988   effect(TEMP tmp, TEMP tmp2, TEMP tmp3);
15989 
15990   ins_cost(5 * INSN_COST);
15991   format %{ "fastlock $object,$box\t! kills $tmp,$tmp2,$tmp3" %}
15992 
15993   ins_encode %{
15994     __ fast_lock_lightweight($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
15995   %}
15996 
15997   ins_pipe(pipe_serial);
15998 %}
15999 
16000 instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2, iRegPNoSp tmp3)
16001 %{
16002   predicate(LockingMode == LM_LIGHTWEIGHT);
16003   match(Set cr (FastUnlock object box));
16004   effect(TEMP tmp, TEMP tmp2, TEMP tmp3);
16005 
16006   ins_cost(5 * INSN_COST);
16007   format %{ "fastunlock $object,$box\t! kills $tmp, $tmp2, $tmp3" %}
16008 
16009   ins_encode %{
16010     __ fast_unlock_lightweight($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
16011   %}
16012 
16013   ins_pipe(pipe_serial);
16014 %}
16015 
16016 // ============================================================================
16017 // Safepoint Instructions
16018 
16019 // TODO
16020 // provide a near and far version of this code
16021 
16022 instruct safePoint(rFlagsReg cr, iRegP poll)
16023 %{
16024   match(SafePoint poll);
16025   effect(KILL cr);
16026 
16027   format %{
16028     "ldrw zr, [$poll]\t# Safepoint: poll for GC"
16029   %}
16030   ins_encode %{
< prev index next >