Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index 8f39d027287a211ddbec4882061c8f2f41983b3e..481fb8c9159f4a034408b00aba7a5aeca1fca1ad 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -268,66 +268,6 @@ void DoubleToIStub::Generate(MacroAssembler* masm) { |
} |
-void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime( |
- Isolate* isolate) { |
- WriteInt32ToHeapNumberStub stub1(isolate, a1, v0, a2, a3); |
- WriteInt32ToHeapNumberStub stub2(isolate, a2, v0, a3, a0); |
- stub1.GetCode(); |
- stub2.GetCode(); |
-} |
- |
- |
-// See comment for class, this does NOT work for int32's that are in Smi range. |
-void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) { |
- Label max_negative_int; |
- // the_int_ has the answer which is a signed int32 but not a Smi. |
- // We test for the special value that has a different exponent. |
- STATIC_ASSERT(HeapNumber::kSignMask == 0x80000000u); |
- // Test sign, and save for later conditionals. |
- __ And(sign(), the_int(), Operand(0x80000000u)); |
- __ Branch(&max_negative_int, eq, the_int(), Operand(0x80000000u)); |
- |
- // Set up the correct exponent in scratch_. All non-Smi int32s have the same. |
- // A non-Smi integer is 1.xxx * 2^30 so the exponent is 30 (biased). |
- uint32_t non_smi_exponent = |
- (HeapNumber::kExponentBias + 30) << HeapNumber::kExponentShift; |
- __ li(scratch(), Operand(non_smi_exponent)); |
- // Set the sign bit in scratch_ if the value was negative. |
- __ or_(scratch(), scratch(), sign()); |
- // Subtract from 0 if the value was negative. |
- __ subu(at, zero_reg, the_int()); |
- __ Movn(the_int(), at, sign()); |
- // We should be masking the implict first digit of the mantissa away here, |
- // but it just ends up combining harmlessly with the last digit of the |
- // exponent that happens to be 1. The sign bit is 0 so we shift 10 to get |
- // the most significant 1 to hit the last bit of the 12 bit sign and exponent. |
- DCHECK(((1 << HeapNumber::kExponentShift) & non_smi_exponent) != 0); |
- const int shift_distance = HeapNumber::kNonMantissaBitsInTopWord - 2; |
- __ srl(at, the_int(), shift_distance); |
- __ or_(scratch(), scratch(), at); |
- __ sw(scratch(), FieldMemOperand(the_heap_number(), |
- HeapNumber::kExponentOffset)); |
- __ sll(scratch(), the_int(), 32 - shift_distance); |
- __ Ret(USE_DELAY_SLOT); |
- __ sw(scratch(), FieldMemOperand(the_heap_number(), |
- HeapNumber::kMantissaOffset)); |
- |
- __ bind(&max_negative_int); |
- // The max negative int32 is stored as a positive number in the mantissa of |
- // a double because it uses a sign bit instead of using two's complement. |
- // The actual mantissa bits stored are all 0 because the implicit most |
- // significant 1 bit is not stored. |
- non_smi_exponent += 1 << HeapNumber::kExponentShift; |
- __ li(scratch(), Operand(HeapNumber::kSignMask | non_smi_exponent)); |
- __ sw(scratch(), |
- FieldMemOperand(the_heap_number(), HeapNumber::kExponentOffset)); |
- __ mov(scratch(), zero_reg); |
- __ Ret(USE_DELAY_SLOT); |
- __ sw(scratch(), |
- FieldMemOperand(the_heap_number(), HeapNumber::kMantissaOffset)); |
-} |
- |
- |
// Handle the case where the lhs and rhs are the same object. |
// Equality is almost reflexive (everything but NaN), so this is a test |
// for "identity and not NaN". |
@@ -1053,7 +993,6 @@ bool CEntryStub::NeedsImmovableCode() { |
void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { |
CEntryStub::GenerateAheadOfTime(isolate); |
- WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(isolate); |
StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); |
StubFailureTrampolineStub::GenerateAheadOfTime(isolate); |
ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |