50 if (LP64_ONLY(false &&) type == T_LONG) {
51 return 2;
52 }
53 return 1;
54 }
55
56
57 inline bool LinearScan::requires_adjacent_regs(BasicType type) {
58 return false;
59 }
60
61 inline bool LinearScan::is_caller_save(int assigned_reg) {
62 assert(assigned_reg >= 0 && assigned_reg < nof_regs, "should call this only for registers");
63 return true; // no callee-saved registers on Intel
64
65 }
66
67
68 inline void LinearScan::pd_add_temps(LIR_Op* op) {
69 switch (op->code()) {
70 case lir_tan:
71 case lir_sin:
72 case lir_cos: {
73 // The slow path for these functions may need to save and
74 // restore all live registers but we don't want to save and
75 // restore everything all the time, so mark the xmms as being
76 // killed. If the slow path were explicit or we could propagate
77 // live register masks down to the assembly we could do better
78 // but we don't have any easy way to do that right now. We
79 // could also consider not killing all xmm registers if we
80 // assume that slow paths are uncommon but it's not clear that
81 // would be a good idea.
82 if (UseSSE > 0) {
83 #ifndef PRODUCT
84 if (TraceLinearScanLevel >= 2) {
85 tty->print_cr("killing XMMs for trig");
86 }
87 #endif
88 int num_caller_save_xmm_regs = FrameMap::get_num_caller_save_xmms();
89 int op_id = op->id();
90 for (int xmm = 0; xmm < num_caller_save_xmm_regs; xmm++) {
91 LIR_Opr opr = FrameMap::caller_save_xmm_reg_at(xmm);
92 add_temp(reg_num(opr), op_id, noUse, T_ILLEGAL);
|
50 if (LP64_ONLY(false &&) type == T_LONG) {
51 return 2;
52 }
53 return 1;
54 }
55
56
57 inline bool LinearScan::requires_adjacent_regs(BasicType type) {
58 return false;
59 }
60
61 inline bool LinearScan::is_caller_save(int assigned_reg) {
62 assert(assigned_reg >= 0 && assigned_reg < nof_regs, "should call this only for registers");
63 return true; // no callee-saved registers on Intel
64
65 }
66
67
68 inline void LinearScan::pd_add_temps(LIR_Op* op) {
69 switch (op->code()) {
70 case lir_tan: {
71 // The slow path for these functions may need to save and
72 // restore all live registers but we don't want to save and
73 // restore everything all the time, so mark the xmms as being
74 // killed. If the slow path were explicit or we could propagate
75 // live register masks down to the assembly we could do better
76 // but we don't have any easy way to do that right now. We
77 // could also consider not killing all xmm registers if we
78 // assume that slow paths are uncommon but it's not clear that
79 // would be a good idea.
80 if (UseSSE > 0) {
81 #ifndef PRODUCT
82 if (TraceLinearScanLevel >= 2) {
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);
|