src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8074457 Cdiff src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
Print this page
*** 23,36 ****
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "interpreter/bytecodeHistogram.hpp"
#include "interpreter/interpreter.hpp"
- #include "interpreter/interpreterGenerator.hpp"
#include "interpreter/interpreterRuntime.hpp"
! #include "interpreter/interp_masm.hpp"
#include "interpreter/templateTable.hpp"
#include "oops/arrayOop.hpp"
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
--- 23,36 ----
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "interpreter/bytecodeHistogram.hpp"
+ #include "interpreter/interp_masm.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
! #include "interpreter/templateInterpreterGenerator.hpp"
#include "interpreter/templateTable.hpp"
#include "oops/arrayOop.hpp"
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
*** 47,58 ****
#include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#define __ _masm->
- #ifndef CC_INTERP
-
// Global Register Names
static const Register rbcp = LP64_ONLY(r13) NOT_LP64(rsi);
static const Register rlocals = LP64_ONLY(r14) NOT_LP64(rdi);
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
--- 47,56 ----
*** 359,369 ****
// so we have a 'sticky' overflow test
//
// rbx: method
// rcx: invocation counter
//
! void InterpreterGenerator::generate_counter_incr(
Label* overflow,
Label* profile_method,
Label* profile_method_continue) {
Label done;
// Note: In tiered we increment either counters in Method* or in MDO depending if we're profiling or not.
--- 357,367 ----
// so we have a 'sticky' overflow test
//
// rbx: method
// rcx: invocation counter
//
! void TemplateInterpreterGenerator::generate_counter_incr(
Label* overflow,
Label* profile_method,
Label* profile_method_continue) {
Label done;
// Note: In tiered we increment either counters in Method* or in MDO depending if we're profiling or not.
*** 434,444 ****
__ jcc(Assembler::aboveEqual, *overflow);
__ bind(done);
}
}
! void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
// Asm interpreter on entry
// r14/rdi - locals
// r13/rsi - bcp
// rbx - method
--- 432,442 ----
__ jcc(Assembler::aboveEqual, *overflow);
__ bind(done);
}
}
! void TemplateInterpreterGenerator::generate_counter_overflow(Label& do_continue) {
// Asm interpreter on entry
// r14/rdi - locals
// r13/rsi - bcp
// rbx - method
*** 464,474 ****
rarg);
__ movptr(rbx, Address(rbp, method_offset)); // restore Method*
// Preserve invariant that r13/r14 contain bcp/locals of sender frame
// and jump to the interpreted entry.
! __ jmp(*do_continue, relocInfo::none);
}
// See if we've got enough room on the stack for locals plus overhead.
// The expression stack grows down incrementally, so the normal guard
// page mechanism will work for that.
--- 462,472 ----
rarg);
__ movptr(rbx, Address(rbp, method_offset)); // restore Method*
// Preserve invariant that r13/r14 contain bcp/locals of sender frame
// and jump to the interpreted entry.
! __ jmp(do_continue, relocInfo::none);
}
// See if we've got enough room on the stack for locals plus overhead.
// The expression stack grows down incrementally, so the normal guard
// page mechanism will work for that.
*** 481,491 ****
// rdx: number of additional locals this frame needs (what we must check)
// rbx: Method*
//
// Kills:
// rax
! void InterpreterGenerator::generate_stack_overflow_check(void) {
// monitor entry size: see picture of stack in frame_x86.hpp
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
// total overhead size: entry_size + (saved rbp through expr stack
--- 479,489 ----
// rdx: number of additional locals this frame needs (what we must check)
// rbx: Method*
//
// Kills:
// rax
! void TemplateInterpreterGenerator::generate_stack_overflow_check(void) {
// monitor entry size: see picture of stack in frame_x86.hpp
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
// total overhead size: entry_size + (saved rbp through expr stack
*** 685,695 ****
}
// End of helpers
// Method entry for java.lang.ref.Reference.get.
! address InterpreterGenerator::generate_Reference_get_entry(void) {
#if INCLUDE_ALL_GCS
// Code: _aload_0, _getfield, _areturn
// parameter size = 1
//
// The code that gets generated by this routine is split into 2 parts:
--- 683,693 ----
}
// End of helpers
// Method entry for java.lang.ref.Reference.get.
! address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
#if INCLUDE_ALL_GCS
// Code: _aload_0, _getfield, _areturn
// parameter size = 1
//
// The code that gets generated by this routine is split into 2 parts:
*** 781,791 ****
}
// Interpreter stub for calling a native method. (asm interpreter)
// This sets up a somewhat different looking stack for calling the
// native method than the typical interpreter frame setup.
! address InterpreterGenerator::generate_native_entry(bool synchronized) {
// determine code generation flags
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
// rbx: Method*
// rbcp: sender sp
--- 779,789 ----
}
// Interpreter stub for calling a native method. (asm interpreter)
// This sets up a somewhat different looking stack for calling the
// native method than the typical interpreter frame setup.
! address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// determine code generation flags
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
// rbx: Method*
// rbcp: sender sp
*** 1298,1317 ****
__ jmp(rdi);
if (inc_counter) {
// Handle overflow of counter and compile method
__ bind(invocation_counter_overflow);
! generate_counter_overflow(&continue_after_compile);
}
return entry_point;
}
//
// Generic interpreted method entry to (asm) interpreter
//
! address InterpreterGenerator::generate_normal_entry(bool synchronized) {
// determine code generation flags
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
// ebx: Method*
// rbcp: sender sp
--- 1296,1315 ----
__ jmp(rdi);
if (inc_counter) {
// Handle overflow of counter and compile method
__ bind(invocation_counter_overflow);
! generate_counter_overflow(continue_after_compile);
}
return entry_point;
}
//
// Generic interpreted method entry to (asm) interpreter
//
! address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
// determine code generation flags
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
// ebx: Method*
// rbcp: sender sp
*** 1469,1479 ****
__ get_method(rbx);
__ jmp(profile_method_continue);
}
// Handle overflow of counter and compile method
__ bind(invocation_counter_overflow);
! generate_counter_overflow(&continue_after_compile);
}
return entry_point;
}
--- 1467,1477 ----
__ get_method(rbx);
__ jmp(profile_method_continue);
}
// Handle overflow of counter and compile method
__ bind(invocation_counter_overflow);
! generate_counter_overflow(continue_after_compile);
}
return entry_point;
}
*** 1765,1786 ****
vep = __ pc();
__ bind(L);
generate_and_dispatch(t);
}
-
- //-----------------------------------------------------------------------------
- // Generation of individual instructions
-
- // helpers for generate_and_dispatch
-
-
- InterpreterGenerator::InterpreterGenerator(StubQueue* code)
- : TemplateInterpreterGenerator(code) {
- generate_all(); // down here so it can be "virtual"
- }
-
//-----------------------------------------------------------------------------
// Non-product code
#ifndef PRODUCT
--- 1763,1772 ----
*** 1869,1874 ****
__ jcc(Assembler::notEqual, L);
__ int3();
__ bind(L);
}
#endif // !PRODUCT
- #endif // ! CC_INTERP
--- 1855,1859 ----
src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File