src/cpu/ppc/vm/cppInterpreter_ppc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/ppc/vm/cppInterpreter_ppc.cpp Thu Mar 6 11:59:49 2014
--- new/src/cpu/ppc/vm/cppInterpreter_ppc.cpp Thu Mar 6 11:59:48 2014
*** 24,33 ****
--- 24,34 ----
*/
#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/macroAssembler.inline.hpp"
+ #include "ci/ciMethod.hpp"
#include "interpreter/bytecodeHistogram.hpp"
#include "interpreter/cppInterpreter.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterGenerator.hpp"
#include "interpreter/interpreterRuntime.hpp"
*** 2938,2948 ****
--- 2939,3006 ----
intptr_t* last_Java_fp) {
istate->_last_Java_pc = last_Java_pc;
istate->_last_Java_fp = last_Java_fp;
}
! int AbstractInterpreter::layout_activation(Method* method,
! template<class M> static void frame_size_helper(M* method,
+ int monitors,
+ int& monitor_size,
+ int& top_frame_size) {
+ monitor_size = frame::interpreter_frame_monitor_size_in_bytes() * monitors;
+ top_frame_size = round_to(frame::interpreter_frame_cinterpreterstate_size_in_bytes()
+ + monitor_size
+ + (method->max_stack() *Interpreter::stackElementWords * BytesPerWord)
+ + 2*BytesPerWord,
+ frame::alignment_in_bytes)
+ + frame::top_ijava_frame_abi_size;
+ }
+
+ template<class M> int AbstractInterpreter::size_activation(M* method,
+ int temps,
+ int popframe_args,
+ int monitors,
+ int callee_params,
+ int callee_locals,
+ bool is_top_frame) {
+ int monitor_size = 0;
+ int top_frame_size = 0;
+ frame_size_helper<M>(method, monitors, monitor_size, top_frame_size);
+
+ int frame_size;
+ if (is_top_frame) {
+ frame_size = top_frame_size;
+ } else {
+ frame_size = round_to(frame::interpreter_frame_cinterpreterstate_size_in_bytes()
+ + monitor_size
+ + ((temps - callee_params + callee_locals) *
+ Interpreter::stackElementWords * BytesPerWord)
+ + 2*BytesPerWord,
+ frame::alignment_in_bytes)
+ + frame::parent_ijava_frame_abi_size;
+ assert(popframe_args==0, "non-zero for top_frame only");
+ }
+
+ return frame_size/BytesPerWord;
+ }
+
+ template int AbstractInterpreter::size_activation<Method>(Method* method,
+ int temps,
+ int popframe_args,
+ int monitors,
+ int callee_params,
+ int callee_locals,
+ bool is_top_frame);
+
+ template int AbstractInterpreter::size_activation<ciMethod>(ciMethod* method,
+ int temps,
+ int popframe_args,
+ int monitors,
+ int callee_params,
+ int callee_locals,
+ bool is_top_frame);
+
+ void AbstractInterpreter::layout_activation(Method* method,
int temps, // Number of slots on java expression stack in use.
int popframe_args,
int monitors, // Number of active monitors.
int caller_actual_parameters,
int callee_params,// Number of slots for callee parameters.
*** 2958,2990 ****
--- 3016,3028 ----
// exception. With the C++ based interpreter only the top most frame
// has a full sized expression stack. The 16 byte slop factor is
// both the abi scratch area and a place to hold a result from a
// callee on its way to the callers stack.
! int monitor_size = frame::interpreter_frame_monitor_size_in_bytes() * monitors;
! int frame_size;
int top_frame_size = round_to(frame::interpreter_frame_cinterpreterstate_size_in_bytes()
+ monitor_size
+ (method->max_stack() *Interpreter::stackElementWords * BytesPerWord)
+ 2*BytesPerWord,
frame::alignment_in_bytes)
+ frame::top_ijava_frame_abi_size;
if (is_top_frame) {
frame_size = top_frame_size;
} else {
frame_size = round_to(frame::interpreter_frame_cinterpreterstate_size_in_bytes()
+ monitor_size
+ ((temps - callee_params + callee_locals) *
Interpreter::stackElementWords * BytesPerWord)
+ 2*BytesPerWord,
frame::alignment_in_bytes)
+ frame::parent_ijava_frame_abi_size;
assert(popframe_args==0, "non-zero for top_frame only");
}
// If we actually have a frame to layout we must now fill in all the pieces.
if (interpreter_frame != NULL) {
! int monitor_size = 0;
! int top_frame_size = 0;
+ frame_size_helper<Method>(method, monitors, monitor_size, top_frame_size);
intptr_t sp = (intptr_t)interpreter_frame->sp();
intptr_t fp = *(intptr_t *)sp;
assert(fp == (intptr_t)caller->sp(), "fp must match");
interpreterState cur_state =
*** 3036,3045 ****
--- 3074,3081 ----
(intptr_t*)(((intptr_t)fp)-top_frame_size),
is_top_frame);
BytecodeInterpreter::pd_layout_interpreterState(cur_state, interpreter_return_address,
interpreter_frame->fp());
}
return frame_size/BytesPerWord;
}
#endif // CC_INTERP
src/cpu/ppc/vm/cppInterpreter_ppc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File