< prev index next >

src/hotspot/cpu/arm/arm.ad

Print this page
rev 54101 : 8214512: ARM32: Jtreg test compiler/c2/Test8062950.java fails on ARM
Reviewed-by: dlong, enevill, bulasevich
Contributed-by: nick.gasson@arm.com, christoph.goettschkes@microdoc.com


11999 /* instruct partialSubtypeCheck_vs_zero( flagsRegP pcc, o1RegP sub, o2RegP super, immP0 zero, o0RegP idx, o7RegP o7 ) %{ */
12000 /*   match(Set pcc (CmpP (PartialSubtypeCheck sub super) zero)); */
12001 /*   ins_pipe(partial_subtype_check_pipe); */
12002 /* %} */
12003 
12004 
12005 // ============================================================================
12006 // inlined locking and unlocking
12007 
12008 #ifdef AARCH64
12009 instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch, iRegP scratch3 )
12010 #else
12011 instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch )
12012 #endif
12013 %{
12014   match(Set pcc (FastLock object box));
12015 
12016 #ifdef AARCH64
12017   effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
12018 #else

12019   effect(TEMP scratch, TEMP scratch2);
12020 #endif
12021   ins_cost(100);
12022 
12023 #ifdef AARCH64
12024   format %{ "FASTLOCK  $object, $box; KILL $scratch, $scratch2, $scratch3" %}
12025   ins_encode %{
12026     __ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
12027   %}
12028 #else
12029   format %{ "FASTLOCK  $object, $box; KILL $scratch, $scratch2" %}
12030   ins_encode %{
12031     __ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register);
12032   %}
12033 #endif
12034   ins_pipe(long_memory_op);
12035 %}
12036 
12037 
12038 #ifdef AARCH64
12039 instruct cmpFastUnlock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch, iRegP scratch3 ) %{
12040   match(Set pcc (FastUnlock object box));
12041   effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
12042   ins_cost(100);
12043 
12044   format %{ "FASTUNLOCK  $object, $box; KILL $scratch, $scratch2, $scratch3" %}
12045   ins_encode %{
12046     __ fast_unlock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
12047   %}
12048   ins_pipe(long_memory_op);
12049 %}
12050 #else















12051 instruct cmpFastUnlock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch ) %{
12052   match(Set pcc (FastUnlock object box));
12053   effect(TEMP scratch, TEMP scratch2);
12054   ins_cost(100);
12055 
12056   format %{ "FASTUNLOCK  $object, $box; KILL $scratch, $scratch2" %}
12057   ins_encode %{
12058     __ fast_unlock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register);
12059   %}
12060   ins_pipe(long_memory_op);
12061 %}
12062 #endif
12063 
12064 #ifdef AARCH64
12065 // TODO: add version that takes immI cnt?
12066 instruct clear_array(iRegX cnt, iRegP base, iRegP ptr, iRegX temp, Universe dummy, flagsReg cpsr) %{
12067   match(Set dummy (ClearArray cnt base));
12068   effect(TEMP temp, TEMP ptr, KILL cpsr);
12069   ins_cost(300);
12070   format %{




11999 /* instruct partialSubtypeCheck_vs_zero( flagsRegP pcc, o1RegP sub, o2RegP super, immP0 zero, o0RegP idx, o7RegP o7 ) %{ */
12000 /*   match(Set pcc (CmpP (PartialSubtypeCheck sub super) zero)); */
12001 /*   ins_pipe(partial_subtype_check_pipe); */
12002 /* %} */
12003 
12004 
12005 // ============================================================================
12006 // inlined locking and unlocking
12007 
12008 #ifdef AARCH64
12009 instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch, iRegP scratch3 )
12010 #else
12011 instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch )
12012 #endif
12013 %{
12014   match(Set pcc (FastLock object box));
12015 
12016 #ifdef AARCH64
12017   effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
12018 #else
12019   predicate(!(UseBiasedLocking && !UseOptoBiasInlining));
12020   effect(TEMP scratch, TEMP scratch2);
12021 #endif
12022   ins_cost(DEFAULT_COST*3);
12023 
12024 #ifdef AARCH64
12025   format %{ "FASTLOCK  $object, $box; KILL $scratch, $scratch2, $scratch3" %}
12026   ins_encode %{
12027     __ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
12028   %}
12029 #else
12030   format %{ "FASTLOCK  $object, $box; KILL $scratch, $scratch2" %}
12031   ins_encode %{
12032     __ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register);
12033   %}
12034 #endif
12035   ins_pipe(long_memory_op);
12036 %}
12037 
12038 
12039 #ifdef AARCH64
12040 instruct cmpFastUnlock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch, iRegP scratch3 ) %{
12041   match(Set pcc (FastUnlock object box));
12042   effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
12043   ins_cost(100);
12044 
12045   format %{ "FASTUNLOCK  $object, $box; KILL $scratch, $scratch2, $scratch3" %}
12046   ins_encode %{
12047     __ fast_unlock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
12048   %}
12049   ins_pipe(long_memory_op);
12050 %}
12051 #else
12052 instruct cmpFastLock_noBiasInline(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2,
12053                                   iRegP scratch, iRegP scratch3) %{
12054   match(Set pcc (FastLock object box));
12055   predicate(UseBiasedLocking && !UseOptoBiasInlining);
12056 
12057   effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
12058   ins_cost(DEFAULT_COST*5);
12059 
12060   format %{ "FASTLOCK  $object, $box; KILL $scratch, $scratch2, $scratch3" %}
12061   ins_encode %{
12062     __ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
12063   %}
12064   ins_pipe(long_memory_op);
12065 %}
12066 
12067 instruct cmpFastUnlock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch ) %{
12068   match(Set pcc (FastUnlock object box));
12069   effect(TEMP scratch, TEMP scratch2);
12070   ins_cost(100);
12071 
12072   format %{ "FASTUNLOCK  $object, $box; KILL $scratch, $scratch2" %}
12073   ins_encode %{
12074     __ fast_unlock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register);
12075   %}
12076   ins_pipe(long_memory_op);
12077 %}
12078 #endif
12079 
12080 #ifdef AARCH64
12081 // TODO: add version that takes immI cnt?
12082 instruct clear_array(iRegX cnt, iRegP base, iRegP ptr, iRegX temp, Universe dummy, flagsReg cpsr) %{
12083   match(Set dummy (ClearArray cnt base));
12084   effect(TEMP temp, TEMP ptr, KILL cpsr);
12085   ins_cost(300);
12086   format %{


< prev index next >