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 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 3493 |
3494 void LCodeGen::DoMathExp(LMathExp* instr) { | 3494 void LCodeGen::DoMathExp(LMathExp* instr) { |
3495 __ PrepareCallCFunction(0, 1, scratch0()); | 3495 DoubleRegister input = ToDoubleRegister(instr->value()); |
3496 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3496 DoubleRegister result = ToDoubleRegister(instr->result()); |
3497 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); | 3497 DoubleRegister double_scratch1 = ToDoubleRegister(instr->double_temp()); |
3498 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3498 DoubleRegister double_scratch2 = double_scratch0(); |
| 3499 Register temp1 = ToRegister(instr->temp1()); |
| 3500 Register temp2 = ToRegister(instr->temp2()); |
| 3501 |
| 3502 MathExpGenerator::EmitMathExp( |
| 3503 masm(), input, result, double_scratch1, double_scratch2, |
| 3504 temp1, temp2, scratch0()); |
3499 } | 3505 } |
3500 | 3506 |
3501 | 3507 |
3502 void LCodeGen::DoMathLog(LMathLog* instr) { | 3508 void LCodeGen::DoMathLog(LMathLog* instr) { |
3503 __ PrepareCallCFunction(0, 1, scratch0()); | 3509 __ PrepareCallCFunction(0, 1, scratch0()); |
3504 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3510 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3505 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1); | 3511 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1); |
3506 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3512 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3507 } | 3513 } |
3508 | 3514 |
(...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5541 __ lw(result, FieldMemOperand(scratch, | 5547 __ lw(result, FieldMemOperand(scratch, |
5542 FixedArray::kHeaderSize - kPointerSize)); | 5548 FixedArray::kHeaderSize - kPointerSize)); |
5543 __ bind(deferred->exit()); | 5549 __ bind(deferred->exit()); |
5544 __ bind(&done); | 5550 __ bind(&done); |
5545 } | 5551 } |
5546 | 5552 |
5547 #undef __ | 5553 #undef __ |
5548 | 5554 |
5549 } // namespace internal | 5555 } // namespace internal |
5550 } // namespace v8 | 5556 } // namespace v8 |
OLD | NEW |