OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3432 // an untagged smi. Allocate a heap number and call a | 3432 // an untagged smi. Allocate a heap number and call a |
3433 // C function for integer exponents. The register containing | 3433 // C function for integer exponents. The register containing |
3434 // the heap number is callee-saved. | 3434 // the heap number is callee-saved. |
3435 __ AllocateHeapNumber(heapnumber, | 3435 __ AllocateHeapNumber(heapnumber, |
3436 scratch, | 3436 scratch, |
3437 scratch2, | 3437 scratch2, |
3438 heapnumbermap, | 3438 heapnumbermap, |
3439 &call_runtime); | 3439 &call_runtime); |
3440 __ push(ra); | 3440 __ push(ra); |
3441 __ PrepareCallCFunction(3, scratch); | 3441 __ PrepareCallCFunction(3, scratch); |
3442 __ SetCallCDoubleArguments(double_base, double_exponent); | 3442 __ SetCallCDoubleArguments(double_base, exponent); |
3443 __ CallCFunction( | 3443 __ CallCFunction( |
3444 ExternalReference::power_double_int_function(masm->isolate()), 4); | 3444 ExternalReference::power_double_int_function(masm->isolate()), 3); |
3445 __ pop(ra); | 3445 __ pop(ra); |
3446 __ GetCFunctionDoubleResult(double_result); | 3446 __ GetCFunctionDoubleResult(double_result); |
3447 __ sdc1(double_result, | 3447 __ sdc1(double_result, |
3448 FieldMemOperand(heapnumber, HeapNumber::kValueOffset)); | 3448 FieldMemOperand(heapnumber, HeapNumber::kValueOffset)); |
3449 __ mov(v0, heapnumber); | 3449 __ mov(v0, heapnumber); |
3450 __ DropAndRet(2 * kPointerSize); | 3450 __ DropAndRet(2 * kPointerSize); |
3451 | 3451 |
3452 __ bind(&exponent_not_smi); | 3452 __ bind(&exponent_not_smi); |
3453 __ lw(scratch, FieldMemOperand(exponent, JSObject::kMapOffset)); | 3453 __ lw(scratch, FieldMemOperand(exponent, JSObject::kMapOffset)); |
3454 __ Branch(&call_runtime, ne, scratch, Operand(heapnumbermap)); | 3454 __ Branch(&call_runtime, ne, scratch, Operand(heapnumbermap)); |
(...skipping 3192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6647 __ mov(result, zero_reg); | 6647 __ mov(result, zero_reg); |
6648 __ Ret(); | 6648 __ Ret(); |
6649 } | 6649 } |
6650 | 6650 |
6651 | 6651 |
6652 #undef __ | 6652 #undef __ |
6653 | 6653 |
6654 } } // namespace v8::internal | 6654 } } // namespace v8::internal |
6655 | 6655 |
6656 #endif // V8_TARGET_ARCH_MIPS | 6656 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |