src/cpu/x86/vm/x86_64.ad

changeset 6429
606acabe7b5c
parent 6378
8a8ff6b577ed
child 6518
62c54fcc0a35
equal deleted inserted replaced
6427:a48e16541e6b 6429:606acabe7b5c
11375 %} 11375 %}
11376 11376
11377 // ============================================================================ 11377 // ============================================================================
11378 // inlined locking and unlocking 11378 // inlined locking and unlocking
11379 11379
11380 instruct cmpFastLockRTM(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI tmp, rdx_RegI scr, rRegI cx1, rRegI cx2) %{
11381 predicate(Compile::current()->use_rtm());
11382 match(Set cr (FastLock object box));
11383 effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box);
11384 ins_cost(300);
11385 format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
11386 ins_encode %{
11387 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
11388 $scr$$Register, $cx1$$Register, $cx2$$Register,
11389 _counters, _rtm_counters, _stack_rtm_counters,
11390 ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
11391 true, ra_->C->profile_rtm());
11392 %}
11393 ins_pipe(pipe_slow);
11394 %}
11395
11380 instruct cmpFastLock(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI tmp, rRegP scr) %{ 11396 instruct cmpFastLock(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI tmp, rRegP scr) %{
11397 predicate(!Compile::current()->use_rtm());
11381 match(Set cr (FastLock object box)); 11398 match(Set cr (FastLock object box));
11382 effect(TEMP tmp, TEMP scr, USE_KILL box); 11399 effect(TEMP tmp, TEMP scr, USE_KILL box);
11383 ins_cost(300); 11400 ins_cost(300);
11384 format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %} 11401 format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %}
11385 ins_encode %{ 11402 ins_encode %{
11386 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register, $scr$$Register, _counters); 11403 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
11404 $scr$$Register, noreg, noreg, _counters, NULL, NULL, NULL, false, false);
11387 %} 11405 %}
11388 ins_pipe(pipe_slow); 11406 ins_pipe(pipe_slow);
11389 %} 11407 %}
11390 11408
11391 instruct cmpFastUnlock(rFlagsReg cr, rRegP object, rax_RegP box, rRegP tmp) %{ 11409 instruct cmpFastUnlock(rFlagsReg cr, rRegP object, rax_RegP box, rRegP tmp) %{
11392 match(Set cr (FastUnlock object box)); 11410 match(Set cr (FastUnlock object box));
11393 effect(TEMP tmp, USE_KILL box); 11411 effect(TEMP tmp, USE_KILL box);
11394 ins_cost(300); 11412 ins_cost(300);
11395 format %{ "fastunlock $object,$box\t! kills $box,$tmp" %} 11413 format %{ "fastunlock $object,$box\t! kills $box,$tmp" %}
11396 ins_encode %{ 11414 ins_encode %{
11397 __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register); 11415 __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
11398 %} 11416 %}
11399 ins_pipe(pipe_slow); 11417 ins_pipe(pipe_slow);
11400 %} 11418 %}
11401 11419
11402 11420

mercurial