< prev index next >

src/cpu/x86/vm/c1_LinearScan_x86.cpp

Print this page




 809   if (res->is_fpu_register() && !res->is_xmm_register()) {
 810     do_push(res);
 811     opCall->set_result_opr(to_fpu_stack_top(res));
 812   }
 813 }
 814 
 815 #ifndef PRODUCT
 816 void FpuStackAllocator::check_invalid_lir_op(LIR_Op* op) {
 817   switch (op->code()) {
 818     case lir_24bit_FPU:
 819     case lir_reset_FPU:
 820     case lir_ffree:
 821       assert(false, "operations not allowed in lir. If one of these operations is needed, check if they have fpu operands");
 822       break;
 823 
 824     case lir_fpop_raw:
 825     case lir_fxch:
 826     case lir_fld:
 827       assert(false, "operations only inserted by FpuStackAllocator");
 828       break;


 829   }
 830 }
 831 #endif
 832 
 833 
 834 void FpuStackAllocator::merge_insert_add(LIR_List* instrs, FpuStackSim* cur_sim, int reg) {
 835   LIR_Op1* move = new LIR_Op1(lir_move, LIR_OprFact::doubleConst(0), LIR_OprFact::double_fpu(reg)->make_fpu_stack_offset());
 836 
 837   instrs->instructions_list()->push(move);
 838 
 839   cur_sim->push(reg);
 840   move->set_result_opr(to_fpu_stack(move->result_opr()));
 841 
 842   #ifndef PRODUCT
 843     if (TraceFPUStack) {
 844       tty->print("Added new register: %d         New state: ", reg); cur_sim->print(); tty->cr();
 845     }
 846   #endif
 847 }
 848 




 809   if (res->is_fpu_register() && !res->is_xmm_register()) {
 810     do_push(res);
 811     opCall->set_result_opr(to_fpu_stack_top(res));
 812   }
 813 }
 814 
 815 #ifndef PRODUCT
 816 void FpuStackAllocator::check_invalid_lir_op(LIR_Op* op) {
 817   switch (op->code()) {
 818     case lir_24bit_FPU:
 819     case lir_reset_FPU:
 820     case lir_ffree:
 821       assert(false, "operations not allowed in lir. If one of these operations is needed, check if they have fpu operands");
 822       break;
 823 
 824     case lir_fpop_raw:
 825     case lir_fxch:
 826     case lir_fld:
 827       assert(false, "operations only inserted by FpuStackAllocator");
 828       break;
 829     default:
 830       break;
 831   }
 832 }
 833 #endif
 834 
 835 
 836 void FpuStackAllocator::merge_insert_add(LIR_List* instrs, FpuStackSim* cur_sim, int reg) {
 837   LIR_Op1* move = new LIR_Op1(lir_move, LIR_OprFact::doubleConst(0), LIR_OprFact::double_fpu(reg)->make_fpu_stack_offset());
 838 
 839   instrs->instructions_list()->push(move);
 840 
 841   cur_sim->push(reg);
 842   move->set_result_opr(to_fpu_stack(move->result_opr()));
 843 
 844   #ifndef PRODUCT
 845     if (TraceFPUStack) {
 846       tty->print("Added new register: %d         New state: ", reg); cur_sim->print(); tty->cr();
 847     }
 848   #endif
 849 }
 850 


< prev index next >