< 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"

@@ -3048,10 +3049,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;

@@ -3084,10 +3089,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:

@@ -3155,10 +3161,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;

@@ -3182,10 +3192,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);

@@ -3279,10 +3290,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;

@@ -3312,10 +3327,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 >