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