< 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 

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

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