/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
// Inline functions for SPARC frames:
// Constructors
_younger_sp = NULL;
}
// Accessors:
assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
return ret;
}
// Return unique id for this frame. The id must have a value where we can distinguish
// frame.
// Relationals on frames based
// Return true if the frame is younger (more recent activation) than the frame represented by id
inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
// Return true if the frame is older (less recent activation) than the frame represented by id
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
inline intptr_t* frame::link() const { return (intptr_t *)(fp()[FP->sp_offset_in_saved_window()] + STACK_BIAS); }
inline void frame::set_link(intptr_t* addr) { assert(link()==addr, "frame nesting is controlled by hardware"); }
// return address:
inline address* frame::I7_addr() const { return (address*) &sp()[ I7->sp_offset_in_saved_window()]; }
inline address* frame::I0_addr() const { return (address*) &sp()[ I0->sp_offset_in_saved_window()]; }
inline address* frame::O7_addr() const { return (address*) &younger_sp()[ I7->sp_offset_in_saved_window()]; }
inline address* frame::O0_addr() const { return (address*) &younger_sp()[ I0->sp_offset_in_saved_window()]; }
// Used only in frame::oopmapreg_to_location
// This return a value in VMRegImpl::slot_size
}
#ifdef CC_INTERP
}
}
}
// bottom(base) of the expression stack (highest address)
}
// top of expression stack (lowest address)
}
// monitor elements
// in keeping with Intel side: end is lower in memory than begin;
// and beginning element is oldest element
// Also begin is one past last monitor.
return get_interpreterState()->monitor_base();
}
}
}
}
// Constant pool cache
// where LcpoolCache is saved:
}
return &istate->_constants;
}
#else // !CC_INTERP
}
// %%%%% reinterpreting Lbcp as a bcx
}
// %%%%% reinterpreting ImethodDataPtr as a mdx
}
// bottom(base) of the expression stack (highest address)
}
// top of expression stack (lowest address)
return *interpreter_frame_esp_addr() + 1;
}
*interpreter_frame_esp_addr() = x - 1;
}
// monitor elements
// in keeping with Intel side: end is lower in memory than begin;
// and beginning element is oldest element
// Also begin is one past last monitor.
}
return interpreter_frame_monitors();
}
}
}
}
// Constant pool cache
// where LcpoolCache is saved:
}
}
#endif // CC_INTERP
// note: adjust this code if the link argument in StubGenerator::call_stub() changes!
}
inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
// always allocate non-argument locals 0..5 as if they were arguments:
// Note: monitors (BasicLock blocks) are never allocated in argument slots
//assert(local_index >= 0 && local_index < max_nof_locals, "bad local index");
if (local_index < allocated_above_frame)
else
}
inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
assert(local_index >= max_nof_locals && ((local_index - max_nof_locals) & 1) && (local_index - max_nof_locals) < max_nof_monitors*2, "bad monitor index");
// The compiler uses the __higher__ of two indexes allocated to the monitor.
// Increasing local indexes are mapped to increasing memory locations,
// so the start of the BasicLock is associated with the __lower__ index.
int offset = (local_index-1) - (max_nof_locals + max_nof_monitors*2) + compiler_frame_vm_locals_fp_offset;
// We allocate monitors aligned zero mod 8:
// This works because all monitors are allocated after
// all locals, and because the highest address corresponding to any
// monitor index is always even.
return offset;
}
inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) {
// always allocate non-argument locals 0..5 as if they were arguments:
}
// On SPARC, the %lN and %iN registers are non-volatile.
// This predicate is (presently) applied only to temporary registers,
// and so it need not recognize non-volatile globals.
}
}
}
#endif // CPU_SPARC_VM_FRAME_SPARC_INLINE_HPP