| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 2931c1520853e1953d1ce9f4d9f29cdc5502a178..8e2d5abbeda823bb30f5ae9c7a19290339b452d8 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -674,17 +674,9 @@ void FullCodeGenerator::DoTest(Expression* condition,
|
| Label* if_true,
|
| Label* if_false,
|
| Label* fall_through) {
|
| - if (CpuFeatures::IsSupported(FPU)) {
|
| - ToBooleanStub stub(result_register());
|
| - __ CallStub(&stub, condition->test_id());
|
| - __ mov(at, zero_reg);
|
| - } else {
|
| - // Call the runtime to find the boolean value of the source and then
|
| - // translate it into control flow to the pair of labels.
|
| - __ push(result_register());
|
| - __ CallRuntime(Runtime::kToBool, 1);
|
| - __ LoadRoot(at, Heap::kFalseValueRootIndex);
|
| - }
|
| + ToBooleanStub stub(result_register());
|
| + __ CallStub(&stub, condition->test_id());
|
| + __ mov(at, zero_reg);
|
| Split(ne, v0, Operand(at), if_true, if_false, fall_through);
|
| }
|
|
|
| @@ -3045,31 +3037,21 @@ void FullCodeGenerator::EmitRandomHeapNumber(CallRuntime* expr) {
|
| // Convert 32 random bits in v0 to 0.(32 random bits) in a double
|
| // by computing:
|
| // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
|
| - if (CpuFeatures::IsSupported(FPU)) {
|
| - __ PrepareCallCFunction(1, a0);
|
| - __ lw(a0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| - __ lw(a0, FieldMemOperand(a0, GlobalObject::kNativeContextOffset));
|
| - __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1);
|
| -
|
| - CpuFeatureScope scope(masm(), FPU);
|
| - // 0x41300000 is the top half of 1.0 x 2^20 as a double.
|
| - __ li(a1, Operand(0x41300000));
|
| - // Move 0x41300000xxxxxxxx (x = random bits in v0) to FPU.
|
| - __ Move(f12, v0, a1);
|
| - // Move 0x4130000000000000 to FPU.
|
| - __ Move(f14, zero_reg, a1);
|
| - // Subtract and store the result in the heap number.
|
| - __ sub_d(f0, f12, f14);
|
| - __ sdc1(f0, FieldMemOperand(s0, HeapNumber::kValueOffset));
|
| - __ mov(v0, s0);
|
| - } else {
|
| - __ PrepareCallCFunction(2, a0);
|
| - __ mov(a0, s0);
|
| - __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| - __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset));
|
| - __ CallCFunction(
|
| - ExternalReference::fill_heap_number_with_random_function(isolate()), 2);
|
| - }
|
| + __ PrepareCallCFunction(1, a0);
|
| + __ lw(a0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| + __ lw(a0, FieldMemOperand(a0, GlobalObject::kNativeContextOffset));
|
| + __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1);
|
| +
|
| + // 0x41300000 is the top half of 1.0 x 2^20 as a double.
|
| + __ li(a1, Operand(0x41300000));
|
| + // Move 0x41300000xxxxxxxx (x = random bits in v0) to FPU.
|
| + __ Move(f12, v0, a1);
|
| + // Move 0x4130000000000000 to FPU.
|
| + __ Move(f14, zero_reg, a1);
|
| + // Subtract and store the result in the heap number.
|
| + __ sub_d(f0, f12, f14);
|
| + __ sdc1(f0, FieldMemOperand(s0, HeapNumber::kValueOffset));
|
| + __ mov(v0, s0);
|
|
|
| context()->Plug(v0);
|
| }
|
| @@ -3207,12 +3189,8 @@ void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
|
| ASSERT(args->length() == 2);
|
| VisitForStackValue(args->at(0));
|
| VisitForStackValue(args->at(1));
|
| - if (CpuFeatures::IsSupported(FPU)) {
|
| - MathPowStub stub(MathPowStub::ON_STACK);
|
| - __ CallStub(&stub);
|
| - } else {
|
| - __ CallRuntime(Runtime::kMath_pow, 2);
|
| - }
|
| + MathPowStub stub(MathPowStub::ON_STACK);
|
| + __ CallStub(&stub);
|
| context()->Plug(v0);
|
| }
|
|
|
|
|