< prev index next >

src/hotspot/cpu/riscv/riscv.ad

Print this page

10191 // for this guy.
10192 instruct tlsLoadP(javaThread_RegP dst)
10193 %{
10194   match(Set dst (ThreadLocal));
10195 
10196   ins_cost(0);
10197 
10198   format %{ " -- \t// $dst=Thread::current(), empty, #@tlsLoadP" %}
10199 
10200   size(0);
10201 
10202   ins_encode( /*empty*/ );
10203 
10204   ins_pipe(pipe_class_empty);
10205 %}
10206 
10207 // inlined locking and unlocking
10208 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10209 instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10210 %{

10211   match(Set cr (FastLock object box));
10212   effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10213 
10214   ins_cost(LOAD_COST * 2 + STORE_COST * 3 + ALU_COST * 6 + BRANCH_COST * 3);
10215   format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3, #@cmpFastLock" %}
10216 
10217   ins_encode %{
10218     __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10219   %}
10220 
10221   ins_pipe(pipe_serial);
10222 %}
10223 
10224 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10225 instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10226 %{

10227   match(Set cr (FastUnlock object box));
10228   effect(TEMP tmp1, TEMP tmp2);
10229 
10230   ins_cost(LOAD_COST * 2 + STORE_COST + ALU_COST * 2 + BRANCH_COST * 4);
10231   format %{ "fastunlock $object,$box\t! kills $tmp1, $tmp2, #@cmpFastUnlock" %}
10232 
10233   ins_encode %{
10234     __ fast_unlock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10235   %}
10236 
10237   ins_pipe(pipe_serial);
10238 %}
10239 
































10240 // Tail Call; Jump from runtime stub to Java code.
10241 // Also known as an 'interprocedural jump'.
10242 // Target of jump will eventually return to caller.
10243 // TailJump below removes the return address.
10244 instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_oop)
10245 %{
10246   match(TailCall jump_target method_oop);
10247 
10248   ins_cost(BRANCH_COST);
10249 
10250   format %{ "jalr $jump_target\t# $method_oop holds method oop, #@TailCalljmpInd." %}
10251 
10252   ins_encode(riscv_enc_tail_call(jump_target));
10253 
10254   ins_pipe(pipe_class_call);
10255 %}
10256 
10257 instruct TailjmpInd(iRegPNoSp jump_target, iRegP_R10 ex_oop)
10258 %{
10259   match(TailJump jump_target ex_oop);

10191 // for this guy.
10192 instruct tlsLoadP(javaThread_RegP dst)
10193 %{
10194   match(Set dst (ThreadLocal));
10195 
10196   ins_cost(0);
10197 
10198   format %{ " -- \t// $dst=Thread::current(), empty, #@tlsLoadP" %}
10199 
10200   size(0);
10201 
10202   ins_encode( /*empty*/ );
10203 
10204   ins_pipe(pipe_class_empty);
10205 %}
10206 
10207 // inlined locking and unlocking
10208 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10209 instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10210 %{
10211   predicate(LockingMode != LM_LIGHTWEIGHT);
10212   match(Set cr (FastLock object box));
10213   effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10214 
10215   ins_cost(10 * DEFAULT_COST);
10216   format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3, #@cmpFastLock" %}
10217 
10218   ins_encode %{
10219     __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10220   %}
10221 
10222   ins_pipe(pipe_serial);
10223 %}
10224 
10225 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10226 instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10227 %{
10228   predicate(LockingMode != LM_LIGHTWEIGHT);
10229   match(Set cr (FastUnlock object box));
10230   effect(TEMP tmp1, TEMP tmp2);
10231 
10232   ins_cost(10 * DEFAULT_COST);
10233   format %{ "fastunlock $object,$box\t! kills $tmp1, $tmp2, #@cmpFastUnlock" %}
10234 
10235   ins_encode %{
10236     __ fast_unlock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10237   %}
10238 
10239   ins_pipe(pipe_serial);
10240 %}
10241 
10242 instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP_R10 box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10243 %{
10244   predicate(LockingMode == LM_LIGHTWEIGHT);
10245   match(Set cr (FastLock object box));
10246   effect(TEMP tmp1, TEMP tmp2, USE_KILL box);
10247 
10248   ins_cost(10 * DEFAULT_COST);
10249   format %{ "fastlock $object,$box\t! kills $box,$tmp1,$tmp2 #@cmpFastLockLightweight" %}
10250 
10251   ins_encode %{
10252     __ fast_lock_lightweight($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10253   %}
10254 
10255   ins_pipe(pipe_serial);
10256 %}
10257 
10258 instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP_R10 box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10259 %{
10260   predicate(LockingMode == LM_LIGHTWEIGHT);
10261   match(Set cr (FastUnlock object box));
10262   effect(TEMP tmp1, TEMP tmp2, USE_KILL box);
10263 
10264   ins_cost(10 * DEFAULT_COST);
10265   format %{ "fastunlock $object,$box\t! kills $box,$tmp1,$tmp2, #@cmpFastUnlockLightweight" %}
10266 
10267   ins_encode %{
10268     __ fast_unlock_lightweight($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10269   %}
10270 
10271   ins_pipe(pipe_serial);
10272 %}
10273 
10274 // Tail Call; Jump from runtime stub to Java code.
10275 // Also known as an 'interprocedural jump'.
10276 // Target of jump will eventually return to caller.
10277 // TailJump below removes the return address.
10278 instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_oop)
10279 %{
10280   match(TailCall jump_target method_oop);
10281 
10282   ins_cost(BRANCH_COST);
10283 
10284   format %{ "jalr $jump_target\t# $method_oop holds method oop, #@TailCalljmpInd." %}
10285 
10286   ins_encode(riscv_enc_tail_call(jump_target));
10287 
10288   ins_pipe(pipe_class_call);
10289 %}
10290 
10291 instruct TailjmpInd(iRegPNoSp jump_target, iRegP_R10 ex_oop)
10292 %{
10293   match(TailJump jump_target ex_oop);
< prev index next >