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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 __ push(ra); | 1460 __ push(ra); |
1461 __ PrepareCallCFunction(2, scratch); | 1461 __ PrepareCallCFunction(2, scratch); |
1462 if (IsMipsSoftFloatABI) { | 1462 if (IsMipsSoftFloatABI) { |
1463 __ Move(a0, a1, f4); | 1463 __ Move(a0, a1, f4); |
1464 } else { | 1464 } else { |
1465 __ mov_d(f12, f4); | 1465 __ mov_d(f12, f4); |
1466 } | 1466 } |
1467 AllowExternalCallThatCantCauseGC scope(masm); | 1467 AllowExternalCallThatCantCauseGC scope(masm); |
1468 Isolate* isolate = masm->isolate(); | 1468 Isolate* isolate = masm->isolate(); |
1469 switch (type_) { | 1469 switch (type_) { |
1470 case TranscendentalCache::SIN: | |
1471 __ CallCFunction( | |
1472 ExternalReference::math_sin_double_function(isolate), | |
1473 0, 1); | |
1474 break; | |
1475 case TranscendentalCache::COS: | |
1476 __ CallCFunction( | |
1477 ExternalReference::math_cos_double_function(isolate), | |
1478 0, 1); | |
1479 break; | |
1480 case TranscendentalCache::TAN: | |
1481 __ CallCFunction(ExternalReference::math_tan_double_function(isolate), | |
1482 0, 1); | |
1483 break; | |
1484 case TranscendentalCache::LOG: | 1470 case TranscendentalCache::LOG: |
1485 __ CallCFunction( | 1471 __ CallCFunction( |
1486 ExternalReference::math_log_double_function(isolate), | 1472 ExternalReference::math_log_double_function(isolate), |
1487 0, 1); | 1473 0, 1); |
1488 break; | 1474 break; |
1489 default: | 1475 default: |
1490 UNIMPLEMENTED(); | 1476 UNIMPLEMENTED(); |
1491 break; | 1477 break; |
1492 } | 1478 } |
1493 __ pop(ra); | 1479 __ pop(ra); |
1494 } | 1480 } |
1495 | 1481 |
1496 | 1482 |
1497 Runtime::FunctionId TranscendentalCacheStub::RuntimeFunction() { | 1483 Runtime::FunctionId TranscendentalCacheStub::RuntimeFunction() { |
1498 switch (type_) { | 1484 switch (type_) { |
1499 // Add more cases when necessary. | 1485 // Add more cases when necessary. |
1500 case TranscendentalCache::SIN: return Runtime::kMath_sin; | |
1501 case TranscendentalCache::COS: return Runtime::kMath_cos; | |
1502 case TranscendentalCache::TAN: return Runtime::kMath_tan; | |
1503 case TranscendentalCache::LOG: return Runtime::kMath_log; | 1486 case TranscendentalCache::LOG: return Runtime::kMath_log; |
1504 default: | 1487 default: |
1505 UNIMPLEMENTED(); | 1488 UNIMPLEMENTED(); |
1506 return Runtime::kAbort; | 1489 return Runtime::kAbort; |
1507 } | 1490 } |
1508 } | 1491 } |
1509 | 1492 |
1510 | 1493 |
1511 void MathPowStub::Generate(MacroAssembler* masm) { | 1494 void MathPowStub::Generate(MacroAssembler* masm) { |
1512 const Register base = a1; | 1495 const Register base = a1; |
(...skipping 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6178 __ bind(&fast_elements_case); | 6161 __ bind(&fast_elements_case); |
6179 GenerateCase(masm, FAST_ELEMENTS); | 6162 GenerateCase(masm, FAST_ELEMENTS); |
6180 } | 6163 } |
6181 | 6164 |
6182 | 6165 |
6183 #undef __ | 6166 #undef __ |
6184 | 6167 |
6185 } } // namespace v8::internal | 6168 } } // namespace v8::internal |
6186 | 6169 |
6187 #endif // V8_TARGET_ARCH_MIPS | 6170 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |