--- a/src/hotspot/cpu/arm/arm.ad Mon Dec 17 16:55:17 2018 +0100
+++ b/src/hotspot/cpu/arm/arm.ad Mon Dec 17 10:36:07 2018 -0800
@@ -8945,9 +8945,10 @@
instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch )
%{
match(Set pcc (FastLock object box));
+ predicate(!(UseBiasedLocking && !UseOptoBiasInlining));
effect(TEMP scratch, TEMP scratch2);
- ins_cost(100);
+ ins_cost(DEFAULT_COST*3);
format %{ "FASTLOCK $object, $box; KILL $scratch, $scratch2" %}
ins_encode %{
@@ -8956,6 +8957,21 @@
ins_pipe(long_memory_op);
%}
+instruct cmpFastLock_noBiasInline(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2,
+ iRegP scratch, iRegP scratch3) %{
+ match(Set pcc (FastLock object box));
+ predicate(UseBiasedLocking && !UseOptoBiasInlining);
+
+ effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
+ ins_cost(DEFAULT_COST*5);
+
+ format %{ "FASTLOCK $object, $box; KILL $scratch, $scratch2, $scratch3" %}
+ ins_encode %{
+ __ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
+ %}
+ ins_pipe(long_memory_op);
+%}
+
instruct cmpFastUnlock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch ) %{
match(Set pcc (FastUnlock object box));