< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_64.cpp

Print this page
*** 23,10 ***
--- 23,11 ---
   */
  
  #include "precompiled.hpp"
  #include "asm/macroAssembler.hpp"
  #include "classfile/vmIntrinsics.hpp"
+ #include "code/SCCache.hpp"
  #include "compiler/oopMap.hpp"
  #include "gc/shared/barrierSet.hpp"
  #include "gc/shared/barrierSetAssembler.hpp"
  #include "gc/shared/barrierSetNMethod.hpp"
  #include "gc/shared/gc_globals.hpp"

*** 3047,10 ***
--- 3048,14 ---
  address StubGenerator::generate_multiplyToLen() {
    __ align(CodeEntryAlignment);
    StubCodeMark mark(this, "StubRoutines", "multiplyToLen");
    address start = __ pc();
  
+   if (SCCache::load_stub(this, vmIntrinsics::_multiplyToLen, "multiplyToLen", start)) {
+     return start;
+   }
+ 
    // Win64: rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...)
    // Unix:  rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...)
    const Register x     = rdi;
    const Register xlen  = rax;
    const Register y     = rsi;

*** 3083,10 ***
--- 3088,11 ---
    restore_arg_regs();
  
    __ leave(); // required for proper stackwalking of RuntimeStub frame
    __ ret(0);
  
+   SCCache::store_stub(this, vmIntrinsics::_multiplyToLen, "multiplyToLen", start);
    return start;
  }
  
  /**
  *  Arguments:

*** 3154,10 ***
--- 3160,14 ---
  
    __ align(CodeEntryAlignment);
    StubCodeMark mark(this, "StubRoutines", "squareToLen");
    address start = __ pc();
  
+   if (SCCache::load_stub(this, vmIntrinsics::_squareToLen, "squareToLen", start)) {
+     return start;
+   }
+ 
    // Win64: rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...)
    // Unix:  rdi, rsi, rdx, rcx (c_rarg0, c_rarg1, ...)
    const Register x      = rdi;
    const Register len    = rsi;
    const Register z      = r8;

*** 3181,10 ***
--- 3191,11 ---
    restore_arg_regs();
  
    __ leave(); // required for proper stackwalking of RuntimeStub frame
    __ ret(0);
  
+   SCCache::store_stub(this, vmIntrinsics::_squareToLen, "squareToLen", start);
    return start;
  }
  
  address StubGenerator::generate_method_entry_barrier() {
    __ align(CodeEntryAlignment);

*** 3278,10 ***
--- 3289,14 ---
  address StubGenerator::generate_mulAdd() {
    __ align(CodeEntryAlignment);
    StubCodeMark mark(this, "StubRoutines", "mulAdd");
    address start = __ pc();
  
+   if (SCCache::load_stub(this, vmIntrinsics::_mulAdd, "mulAdd", start)) {
+     return start;
+   }
+ 
    // Win64: rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...)
    // Unix:  rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...)
    const Register out     = rdi;
    const Register in      = rsi;
    const Register offset  = r11;

*** 3311,10 ***
--- 3326,11 ---
    restore_arg_regs();
  
    __ leave(); // required for proper stackwalking of RuntimeStub frame
    __ ret(0);
  
+   SCCache::store_stub(this, vmIntrinsics::_mulAdd, "mulAdd", start);
    return start;
  }
  
  address StubGenerator::generate_bigIntegerRightShift() {
    __ align(CodeEntryAlignment);
< prev index next >