hotspot/src/cpu/x86/vm/x86_64.ad
changeset 10255 bab46e6f7661
parent 10252 0981ce1c3eef
child 10262 c5f62d314bee
equal deleted inserted replaced
10254:406448a00c51 10255:bab46e6f7661
  4011 op_attrib op_cost(0);        // Required cost attribute
  4011 op_attrib op_cost(0);        // Required cost attribute
  4012 
  4012 
  4013 //----------Instruction Attributes---------------------------------------------
  4013 //----------Instruction Attributes---------------------------------------------
  4014 ins_attrib ins_cost(100);       // Required cost attribute
  4014 ins_attrib ins_cost(100);       // Required cost attribute
  4015 ins_attrib ins_size(8);         // Required size attribute (in bits)
  4015 ins_attrib ins_size(8);         // Required size attribute (in bits)
  4016 ins_attrib ins_pc_relative(0);  // Required PC Relative flag
       
  4017 ins_attrib ins_short_branch(0); // Required flag: is this instruction
  4016 ins_attrib ins_short_branch(0); // Required flag: is this instruction
  4018                                 // a non-matching short branch variant
  4017                                 // a non-matching short branch variant
  4019                                 // of some long branch?
  4018                                 // of some long branch?
  4020 ins_attrib ins_alignment(1);    // Required alignment attribute (must
  4019 ins_attrib ins_alignment(1);    // Required alignment attribute (must
  4021                                 // be a power of 2) specifies the
  4020                                 // be a power of 2) specifies the
  7545     Address dispatch($dest$$Register, $switch_val$$Register, (Address::ScaleFactor) $shift$$constant);
  7544     Address dispatch($dest$$Register, $switch_val$$Register, (Address::ScaleFactor) $shift$$constant);
  7546     __ lea($dest$$Register, $constantaddress);
  7545     __ lea($dest$$Register, $constantaddress);
  7547     __ jmp(dispatch);
  7546     __ jmp(dispatch);
  7548   %}
  7547   %}
  7549   ins_pipe(pipe_jmp);
  7548   ins_pipe(pipe_jmp);
  7550   ins_pc_relative(1);
       
  7551 %}
  7549 %}
  7552 
  7550 
  7553 instruct jumpXtnd_addr(rRegL switch_val, immI2 shift, immL32 offset, rRegI dest) %{
  7551 instruct jumpXtnd_addr(rRegL switch_val, immI2 shift, immL32 offset, rRegI dest) %{
  7554   match(Jump (AddL (LShiftL switch_val shift) offset));
  7552   match(Jump (AddL (LShiftL switch_val shift) offset));
  7555   ins_cost(350);
  7553   ins_cost(350);
  7566     Address dispatch($dest$$Register, $switch_val$$Register, (Address::ScaleFactor) $shift$$constant, (int) $offset$$constant);
  7564     Address dispatch($dest$$Register, $switch_val$$Register, (Address::ScaleFactor) $shift$$constant, (int) $offset$$constant);
  7567     __ lea($dest$$Register, $constantaddress);
  7565     __ lea($dest$$Register, $constantaddress);
  7568     __ jmp(dispatch);
  7566     __ jmp(dispatch);
  7569   %}
  7567   %}
  7570   ins_pipe(pipe_jmp);
  7568   ins_pipe(pipe_jmp);
  7571   ins_pc_relative(1);
       
  7572 %}
  7569 %}
  7573 
  7570 
  7574 instruct jumpXtnd(rRegL switch_val, rRegI dest) %{
  7571 instruct jumpXtnd(rRegL switch_val, rRegI dest) %{
  7575   match(Jump switch_val);
  7572   match(Jump switch_val);
  7576   ins_cost(350);
  7573   ins_cost(350);
  7587     Address dispatch($dest$$Register, $switch_val$$Register, Address::times_1);
  7584     Address dispatch($dest$$Register, $switch_val$$Register, Address::times_1);
  7588     __ lea($dest$$Register, $constantaddress);
  7585     __ lea($dest$$Register, $constantaddress);
  7589     __ jmp(dispatch);
  7586     __ jmp(dispatch);
  7590   %}
  7587   %}
  7591   ins_pipe(pipe_jmp);
  7588   ins_pipe(pipe_jmp);
  7592   ins_pc_relative(1);
       
  7593 %}
  7589 %}
  7594 
  7590 
  7595 // Conditional move
  7591 // Conditional move
  7596 instruct cmovI_reg(rRegI dst, rRegI src, rFlagsReg cr, cmpOp cop)
  7592 instruct cmovI_reg(rRegI dst, rRegI src, rFlagsReg cr, cmpOp cop)
  7597 %{
  7593 %{
 12018   format %{ "jmp     $labl" %}
 12014   format %{ "jmp     $labl" %}
 12019   size(5);
 12015   size(5);
 12020   opcode(0xE9);
 12016   opcode(0xE9);
 12021   ins_encode(OpcP, Lbl(labl));
 12017   ins_encode(OpcP, Lbl(labl));
 12022   ins_pipe(pipe_jmp);
 12018   ins_pipe(pipe_jmp);
 12023   ins_pc_relative(1);
       
 12024 %}
 12019 %}
 12025 
 12020 
 12026 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12021 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12027 instruct jmpCon(cmpOp cop, rFlagsReg cr, label labl)
 12022 instruct jmpCon(cmpOp cop, rFlagsReg cr, label labl)
 12028 %{
 12023 %{
 12033   format %{ "j$cop     $labl" %}
 12028   format %{ "j$cop     $labl" %}
 12034   size(6);
 12029   size(6);
 12035   opcode(0x0F, 0x80);
 12030   opcode(0x0F, 0x80);
 12036   ins_encode(Jcc(cop, labl));
 12031   ins_encode(Jcc(cop, labl));
 12037   ins_pipe(pipe_jcc);
 12032   ins_pipe(pipe_jcc);
 12038   ins_pc_relative(1);
       
 12039 %}
 12033 %}
 12040 
 12034 
 12041 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12035 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12042 instruct jmpLoopEnd(cmpOp cop, rFlagsReg cr, label labl)
 12036 instruct jmpLoopEnd(cmpOp cop, rFlagsReg cr, label labl)
 12043 %{
 12037 %{
 12048   format %{ "j$cop     $labl\t# loop end" %}
 12042   format %{ "j$cop     $labl\t# loop end" %}
 12049   size(6);
 12043   size(6);
 12050   opcode(0x0F, 0x80);
 12044   opcode(0x0F, 0x80);
 12051   ins_encode(Jcc(cop, labl));
 12045   ins_encode(Jcc(cop, labl));
 12052   ins_pipe(pipe_jcc);
 12046   ins_pipe(pipe_jcc);
 12053   ins_pc_relative(1);
       
 12054 %}
 12047 %}
 12055 
 12048 
 12056 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12049 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12057 instruct jmpLoopEndU(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12050 instruct jmpLoopEndU(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12058   match(CountedLoopEnd cop cmp);
 12051   match(CountedLoopEnd cop cmp);
 12062   format %{ "j$cop,u   $labl\t# loop end" %}
 12055   format %{ "j$cop,u   $labl\t# loop end" %}
 12063   size(6);
 12056   size(6);
 12064   opcode(0x0F, 0x80);
 12057   opcode(0x0F, 0x80);
 12065   ins_encode(Jcc(cop, labl));
 12058   ins_encode(Jcc(cop, labl));
 12066   ins_pipe(pipe_jcc);
 12059   ins_pipe(pipe_jcc);
 12067   ins_pc_relative(1);
       
 12068 %}
 12060 %}
 12069 
 12061 
 12070 instruct jmpLoopEndUCF(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12062 instruct jmpLoopEndUCF(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12071   match(CountedLoopEnd cop cmp);
 12063   match(CountedLoopEnd cop cmp);
 12072   effect(USE labl);
 12064   effect(USE labl);
 12075   format %{ "j$cop,u   $labl\t# loop end" %}
 12067   format %{ "j$cop,u   $labl\t# loop end" %}
 12076   size(6);
 12068   size(6);
 12077   opcode(0x0F, 0x80);
 12069   opcode(0x0F, 0x80);
 12078   ins_encode(Jcc(cop, labl));
 12070   ins_encode(Jcc(cop, labl));
 12079   ins_pipe(pipe_jcc);
 12071   ins_pipe(pipe_jcc);
 12080   ins_pc_relative(1);
       
 12081 %}
 12072 %}
 12082 
 12073 
 12083 // Jump Direct Conditional - using unsigned comparison
 12074 // Jump Direct Conditional - using unsigned comparison
 12084 instruct jmpConU(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12075 instruct jmpConU(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12085   match(If cop cmp);
 12076   match(If cop cmp);
 12089   format %{ "j$cop,u  $labl" %}
 12080   format %{ "j$cop,u  $labl" %}
 12090   size(6);
 12081   size(6);
 12091   opcode(0x0F, 0x80);
 12082   opcode(0x0F, 0x80);
 12092   ins_encode(Jcc(cop, labl));
 12083   ins_encode(Jcc(cop, labl));
 12093   ins_pipe(pipe_jcc);
 12084   ins_pipe(pipe_jcc);
 12094   ins_pc_relative(1);
       
 12095 %}
 12085 %}
 12096 
 12086 
 12097 instruct jmpConUCF(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12087 instruct jmpConUCF(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12098   match(If cop cmp);
 12088   match(If cop cmp);
 12099   effect(USE labl);
 12089   effect(USE labl);
 12102   format %{ "j$cop,u  $labl" %}
 12092   format %{ "j$cop,u  $labl" %}
 12103   size(6);
 12093   size(6);
 12104   opcode(0x0F, 0x80);
 12094   opcode(0x0F, 0x80);
 12105   ins_encode(Jcc(cop, labl));
 12095   ins_encode(Jcc(cop, labl));
 12106   ins_pipe(pipe_jcc);
 12096   ins_pipe(pipe_jcc);
 12107   ins_pc_relative(1);
       
 12108 %}
 12097 %}
 12109 
 12098 
 12110 instruct jmpConUCF2(cmpOpUCF2 cop, rFlagsRegUCF cmp, label labl) %{
 12099 instruct jmpConUCF2(cmpOpUCF2 cop, rFlagsRegUCF cmp, label labl) %{
 12111   match(If cop cmp);
 12100   match(If cop cmp);
 12112   effect(USE labl);
 12101   effect(USE labl);
 12142     emit_cc(cbuf, $secondary, $cop$$cmpcode);
 12131     emit_cc(cbuf, $secondary, $cop$$cmpcode);
 12143     int disp = l->loc_pos() - (cbuf.insts_size() + 4);
 12132     int disp = l->loc_pos() - (cbuf.insts_size() + 4);
 12144     emit_d32(cbuf, disp);
 12133     emit_d32(cbuf, disp);
 12145   %}
 12134   %}
 12146   ins_pipe(pipe_jcc);
 12135   ins_pipe(pipe_jcc);
 12147   ins_pc_relative(1);
       
 12148 %}
 12136 %}
 12149 
 12137 
 12150 // ============================================================================
 12138 // ============================================================================
 12151 // The 2nd slow-half of a subtype check.  Scan the subklass's 2ndary
 12139 // The 2nd slow-half of a subtype check.  Scan the subklass's 2ndary
 12152 // superklass array for an instance of the superklass.  Set a hidden
 12140 // superklass array for an instance of the superklass.  Set a hidden
 12219   format %{ "jmp,s   $labl" %}
 12207   format %{ "jmp,s   $labl" %}
 12220   size(2);
 12208   size(2);
 12221   opcode(0xEB);
 12209   opcode(0xEB);
 12222   ins_encode(OpcP, LblShort(labl));
 12210   ins_encode(OpcP, LblShort(labl));
 12223   ins_pipe(pipe_jmp);
 12211   ins_pipe(pipe_jmp);
 12224   ins_pc_relative(1);
       
 12225   ins_short_branch(1);
 12212   ins_short_branch(1);
 12226 %}
 12213 %}
 12227 
 12214 
 12228 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12215 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12229 instruct jmpCon_short(cmpOp cop, rFlagsReg cr, label labl) %{
 12216 instruct jmpCon_short(cmpOp cop, rFlagsReg cr, label labl) %{
 12234   format %{ "j$cop,s   $labl" %}
 12221   format %{ "j$cop,s   $labl" %}
 12235   size(2);
 12222   size(2);
 12236   opcode(0x70);
 12223   opcode(0x70);
 12237   ins_encode(JccShort(cop, labl));
 12224   ins_encode(JccShort(cop, labl));
 12238   ins_pipe(pipe_jcc);
 12225   ins_pipe(pipe_jcc);
 12239   ins_pc_relative(1);
       
 12240   ins_short_branch(1);
 12226   ins_short_branch(1);
 12241 %}
 12227 %}
 12242 
 12228 
 12243 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12229 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12244 instruct jmpLoopEnd_short(cmpOp cop, rFlagsReg cr, label labl) %{
 12230 instruct jmpLoopEnd_short(cmpOp cop, rFlagsReg cr, label labl) %{
 12249   format %{ "j$cop,s   $labl\t# loop end" %}
 12235   format %{ "j$cop,s   $labl\t# loop end" %}
 12250   size(2);
 12236   size(2);
 12251   opcode(0x70);
 12237   opcode(0x70);
 12252   ins_encode(JccShort(cop, labl));
 12238   ins_encode(JccShort(cop, labl));
 12253   ins_pipe(pipe_jcc);
 12239   ins_pipe(pipe_jcc);
 12254   ins_pc_relative(1);
       
 12255   ins_short_branch(1);
 12240   ins_short_branch(1);
 12256 %}
 12241 %}
 12257 
 12242 
 12258 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12243 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 12259 instruct jmpLoopEndU_short(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12244 instruct jmpLoopEndU_short(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12264   format %{ "j$cop,us  $labl\t# loop end" %}
 12249   format %{ "j$cop,us  $labl\t# loop end" %}
 12265   size(2);
 12250   size(2);
 12266   opcode(0x70);
 12251   opcode(0x70);
 12267   ins_encode(JccShort(cop, labl));
 12252   ins_encode(JccShort(cop, labl));
 12268   ins_pipe(pipe_jcc);
 12253   ins_pipe(pipe_jcc);
 12269   ins_pc_relative(1);
       
 12270   ins_short_branch(1);
 12254   ins_short_branch(1);
 12271 %}
 12255 %}
 12272 
 12256 
 12273 instruct jmpLoopEndUCF_short(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12257 instruct jmpLoopEndUCF_short(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12274   match(CountedLoopEnd cop cmp);
 12258   match(CountedLoopEnd cop cmp);
 12278   format %{ "j$cop,us  $labl\t# loop end" %}
 12262   format %{ "j$cop,us  $labl\t# loop end" %}
 12279   size(2);
 12263   size(2);
 12280   opcode(0x70);
 12264   opcode(0x70);
 12281   ins_encode(JccShort(cop, labl));
 12265   ins_encode(JccShort(cop, labl));
 12282   ins_pipe(pipe_jcc);
 12266   ins_pipe(pipe_jcc);
 12283   ins_pc_relative(1);
       
 12284   ins_short_branch(1);
 12267   ins_short_branch(1);
 12285 %}
 12268 %}
 12286 
 12269 
 12287 // Jump Direct Conditional - using unsigned comparison
 12270 // Jump Direct Conditional - using unsigned comparison
 12288 instruct jmpConU_short(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12271 instruct jmpConU_short(cmpOpU cop, rFlagsRegU cmp, label labl) %{
 12293   format %{ "j$cop,us  $labl" %}
 12276   format %{ "j$cop,us  $labl" %}
 12294   size(2);
 12277   size(2);
 12295   opcode(0x70);
 12278   opcode(0x70);
 12296   ins_encode(JccShort(cop, labl));
 12279   ins_encode(JccShort(cop, labl));
 12297   ins_pipe(pipe_jcc);
 12280   ins_pipe(pipe_jcc);
 12298   ins_pc_relative(1);
       
 12299   ins_short_branch(1);
 12281   ins_short_branch(1);
 12300 %}
 12282 %}
 12301 
 12283 
 12302 instruct jmpConUCF_short(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12284 instruct jmpConUCF_short(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
 12303   match(If cop cmp);
 12285   match(If cop cmp);
 12307   format %{ "j$cop,us  $labl" %}
 12289   format %{ "j$cop,us  $labl" %}
 12308   size(2);
 12290   size(2);
 12309   opcode(0x70);
 12291   opcode(0x70);
 12310   ins_encode(JccShort(cop, labl));
 12292   ins_encode(JccShort(cop, labl));
 12311   ins_pipe(pipe_jcc);
 12293   ins_pipe(pipe_jcc);
 12312   ins_pc_relative(1);
       
 12313   ins_short_branch(1);
 12294   ins_short_branch(1);
 12314 %}
 12295 %}
 12315 
 12296 
 12316 instruct jmpConUCF2_short(cmpOpUCF2 cop, rFlagsRegUCF cmp, label labl) %{
 12297 instruct jmpConUCF2_short(cmpOpUCF2 cop, rFlagsRegUCF cmp, label labl) %{
 12317   match(If cop cmp);
 12298   match(If cop cmp);
 12347     emit_d8(cbuf, disp);
 12328     emit_d8(cbuf, disp);
 12348     assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp");
 12329     assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp");
 12349     assert(-128 <= parity_disp && parity_disp <= 127, "Displacement too large for short jmp");
 12330     assert(-128 <= parity_disp && parity_disp <= 127, "Displacement too large for short jmp");
 12350   %}
 12331   %}
 12351   ins_pipe(pipe_jcc);
 12332   ins_pipe(pipe_jcc);
 12352   ins_pc_relative(1);
       
 12353   ins_short_branch(1);
 12333   ins_short_branch(1);
 12354 %}
 12334 %}
 12355 
 12335 
 12356 // ============================================================================
 12336 // ============================================================================
 12357 // inlined locking and unlocking
 12337 // inlined locking and unlocking
 12364 
 12344 
 12365   ins_cost(300);
 12345   ins_cost(300);
 12366   format %{ "fastlock $object,$box,$tmp,$scr" %}
 12346   format %{ "fastlock $object,$box,$tmp,$scr" %}
 12367   ins_encode(Fast_Lock(object, box, tmp, scr));
 12347   ins_encode(Fast_Lock(object, box, tmp, scr));
 12368   ins_pipe(pipe_slow);
 12348   ins_pipe(pipe_slow);
 12369   ins_pc_relative(1);
       
 12370 %}
 12349 %}
 12371 
 12350 
 12372 instruct cmpFastUnlock(rFlagsReg cr,
 12351 instruct cmpFastUnlock(rFlagsReg cr,
 12373                        rRegP object, rax_RegP box, rRegP tmp)
 12352                        rRegP object, rax_RegP box, rRegP tmp)
 12374 %{
 12353 %{
 12377 
 12356 
 12378   ins_cost(300);
 12357   ins_cost(300);
 12379   format %{ "fastunlock $object, $box, $tmp" %}
 12358   format %{ "fastunlock $object, $box, $tmp" %}
 12380   ins_encode(Fast_Unlock(object, box, tmp));
 12359   ins_encode(Fast_Unlock(object, box, tmp));
 12381   ins_pipe(pipe_slow);
 12360   ins_pipe(pipe_slow);
 12382   ins_pc_relative(1);
       
 12383 %}
 12361 %}
 12384 
 12362 
 12385 
 12363 
 12386 // ============================================================================
 12364 // ============================================================================
 12387 // Safepoint Instructions
 12365 // Safepoint Instructions
 12430   ins_cost(300);
 12408   ins_cost(300);
 12431   format %{ "call,static " %}
 12409   format %{ "call,static " %}
 12432   opcode(0xE8); /* E8 cd */
 12410   opcode(0xE8); /* E8 cd */
 12433   ins_encode(Java_Static_Call(meth), call_epilog);
 12411   ins_encode(Java_Static_Call(meth), call_epilog);
 12434   ins_pipe(pipe_slow);
 12412   ins_pipe(pipe_slow);
 12435   ins_pc_relative(1);
       
 12436   ins_alignment(4);
 12413   ins_alignment(4);
 12437 %}
 12414 %}
 12438 
 12415 
 12439 // Call Java Static Instruction (method handle version)
 12416 // Call Java Static Instruction (method handle version)
 12440 // Note: If this code changes, the corresponding ret_addr_offset() and
 12417 // Note: If this code changes, the corresponding ret_addr_offset() and
 12452   ins_encode(preserve_SP,
 12429   ins_encode(preserve_SP,
 12453              Java_Static_Call(meth),
 12430              Java_Static_Call(meth),
 12454              restore_SP,
 12431              restore_SP,
 12455              call_epilog);
 12432              call_epilog);
 12456   ins_pipe(pipe_slow);
 12433   ins_pipe(pipe_slow);
 12457   ins_pc_relative(1);
       
 12458   ins_alignment(4);
 12434   ins_alignment(4);
 12459 %}
 12435 %}
 12460 
 12436 
 12461 // Call Java Dynamic Instruction
 12437 // Call Java Dynamic Instruction
 12462 // Note: If this code changes, the corresponding ret_addr_offset() and
 12438 // Note: If this code changes, the corresponding ret_addr_offset() and
 12470   format %{ "movq    rax, #Universe::non_oop_word()\n\t"
 12446   format %{ "movq    rax, #Universe::non_oop_word()\n\t"
 12471             "call,dynamic " %}
 12447             "call,dynamic " %}
 12472   opcode(0xE8); /* E8 cd */
 12448   opcode(0xE8); /* E8 cd */
 12473   ins_encode(Java_Dynamic_Call(meth), call_epilog);
 12449   ins_encode(Java_Dynamic_Call(meth), call_epilog);
 12474   ins_pipe(pipe_slow);
 12450   ins_pipe(pipe_slow);
 12475   ins_pc_relative(1);
       
 12476   ins_alignment(4);
 12451   ins_alignment(4);
 12477 %}
 12452 %}
 12478 
 12453 
 12479 // Call Runtime Instruction
 12454 // Call Runtime Instruction
 12480 instruct CallRuntimeDirect(method meth)
 12455 instruct CallRuntimeDirect(method meth)
 12485   ins_cost(300);
 12460   ins_cost(300);
 12486   format %{ "call,runtime " %}
 12461   format %{ "call,runtime " %}
 12487   opcode(0xE8); /* E8 cd */
 12462   opcode(0xE8); /* E8 cd */
 12488   ins_encode(Java_To_Runtime(meth));
 12463   ins_encode(Java_To_Runtime(meth));
 12489   ins_pipe(pipe_slow);
 12464   ins_pipe(pipe_slow);
 12490   ins_pc_relative(1);
       
 12491 %}
 12465 %}
 12492 
 12466 
 12493 // Call runtime without safepoint
 12467 // Call runtime without safepoint
 12494 instruct CallLeafDirect(method meth)
 12468 instruct CallLeafDirect(method meth)
 12495 %{
 12469 %{
 12499   ins_cost(300);
 12473   ins_cost(300);
 12500   format %{ "call_leaf,runtime " %}
 12474   format %{ "call_leaf,runtime " %}
 12501   opcode(0xE8); /* E8 cd */
 12475   opcode(0xE8); /* E8 cd */
 12502   ins_encode(Java_To_Runtime(meth));
 12476   ins_encode(Java_To_Runtime(meth));
 12503   ins_pipe(pipe_slow);
 12477   ins_pipe(pipe_slow);
 12504   ins_pc_relative(1);
       
 12505 %}
 12478 %}
 12506 
 12479 
 12507 // Call runtime without safepoint
 12480 // Call runtime without safepoint
 12508 instruct CallLeafNoFPDirect(method meth)
 12481 instruct CallLeafNoFPDirect(method meth)
 12509 %{
 12482 %{
 12513   ins_cost(300);
 12486   ins_cost(300);
 12514   format %{ "call_leaf_nofp,runtime " %}
 12487   format %{ "call_leaf_nofp,runtime " %}
 12515   opcode(0xE8); /* E8 cd */
 12488   opcode(0xE8); /* E8 cd */
 12516   ins_encode(Java_To_Runtime(meth));
 12489   ins_encode(Java_To_Runtime(meth));
 12517   ins_pipe(pipe_slow);
 12490   ins_pipe(pipe_slow);
 12518   ins_pc_relative(1);
       
 12519 %}
 12491 %}
 12520 
 12492 
 12521 // Return Instruction
 12493 // Return Instruction
 12522 // Remove the return address & jump to it.
 12494 // Remove the return address & jump to it.
 12523 // Notice: We always emit a nop after a ret to make sure there is room
 12495 // Notice: We always emit a nop after a ret to make sure there is room