10216 // for this guy.
10217 instruct tlsLoadP(javaThread_RegP dst)
10218 %{
10219 match(Set dst (ThreadLocal));
10220
10221 ins_cost(0);
10222
10223 format %{ " -- \t// $dst=Thread::current(), empty, #@tlsLoadP" %}
10224
10225 size(0);
10226
10227 ins_encode( /*empty*/ );
10228
10229 ins_pipe(pipe_class_empty);
10230 %}
10231
10232 // inlined locking and unlocking
10233 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10234 instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10235 %{
10236 match(Set cr (FastLock object box));
10237 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10238
10239 ins_cost(LOAD_COST * 2 + STORE_COST * 3 + ALU_COST * 6 + BRANCH_COST * 3);
10240 format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3, #@cmpFastLock" %}
10241
10242 ins_encode %{
10243 __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10244 %}
10245
10246 ins_pipe(pipe_serial);
10247 %}
10248
10249 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10250 instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10251 %{
10252 match(Set cr (FastUnlock object box));
10253 effect(TEMP tmp1, TEMP tmp2);
10254
10255 ins_cost(LOAD_COST * 2 + STORE_COST + ALU_COST * 2 + BRANCH_COST * 4);
10256 format %{ "fastunlock $object,$box\t! kills $tmp1, $tmp2, #@cmpFastUnlock" %}
10257
10258 ins_encode %{
10259 __ fast_unlock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10260 %}
10261
10262 ins_pipe(pipe_serial);
10263 %}
10264
10265 // Tail Call; Jump from runtime stub to Java code.
10266 // Also known as an 'interprocedural jump'.
10267 // Target of jump will eventually return to caller.
10268 // TailJump below removes the return address.
10269 // Don't use fp for 'jump_target' because a MachEpilogNode has already been
10270 // emitted just above the TailCall which has reset fp to the caller state.
10271 instruct TailCalljmpInd(iRegPNoSpNoFp jump_target, inline_cache_RegP method_oop)
10272 %{
10273 match(TailCall jump_target method_oop);
10274
10275 ins_cost(BRANCH_COST);
10276
10277 format %{ "jalr $jump_target\t# $method_oop holds method oop, #@TailCalljmpInd." %}
10278
10279 ins_encode(riscv_enc_tail_call(jump_target));
10280
10281 ins_pipe(pipe_class_call);
10282 %}
10283
10284 instruct TailjmpInd(iRegPNoSpNoFp jump_target, iRegP_R10 ex_oop)
|
10216 // for this guy.
10217 instruct tlsLoadP(javaThread_RegP dst)
10218 %{
10219 match(Set dst (ThreadLocal));
10220
10221 ins_cost(0);
10222
10223 format %{ " -- \t// $dst=Thread::current(), empty, #@tlsLoadP" %}
10224
10225 size(0);
10226
10227 ins_encode( /*empty*/ );
10228
10229 ins_pipe(pipe_class_empty);
10230 %}
10231
10232 // inlined locking and unlocking
10233 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10234 instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10235 %{
10236 predicate(LockingMode != LM_LIGHTWEIGHT);
10237 match(Set cr (FastLock object box));
10238 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10239
10240 ins_cost(10 * DEFAULT_COST);
10241 format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3, #@cmpFastLock" %}
10242
10243 ins_encode %{
10244 __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10245 %}
10246
10247 ins_pipe(pipe_serial);
10248 %}
10249
10250 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10251 instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10252 %{
10253 predicate(LockingMode != LM_LIGHTWEIGHT);
10254 match(Set cr (FastUnlock object box));
10255 effect(TEMP tmp1, TEMP tmp2);
10256
10257 ins_cost(10 * DEFAULT_COST);
10258 format %{ "fastunlock $object,$box\t! kills $tmp1, $tmp2, #@cmpFastUnlock" %}
10259
10260 ins_encode %{
10261 __ fast_unlock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10262 %}
10263
10264 ins_pipe(pipe_serial);
10265 %}
10266
10267 instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP_R10 box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10268 %{
10269 predicate(LockingMode == LM_LIGHTWEIGHT);
10270 match(Set cr (FastLock object box));
10271 effect(TEMP tmp1, TEMP tmp2, USE_KILL box);
10272
10273 ins_cost(10 * DEFAULT_COST);
10274 format %{ "fastlock $object,$box\t! kills $box,$tmp1,$tmp2 #@cmpFastLockLightweight" %}
10275
10276 ins_encode %{
10277 __ fast_lock_lightweight($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10278 %}
10279
10280 ins_pipe(pipe_serial);
10281 %}
10282
10283 instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP_R10 box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10284 %{
10285 predicate(LockingMode == LM_LIGHTWEIGHT);
10286 match(Set cr (FastUnlock object box));
10287 effect(TEMP tmp1, TEMP tmp2, USE_KILL box);
10288
10289 ins_cost(10 * DEFAULT_COST);
10290 format %{ "fastunlock $object,$box\t! kills $box,$tmp1,$tmp2, #@cmpFastUnlockLightweight" %}
10291
10292 ins_encode %{
10293 __ fast_unlock_lightweight($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10294 %}
10295
10296 ins_pipe(pipe_serial);
10297 %}
10298
10299 // Tail Call; Jump from runtime stub to Java code.
10300 // Also known as an 'interprocedural jump'.
10301 // Target of jump will eventually return to caller.
10302 // TailJump below removes the return address.
10303 // Don't use fp for 'jump_target' because a MachEpilogNode has already been
10304 // emitted just above the TailCall which has reset fp to the caller state.
10305 instruct TailCalljmpInd(iRegPNoSpNoFp jump_target, inline_cache_RegP method_oop)
10306 %{
10307 match(TailCall jump_target method_oop);
10308
10309 ins_cost(BRANCH_COST);
10310
10311 format %{ "jalr $jump_target\t# $method_oop holds method oop, #@TailCalljmpInd." %}
10312
10313 ins_encode(riscv_enc_tail_call(jump_target));
10314
10315 ins_pipe(pipe_class_call);
10316 %}
10317
10318 instruct TailjmpInd(iRegPNoSpNoFp jump_target, iRegP_R10 ex_oop)
|