c1_LIRGenerator_x86.cpp revision 1703
5841N/A * or visit www.oracle.com if you need additional information or have any
5841N/A# include "incls/_c1_LIRGenerator_x86.cpp.incl"
5841N/A if (r->is_constant()) {
5841N/A case floatTag: opr = UseSSE >= 1 ? FrameMap::xmm0_float_opr : FrameMap::fpu0_float_opr; break;
5841N/A case doubleTag: opr = UseSSE >= 2 ? FrameMap::xmm0_double_opr : FrameMap::fpu0_double_opr; break;
5841N/A case addressTag:
5841N/A (v->type()->is_constant() && v->type()->as_ObjectType()->constant_value()->is_null_object());
5841N/A if (needs_card_mark) {
5841N/Avoid LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
5841N/Avoid LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, int disp, BasicType type, CodeEmitInfo* info) {
5841N/Avoid LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
5841N/Abool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) {
5841N/A bool needs_range_check = true;
5841N/A if (use_length) {
5841N/A if (needs_range_check) {
5841N/A if (needs_store_check) {
5841N/A set_no_result(x);
5841N/A if (x->needs_null_check()) {
5841N/A LIR_Address* array_addr = emit_array_address(array.result(), index.result(), x->elt_type(), obj_store);
5841N/A if (use_length) {
5841N/A __ branch(lir_cond_belowEqual, T_INT, new RangeCheckStub(range_check_info, index.result()));
5841N/A set_no_result(x);
5841N/A if (UseBiasedLocking) {
5841N/A if (x->needs_null_check()) {
5841N/A set_no_result(x);
5841N/A bool must_load_right = false;
5841N/A if (must_load_both) {
5841N/A if ((UseSSE >= 1 && x->op() == Bytecodes::_frem) || (UseSSE >= 2 && x->op() == Bytecodes::_drem)) {
5841N/A // special handling for frem and drem: no SSE instruction, so must use FPU with temporary fpu stack slots
5841N/A rlock_result(x);
5841N/A if (!ImplicitDiv0Checks) {
5841N/A bool use_constant = false;
5841N/A use_constant = true;
5841N/A use_constant = true;
5841N/A if (use_constant) {
5841N/A rlock_result(x);
5841N/A rlock_result(x);
5841N/A if (x->is_commutative() && x->y()->as_Constant() == NULL && x->x()->use_count() > x->y()->use_count()) {
5841N/A x->swap_operands();
5841N/A if (must_load_count) {
5841N/A if (x->is_commutative() && x->y()->as_Constant() == NULL && x->x()->use_count() > x->y()->use_count()) {
5841N/A x->swap_operands();
5841N/A __ fcmp2int(left.result(), right.result(), reg, (code == Bytecodes::_fcmpl || code == Bytecodes::_dcmpl));
5841N/A LIRItem new_value (x->argument_at(2), this); // replace field with new_value if it matches cmp_value
5841N/A LIR_Address* a;
5841N/A NOT_LP64(offset.result()->as_constant_ptr()->as_jint()) LP64_ONLY((int)offset.result()->as_constant_ptr()->as_jlong()),
5841N/A case vmIntrinsics::_dsqrt: __ sqrt (calc_input, calc_result, LIR_OprFact::illegalOpr); break;
5841N/A default: ShouldNotReachHere();
5841N/A set_no_result(x);
5841N/A CodeEmitInfo* info = state_for(x, x->state()); // we may want to have stack (deoptimization?)
5841N/A __ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(), length.result(), tmp, expected_type, flags, info); // does add_safepoint
5841N/A case Bytecodes::_i2s: fixed_input = false; fixed_result = false; round_result = false; needs_stub = false; break;
5841N/A case Bytecodes::_f2d: fixed_input = UseSSE == 1; fixed_result = false; round_result = false; needs_stub = false; break;
5841N/A case Bytecodes::_d2f: fixed_input = false; fixed_result = UseSSE == 1; round_result = UseSSE < 1; needs_stub = false; break;
5841N/A case Bytecodes::_i2f: fixed_input = false; fixed_result = false; round_result = UseSSE < 1; needs_stub = false; break;
5841N/A case Bytecodes::_i2d: fixed_input = false; fixed_result = false; round_result = false; needs_stub = false; break;
5841N/A case Bytecodes::_f2i: fixed_input = false; fixed_result = false; round_result = false; needs_stub = true; break;
5841N/A case Bytecodes::_d2i: fixed_input = false; fixed_result = false; round_result = false; needs_stub = true; break;
5841N/A case Bytecodes::_l2f: fixed_input = false; fixed_result = UseSSE >= 1; round_result = UseSSE < 1; needs_stub = false; break;
5841N/A case Bytecodes::_l2d: fixed_input = false; fixed_result = UseSSE >= 2; round_result = UseSSE < 2; needs_stub = false; break;
5841N/A case Bytecodes::_f2l: fixed_input = true; fixed_result = true; round_result = false; needs_stub = false; break;
5841N/A case Bytecodes::_d2l: fixed_input = true; fixed_result = true; round_result = false; needs_stub = false; break;
5841N/A default: ShouldNotReachHere();
5841N/A if (fixed_input) {
5841N/A if (fixed_result) {
5841N/A } else if (round_result) {
5841N/A if (needs_stub) {
5841N/A // in case of patching (i.e., object class is not yet loaded), we need to reexecute the instruction
5841N/A if (x->is_incompatible_class_change_check()) {
5841N/A stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
5841N/A stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
5841N/A if (tag == longTag && yin->is_constant() && yin->get_jlong_constant() == 0 && (cond == If::eql || cond == If::neq)) {
5841N/A if (x->is_safepoint()) {
5841N/A set_no_result(x);