src/cpu/sparc/vm/cppInterpreter_sparc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/sparc/vm/cppInterpreter_sparc.cpp Mon Apr 14 17:24:33 2008
--- new/src/cpu/sparc/vm/cppInterpreter_sparc.cpp Mon Apr 14 17:24:32 2008
*** 157,167 ****
--- 157,167 ----
__ st(O0, L1_scratch, 0);
__ sub(L1_scratch, wordSize, L1_scratch);
break;
case T_LONG :
#ifndef _LP64
! #if !defined(_LP64) && defined(COMPILER2)
! #if defined(COMPILER2)
// All return values are where we want them, except for Longs. C2 returns
// longs in G1 in the 32-bit build whereas the interpreter wants them in O0/O1.
// Since the interpreter will return longs in G1 and O0/O1 in the 32bit
// build even if we are returning from interpreted we just do a little
// stupid shuffing.
*** 171,184 ****
--- 171,183 ----
__ stx(G1, L1_scratch, -wordSize);
#else
// native result is in O0, O1
__ st(O1, L1_scratch, 0); // Low order
__ st(O0, L1_scratch, -wordSize); // High order
- #endif /* !_LP64 && COMPILER2 */
#else
! __ stx(O0, L1_scratch, 0);
__ breakpoint_trap();
! __ stx(O0, L1_scratch, -wordSize);
#endif
__ sub(L1_scratch, 2*wordSize, L1_scratch);
break;
case T_INT :
*** 235,245 ****
--- 234,243 ----
address entry = __ pc();
switch (type) {
case T_VOID: break;
break;
case T_FLOAT :
__ breakpoint_trap(Assembler::zero);
case T_BOOLEAN:
case T_CHAR :
case T_BYTE :
case T_SHORT :
case T_INT :
*** 253,267 ****
--- 251,261 ----
// return top two words on current expression stack to caller's expression stack
// The caller's expression stack is adjacent to the current frame manager's intepretState
// except we allocated one extra word for this intepretState so we won't overwrite it
// when we return a two word result.
#ifdef _LP64
__ breakpoint_trap();
// Hmm now that longs are in one entry should "_ptr" really be "x"?
__ ld_ptr(O0, 0, O2);
__ ld_ptr(O0, wordSize, O3);
__ st_ptr(O3, O1, 0);
__ st_ptr(O2, O1, -wordSize);
#else
__ ld(O0, 0, O2);
__ ld(O0, wordSize, O3);
__ st(O3, O1, 0);
*** 317,330 ****
--- 311,321 ----
// return top two words on current expression stack to caller's expression stack
// The caller's expression stack is adjacent to the current frame manager's interpretState
// except we allocated one extra word for this intepretState so we won't overwrite it
// when we return a two word result.
#ifdef _LP64
__ breakpoint_trap();
// Hmm now that longs are in one entry should "_ptr" really be "x"?
__ ld_ptr(O0, 0, O0->after_save());
__ ld_ptr(O0, wordSize, O1->after_save());
#else
__ ld(O0, wordSize, O1->after_save());
__ ld(O0, 0, O0->after_save());
#endif
#if defined(COMPILER2) && !defined(_LP64)
*** 1371,1381 ****
--- 1362,1372 ----
__ cmp(L1_scratch, L4_scratch);
__ br(Assembler::notEqual, false, Assembler::pt, loop);
__ delayed()->ld_ptr(L1_scratch, entry_size, L3_scratch);
// now zero the slot so we can find it.
! __ st_ptr(G0, L4_scratch, BasicObjectLock::obj_offset_in_bytes());
}
// Initial entry to C++ interpreter from the call_stub.
// This entry point is called the frame manager since it handles the generation
*** 1711,1721 ****
--- 1702,1712 ----
__ ld_ptr(STATE(_result._to_call._callee), L4_scratch); // called method
__ ld_ptr(STATE(_stack), L1_scratch); // get top of java expr stack
__ lduh(L4_scratch, in_bytes(methodOopDesc::size_of_parameters_offset()), L2_scratch); // get parameter size
__ sll(L2_scratch, LogBytesPerWord, L2_scratch ); // parameter size in bytes
__ add(L1_scratch, L2_scratch, L1_scratch); // stack destination for result
- __ ld_ptr(L4_scratch, in_bytes(methodOopDesc::result_index_offset()), L3_scratch); // called method result type index
// tosca is really just native abi
__ set((intptr_t)CppInterpreter::_tosca_to_stack, L4_scratch);
__ sll(L3_scratch, LogBytesPerWord, L3_scratch);
__ ld_ptr(L4_scratch, L3_scratch, Lscratch); // get typed result converter address
*** 1755,1765 ****
--- 1746,1756 ----
// other thing that makes it easy is that the top of the caller's stack is stored in STATE(_locals)
// for the current activation
__ ld_ptr(STATE(_prev_link), L1_scratch);
__ ld_ptr(STATE(_method), L2_scratch); // get method just executed
- __ ld_ptr(L2_scratch, in_bytes(methodOopDesc::result_index_offset()), L2_scratch);
__ tst(L1_scratch);
__ brx(Assembler::zero, false, Assembler::pt, return_to_initial_caller);
__ delayed()->sll(L2_scratch, LogBytesPerWord, L2_scratch);
// Copy result to callers java stack
*** 1921,1934 ****
--- 1912,1925 ----
__ ld_ptr(STATE(_stack_limit), L1_scratch);
// compute the unused java stack size
__ sub(Gargs, L1_scratch, L2_scratch); // compute unused space
! // Round down the unused space to that stack is always 16-byte aligned
! // by making the unused space a multiple of the size of a long.
! // by making the unused space a multiple of the size of two longs. (vs)
! __ and3(L2_scratch, -2*BytesPerLong, L2_scratch);
// Now trim the stack
__ add(SP, L2_scratch, SP);
*** 2174,2183 ****
--- 2165,2177 ----
if (interpreter_frame != NULL) {
// MUCHO HACK
intptr_t* frame_bottom = interpreter_frame->sp() - (full_frame_words - frame_words);
+ // 'interpreter_frame->sp()' is unbiased while 'frame_bottom' must be a biased value in 64bit mode. (vs)
+ assert(((intptr_t)frame_bottom & 0xf) == 0, "SP biased in layout_activation");
+ frame_bottom = (intptr_t*)((intptr_t)frame_bottom - STACK_BIAS);
/* Now fillin the interpreterState object */
interpreterState cur_state = (interpreterState) ((intptr_t)interpreter_frame->fp() - sizeof(BytecodeInterpreter));
src/cpu/sparc/vm/cppInterpreter_sparc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File