registerMap_sparc.hpp revision 1879
222N/A/*
222N/A * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
222N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
222N/A *
222N/A * This code is free software; you can redistribute it and/or modify it
222N/A * under the terms of the GNU General Public License version 2 only, as
222N/A * published by the Free Software Foundation.
222N/A *
222N/A * This code is distributed in the hope that it will be useful, but WITHOUT
222N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
222N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
222N/A * version 2 for more details (a copy is included in the LICENSE file that
222N/A * accompanied this code).
222N/A *
222N/A * You should have received a copy of the GNU General Public License version
222N/A * 2 along with this work; if not, write to the Free Software Foundation,
222N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
222N/A *
222N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
222N/A * or visit www.oracle.com if you need additional information or have any
222N/A * questions.
222N/A *
222N/A */
222N/A
222N/A#ifndef CPU_SPARC_VM_REGISTERMAP_SPARC_HPP
222N/A#define CPU_SPARC_VM_REGISTERMAP_SPARC_HPP
222N/A
222N/A// machine-dependent implemention for register maps
222N/A friend class frame;
222N/A
222N/A private:
222N/A intptr_t* _window; // register window save area (for L and I regs)
222N/A intptr_t* _younger_window; // previous save area (for O regs, if needed)
222N/A
222N/A address pd_location(VMReg reg) const;
222N/A void pd_clear();
222N/A void pd_initialize_from(const RegisterMap* map) {
222N/A _window = map->_window;
222N/A _younger_window = map->_younger_window;
222N/A _location_valid[0] = 0; // avoid the shift_individual_registers game
222N/A }
222N/A void pd_initialize() {
222N/A _window = NULL;
222N/A _younger_window = NULL;
222N/A _location_valid[0] = 0; // avoid the shift_individual_registers game
222N/A }
222N/A void shift_window(intptr_t* sp, intptr_t* younger_sp) {
222N/A _window = sp;
222N/A _younger_window = younger_sp;
222N/A // Throw away locations for %i, %o, and %l registers:
222N/A // But do not throw away %g register locs.
222N/A if (_location_valid[0] != 0) shift_individual_registers();
222N/A }
222N/A void shift_individual_registers();
222N/A // When popping out of compiled frames, we make all IRegs disappear.
222N/A void make_integer_regs_unsaved() { _location_valid[0] = 0; }
222N/A
222N/A#endif // CPU_SPARC_VM_REGISTERMAP_SPARC_HPP
222N/A