提交 f6336f02 编写于 作者: B bdelsart

7025485: leverage shared x86-only deoptimization code

Summary: removed an ifdef IA32 around harmless code useful for some ports
Reviewed-by: chrisphi, never
上级 5700cf82
......@@ -101,9 +101,9 @@ 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;
// PD (x86 only)
_counter_temp = 0;
_initial_fp = 0;
_unpack_kind = 0;
_sender_sp_temp = 0;
......@@ -459,18 +459,9 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
frame_sizes,
frame_pcs,
return_type);
#if defined(IA32) || defined(AMD64)
// We need a way to pass fp to the unpacking code so the skeletal frames
// come out correct. This is only needed for x86 because of c2 using ebp
// as an allocatable register. So this update is useless (and harmless)
// on the other platforms. It would be nice to do this in a different
// way but even the old style deoptimization had a problem with deriving
// this value. NEEDS_CLEANUP
// Note: now that c1 is using c2's deopt blob we must do this on all
// x86 based platforms
intptr_t** fp_addr = (intptr_t**) (((address)info) + info->initial_fp_offset_in_bytes());
*fp_addr = array->sender().fp(); // was adapter_caller
#endif /* IA32 || AMD64 */
// 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());
if (array->frames() > 1) {
if (VerifyStack && TraceDeoptimization) {
......
......@@ -136,12 +136,12 @@ 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
// The following fields are used as temps during the unpacking phase
// (which is tight on registers, especially on x86). They really ought
// to be PD variables but that involves moving this class into its own
// file to use the pd include mechanism. Maybe in a later cleanup ...
intptr_t _counter_temp; // SHOULD BE PD VARIABLE (x86 frame count temp)
intptr_t _initial_fp; // SHOULD BE PD VARIABLE (x86/c2 initial ebp)
intptr_t _unpack_kind; // SHOULD BE PD VARIABLE (x86 unpack kind)
intptr_t _sender_sp_temp; // SHOULD BE PD VARIABLE (x86 sender_sp)
public:
......@@ -165,6 +165,8 @@ class Deoptimization : AllStatic {
// Returns the total size of frames
int size_of_frames() const;
void set_initial_fp(intptr_t fp) { _initial_fp = fp; }
// Accessors used by the code generator for the unpack stub.
static int size_of_deoptimized_frame_offset_in_bytes() { return offset_of(UnrollBlock, _size_of_deoptimized_frame); }
static int caller_adjustment_offset_in_bytes() { return offset_of(UnrollBlock, _caller_adjustment); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册