< prev index next >

src/cpu/x86/vm/c1_LinearScan_x86.cpp

Print this page




 794       // overflow.
 795       assert(right->is_illegal(), "must be");
 796       assert(left->is_fpu_register(), "must be");
 797       assert(res->is_fpu_register(), "must be");
 798       assert(op2->tmp1_opr()->is_fpu_register(), "must be");
 799 
 800       insert_free_if_dead(op2->tmp1_opr());
 801       insert_free_if_dead(res, left);
 802       insert_exchange(left);
 803       do_rename(left, res);
 804 
 805       new_left = to_fpu_stack_top(res);
 806       new_res = new_left;
 807 
 808       op2->set_fpu_stack_size(sim()->stack_size());
 809       assert(sim()->stack_size() <= 7, "at least one stack slot must be free");
 810       break;
 811     }
 812 
 813 
 814     case lir_tan:
 815     case lir_sin:
 816     case lir_cos: {
 817       // sin, cos and exp need two temporary fpu stack slots, so there are two temporary
 818       // registers (stored in right and temp of the operation).
 819       // the stack allocator must guarantee that the stack slots are really free,
 820       // otherwise there might be a stack overflow.
 821       assert(left->is_fpu_register(), "must be");
 822       assert(res->is_fpu_register(), "must be");
 823       // assert(left->is_last_use(), "old value gets destroyed");
 824       assert(right->is_fpu_register(), "right is used as the first temporary register");
 825       assert(op2->tmp1_opr()->is_fpu_register(), "temp is used as the second temporary register");
 826       assert(fpu_num(left) != fpu_num(right) && fpu_num(right) != fpu_num(op2->tmp1_opr()) && fpu_num(op2->tmp1_opr()) != fpu_num(res), "need distinct temp registers");
 827 
 828       insert_free_if_dead(right);
 829       insert_free_if_dead(op2->tmp1_opr());
 830 
 831       insert_free_if_dead(res, left);
 832       insert_exchange(left);
 833       do_rename(left, res);
 834 
 835       new_left = to_fpu_stack_top(res);
 836       new_res = new_left;




 794       // overflow.
 795       assert(right->is_illegal(), "must be");
 796       assert(left->is_fpu_register(), "must be");
 797       assert(res->is_fpu_register(), "must be");
 798       assert(op2->tmp1_opr()->is_fpu_register(), "must be");
 799 
 800       insert_free_if_dead(op2->tmp1_opr());
 801       insert_free_if_dead(res, left);
 802       insert_exchange(left);
 803       do_rename(left, res);
 804 
 805       new_left = to_fpu_stack_top(res);
 806       new_res = new_left;
 807 
 808       op2->set_fpu_stack_size(sim()->stack_size());
 809       assert(sim()->stack_size() <= 7, "at least one stack slot must be free");
 810       break;
 811     }
 812 
 813 
 814     case lir_tan: {


 815       // sin, cos and exp need two temporary fpu stack slots, so there are two temporary
 816       // registers (stored in right and temp of the operation).
 817       // the stack allocator must guarantee that the stack slots are really free,
 818       // otherwise there might be a stack overflow.
 819       assert(left->is_fpu_register(), "must be");
 820       assert(res->is_fpu_register(), "must be");
 821       // assert(left->is_last_use(), "old value gets destroyed");
 822       assert(right->is_fpu_register(), "right is used as the first temporary register");
 823       assert(op2->tmp1_opr()->is_fpu_register(), "temp is used as the second temporary register");
 824       assert(fpu_num(left) != fpu_num(right) && fpu_num(right) != fpu_num(op2->tmp1_opr()) && fpu_num(op2->tmp1_opr()) != fpu_num(res), "need distinct temp registers");
 825 
 826       insert_free_if_dead(right);
 827       insert_free_if_dead(op2->tmp1_opr());
 828 
 829       insert_free_if_dead(res, left);
 830       insert_exchange(left);
 831       do_rename(left, res);
 832 
 833       new_left = to_fpu_stack_top(res);
 834       new_res = new_left;


< prev index next >