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