OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3483 } else if (exponent_type.IsInteger32()) { | 3483 } else if (exponent_type.IsInteger32()) { |
3484 MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3484 MathPowStub stub(isolate(), MathPowStub::INTEGER); |
3485 __ CallStub(&stub); | 3485 __ CallStub(&stub); |
3486 } else { | 3486 } else { |
3487 DCHECK(exponent_type.IsDouble()); | 3487 DCHECK(exponent_type.IsDouble()); |
3488 MathPowStub stub(isolate(), MathPowStub::DOUBLE); | 3488 MathPowStub stub(isolate(), MathPowStub::DOUBLE); |
3489 __ CallStub(&stub); | 3489 __ CallStub(&stub); |
3490 } | 3490 } |
3491 } | 3491 } |
3492 | 3492 |
| 3493 void LCodeGen::DoMathCos(LMathCos* instr) { |
| 3494 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3495 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3496 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 0, 1); |
| 3497 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3498 } |
| 3499 |
| 3500 void LCodeGen::DoMathSin(LMathSin* instr) { |
| 3501 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3502 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3503 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 0, 1); |
| 3504 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3505 } |
3493 | 3506 |
3494 void LCodeGen::DoMathExp(LMathExp* instr) { | 3507 void LCodeGen::DoMathExp(LMathExp* instr) { |
3495 __ PrepareCallCFunction(0, 1, scratch0()); | 3508 __ PrepareCallCFunction(0, 1, scratch0()); |
3496 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3509 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3497 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); | 3510 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); |
3498 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3511 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3499 } | 3512 } |
3500 | 3513 |
3501 | 3514 |
3502 void LCodeGen::DoMathLog(LMathLog* instr) { | 3515 void LCodeGen::DoMathLog(LMathLog* instr) { |
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5541 __ lw(result, FieldMemOperand(scratch, | 5554 __ lw(result, FieldMemOperand(scratch, |
5542 FixedArray::kHeaderSize - kPointerSize)); | 5555 FixedArray::kHeaderSize - kPointerSize)); |
5543 __ bind(deferred->exit()); | 5556 __ bind(deferred->exit()); |
5544 __ bind(&done); | 5557 __ bind(&done); |
5545 } | 5558 } |
5546 | 5559 |
5547 #undef __ | 5560 #undef __ |
5548 | 5561 |
5549 } // namespace internal | 5562 } // namespace internal |
5550 } // namespace v8 | 5563 } // namespace v8 |
OLD | NEW |