OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
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 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3499 __ sub_d(f0, f12, f14); | 3499 __ sub_d(f0, f12, f14); |
3500 } | 3500 } |
3501 | 3501 |
3502 void LCodeGen::DoDeferredRandom(LRandom* instr) { | 3502 void LCodeGen::DoDeferredRandom(LRandom* instr) { |
3503 __ PrepareCallCFunction(1, scratch0()); | 3503 __ PrepareCallCFunction(1, scratch0()); |
3504 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); | 3504 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); |
3505 // Return value is in v0. | 3505 // Return value is in v0. |
3506 } | 3506 } |
3507 | 3507 |
3508 | 3508 |
| 3509 void LCodeGen::DoMathExp(LMathExp* instr) { |
| 3510 DoubleRegister input = ToDoubleRegister(instr->value()); |
| 3511 DoubleRegister result = ToDoubleRegister(instr->result()); |
| 3512 DoubleRegister double_scratch1 = ToDoubleRegister(instr->double_temp()); |
| 3513 DoubleRegister double_scratch2 = double_scratch0(); |
| 3514 Register temp1 = ToRegister(instr->temp1()); |
| 3515 Register temp2 = ToRegister(instr->temp2()); |
| 3516 |
| 3517 MathExpGenerator::EmitMathExp( |
| 3518 masm(), input, result, double_scratch1, double_scratch2, |
| 3519 temp1, temp2, scratch0()); |
| 3520 } |
| 3521 |
| 3522 |
3509 void LCodeGen::DoMathLog(LUnaryMathOperation* instr) { | 3523 void LCodeGen::DoMathLog(LUnaryMathOperation* instr) { |
3510 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | 3524 ASSERT(ToDoubleRegister(instr->result()).is(f4)); |
3511 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3525 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
3512 TranscendentalCacheStub::UNTAGGED); | 3526 TranscendentalCacheStub::UNTAGGED); |
3513 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3527 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
3514 } | 3528 } |
3515 | 3529 |
3516 | 3530 |
3517 void LCodeGen::DoMathTan(LUnaryMathOperation* instr) { | 3531 void LCodeGen::DoMathTan(LUnaryMathOperation* instr) { |
3518 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | 3532 ASSERT(ToDoubleRegister(instr->result()).is(f4)); |
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5501 __ Subu(scratch, result, scratch); | 5515 __ Subu(scratch, result, scratch); |
5502 __ lw(result, FieldMemOperand(scratch, | 5516 __ lw(result, FieldMemOperand(scratch, |
5503 FixedArray::kHeaderSize - kPointerSize)); | 5517 FixedArray::kHeaderSize - kPointerSize)); |
5504 __ bind(&done); | 5518 __ bind(&done); |
5505 } | 5519 } |
5506 | 5520 |
5507 | 5521 |
5508 #undef __ | 5522 #undef __ |
5509 | 5523 |
5510 } } // namespace v8::internal | 5524 } } // namespace v8::internal |
OLD | NEW |