1075 return shouldHaveRegister; |
1075 return shouldHaveRegister; |
1076 } |
1076 } |
1077 } |
1077 } |
1078 |
1078 |
1079 |
1079 |
1080 #ifdef X86 |
1080 #if defined(X86) || defined(S390) |
1081 if (op->code() == lir_cmove) { |
1081 if (op->code() == lir_cmove) { |
1082 // conditional moves can handle stack operands |
1082 // conditional moves can handle stack operands |
1083 assert(op->result_opr()->is_register(), "result must always be in a register"); |
1083 assert(op->result_opr()->is_register(), "result must always be in a register"); |
1084 return shouldHaveRegister; |
1084 return shouldHaveRegister; |
1085 } |
1085 } |
1086 |
1086 |
1087 // optimizations for second input operand of arithmehtic operations on Intel |
1087 // optimizations for second input operand of arithmehtic operations on Intel |
1088 // this operand is allowed to be on the stack in some cases |
1088 // this operand is allowed to be on the stack in some cases |
1089 BasicType opr_type = opr->type_register(); |
1089 BasicType opr_type = opr->type_register(); |
1090 if (opr_type == T_FLOAT || opr_type == T_DOUBLE) { |
1090 if (opr_type == T_FLOAT || opr_type == T_DOUBLE) { |
1091 if ((UseSSE == 1 && opr_type == T_FLOAT) || UseSSE >= 2) { |
1091 if ((UseSSE == 1 && opr_type == T_FLOAT) || UseSSE >= 2 S390_ONLY(|| true)) { |
1092 // SSE float instruction (T_DOUBLE only supported with SSE2) |
1092 // SSE float instruction (T_DOUBLE only supported with SSE2) |
1093 switch (op->code()) { |
1093 switch (op->code()) { |
1094 case lir_cmp: |
1094 case lir_cmp: |
1095 case lir_add: |
1095 case lir_add: |
1096 case lir_sub: |
1096 case lir_sub: |
2651 |
2651 |
2652 Location::Type loc_type = float_saved_as_double ? Location::float_in_dbl : Location::normal; |
2652 Location::Type loc_type = float_saved_as_double ? Location::float_in_dbl : Location::normal; |
2653 VMReg rname = frame_map()->fpu_regname(opr->fpu_regnr()); |
2653 VMReg rname = frame_map()->fpu_regname(opr->fpu_regnr()); |
2654 #ifndef __SOFTFP__ |
2654 #ifndef __SOFTFP__ |
2655 #ifndef VM_LITTLE_ENDIAN |
2655 #ifndef VM_LITTLE_ENDIAN |
|
2656 // On S390 a (single precision) float value occupies only the high |
|
2657 // word of the full double register. So when the double register is |
|
2658 // stored to memory (e.g. by the RegisterSaver), then the float value |
|
2659 // is found at offset 0. I.e. the code below is not needed on S390. |
|
2660 #ifndef S390 |
2656 if (! float_saved_as_double) { |
2661 if (! float_saved_as_double) { |
2657 // On big endian system, we may have an issue if float registers use only |
2662 // On big endian system, we may have an issue if float registers use only |
2658 // the low half of the (same) double registers. |
2663 // the low half of the (same) double registers. |
2659 // Both the float and the double could have the same regnr but would correspond |
2664 // Both the float and the double could have the same regnr but would correspond |
2660 // to two different addresses once saved. |
2665 // to two different addresses once saved. |
2665 (next->as_FloatRegister() == rname->as_FloatRegister())) { |
2670 (next->as_FloatRegister() == rname->as_FloatRegister())) { |
2666 // the back-end does use the same numbering for the double and the float |
2671 // the back-end does use the same numbering for the double and the float |
2667 rname = next; // VMReg for the low bits, e.g. the real VMReg for the float |
2672 rname = next; // VMReg for the low bits, e.g. the real VMReg for the float |
2668 } |
2673 } |
2669 } |
2674 } |
|
2675 #endif // !S390 |
2670 #endif |
2676 #endif |
2671 #endif |
2677 #endif |
2672 LocationValue* sv = new LocationValue(Location::new_reg_loc(loc_type, rname)); |
2678 LocationValue* sv = new LocationValue(Location::new_reg_loc(loc_type, rname)); |
2673 |
2679 |
2674 scope_values->append(sv); |
2680 scope_values->append(sv); |