< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_64.cpp

Print this page
@@ -24,10 +24,11 @@
  
  #include "precompiled.hpp"
  #include "asm/macroAssembler.hpp"
  #include "classfile/javaClasses.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"

@@ -3051,10 +3052,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;

@@ -3087,10 +3092,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:

@@ -3158,10 +3164,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;

@@ -3185,10 +3195,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);

@@ -3282,10 +3293,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;

@@ -3315,10 +3330,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 >