83 tty->print_cr("killing XMMs for trig"); 84 } 85 #endif 86 int num_caller_save_xmm_regs = FrameMap::get_num_caller_save_xmms(); 87 int op_id = op->id(); 88 for (int xmm = 0; xmm < num_caller_save_xmm_regs; xmm++) { 89 LIR_Opr opr = FrameMap::caller_save_xmm_reg_at(xmm); 90 add_temp(reg_num(opr), op_id, noUse, T_ILLEGAL); 91 } 92 } 93 break; 94 } 95 } 96 } 97 98 99 // Implementation of LinearScanWalker 100 101 inline bool LinearScanWalker::pd_init_regs_for_alloc(Interval* cur) { 102 int last_xmm_reg = pd_last_xmm_reg; 103 if (UseAVX < 3) { 104 last_xmm_reg = pd_first_xmm_reg + (pd_nof_xmm_regs_frame_map / 2) - 1; 105 } 106 if (allocator()->gen()->is_vreg_flag_set(cur->reg_num(), LIRGenerator::byte_reg)) { 107 assert(cur->type() != T_FLOAT && cur->type() != T_DOUBLE, "cpu regs only"); 108 _first_reg = pd_first_byte_reg; 109 _last_reg = FrameMap::last_byte_reg(); 110 return true; 111 } else if ((UseSSE >= 1 && cur->type() == T_FLOAT) || (UseSSE >= 2 && cur->type() == T_DOUBLE)) { 112 _first_reg = pd_first_xmm_reg; 113 _last_reg = last_xmm_reg; 114 return true; 115 } 116 117 return false; 118 } 119 120 121 class FpuStackAllocator VALUE_OBJ_CLASS_SPEC { 122 private: 123 Compilation* _compilation; 124 LinearScan* _allocator; 125 | 83 tty->print_cr("killing XMMs for trig"); 84 } 85 #endif 86 int num_caller_save_xmm_regs = FrameMap::get_num_caller_save_xmms(); 87 int op_id = op->id(); 88 for (int xmm = 0; xmm < num_caller_save_xmm_regs; xmm++) { 89 LIR_Opr opr = FrameMap::caller_save_xmm_reg_at(xmm); 90 add_temp(reg_num(opr), op_id, noUse, T_ILLEGAL); 91 } 92 } 93 break; 94 } 95 } 96 } 97 98 99 // Implementation of LinearScanWalker 100 101 inline bool LinearScanWalker::pd_init_regs_for_alloc(Interval* cur) { 102 int last_xmm_reg = pd_last_xmm_reg; 103 #ifdef _LP64 104 if (UseAVX < 3) { 105 last_xmm_reg = pd_first_xmm_reg + (pd_nof_xmm_regs_frame_map / 2) - 1; 106 } 107 #endif 108 if (allocator()->gen()->is_vreg_flag_set(cur->reg_num(), LIRGenerator::byte_reg)) { 109 assert(cur->type() != T_FLOAT && cur->type() != T_DOUBLE, "cpu regs only"); 110 _first_reg = pd_first_byte_reg; 111 _last_reg = FrameMap::last_byte_reg(); 112 return true; 113 } else if ((UseSSE >= 1 && cur->type() == T_FLOAT) || (UseSSE >= 2 && cur->type() == T_DOUBLE)) { 114 _first_reg = pd_first_xmm_reg; 115 _last_reg = last_xmm_reg; 116 return true; 117 } 118 119 return false; 120 } 121 122 123 class FpuStackAllocator VALUE_OBJ_CLASS_SPEC { 124 private: 125 Compilation* _compilation; 126 LinearScan* _allocator; 127 |