8145117: PPC64: Remove cpp interpreter implementation
Reviewed-by: coleenp, mdoerr
This commit is contained in:
parent
2e4d7b8120
commit
39e280e4e3
@ -84,10 +84,7 @@ frame frame::sender_for_entry_frame(RegisterMap *map) const {
|
||||
|
||||
frame frame::sender_for_interpreter_frame(RegisterMap *map) const {
|
||||
// Pass callers initial_caller_sp as unextended_sp.
|
||||
return frame(sender_sp(), sender_pc(),
|
||||
CC_INTERP_ONLY((intptr_t*)((parent_ijava_frame_abi *)callers_abi())->initial_caller_sp)
|
||||
NOT_CC_INTERP((intptr_t*)get_ijava_state()->sender_sp)
|
||||
);
|
||||
return frame(sender_sp(), sender_pc(), (intptr_t*)get_ijava_state()->sender_sp);
|
||||
}
|
||||
|
||||
frame frame::sender_for_compiled_frame(RegisterMap *map) const {
|
||||
@ -168,14 +165,8 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
if (method->is_native()) {
|
||||
// Prior to calling into the runtime to notify the method exit the possible
|
||||
// result value is saved into the interpreter frame.
|
||||
#ifdef CC_INTERP
|
||||
interpreterState istate = get_interpreterState();
|
||||
address lresult = (address)istate + in_bytes(BytecodeInterpreter::native_lresult_offset());
|
||||
address fresult = (address)istate + in_bytes(BytecodeInterpreter::native_fresult_offset());
|
||||
#else
|
||||
address lresult = (address)&(get_ijava_state()->lresult);
|
||||
address fresult = (address)&(get_ijava_state()->fresult);
|
||||
#endif
|
||||
|
||||
switch (method->result_type()) {
|
||||
case T_OBJECT:
|
||||
@ -226,31 +217,6 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
|
||||
void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
if (is_interpreted_frame()) {
|
||||
#ifdef CC_INTERP
|
||||
interpreterState istate = get_interpreterState();
|
||||
values.describe(frame_no, (intptr_t*)istate, "istate");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_thread), " thread");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_bcp), " bcp");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_locals), " locals");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_constants), " constants");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_method), err_msg(" method = %s", istate->_method->name_and_sig_as_C_string()));
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_mdx), " mdx");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_stack), " stack");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_msg), err_msg(" msg = %s", BytecodeInterpreter::C_msg(istate->_msg)));
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_result), " result");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_prev_link), " prev_link");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_oop_temp), " oop_temp");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_stack_base), " stack_base");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_stack_limit), " stack_limit");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_monitor_base), " monitor_base");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_frame_bottom), " frame_bottom");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_last_Java_pc), " last_Java_pc");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_last_Java_fp), " last_Java_fp");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_last_Java_sp), " last_Java_sp");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_self_link), " self_link");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_native_fresult), " native_fresult");
|
||||
values.describe(frame_no, (intptr_t*)&(istate->_native_lresult), " native_lresult");
|
||||
#else
|
||||
#define DESCRIBE_ADDRESS(name) \
|
||||
values.describe(frame_no, (intptr_t*)&(get_ijava_state()->name), #name);
|
||||
|
||||
@ -266,7 +232,6 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
DESCRIBE_ADDRESS(oop_tmp);
|
||||
DESCRIBE_ADDRESS(lresult);
|
||||
DESCRIBE_ADDRESS(fresult);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -193,33 +193,48 @@
|
||||
#define _spill_nonvolatiles_neg(_component) \
|
||||
(int)(-frame::spill_nonvolatiles_size + offset_of(frame::spill_nonvolatiles, _component))
|
||||
|
||||
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// Frame layout for the Java template interpreter on PPC64.
|
||||
// Frame layout for the Java template interpreter on PPC64.
|
||||
//
|
||||
// Diffs to the CC_INTERP are marked with 'X'.
|
||||
// In these figures the stack grows upwards, while memory grows
|
||||
// downwards. Square brackets denote regions possibly larger than
|
||||
// single 64 bit slots.
|
||||
//
|
||||
// STACK (interpreter is active):
|
||||
// 0 [TOP_IJAVA_FRAME]
|
||||
// [PARENT_IJAVA_FRAME]
|
||||
// ...
|
||||
// [PARENT_IJAVA_FRAME]
|
||||
// [ENTRY_FRAME]
|
||||
// [C_FRAME]
|
||||
// ...
|
||||
// [C_FRAME]
|
||||
//
|
||||
// With the following frame layouts:
|
||||
// TOP_IJAVA_FRAME:
|
||||
//
|
||||
// 0 [TOP_IJAVA_FRAME_ABI]
|
||||
// alignment (optional)
|
||||
// [operand stack]
|
||||
// [monitors] (optional)
|
||||
// X[IJAVA_STATE]
|
||||
// [IJAVA_STATE]
|
||||
// note: own locals are located in the caller frame.
|
||||
//
|
||||
// PARENT_IJAVA_FRAME:
|
||||
//
|
||||
// 0 [PARENT_IJAVA_FRAME_ABI]
|
||||
// alignment (optional)
|
||||
// [callee's Java result]
|
||||
// [callee's locals w/o arguments]
|
||||
// [outgoing arguments]
|
||||
// [used part of operand stack w/o arguments]
|
||||
// [monitors] (optional)
|
||||
// X[IJAVA_STATE]
|
||||
// [monitors] (optional)
|
||||
// [IJAVA_STATE]
|
||||
//
|
||||
// ENTRY_FRAME:
|
||||
// 0 [PARENT_IJAVA_FRAME_ABI]
|
||||
// alignment (optional)
|
||||
// [callee's Java result]
|
||||
// [callee's locals w/o arguments]
|
||||
// [outgoing arguments]
|
||||
// [ENTRY_FRAME_LOCALS]
|
||||
|
||||
struct parent_ijava_frame_abi : abi_minframe {
|
||||
};
|
||||
@ -269,113 +284,6 @@
|
||||
#define _ijava_state_neg(_component) \
|
||||
(int) (-frame::ijava_state_size + offset_of(frame::ijava_state, _component))
|
||||
|
||||
#else // CC_INTERP:
|
||||
|
||||
// Frame layout for the Java C++ interpreter on PPC64.
|
||||
//
|
||||
// This frame layout provides a C-like frame for every Java frame.
|
||||
//
|
||||
// In these figures the stack grows upwards, while memory grows
|
||||
// downwards. Square brackets denote regions possibly larger than
|
||||
// single 64 bit slots.
|
||||
//
|
||||
// STACK (no JNI, no compiled code, no library calls,
|
||||
// interpreter-loop is active):
|
||||
// 0 [InterpretMethod]
|
||||
// [TOP_IJAVA_FRAME]
|
||||
// [PARENT_IJAVA_FRAME]
|
||||
// ...
|
||||
// [PARENT_IJAVA_FRAME]
|
||||
// [ENTRY_FRAME]
|
||||
// [C_FRAME]
|
||||
// ...
|
||||
// [C_FRAME]
|
||||
//
|
||||
// TOP_IJAVA_FRAME:
|
||||
// 0 [TOP_IJAVA_FRAME_ABI]
|
||||
// alignment (optional)
|
||||
// [operand stack]
|
||||
// [monitors] (optional)
|
||||
// [cInterpreter object]
|
||||
// result, locals, and arguments are in parent frame!
|
||||
//
|
||||
// PARENT_IJAVA_FRAME:
|
||||
// 0 [PARENT_IJAVA_FRAME_ABI]
|
||||
// alignment (optional)
|
||||
// [callee's Java result]
|
||||
// [callee's locals w/o arguments]
|
||||
// [outgoing arguments]
|
||||
// [used part of operand stack w/o arguments]
|
||||
// [monitors] (optional)
|
||||
// [cInterpreter object]
|
||||
//
|
||||
// ENTRY_FRAME:
|
||||
// 0 [PARENT_IJAVA_FRAME_ABI]
|
||||
// alignment (optional)
|
||||
// [callee's Java result]
|
||||
// [callee's locals w/o arguments]
|
||||
// [outgoing arguments]
|
||||
// [ENTRY_FRAME_LOCALS]
|
||||
//
|
||||
// PARENT_IJAVA_FRAME_ABI:
|
||||
// 0 [ABI_MINFRAME]
|
||||
// top_frame_sp
|
||||
// initial_caller_sp
|
||||
//
|
||||
// TOP_IJAVA_FRAME_ABI:
|
||||
// 0 [PARENT_IJAVA_FRAME_ABI]
|
||||
// carg_3_unused
|
||||
// carg_4_unused
|
||||
// carg_5_unused
|
||||
// carg_6_unused
|
||||
// carg_7_unused
|
||||
// frame_manager_lr
|
||||
//
|
||||
|
||||
// PARENT_IJAVA_FRAME_ABI
|
||||
|
||||
struct parent_ijava_frame_abi : abi_minframe {
|
||||
// SOE registers.
|
||||
// C2i adapters spill their top-frame stack-pointer here.
|
||||
uint64_t top_frame_sp; // carg_1
|
||||
// Sp of calling compiled frame before it was resized by the c2i
|
||||
// adapter or sp of call stub. Does not contain a valid value for
|
||||
// non-initial frames.
|
||||
uint64_t initial_caller_sp; // carg_2
|
||||
// aligned to frame::alignment_in_bytes (16)
|
||||
};
|
||||
|
||||
enum {
|
||||
parent_ijava_frame_abi_size = sizeof(parent_ijava_frame_abi)
|
||||
};
|
||||
|
||||
#define _parent_ijava_frame_abi(_component) \
|
||||
(offset_of(frame::parent_ijava_frame_abi, _component))
|
||||
|
||||
// TOP_IJAVA_FRAME_ABI
|
||||
|
||||
struct top_ijava_frame_abi : parent_ijava_frame_abi {
|
||||
uint64_t carg_3_unused; // carg_3
|
||||
uint64_t card_4_unused; //_16 carg_4
|
||||
uint64_t carg_5_unused; // carg_5
|
||||
uint64_t carg_6_unused; //_16 carg_6
|
||||
uint64_t carg_7_unused; // carg_7
|
||||
// Use arg8 for storing frame_manager_lr. The size of
|
||||
// top_ijava_frame_abi must match abi_reg_args.
|
||||
uint64_t frame_manager_lr; //_16 carg_8
|
||||
// nothing to add here!
|
||||
// aligned to frame::alignment_in_bytes (16)
|
||||
};
|
||||
|
||||
enum {
|
||||
top_ijava_frame_abi_size = sizeof(top_ijava_frame_abi)
|
||||
};
|
||||
|
||||
#define _top_ijava_frame_abi(_component) \
|
||||
(offset_of(frame::top_ijava_frame_abi, _component))
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
// ENTRY_FRAME
|
||||
|
||||
struct entry_frame_locals {
|
||||
@ -496,10 +404,6 @@
|
||||
|
||||
public:
|
||||
|
||||
#ifdef CC_INTERP
|
||||
// Additional interface for interpreter frames:
|
||||
inline interpreterState get_interpreterState() const;
|
||||
#else
|
||||
inline ijava_state* get_ijava_state() const;
|
||||
// Some convenient register frame setters/getters for deoptimization.
|
||||
inline intptr_t* interpreter_frame_esp() const;
|
||||
@ -507,7 +411,6 @@
|
||||
inline void interpreter_frame_set_esp(intptr_t* esp);
|
||||
inline void interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp);
|
||||
inline void interpreter_frame_set_sender_sp(intptr_t* sender_sp);
|
||||
#endif // CC_INTERP
|
||||
|
||||
// Size of a monitor in bytes.
|
||||
static int interpreter_frame_monitor_size_in_bytes();
|
||||
|
@ -123,84 +123,6 @@ inline intptr_t* frame::real_fp() const {
|
||||
return fp();
|
||||
}
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
inline interpreterState frame::get_interpreterState() const {
|
||||
return (interpreterState)(((address)callers_abi())
|
||||
- frame::interpreter_frame_cinterpreterstate_size_in_bytes());
|
||||
}
|
||||
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t**)&istate->_locals;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*)&istate->_bcp;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*)&istate->_mdx;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_expression_stack() const {
|
||||
return (intptr_t*)interpreter_frame_monitor_end() - 1;
|
||||
}
|
||||
|
||||
inline jint frame::interpreter_frame_expression_stack_direction() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// top of expression stack
|
||||
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return istate->_stack + 1;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
|
||||
return &interpreter_frame_tos_address()[offset];
|
||||
}
|
||||
|
||||
// monitor elements
|
||||
|
||||
// in keeping with Intel side: end is lower in memory than begin;
|
||||
// and beginning element is oldest element
|
||||
// Also begin is one past last monitor.
|
||||
|
||||
inline BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
|
||||
return get_interpreterState()->monitor_base();
|
||||
}
|
||||
|
||||
inline BasicObjectLock* frame::interpreter_frame_monitor_end() const {
|
||||
return (BasicObjectLock*)get_interpreterState()->stack_base();
|
||||
}
|
||||
|
||||
inline int frame::interpreter_frame_cinterpreterstate_size_in_bytes() {
|
||||
// Size of an interpreter object. Not aligned with frame size.
|
||||
return round_to(sizeof(BytecodeInterpreter), 8);
|
||||
}
|
||||
|
||||
inline Method** frame::interpreter_frame_method_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return &istate->_method;
|
||||
}
|
||||
|
||||
// Constant pool cache
|
||||
|
||||
inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return &istate->_constants; // should really use accessor
|
||||
}
|
||||
|
||||
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return &istate->_constants;
|
||||
}
|
||||
|
||||
#else // !CC_INTERP
|
||||
|
||||
// Template Interpreter frame value accessors.
|
||||
|
||||
inline frame::ijava_state* frame::get_ijava_state() const {
|
||||
@ -267,8 +189,6 @@ inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
|
||||
return &interpreter_frame_tos_address()[offset];
|
||||
}
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
inline int frame::interpreter_frame_monitor_size() {
|
||||
// Number of stack slots for a monitor.
|
||||
return round_to(BasicObjectLock::size(), // number of stack slots
|
||||
|
@ -26,6 +26,10 @@
|
||||
#ifndef CPU_PPC_VM_GLOBALDEFINITIONS_PPC_HPP
|
||||
#define CPU_PPC_VM_GLOBALDEFINITIONS_PPC_HPP
|
||||
|
||||
#ifdef CC_INTERP
|
||||
#error "CC_INTERP no more supported. Removed in change 8145117."
|
||||
#endif
|
||||
|
||||
// Size of PPC Instructions
|
||||
const int BytesPerInstWord = 4;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,11 +38,7 @@
|
||||
#endif
|
||||
|
||||
void InterpreterMacroAssembler::null_check_throw(Register a, int offset, Register temp_reg) {
|
||||
#ifdef CC_INTERP
|
||||
address exception_entry = StubRoutines::throw_NullPointerException_at_call_entry();
|
||||
#else
|
||||
address exception_entry = Interpreter::throw_NullPointerException_entry();
|
||||
#endif
|
||||
MacroAssembler::null_check_throw(a, offset, temp_reg, exception_entry);
|
||||
}
|
||||
|
||||
@ -57,8 +53,6 @@ void InterpreterMacroAssembler::jump_to_entry(address entry, Register Rscratch)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::dispatch_next(TosState state, int bcp_incr) {
|
||||
Register bytecode = R12_scratch2;
|
||||
if (bcp_incr != 0) {
|
||||
@ -207,7 +201,8 @@ void InterpreterMacroAssembler::load_dispatch_table(Register dst, address* table
|
||||
}
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::dispatch_Lbyte_code(TosState state, Register bytecode, address* table, bool verify) {
|
||||
void InterpreterMacroAssembler::dispatch_Lbyte_code(TosState state, Register bytecode,
|
||||
address* table, bool verify) {
|
||||
if (verify) {
|
||||
unimplemented("dispatch_Lbyte_code: verify"); // See Sparc Implementation to implement this
|
||||
}
|
||||
@ -394,7 +389,8 @@ void InterpreterMacroAssembler::get_4_byte_integer_at_bcp(int bcp_offset
|
||||
//
|
||||
// Kills / writes:
|
||||
// - Rdst, Rscratch
|
||||
void InterpreterMacroAssembler::get_cache_index_at_bcp(Register Rdst, int bcp_offset, size_t index_size) {
|
||||
void InterpreterMacroAssembler::get_cache_index_at_bcp(Register Rdst, int bcp_offset,
|
||||
size_t index_size) {
|
||||
assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
|
||||
// Cache index is always in the native format, courtesy of Rewriter.
|
||||
if (index_size == sizeof(u2)) {
|
||||
@ -416,7 +412,8 @@ void InterpreterMacroAssembler::get_cache_index_at_bcp(Register Rdst, int bcp_of
|
||||
// Rdst now contains cp cache index.
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, int bcp_offset, size_t index_size) {
|
||||
void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, int bcp_offset,
|
||||
size_t index_size) {
|
||||
get_cache_index_at_bcp(cache, bcp_offset, index_size);
|
||||
sldi(cache, cache, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord));
|
||||
add(cache, R27_constPoolCache, cache);
|
||||
@ -514,7 +511,8 @@ void InterpreterMacroAssembler::generate_stack_overflow_check_with_compare_and_t
|
||||
// and put arrayOop + shifted_index into res.
|
||||
// Note: res is still shy of address by array offset into object.
|
||||
|
||||
void InterpreterMacroAssembler::index_check_without_pop(Register Rarray, Register Rindex, int index_shift, Register Rtmp, Register Rres) {
|
||||
void InterpreterMacroAssembler::index_check_without_pop(Register Rarray, Register Rindex,
|
||||
int index_shift, Register Rtmp, Register Rres) {
|
||||
// Check that index is in range for array, then shift index by index_shift,
|
||||
// and put arrayOop + shifted_index into res.
|
||||
// Note: res is still shy of address by array offset into object.
|
||||
@ -566,7 +564,8 @@ void InterpreterMacroAssembler::index_check_without_pop(Register Rarray, Registe
|
||||
add(Rres, RsxtIndex, Rarray);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::index_check(Register array, Register index, int index_shift, Register tmp, Register res) {
|
||||
void InterpreterMacroAssembler::index_check(Register array, Register index,
|
||||
int index_shift, Register tmp, Register res) {
|
||||
// pop array
|
||||
pop_ptr(array);
|
||||
|
||||
@ -637,7 +636,8 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
|
||||
Label Lunlock;
|
||||
// If it's still locked, everything is ok, unlock it.
|
||||
ld(Rmonitor_base, 0, R1_SP);
|
||||
addi(Rmonitor_base, Rmonitor_base, - (frame::ijava_state_size + frame::interpreter_frame_monitor_size_in_bytes())); // Monitor base
|
||||
addi(Rmonitor_base, Rmonitor_base,
|
||||
-(frame::ijava_state_size + frame::interpreter_frame_monitor_size_in_bytes())); // Monitor base
|
||||
|
||||
ld(R0, BasicObjectLock::obj_offset_in_bytes(), Rmonitor_base);
|
||||
cmpdi(CCR0, R0, 0);
|
||||
@ -677,7 +677,8 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
|
||||
subf_(Riterations, R26_monitor, Rmonitor_base);
|
||||
ble(CCR0, Lno_unlock);
|
||||
|
||||
addi(Rcurrent_obj_addr, Rmonitor_base, BasicObjectLock::obj_offset_in_bytes() - frame::interpreter_frame_monitor_size_in_bytes());
|
||||
addi(Rcurrent_obj_addr, Rmonitor_base,
|
||||
BasicObjectLock::obj_offset_in_bytes() - frame::interpreter_frame_monitor_size_in_bytes());
|
||||
// Check if any monitor is on stack, bail out if not
|
||||
srdi(Riterations, Riterations, exact_log2(delta));
|
||||
mtctr(Riterations);
|
||||
@ -727,7 +728,8 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
|
||||
}
|
||||
|
||||
// Support function for remove_activation & Co.
|
||||
void InterpreterMacroAssembler::merge_frames(Register Rsender_sp, Register return_pc, Register Rscratch1, Register Rscratch2) {
|
||||
void InterpreterMacroAssembler::merge_frames(Register Rsender_sp, Register return_pc,
|
||||
Register Rscratch1, Register Rscratch2) {
|
||||
// Pop interpreter frame.
|
||||
ld(Rscratch1, 0, R1_SP); // *SP
|
||||
ld(Rsender_sp, _ijava_state_neg(sender_sp), Rscratch1); // top_frame_sp
|
||||
@ -779,8 +781,6 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
|
||||
mtlr(R0);
|
||||
}
|
||||
|
||||
#endif // !CC_INTERP
|
||||
|
||||
// Lock object
|
||||
//
|
||||
// Registers alive
|
||||
@ -791,7 +791,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
|
||||
void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
|
||||
if (UseHeavyMonitors) {
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
|
||||
monitor, /*check_for_exceptions=*/true CC_INTERP_ONLY(&& false));
|
||||
monitor, /*check_for_exceptions=*/true);
|
||||
} else {
|
||||
// template code:
|
||||
//
|
||||
@ -888,7 +888,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
|
||||
// slow case of monitor enter.
|
||||
bind(slow_case);
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
|
||||
monitor, /*check_for_exceptions=*/true CC_INTERP_ONLY(&& false));
|
||||
monitor, /*check_for_exceptions=*/true);
|
||||
// }
|
||||
align(32, 12);
|
||||
bind(done);
|
||||
@ -905,7 +905,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
|
||||
void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_exceptions) {
|
||||
if (UseHeavyMonitors) {
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit),
|
||||
monitor, check_for_exceptions CC_INTERP_ONLY(&& false));
|
||||
monitor, check_for_exceptions);
|
||||
} else {
|
||||
|
||||
// template code:
|
||||
@ -978,7 +978,7 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_e
|
||||
// we need to get into the slow case.
|
||||
bind(slow_case);
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit),
|
||||
monitor, check_for_exceptions CC_INTERP_ONLY(&& false));
|
||||
monitor, check_for_exceptions);
|
||||
// }
|
||||
|
||||
Label done;
|
||||
@ -993,8 +993,6 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_e
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Load compiled (i2c) or interpreter entry when calling from interpreted and
|
||||
// do the call. Centralized so that all interpreter calls will do the same actions.
|
||||
// If jvmti single stepping is on for a thread we must not call compiled code.
|
||||
@ -1004,7 +1002,8 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_e
|
||||
// - Rret_addr: return address
|
||||
// - 2 scratch regs
|
||||
//
|
||||
void InterpreterMacroAssembler::call_from_interpreter(Register Rtarget_method, Register Rret_addr, Register Rscratch1, Register Rscratch2) {
|
||||
void InterpreterMacroAssembler::call_from_interpreter(Register Rtarget_method, Register Rret_addr,
|
||||
Register Rscratch1, Register Rscratch2) {
|
||||
assert_different_registers(Rscratch1, Rscratch2, Rtarget_method, Rret_addr);
|
||||
// Assume we want to go compiled if available.
|
||||
const Register Rtarget_addr = Rscratch1;
|
||||
@ -1488,7 +1487,8 @@ void InterpreterMacroAssembler::profile_typecheck_failed(Register Rscratch1, Reg
|
||||
}
|
||||
|
||||
// Count a ret in the bytecodes.
|
||||
void InterpreterMacroAssembler::profile_ret(TosState state, Register return_bci, Register scratch1, Register scratch2) {
|
||||
void InterpreterMacroAssembler::profile_ret(TosState state, Register return_bci,
|
||||
Register scratch1, Register scratch2) {
|
||||
if (ProfileInterpreter) {
|
||||
Label profile_continue;
|
||||
uint row;
|
||||
@ -1684,7 +1684,8 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
|
||||
// Argument and return type profilig.
|
||||
// kills: tmp, tmp2, R0, CR0, CR1
|
||||
void InterpreterMacroAssembler::profile_obj_type(Register obj, Register mdo_addr_base,
|
||||
RegisterOrConstant mdo_addr_offs, Register tmp, Register tmp2) {
|
||||
RegisterOrConstant mdo_addr_offs,
|
||||
Register tmp, Register tmp2) {
|
||||
Label do_nothing, do_update;
|
||||
|
||||
// tmp2 = obj is allowed
|
||||
@ -1730,7 +1731,9 @@ void InterpreterMacroAssembler::profile_obj_type(Register obj, Register mdo_addr
|
||||
bind(do_nothing);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual) {
|
||||
void InterpreterMacroAssembler::profile_arguments_type(Register callee,
|
||||
Register tmp1, Register tmp2,
|
||||
bool is_virtual) {
|
||||
if (!ProfileInterpreter) {
|
||||
return;
|
||||
}
|
||||
@ -1742,7 +1745,8 @@ void InterpreterMacroAssembler::profile_arguments_type(Register callee, Register
|
||||
|
||||
test_method_data_pointer(profile_continue);
|
||||
|
||||
int off_to_start = is_virtual ? in_bytes(VirtualCallData::virtual_call_data_size()) : in_bytes(CounterData::counter_data_size());
|
||||
int off_to_start = is_virtual ?
|
||||
in_bytes(VirtualCallData::virtual_call_data_size()) : in_bytes(CounterData::counter_data_size());
|
||||
|
||||
lbz(tmp1, in_bytes(DataLayout::tag_offset()) - off_to_start, R28_mdx);
|
||||
cmpwi(CCR0, tmp1, is_virtual ? DataLayout::virtual_call_type_data_tag : DataLayout::call_type_data_tag);
|
||||
@ -1792,7 +1796,8 @@ void InterpreterMacroAssembler::profile_arguments_type(Register callee, Register
|
||||
// argument. tmp1 is the number of cells left in the
|
||||
// CallTypeData/VirtualCallTypeData to reach its end. Non null
|
||||
// if there's a return to profile.
|
||||
assert(ReturnTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
|
||||
assert(ReturnTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(),
|
||||
"can't move past ret type");
|
||||
sldi(tmp1, tmp1, exact_log2(DataLayout::cell_size));
|
||||
add(R28_mdx, tmp1, R28_mdx);
|
||||
}
|
||||
@ -1841,7 +1846,8 @@ void InterpreterMacroAssembler::profile_return_type(Register ret, Register tmp1,
|
||||
}
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
|
||||
void InterpreterMacroAssembler::profile_parameters_type(Register tmp1, Register tmp2,
|
||||
Register tmp3, Register tmp4) {
|
||||
if (ProfileInterpreter && MethodData::profile_parameters()) {
|
||||
Label profile_continue, done;
|
||||
|
||||
@ -1984,7 +1990,9 @@ void InterpreterMacroAssembler::load_local_long(Register Rdst_value, Register Rd
|
||||
// Kills:
|
||||
// - Rdst_value
|
||||
// - Rdst_address
|
||||
void InterpreterMacroAssembler::load_local_ptr(Register Rdst_value, Register Rdst_address, Register Rindex) {
|
||||
void InterpreterMacroAssembler::load_local_ptr(Register Rdst_value,
|
||||
Register Rdst_address,
|
||||
Register Rindex) {
|
||||
sldi(Rdst_address, Rindex, Interpreter::logStackElementSize);
|
||||
subf(Rdst_address, Rdst_address, R18_locals);
|
||||
ld(Rdst_value, 0, Rdst_address);
|
||||
@ -1995,7 +2003,9 @@ void InterpreterMacroAssembler::load_local_ptr(Register Rdst_value, Register Rds
|
||||
// Kills:
|
||||
// - Rdst_value
|
||||
// - Rdst_address
|
||||
void InterpreterMacroAssembler::load_local_float(FloatRegister Rdst_value, Register Rdst_address, Register Rindex) {
|
||||
void InterpreterMacroAssembler::load_local_float(FloatRegister Rdst_value,
|
||||
Register Rdst_address,
|
||||
Register Rindex) {
|
||||
sldi(Rdst_address, Rindex, Interpreter::logStackElementSize);
|
||||
subf(Rdst_address, Rdst_address, R18_locals);
|
||||
lfs(Rdst_value, 0, Rdst_address);
|
||||
@ -2006,7 +2016,9 @@ void InterpreterMacroAssembler::load_local_float(FloatRegister Rdst_value, Regis
|
||||
// Kills:
|
||||
// - Rdst_value
|
||||
// - Rdst_address
|
||||
void InterpreterMacroAssembler::load_local_double(FloatRegister Rdst_value, Register Rdst_address, Register Rindex) {
|
||||
void InterpreterMacroAssembler::load_local_double(FloatRegister Rdst_value,
|
||||
Register Rdst_address,
|
||||
Register Rindex) {
|
||||
sldi(Rdst_address, Rindex, Interpreter::logStackElementSize);
|
||||
subf(Rdst_address, Rdst_address, R18_locals);
|
||||
lfd(Rdst_value, -8, Rdst_address);
|
||||
@ -2102,13 +2114,16 @@ void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point
|
||||
}
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, bool check_exceptions) {
|
||||
void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point,
|
||||
Register arg_1, bool check_exceptions) {
|
||||
// ARG1 is reserved for the thread.
|
||||
mr_if_needed(R4_ARG2, arg_1);
|
||||
call_VM(oop_result, entry_point, check_exceptions);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, bool check_exceptions) {
|
||||
void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point,
|
||||
Register arg_1, Register arg_2,
|
||||
bool check_exceptions) {
|
||||
// ARG1 is reserved for the thread.
|
||||
mr_if_needed(R4_ARG2, arg_1);
|
||||
assert(arg_2 != R4_ARG2, "smashed argument");
|
||||
@ -2116,7 +2131,9 @@ void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point
|
||||
call_VM(oop_result, entry_point, check_exceptions);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3, bool check_exceptions) {
|
||||
void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point,
|
||||
Register arg_1, Register arg_2, Register arg_3,
|
||||
bool check_exceptions) {
|
||||
// ARG1 is reserved for the thread.
|
||||
mr_if_needed(R4_ARG2, arg_1);
|
||||
assert(arg_2 != R4_ARG2, "smashed argument");
|
||||
@ -2168,8 +2185,6 @@ void InterpreterMacroAssembler::restore_interpreter_state(Register scratch, bool
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // !CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::get_method_counters(Register method,
|
||||
Register Rcounters,
|
||||
Label& skip) {
|
||||
@ -2188,7 +2203,9 @@ void InterpreterMacroAssembler::get_method_counters(Register method,
|
||||
bind(has_counters);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::increment_invocation_counter(Register Rcounters, Register iv_be_count, Register Rtmp_r0) {
|
||||
void InterpreterMacroAssembler::increment_invocation_counter(Register Rcounters,
|
||||
Register iv_be_count,
|
||||
Register Rtmp_r0) {
|
||||
assert(UseCompiler || LogTouchedMethods, "incrementing must be useful");
|
||||
Register invocation_count = iv_be_count;
|
||||
Register backedge_count = Rtmp_r0;
|
||||
@ -2230,7 +2247,6 @@ void InterpreterMacroAssembler::verify_oop(Register reg, TosState state) {
|
||||
if (state == atos) { MacroAssembler::verify_oop(reg); }
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// Local helper function for the verify_oop_or_return_address macro.
|
||||
static bool verify_return_address(Method* m, int bci) {
|
||||
#ifndef PRODUCT
|
||||
@ -2287,7 +2303,6 @@ void InterpreterMacroAssembler::verify_oop_or_return_address(Register reg, Regis
|
||||
verify_oop(reg);
|
||||
bind(skip);
|
||||
}
|
||||
#endif // !CC_INTERP
|
||||
|
||||
// Inline assembly for:
|
||||
//
|
||||
@ -2311,7 +2326,7 @@ void InterpreterMacroAssembler::notify_method_entry() {
|
||||
cmpwi(CCR0, R0, 0);
|
||||
beq(CCR0, jvmti_post_done);
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_entry),
|
||||
/*check_exceptions=*/true CC_INTERP_ONLY(&& false));
|
||||
/*check_exceptions=*/true);
|
||||
|
||||
bind(jvmti_post_done);
|
||||
}
|
||||
@ -2345,11 +2360,10 @@ void InterpreterMacroAssembler::notify_method_exit(bool is_native_method, TosSta
|
||||
lwz(R0, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
|
||||
cmpwi(CCR0, R0, 0);
|
||||
beq(CCR0, jvmti_post_done);
|
||||
CC_INTERP_ONLY(assert(is_native_method && !check_exceptions, "must not push state"));
|
||||
if (!is_native_method) push(state); // Expose tos to GC.
|
||||
if (!is_native_method) { push(state); } // Expose tos to GC.
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit),
|
||||
/*check_exceptions=*/check_exceptions);
|
||||
if (!is_native_method) pop(state);
|
||||
if (!is_native_method) { pop(state); }
|
||||
|
||||
align(32, 12);
|
||||
bind(jvmti_post_done);
|
||||
@ -2358,124 +2372,3 @@ void InterpreterMacroAssembler::notify_method_exit(bool is_native_method, TosSta
|
||||
// Dtrace support not implemented.
|
||||
}
|
||||
|
||||
#ifdef CC_INTERP
|
||||
// Convert the current TOP_IJAVA_FRAME into a PARENT_IJAVA_FRAME
|
||||
// (using parent_frame_resize) and push a new interpreter
|
||||
// TOP_IJAVA_FRAME (using frame_size).
|
||||
void InterpreterMacroAssembler::push_interpreter_frame(Register top_frame_size, Register parent_frame_resize,
|
||||
Register tmp1, Register tmp2, Register tmp3,
|
||||
Register tmp4, Register pc) {
|
||||
assert_different_registers(top_frame_size, parent_frame_resize, tmp1, tmp2, tmp3, tmp4);
|
||||
ld(tmp1, _top_ijava_frame_abi(frame_manager_lr), R1_SP);
|
||||
mr(tmp2/*top_frame_sp*/, R1_SP);
|
||||
// Move initial_caller_sp.
|
||||
ld(tmp4, _top_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
neg(parent_frame_resize, parent_frame_resize);
|
||||
resize_frame(parent_frame_resize/*-parent_frame_resize*/, tmp3);
|
||||
|
||||
// Set LR in new parent frame.
|
||||
std(tmp1, _abi(lr), R1_SP);
|
||||
// Set top_frame_sp info for new parent frame.
|
||||
std(tmp2, _parent_ijava_frame_abi(top_frame_sp), R1_SP);
|
||||
std(tmp4, _parent_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
|
||||
// Push new TOP_IJAVA_FRAME.
|
||||
push_frame(top_frame_size, tmp2);
|
||||
|
||||
get_PC_trash_LR(tmp3);
|
||||
std(tmp3, _top_ijava_frame_abi(frame_manager_lr), R1_SP);
|
||||
// Used for non-initial callers by unextended_sp().
|
||||
std(R1_SP, _top_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
}
|
||||
|
||||
// Pop the topmost TOP_IJAVA_FRAME and convert the previous
|
||||
// PARENT_IJAVA_FRAME back into a TOP_IJAVA_FRAME.
|
||||
void InterpreterMacroAssembler::pop_interpreter_frame(Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
|
||||
assert_different_registers(tmp1, tmp2, tmp3, tmp4);
|
||||
|
||||
ld(tmp1/*caller's sp*/, _abi(callers_sp), R1_SP);
|
||||
ld(tmp3, _abi(lr), tmp1);
|
||||
|
||||
ld(tmp4, _parent_ijava_frame_abi(initial_caller_sp), tmp1);
|
||||
|
||||
ld(tmp2/*caller's caller's sp*/, _abi(callers_sp), tmp1);
|
||||
// Merge top frame.
|
||||
std(tmp2, _abi(callers_sp), R1_SP);
|
||||
|
||||
ld(tmp2, _parent_ijava_frame_abi(top_frame_sp), tmp1);
|
||||
|
||||
// Update C stack pointer to caller's top_abi.
|
||||
resize_frame_absolute(tmp2/*addr*/, tmp1/*tmp*/, tmp2/*tmp*/);
|
||||
|
||||
// Update LR in top_frame.
|
||||
std(tmp3, _top_ijava_frame_abi(frame_manager_lr), R1_SP);
|
||||
|
||||
std(tmp4, _top_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
|
||||
// Store the top-frame stack-pointer for c2i adapters.
|
||||
std(R1_SP, _top_ijava_frame_abi(top_frame_sp), R1_SP);
|
||||
}
|
||||
|
||||
// Turn state's interpreter frame into the current TOP_IJAVA_FRAME.
|
||||
void InterpreterMacroAssembler::pop_interpreter_frame_to_state(Register state, Register tmp1, Register tmp2, Register tmp3) {
|
||||
assert_different_registers(R14_state, R15_prev_state, tmp1, tmp2, tmp3);
|
||||
|
||||
if (state == R14_state) {
|
||||
ld(tmp1/*state's fp*/, state_(_last_Java_fp));
|
||||
ld(tmp2/*state's sp*/, state_(_last_Java_sp));
|
||||
} else if (state == R15_prev_state) {
|
||||
ld(tmp1/*state's fp*/, prev_state_(_last_Java_fp));
|
||||
ld(tmp2/*state's sp*/, prev_state_(_last_Java_sp));
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
// Merge top frames.
|
||||
std(tmp1, _abi(callers_sp), R1_SP);
|
||||
|
||||
// Tmp2 is new SP.
|
||||
// Tmp1 is parent's SP.
|
||||
resize_frame_absolute(tmp2/*addr*/, tmp1/*tmp*/, tmp2/*tmp*/);
|
||||
|
||||
// Update LR in top_frame.
|
||||
// Must be interpreter frame.
|
||||
get_PC_trash_LR(tmp3);
|
||||
std(tmp3, _top_ijava_frame_abi(frame_manager_lr), R1_SP);
|
||||
// Used for non-initial callers by unextended_sp().
|
||||
std(R1_SP, _top_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
}
|
||||
|
||||
// Set SP to initial caller's sp, but before fix the back chain.
|
||||
void InterpreterMacroAssembler::resize_frame_to_initial_caller(Register tmp1, Register tmp2) {
|
||||
ld(tmp1, _parent_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
ld(tmp2, _parent_ijava_frame_abi(callers_sp), R1_SP);
|
||||
std(tmp2, _parent_ijava_frame_abi(callers_sp), tmp1); // Fix back chain ...
|
||||
mr(R1_SP, tmp1); // ... and resize to initial caller.
|
||||
}
|
||||
|
||||
// Pop the current interpreter state (without popping the correspoding
|
||||
// frame) and restore R14_state and R15_prev_state accordingly.
|
||||
// Use prev_state_may_be_0 to indicate whether prev_state may be 0
|
||||
// in order to generate an extra check before retrieving prev_state_(_prev_link).
|
||||
void InterpreterMacroAssembler::pop_interpreter_state(bool prev_state_may_be_0)
|
||||
{
|
||||
// Move prev_state to state and restore prev_state from state_(_prev_link).
|
||||
Label prev_state_is_0;
|
||||
mr(R14_state, R15_prev_state);
|
||||
|
||||
// Don't retrieve /*state==*/prev_state_(_prev_link)
|
||||
// if /*state==*/prev_state is 0.
|
||||
if (prev_state_may_be_0) {
|
||||
cmpdi(CCR0, R15_prev_state, 0);
|
||||
beq(CCR0, prev_state_is_0);
|
||||
}
|
||||
|
||||
ld(R15_prev_state, /*state==*/prev_state_(_prev_link));
|
||||
bind(prev_state_is_0);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::restore_prev_state() {
|
||||
// _prev_link is private, but cInterpreter is a friend.
|
||||
ld(R15_prev_state, state_(_prev_link));
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
@ -45,14 +45,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
#define thread_(field_name) in_bytes(JavaThread::field_name ## _offset()), R16_thread
|
||||
#define method_(field_name) in_bytes(Method::field_name ## _offset()), R19_method
|
||||
|
||||
#ifdef CC_INTERP
|
||||
#define state_(field_name) in_bytes(byte_offset_of(BytecodeInterpreter, field_name)), R14_state
|
||||
#define prev_state_(field_name) in_bytes(byte_offset_of(BytecodeInterpreter, field_name)), R15_prev_state
|
||||
void pop (TosState state) {}; // Not needed.
|
||||
void push(TosState state) {}; // Not needed.
|
||||
#endif
|
||||
|
||||
#ifndef CC_INTERP
|
||||
virtual void check_and_handle_popframe(Register java_thread);
|
||||
virtual void check_and_handle_earlyret(Register java_thread);
|
||||
|
||||
@ -207,7 +199,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
void record_static_call_in_profile(Register Rentry, Register Rtmp);
|
||||
void record_receiver_call_in_profile(Register Rklass, Register Rentry, Register Rtmp);
|
||||
#endif // !CC_INTERP
|
||||
|
||||
void get_method_counters(Register method, Register Rcounters, Label& skip);
|
||||
void increment_invocation_counter(Register iv_be_count, Register Rtmp1, Register Rtmp2_r0);
|
||||
@ -216,8 +207,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void lock_object (Register lock_reg, Register obj_reg);
|
||||
void unlock_object(Register lock_reg, bool check_for_exceptions = true);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Interpreter profiling operations
|
||||
void set_method_data_pointer_for_bcp();
|
||||
void test_method_data_pointer(Label& zero_continue);
|
||||
@ -260,14 +249,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void profile_return_type(Register ret, Register tmp1, Register tmp2);
|
||||
void profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
|
||||
|
||||
#endif // !CC_INTERP
|
||||
|
||||
// Debugging
|
||||
void verify_oop(Register reg, TosState state = atos); // only if +VerifyOops && state == atos
|
||||
#ifndef CC_INTERP
|
||||
void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
|
||||
void verify_FPU(int stack_depth, TosState state = ftos);
|
||||
#endif // !CC_INTERP
|
||||
|
||||
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
|
||||
|
||||
@ -275,33 +260,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void notify_method_entry();
|
||||
void notify_method_exit(bool is_native_method, TosState state,
|
||||
NotifyMethodExitMode mode, bool check_exceptions);
|
||||
|
||||
#ifdef CC_INTERP
|
||||
// Convert the current TOP_IJAVA_FRAME into a PARENT_IJAVA_FRAME
|
||||
// (using parent_frame_resize) and push a new interpreter
|
||||
// TOP_IJAVA_FRAME (using frame_size).
|
||||
void push_interpreter_frame(Register top_frame_size, Register parent_frame_resize,
|
||||
Register tmp1, Register tmp2, Register tmp3, Register tmp4, Register pc=noreg);
|
||||
|
||||
// Pop the topmost TOP_IJAVA_FRAME and convert the previous
|
||||
// PARENT_IJAVA_FRAME back into a TOP_IJAVA_FRAME.
|
||||
void pop_interpreter_frame(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
|
||||
|
||||
// Turn state's interpreter frame into the current TOP_IJAVA_FRAME.
|
||||
void pop_interpreter_frame_to_state(Register state, Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
// Set SP to initial caller's sp, but before fix the back chain.
|
||||
void resize_frame_to_initial_caller(Register tmp1, Register tmp2);
|
||||
|
||||
// Pop the current interpreter state (without popping the
|
||||
// correspoding frame) and restore R14_state and R15_prev_state
|
||||
// accordingly. Use prev_state_may_be_0 to indicate whether
|
||||
// prev_state may be 0 in order to generate an extra check before
|
||||
// retrieving prev_state_(_prev_link).
|
||||
void pop_interpreter_state(bool prev_state_may_be_0);
|
||||
|
||||
void restore_prev_state();
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // CPU_PPC_VM_INTERP_MASM_PPC_64_HPP
|
||||
|
@ -457,17 +457,12 @@ address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
// Reset JavaFrameAnchor from call_VM_leaf above.
|
||||
__ reset_last_Java_frame();
|
||||
|
||||
#ifdef CC_INTERP
|
||||
// Return to frame manager, it will handle the pending exception.
|
||||
__ blr();
|
||||
#else
|
||||
// We don't know our caller, so jump to the general forward exception stub,
|
||||
// which will also pop our full frame off. Satisfy the interface of
|
||||
// SharedRuntime::generate_forward_exception()
|
||||
__ load_const_optimized(R11_scratch1, StubRoutines::forward_exception_entry(), R0);
|
||||
__ mtctr(R11_scratch1);
|
||||
__ bctr();
|
||||
#endif
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -518,7 +513,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
// continue and the thread will safepoint at the next bytecode dispatch.
|
||||
|
||||
// If the receiver is null then it is OK to jump to the slow path.
|
||||
__ ld(R3_RET, Interpreter::stackElementSize, CC_INTERP_ONLY(R17_tos) NOT_CC_INTERP(R15_esp)); // get receiver
|
||||
__ ld(R3_RET, Interpreter::stackElementSize, R15_esp); // get receiver
|
||||
|
||||
// Check if receiver == NULL and go the slow path.
|
||||
__ cmpdi(CCR0, R3_RET, 0);
|
||||
|
@ -39,12 +39,10 @@
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// The offset in bytes to access a expression stack slot
|
||||
// relative to the esp pointer.
|
||||
static int expr_offset_in_bytes(int slot) {
|
||||
return stackElementSize * slot + wordSize;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CPU_PPC_VM_INTERPRETER_PPC_HPP
|
||||
|
@ -2822,12 +2822,8 @@ void MacroAssembler::set_top_ijava_frame_at_SP_as_last_Java_frame(Register sp, R
|
||||
// sp points to a TOP_IJAVA_FRAME, retrieve frame's PC via
|
||||
// TOP_IJAVA_FRAME_ABI.
|
||||
// FIXME: assert that we really have a TOP_IJAVA_FRAME here!
|
||||
#ifdef CC_INTERP
|
||||
ld(tmp1/*pc*/, _top_ijava_frame_abi(frame_manager_lr), sp);
|
||||
#else
|
||||
address entry = pc();
|
||||
load_const_optimized(tmp1, entry);
|
||||
#endif
|
||||
|
||||
set_last_Java_frame(/*sp=*/sp, /*pc=*/tmp1);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,12 +32,6 @@
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
#ifdef CC_INTERP
|
||||
#define EXCEPTION_ENTRY StubRoutines::throw_NullPointerException_at_call_entry()
|
||||
#else
|
||||
#define EXCEPTION_ENTRY Interpreter::throw_NullPointerException_entry()
|
||||
#endif
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) // nothing
|
||||
#else
|
||||
@ -51,10 +45,12 @@ inline static RegisterOrConstant constant(int value) {
|
||||
return RegisterOrConstant(value);
|
||||
}
|
||||
|
||||
void MethodHandles::load_klass_from_Class(MacroAssembler* _masm, Register klass_reg, Register temp_reg, Register temp2_reg) {
|
||||
if (VerifyMethodHandles)
|
||||
verify_klass(_masm, klass_reg, SystemDictionary::WK_KLASS_ENUM_NAME(java_lang_Class), temp_reg, temp2_reg,
|
||||
"MH argument is a Class");
|
||||
void MethodHandles::load_klass_from_Class(MacroAssembler* _masm, Register klass_reg,
|
||||
Register temp_reg, Register temp2_reg) {
|
||||
if (VerifyMethodHandles) {
|
||||
verify_klass(_masm, klass_reg, SystemDictionary::WK_KLASS_ENUM_NAME(java_lang_Class),
|
||||
temp_reg, temp2_reg, "MH argument is a Class");
|
||||
}
|
||||
__ ld(klass_reg, java_lang_Class::klass_offset_in_bytes(), klass_reg);
|
||||
}
|
||||
|
||||
@ -187,7 +183,7 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
|
||||
sizeof(u2), /*is_signed*/ false);
|
||||
// assert(sizeof(u2) == sizeof(ConstMethod::_size_of_parameters), "");
|
||||
Label L;
|
||||
__ ld(temp2, __ argument_offset(temp2, temp2, 0), CC_INTERP_ONLY(R17_tos) NOT_CC_INTERP(R15_esp));
|
||||
__ ld(temp2, __ argument_offset(temp2, temp2, 0), R15_esp);
|
||||
__ cmpd(CCR1, temp2, recv);
|
||||
__ beq(CCR1, L);
|
||||
__ stop("receiver not on stack");
|
||||
@ -214,7 +210,7 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Register argbase = CC_INTERP_ONLY(R17_tos) NOT_CC_INTERP(R15_esp); // parameter (preserved)
|
||||
Register argbase = R15_esp; // parameter (preserved)
|
||||
Register argslot = R3;
|
||||
Register temp1 = R6;
|
||||
Register param_size = R7;
|
||||
@ -317,10 +313,12 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
|
||||
__ verify_oop(receiver_reg);
|
||||
if (iid == vmIntrinsics::_linkToSpecial) {
|
||||
// Don't actually load the klass; just null-check the receiver.
|
||||
__ null_check_throw(receiver_reg, -1, temp1, EXCEPTION_ENTRY);
|
||||
__ null_check_throw(receiver_reg, -1, temp1,
|
||||
Interpreter::throw_NullPointerException_entry());
|
||||
} else {
|
||||
// load receiver klass itself
|
||||
__ null_check_throw(receiver_reg, oopDesc::klass_offset_in_bytes(), temp1, EXCEPTION_ENTRY);
|
||||
__ null_check_throw(receiver_reg, oopDesc::klass_offset_in_bytes(), temp1,
|
||||
Interpreter::throw_NullPointerException_entry());
|
||||
__ load_klass(temp1_recv_klass, receiver_reg);
|
||||
__ verify_klass_ptr(temp1_recv_klass);
|
||||
}
|
||||
|
@ -578,27 +578,17 @@ REGISTER_DECLARATION(FloatRegister, F13_ARG13, F13); // volatile
|
||||
|
||||
// Register declarations to be used in frame manager assembly code.
|
||||
// Use only non-volatile registers in order to keep values across C-calls.
|
||||
#ifdef CC_INTERP
|
||||
REGISTER_DECLARATION(Register, R14_state, R14); // address of new cInterpreter.
|
||||
REGISTER_DECLARATION(Register, R15_prev_state, R15); // address of old cInterpreter
|
||||
#else // CC_INTERP
|
||||
REGISTER_DECLARATION(Register, R14_bcp, R14);
|
||||
REGISTER_DECLARATION(Register, R15_esp, R15);
|
||||
REGISTER_DECLARATION(FloatRegister, F15_ftos, F15);
|
||||
#endif // CC_INTERP
|
||||
REGISTER_DECLARATION(Register, R16_thread, R16); // address of current thread
|
||||
REGISTER_DECLARATION(Register, R17_tos, R17); // address of Java tos (prepushed).
|
||||
REGISTER_DECLARATION(Register, R18_locals, R18); // address of first param slot (receiver).
|
||||
REGISTER_DECLARATION(Register, R19_method, R19); // address of current method
|
||||
#ifndef DONT_USE_REGISTER_DEFINES
|
||||
#ifdef CC_INTERP
|
||||
#define R14_state AS_REGISTER(Register, R14)
|
||||
#define R15_prev_state AS_REGISTER(Register, R15)
|
||||
#else // CC_INTERP
|
||||
#define R14_bcp AS_REGISTER(Register, R14)
|
||||
#define R15_esp AS_REGISTER(Register, R15)
|
||||
#define F15_ftos AS_REGISTER(FloatRegister, F15)
|
||||
#endif // CC_INTERP
|
||||
#define R16_thread AS_REGISTER(Register, R16)
|
||||
#define R17_tos AS_REGISTER(Register, R17)
|
||||
#define R18_locals AS_REGISTER(Register, R18)
|
||||
@ -619,13 +609,11 @@ REGISTER_DECLARATION(Register, R26_tmp6, R26);
|
||||
REGISTER_DECLARATION(Register, R27_tmp7, R27);
|
||||
REGISTER_DECLARATION(Register, R28_tmp8, R28);
|
||||
REGISTER_DECLARATION(Register, R29_tmp9, R29);
|
||||
#ifndef CC_INTERP
|
||||
REGISTER_DECLARATION(Register, R24_dispatch_addr, R24);
|
||||
REGISTER_DECLARATION(Register, R25_templateTableBase, R25);
|
||||
REGISTER_DECLARATION(Register, R26_monitor, R26);
|
||||
REGISTER_DECLARATION(Register, R27_constPoolCache, R27);
|
||||
REGISTER_DECLARATION(Register, R28_mdx, R28);
|
||||
#endif // CC_INTERP
|
||||
|
||||
#ifndef DONT_USE_REGISTER_DEFINES
|
||||
#define R21_tmp1 AS_REGISTER(Register, R21)
|
||||
@ -637,7 +625,6 @@ REGISTER_DECLARATION(Register, R28_mdx, R28);
|
||||
#define R27_tmp7 AS_REGISTER(Register, R27)
|
||||
#define R28_tmp8 AS_REGISTER(Register, R28)
|
||||
#define R29_tmp9 AS_REGISTER(Register, R29)
|
||||
#ifndef CC_INTERP
|
||||
// Lmonitors : monitor pointer
|
||||
// LcpoolCache: constant pool cache
|
||||
// mdx: method data index
|
||||
@ -649,7 +636,6 @@ REGISTER_DECLARATION(Register, R28_mdx, R28);
|
||||
#endif
|
||||
|
||||
#define CCR4_is_synced AS_REGISTER(ConditionRegister, CCR4)
|
||||
#endif
|
||||
|
||||
// Scratch registers are volatile.
|
||||
REGISTER_DECLARATION(Register, R11_scratch1, R11);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -954,15 +954,10 @@ static address gen_c2i_adapter(MacroAssembler *masm,
|
||||
|
||||
// Jump to the interpreter just as if interpreter was doing it.
|
||||
|
||||
#ifdef CC_INTERP
|
||||
const Register tos = R17_tos;
|
||||
#else
|
||||
const Register tos = R15_esp;
|
||||
__ load_const_optimized(R25_templateTableBase, (address)Interpreter::dispatch_table((TosState)0), R11_scratch1);
|
||||
#endif
|
||||
|
||||
// load TOS
|
||||
__ addi(tos, R1_SP, st_off);
|
||||
__ addi(R15_esp, R1_SP, st_off);
|
||||
|
||||
// Frame_manager expects initial_caller_sp (= SP without resize by c2i) in R21_tmp1.
|
||||
assert(sender_SP == R21_sender_SP, "passing initial caller's SP in wrong register");
|
||||
@ -996,12 +991,7 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
|
||||
// save code can segv when fxsave instructions find improperly
|
||||
// aligned stack pointer.
|
||||
|
||||
#ifdef CC_INTERP
|
||||
const Register ld_ptr = R17_tos;
|
||||
#else
|
||||
const Register ld_ptr = R15_esp;
|
||||
#endif
|
||||
|
||||
const Register value_regs[] = { R22_tmp2, R23_tmp3, R24_tmp4, R25_tmp5, R26_tmp6 };
|
||||
const int num_value_regs = sizeof(value_regs) / sizeof(Register);
|
||||
int value_regs_index = 0;
|
||||
@ -2593,15 +2583,11 @@ static void push_skeleton_frame(MacroAssembler* masm, bool deopt,
|
||||
__ ld(frame_size_reg, 0, frame_sizes_reg);
|
||||
__ std(pc_reg, _abi(lr), R1_SP);
|
||||
__ push_frame(frame_size_reg, R0/*tmp*/);
|
||||
#ifdef CC_INTERP
|
||||
__ std(R1_SP, _parent_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
#else
|
||||
#ifdef ASSERT
|
||||
__ load_const_optimized(pc_reg, 0x5afe);
|
||||
__ std(pc_reg, _ijava_state_neg(ijava_reserved), R1_SP);
|
||||
#endif
|
||||
__ std(R1_SP, _ijava_state_neg(sender_sp), R1_SP);
|
||||
#endif // CC_INTERP
|
||||
__ addi(number_of_frames_reg, number_of_frames_reg, -1);
|
||||
__ addi(frame_sizes_reg, frame_sizes_reg, wordSize);
|
||||
__ addi(pcs_reg, pcs_reg, wordSize);
|
||||
@ -2673,15 +2659,11 @@ static void push_skeleton_frames(MacroAssembler* masm, bool deopt,
|
||||
__ std(R12_scratch2, _abi(lr), R1_SP);
|
||||
|
||||
// Initialize initial_caller_sp.
|
||||
#ifdef CC_INTERP
|
||||
__ std(frame_size_reg/*old_sp*/, _parent_ijava_frame_abi(initial_caller_sp), R1_SP);
|
||||
#else
|
||||
#ifdef ASSERT
|
||||
__ load_const_optimized(pc_reg, 0x5afe);
|
||||
__ std(pc_reg, _ijava_state_neg(ijava_reserved), R1_SP);
|
||||
#endif
|
||||
__ std(frame_size_reg, _ijava_state_neg(sender_sp), R1_SP);
|
||||
#endif // CC_INTERP
|
||||
|
||||
#ifdef ASSERT
|
||||
// Make sure that there is at least one entry in the array.
|
||||
@ -2708,9 +2690,6 @@ static void push_skeleton_frames(MacroAssembler* masm, bool deopt,
|
||||
// Store it in the top interpreter frame.
|
||||
__ std(R0, _abi(lr), R1_SP);
|
||||
// Initialize frame_manager_lr of interpreter top frame.
|
||||
#ifdef CC_INTERP
|
||||
__ std(R0, _top_ijava_frame_abi(frame_manager_lr), R1_SP);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2899,16 +2878,8 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
// optional c2i, caller of deoptee, ...).
|
||||
|
||||
// Initialize R14_state.
|
||||
#ifdef CC_INTERP
|
||||
__ ld(R14_state, 0, R1_SP);
|
||||
__ addi(R14_state, R14_state, -frame::interpreter_frame_cinterpreterstate_size_in_bytes());
|
||||
// Also inititialize R15_prev_state.
|
||||
__ restore_prev_state();
|
||||
#else
|
||||
__ restore_interpreter_state(R11_scratch1);
|
||||
__ load_const_optimized(R25_templateTableBase, (address)Interpreter::dispatch_table((TosState)0), R11_scratch1);
|
||||
#endif // CC_INTERP
|
||||
|
||||
|
||||
// Return to the interpreter entry point.
|
||||
__ blr();
|
||||
@ -3034,16 +3005,8 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
// stack: (top interpreter frame, ..., optional interpreter frame,
|
||||
// optional c2i, caller of deoptee, ...).
|
||||
|
||||
#ifdef CC_INTERP
|
||||
// Initialize R14_state, ...
|
||||
__ ld(R11_scratch1, 0, R1_SP);
|
||||
__ addi(R14_state, R11_scratch1, -frame::interpreter_frame_cinterpreterstate_size_in_bytes());
|
||||
// also initialize R15_prev_state.
|
||||
__ restore_prev_state();
|
||||
#else
|
||||
__ restore_interpreter_state(R11_scratch1);
|
||||
__ load_const_optimized(R25_templateTableBase, (address)Interpreter::dispatch_table((TosState)0), R11_scratch1);
|
||||
#endif // CC_INTERP
|
||||
|
||||
// Return to the interpreter entry point.
|
||||
__ blr();
|
||||
|
@ -225,11 +225,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// R16_thread - JavaThread*
|
||||
|
||||
// Tos must point to last argument - element_size.
|
||||
#ifdef CC_INTERP
|
||||
const Register tos = R17_tos;
|
||||
#else
|
||||
const Register tos = R15_esp;
|
||||
#endif
|
||||
|
||||
__ addi(tos, r_top_of_arguments_addr, -Interpreter::stackElementSize);
|
||||
|
||||
// initialize call_stub locals (step 2)
|
||||
@ -243,11 +240,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
assert(tos != r_arg_thread && R19_method != r_arg_thread, "trashed r_arg_thread");
|
||||
|
||||
// Set R15_prev_state to 0 for simplifying checks in callee.
|
||||
#ifdef CC_INTERP
|
||||
__ li(R15_prev_state, 0);
|
||||
#else
|
||||
__ load_const_optimized(R25_templateTableBase, (address)Interpreter::dispatch_table((TosState)0), R11_scratch1);
|
||||
#endif
|
||||
// Stack on entry to frame manager / native entry:
|
||||
//
|
||||
// F0 [TOP_IJAVA_FRAME_ABI]
|
||||
|
@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#ifndef CC_INTERP
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
@ -1799,4 +1798,3 @@ void TemplateInterpreterGenerator::stop_interpreter_at() {
|
||||
}
|
||||
|
||||
#endif // !PRODUCT
|
||||
#endif // !CC_INTERP
|
||||
|
@ -39,8 +39,6 @@
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
#undef __
|
||||
#define __ _masm->
|
||||
|
||||
@ -4145,4 +4143,3 @@ void TemplateTable::wide() {
|
||||
__ bctr();
|
||||
// Note: the bcp increment step is part of the individual wide bytecode implementations.
|
||||
}
|
||||
#endif // !CC_INTERP
|
||||
|
Loading…
x
Reference in New Issue
Block a user