提交 15bdbb1e 编写于 作者: B bdelsart

7087445: Improve platform independence of JSR292 shared code

Summary: changes necessary for some JSR292 ports
Reviewed-by: jrose, dholmes
上级 b1ece422
......@@ -839,3 +839,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
}
#endif
intptr_t *frame::initial_deoptimization_info() {
// unused... but returns fp() to minimize changes introduced by 7087445
return fp();
}
......@@ -666,3 +666,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
}
#endif
intptr_t *frame::initial_deoptimization_info() {
// used to reset the saved FP
return fp();
}
......@@ -2471,7 +2471,7 @@ void SharedRuntime::generate_deopt_blob() {
__ movl(counter, rbx);
// Pick up the initial fp we should save
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_fp_offset_in_bytes()));
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
// Now adjust the caller's stack to make up for the extra locals
// but record the original sp so that we can save it in the skeletal interpreter
......@@ -2691,7 +2691,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
__ movl(counter, rbx);
// Pick up the initial fp we should save
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_fp_offset_in_bytes()));
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
// Now adjust the caller's stack to make up for the extra locals
// but record the original sp so that we can save it in the skeletal interpreter
......
......@@ -2730,7 +2730,7 @@ void SharedRuntime::generate_deopt_blob() {
__ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
// Pick up the initial fp we should save
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_fp_offset_in_bytes()));
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
// Now adjust the caller's stack to make up for the extra locals
// but record the original sp so that we can save it in the skeletal interpreter
......@@ -2922,7 +2922,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
// Pick up the initial fp we should save
__ movptr(rbp,
Address(rdi,
Deoptimization::UnrollBlock::initial_fp_offset_in_bytes()));
Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
// Now adjust the caller's stack to make up for the extra locals but
// record the original sp so that we can save it in the skeletal
......
......@@ -425,3 +425,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
}
#endif
intptr_t *frame::initial_deoptimization_info() {
// unused... but returns fp() to minimize changes introduced by 7087445
return fp();
}
......@@ -3018,9 +3018,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
}
#ifdef JAVASE_EMBEDDED
#ifdef PPC
UNSUPPORTED_OPTION(EnableInvokeDynamic, "Invoke dynamic");
#endif
UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
#endif
......
......@@ -103,7 +103,7 @@ Deoptimization::UnrollBlock::UnrollBlock(int size_of_deoptimized_frame,
_frame_pcs = frame_pcs;
_register_block = NEW_C_HEAP_ARRAY(intptr_t, RegisterMap::reg_count * 2);
_return_type = return_type;
_initial_fp = 0;
_initial_info = 0;
// PD (x86 only)
_counter_temp = 0;
_unpack_kind = 0;
......@@ -486,9 +486,10 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
frame_sizes,
frame_pcs,
return_type);
// On some platforms, we need a way to pass fp to the unpacking code
// so the skeletal frames come out correct.
info->set_initial_fp((intptr_t) array->sender().fp());
// On some platforms, we need a way to pass some platform dependent
// information to the unpacking code so the skeletal frames come out
// correct (initial fp value, unextended sp, ...)
info->set_initial_info((intptr_t) array->sender().initial_deoptimization_info());
if (array->frames() > 1) {
if (VerifyStack && TraceDeoptimization) {
......
......@@ -137,7 +137,7 @@ class Deoptimization : AllStatic {
address* _frame_pcs; // Array of frame pc's, in bytes, for unrolling the stack
intptr_t* _register_block; // Block for storing callee-saved registers.
BasicType _return_type; // Tells if we have to restore double or long return value
intptr_t _initial_fp; // FP of the sender frame
intptr_t _initial_info; // Platform dependent data for the sender frame (was FP on x86)
int _caller_actual_parameters; // The number of actual arguments at the
// interpreted caller of the deoptimized frame
......@@ -170,7 +170,7 @@ class Deoptimization : AllStatic {
// Returns the total size of frames
int size_of_frames() const;
void set_initial_fp(intptr_t fp) { _initial_fp = fp; }
void set_initial_info(intptr_t info) { _initial_info = info; }
int caller_actual_parameters() const { return _caller_actual_parameters; }
......@@ -184,7 +184,7 @@ class Deoptimization : AllStatic {
static int register_block_offset_in_bytes() { return offset_of(UnrollBlock, _register_block); }
static int return_type_offset_in_bytes() { return offset_of(UnrollBlock, _return_type); }
static int counter_temp_offset_in_bytes() { return offset_of(UnrollBlock, _counter_temp); }
static int initial_fp_offset_in_bytes() { return offset_of(UnrollBlock, _initial_fp); }
static int initial_info_offset_in_bytes() { return offset_of(UnrollBlock, _initial_info); }
static int unpack_kind_offset_in_bytes() { return offset_of(UnrollBlock, _unpack_kind); }
static int sender_sp_temp_offset_in_bytes() { return offset_of(UnrollBlock, _sender_sp_temp); }
......
......@@ -221,6 +221,10 @@ class frame VALUE_OBJ_CLASS_SPEC {
// returns the stack pointer of the calling frame
intptr_t* sender_sp() const;
// Deoptimization info, if needed (platform dependent).
// Stored in the initial_info field of the unroll info, to be used by
// the platform dependent deoptimization blobs.
intptr_t *initial_deoptimization_info();
// Interpreter frames:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册