/*
* 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.
*
*/
#include "precompiled.hpp"
#include "c1/c1_FpuStackSim.hpp"
#include "c1/c1_FrameMap.hpp"
#include "utilities/ostream.hpp"
//--------------------------------------------------------
// FpuStackSim
//--------------------------------------------------------
// This class maps the FPU registers to their stack locations; it computes
// the offsets between individual registers and simulates the FPU stack.
return _regs[i];
}
}
_stack_size--;
}
_stack_size++;
}
{
_stack_size = 0;
for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
set_regs_at(i, EMPTY);
}
}
}
}
}
set_regs_at(tos_index(), t);
}
for (int i = tos_index(); i >= 0; i--) {
return tos_index() - i;
}
}
assert(false, "FpuStackSim: register not found");
BAILOUT_("FpuStackSim: register not found", 0);
}
}
}
return;
bool found = false;
for (int i = 0; i < stack_size(); i++) {
set_regs_at(i, new_rnr);
found = true;
}
}
}
for (int i = 0; i < stack_size(); i++) {
return true;
}
}
return false;
}
#ifdef ASSERT
if (stack_size() == 0) {
for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
}
}
#endif
return stack_size() == 0;
}
}
for (int i = tos_index(); i >= 0; i--) {
set_regs_at(i, EMPTY);
}
_stack_size = 0;
}
(*res)[0] = stack_size();
for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
}
return res;
}
_stack_size = (*fpu_stack_state)[0];
for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
}
}
#ifndef PRODUCT
for (int i = 0; i < stack_size(); i++) {
} else {
}
};
}
#endif