OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 3520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3531 } else if (exponent_type.IsInteger32()) { | 3531 } else if (exponent_type.IsInteger32()) { |
3532 MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3532 MathPowStub stub(isolate(), MathPowStub::INTEGER); |
3533 __ CallStub(&stub); | 3533 __ CallStub(&stub); |
3534 } else { | 3534 } else { |
3535 DCHECK(exponent_type.IsDouble()); | 3535 DCHECK(exponent_type.IsDouble()); |
3536 MathPowStub stub(isolate(), MathPowStub::DOUBLE); | 3536 MathPowStub stub(isolate(), MathPowStub::DOUBLE); |
3537 __ CallStub(&stub); | 3537 __ CallStub(&stub); |
3538 } | 3538 } |
3539 } | 3539 } |
3540 | 3540 |
| 3541 void LCodeGen::DoMathCos(LMathCos* instr) { |
| 3542 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3543 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3544 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 0, 1); |
| 3545 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3546 } |
| 3547 |
| 3548 void LCodeGen::DoMathSin(LMathSin* instr) { |
| 3549 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3550 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3551 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 0, 1); |
| 3552 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3553 } |
3541 | 3554 |
3542 void LCodeGen::DoMathExp(LMathExp* instr) { | 3555 void LCodeGen::DoMathExp(LMathExp* instr) { |
3543 __ PrepareCallCFunction(0, 1, scratch0()); | 3556 __ PrepareCallCFunction(0, 1, scratch0()); |
3544 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3557 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3545 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); | 3558 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); |
3546 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3559 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3547 } | 3560 } |
3548 | 3561 |
3549 | 3562 |
3550 void LCodeGen::DoMathLog(LMathLog* instr) { | 3563 void LCodeGen::DoMathLog(LMathLog* instr) { |
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5544 __ ldr(result, FieldMemOperand(scratch, | 5557 __ ldr(result, FieldMemOperand(scratch, |
5545 FixedArray::kHeaderSize - kPointerSize)); | 5558 FixedArray::kHeaderSize - kPointerSize)); |
5546 __ bind(deferred->exit()); | 5559 __ bind(deferred->exit()); |
5547 __ bind(&done); | 5560 __ bind(&done); |
5548 } | 5561 } |
5549 | 5562 |
5550 #undef __ | 5563 #undef __ |
5551 | 5564 |
5552 } // namespace internal | 5565 } // namespace internal |
5553 } // namespace v8 | 5566 } // namespace v8 |
OLD | NEW |