Index: src/s390/macro-assembler-s390.cc |
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc |
index 559f7d030a75f74448fbb05ffd32d86f8f16983f..c0f234d3ef28e99dc6ffd8dc72bb32b12846c782 100644 |
--- a/src/s390/macro-assembler-s390.cc |
+++ b/src/s390/macro-assembler-s390.cc |
@@ -2407,160 +2407,6 @@ void MacroAssembler::TryInt32Floor(Register result, DoubleRegister double_input, |
bind(&exception); |
} |
-void MacroAssembler::FloatCeiling32(DoubleRegister double_output, |
- DoubleRegister double_input, |
- Register scratch, |
- DoubleRegister double_scratch) { |
- Label not_zero, no_nan_inf, done, do_ceil; |
- Register scratch2 = r0; |
- |
- // Move high word into scratch |
- MovFloatToInt(scratch, double_input); |
- |
- // Test for NaN/Inf which results in NaN/Inf respectively |
- static const uint32_t float32ExponentMask = 0x7f800000u; |
- ExtractBitMask(scratch2, scratch, float32ExponentMask); |
- CmpLogical32(scratch2, Operand(0xff)); |
- bne(&no_nan_inf, Label::kNear); |
- Move(double_output, double_input); |
- b(&done); |
- bind(&no_nan_inf); |
- |
- // Test for double_input in (-1, -0) which results in -0 |
- LoadFloat32Literal(double_scratch, -1.0, scratch2); |
- cebr(double_input, double_scratch); |
- ble(&do_ceil, Label::kNear); |
- Cmp32(scratch, Operand::Zero()); |
- bgt(&do_ceil, Label::kNear); |
- bne(¬_zero, Label::kNear); |
- |
- // double_input = +/- 0 which results in +/- 0 respectively |
- Move(double_output, double_input); |
- b(&done); |
- bind(¬_zero); |
- |
- // double_output = -0 |
- llihf(scratch2, Operand(0x80000000)); |
- ldgr(double_output, scratch2); |
- b(&done); |
- bind(&do_ceil); |
- |
- // Regular case |
- // cgdbr(Condition(6), scratch, double_input); |
- // cdfbr(double_output, scratch); |
- fiebra(double_output, double_input, FIDBRA_ROUND_TOWARD_POS_INF); |
- bind(&done); |
-} |
- |
-void MacroAssembler::FloatFloor32(DoubleRegister double_output, |
- DoubleRegister double_input, |
- Register scratch) { |
- Label not_zero, no_nan_inf, done, do_floor; |
- Register scratch2 = r0; |
- |
- // Move high word into scratch |
- MovFloatToInt(scratch, double_input); |
- |
- // Test for NaN/Inf which results in NaN/Inf respectively |
- static const uint32_t float32ExponentMask = 0x7f800000u; |
- ExtractBitMask(scratch2, scratch, float32ExponentMask); |
- CmpLogical32(scratch2, Operand(0xff)); |
- bne(&no_nan_inf, Label::kNear); |
- Move(double_output, double_input); |
- b(&done); |
- bind(&no_nan_inf); |
- |
- // Test for double_input=+/- 0 which results in +/- 0 respectively |
- ltebr(double_input, double_input); |
- bne(&do_floor, Label::kNear); |
- Move(double_output, double_input); |
- b(&done); |
- bind(&do_floor); |
- |
- // Regular case |
- // cgdbr(Condition(7), scratch, double_input); |
- // cdfbr(double_output, scratch); |
- fiebra(double_output, double_input, FIDBRA_ROUND_TOWARD_NEG_INF); |
- bind(&done); |
-} |
- |
-void MacroAssembler::FloatCeiling64(DoubleRegister double_output, |
- DoubleRegister double_input, |
- Register scratch, |
- DoubleRegister double_scratch) { |
- Label not_zero, no_nan_inf, done, do_ceil; |
- Register scratch2 = r0; |
- |
- // Move high word into scratch |
- StoreDouble(double_input, MemOperand(sp, -kDoubleSize)); |
- LoadlW(scratch, MemOperand(sp, -kDoubleSize + Register::kExponentOffset)); |
- |
- // Test for NaN/Inf which results in NaN/Inf respectively |
- ExtractBitMask(scratch2, scratch, HeapNumber::kExponentMask); |
- CmpLogicalP(scratch2, Operand(0x7ff)); |
- bne(&no_nan_inf, Label::kNear); |
- Move(double_output, double_input); |
- b(&done); |
- bind(&no_nan_inf); |
- |
- // Test for double_input in (-1, -0) which results in -0 |
- LoadDoubleLiteral(double_scratch, -1.0, scratch2); |
- cdbr(double_input, double_scratch); |
- ble(&do_ceil, Label::kNear); |
- Cmp32(scratch, Operand::Zero()); |
- bgt(&do_ceil, Label::kNear); |
- bne(¬_zero, Label::kNear); |
- |
- // double_input = +/- 0 which results in +/- 0 respectively |
- Move(double_output, double_input); |
- b(&done); |
- bind(¬_zero); |
- |
- // double_output = -0 |
- llihf(scratch2, Operand(0x80000000)); |
- ldgr(double_output, scratch2); |
- b(&done); |
- bind(&do_ceil); |
- |
- // Regular case |
- // cgdbr(Condition(6), scratch, double_input); |
- // cdfbr(double_output, scratch); |
- fidbra(double_output, double_input, FIDBRA_ROUND_TOWARD_POS_INF); |
- bind(&done); |
-} |
- |
-void MacroAssembler::FloatFloor64(DoubleRegister double_output, |
- DoubleRegister double_input, |
- Register scratch) { |
- Label not_zero, no_nan_inf, done, do_floor; |
- Register scratch2 = r0; |
- |
- // Move high word into scratch |
- StoreDouble(double_input, MemOperand(sp, -kDoubleSize)); |
- LoadlW(scratch, MemOperand(sp, -kDoubleSize + Register::kExponentOffset)); |
- |
- // Test for NaN/Inf which results in NaN/Inf respectively |
- ExtractBitMask(scratch2, scratch, HeapNumber::kExponentMask); |
- CmpLogicalP(scratch2, Operand(0x7ff)); |
- bne(&no_nan_inf, Label::kNear); |
- Move(double_output, double_input); |
- b(&done); |
- bind(&no_nan_inf); |
- |
- // Test for double_input=+/- 0 which results in +/- 0 respectively |
- ltdbr(double_input, double_input); |
- bne(&do_floor, Label::kNear); |
- Move(double_output, double_input); |
- b(&done); |
- bind(&do_floor); |
- |
- // Regular case |
- // cgdbr(Condition(7), scratch, double_input); |
- // cdfbr(double_output, scratch); |
- fidbra(double_output, double_input, FIDBRA_ROUND_TOWARD_NEG_INF); |
- bind(&done); |
-} |
- |
void MacroAssembler::TryInlineTruncateDoubleToI(Register result, |
DoubleRegister double_input, |
Label* done) { |