1472N/A * or visit www.oracle.com if you need additional information or have any
1879N/A#include "precompiled.hpp"
1879N/A#include "c1/c1_Compilation.hpp"
1879N/A#include "c1/c1_FrameMap.hpp"
1879N/A#include "c1/c1_Instruction.hpp"
1879N/A#include "c1/c1_LIRAssembler.hpp"
1879N/A#include "c1/c1_LIRGenerator.hpp"
1879N/A#include "c1/c1_Runtime1.hpp"
1879N/A#include "c1/c1_ValueStack.hpp"
1879N/A#include "ci/ciArray.hpp"
1879N/A#include "ci/ciObjArrayKlass.hpp"
1879N/A#include "ci/ciTypeArrayKlass.hpp"
1879N/A#include "runtime/sharedRuntime.hpp"
1879N/A#include "runtime/stubRoutines.hpp"
1879N/A#include "vmreg_x86.inline.hpp"
0N/A if (r->is_constant()) {
0N/A case doubleTag: opr = UseSSE >= 2 ? FrameMap::xmm0_double_opr : FrameMap::fpu0_double_opr; break;
0N/A case addressTag:
0N/A if (needs_card_mark) {
0N/Avoid LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
0N/Avoid LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, int disp, BasicType type, CodeEmitInfo* info) {
0N/Avoid LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
2793N/A x->should_profile());
0N/A if (use_length) {
0N/A if (needs_range_check) {
0N/A if (needs_store_check) {
0N/A set_no_result(x);
0N/A if (x->needs_null_check()) {
0N/A LIR_Address* array_addr = emit_array_address(array.result(), index.result(), x->elt_type(), obj_store);
0N/A if (use_length) {
2793N/A __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info, x->profiled_method(), x->profiled_bci());
0N/A set_no_result(x);
0N/A if (UseBiasedLocking) {
0N/A if (x->needs_null_check()) {
0N/A set_no_result(x);
0N/A if (must_load_both) {
0N/A if ((UseSSE >= 1 && x->op() == Bytecodes::_frem) || (UseSSE >= 2 && x->op() == Bytecodes::_drem)) {
0N/A // special handling for frem and drem: no SSE instruction, so must use FPU with temporary fpu stack slots
0N/A rlock_result(x);
0N/A if (!ImplicitDiv0Checks) {
0N/A use_constant = true;
0N/A use_constant = true;
0N/A if (use_constant) {
0N/A rlock_result(x);
0N/A rlock_result(x);
0N/A if (x->is_commutative() && x->y()->as_Constant() == NULL && x->x()->use_count() > x->y()->use_count()) {
0N/A x->swap_operands();
0N/A if (must_load_count) {
0N/A if (x->is_commutative() && x->y()->as_Constant() == NULL && x->x()->use_count() > x->y()->use_count()) {
0N/A x->swap_operands();
0N/A __ fcmp2int(left.result(), right.result(), reg, (code == Bytecodes::_fcmpl || code == Bytecodes::_dcmpl));
1060N/A LIR_Address* a;
3752N/A assert(x->number_of_arguments() == 1 || (x->number_of_arguments() == 2 && x->id() == vmIntrinsics::_dpow), "wrong type");
3752N/A case vmIntrinsics::_dexp: __ exp (calc_input, calc_result, tmp1, tmp2, FrameMap::rax_opr, FrameMap::rcx_opr, FrameMap::rdx_opr); break;
3752N/A case vmIntrinsics::_dpow: __ pow (calc_input, calc_input2, calc_result, tmp1, tmp2, FrameMap::rax_opr, FrameMap::rcx_opr, FrameMap::rdx_opr); break;
0N/A default: ShouldNotReachHere();
0N/A set_no_result(x);
0N/A __ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(), length.result(), tmp, expected_type, flags, info); // does add_safepoint
0N/A case Bytecodes::_i2s: fixed_input = false; fixed_result = false; round_result = false; needs_stub = false; break;
0N/A case Bytecodes::_f2d: fixed_input = UseSSE == 1; fixed_result = false; round_result = false; needs_stub = false; break;
0N/A case Bytecodes::_d2f: fixed_input = false; fixed_result = UseSSE == 1; round_result = UseSSE < 1; needs_stub = false; break;
0N/A case Bytecodes::_i2f: fixed_input = false; fixed_result = false; round_result = UseSSE < 1; needs_stub = false; break;
0N/A case Bytecodes::_i2d: fixed_input = false; fixed_result = false; round_result = false; needs_stub = false; break;
0N/A case Bytecodes::_f2i: fixed_input = false; fixed_result = false; round_result = false; needs_stub = true; break;
0N/A case Bytecodes::_d2i: fixed_input = false; fixed_result = false; round_result = false; needs_stub = true; break;
0N/A case Bytecodes::_l2f: fixed_input = false; fixed_result = UseSSE >= 1; round_result = UseSSE < 1; needs_stub = false; break;
0N/A case Bytecodes::_l2d: fixed_input = false; fixed_result = UseSSE >= 2; round_result = UseSSE < 2; needs_stub = false; break;
0N/A case Bytecodes::_f2l: fixed_input = true; fixed_result = true; round_result = false; needs_stub = false; break;
0N/A case Bytecodes::_d2l: fixed_input = true; fixed_result = true; round_result = false; needs_stub = false; break;
0N/A default: ShouldNotReachHere();
0N/A if (fixed_input) {
0N/A if (fixed_result) {
0N/A } else if (round_result) {
0N/A if (needs_stub) {
0N/A // in case of patching (i.e., object class is not yet loaded), we need to reexecute the instruction
0N/A if (x->is_incompatible_class_change_check()) {
0N/A stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
0N/A stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
0N/A if (tag == longTag && yin->is_constant() && yin->get_jlong_constant() == 0 && (cond == If::eql || cond == If::neq)) {
0N/A if (x->is_safepoint()) {
0N/A set_no_result(x);