| 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 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 case ExternalReference::BUILTIN_FP_INT_CALL: | 1495 case ExternalReference::BUILTIN_FP_INT_CALL: |
| 1496 GetFpArgs(&dval0, &ival); | 1496 GetFpArgs(&dval0, &ival); |
| 1497 PrintF("Call to host function at %p with args %f, %d", | 1497 PrintF("Call to host function at %p with args %f, %d", |
| 1498 FUNCTION_ADDR(target), dval0, ival); | 1498 FUNCTION_ADDR(target), dval0, ival); |
| 1499 break; | 1499 break; |
| 1500 default: | 1500 default: |
| 1501 UNREACHABLE(); | 1501 UNREACHABLE(); |
| 1502 break; | 1502 break; |
| 1503 } | 1503 } |
| 1504 } | 1504 } |
| 1505 double result = target(arg0, arg1, arg2, arg3); | |
| 1506 if (redirection->type() != ExternalReference::BUILTIN_COMPARE_CALL) { | 1505 if (redirection->type() != ExternalReference::BUILTIN_COMPARE_CALL) { |
| 1507 SetFpResult(result); | 1506 SimulatorRuntimeFPCall target = |
| 1507 reinterpret_cast<SimulatorRuntimeFPCall>(external); |
| 1508 double result = target(arg0, arg1, arg2, arg3); |
| 1509 SetFpResult(result); |
| 1508 } else { | 1510 } else { |
| 1511 SimulatorRuntimeCall target = |
| 1512 reinterpret_cast<SimulatorRuntimeCall>(external); |
| 1513 uint64_t result = target(arg0, arg1, arg2, arg3, arg4, arg5); |
| 1509 int32_t gpreg_pair[2]; | 1514 int32_t gpreg_pair[2]; |
| 1510 memcpy(&gpreg_pair[0], &result, 2 * sizeof(int32_t)); | 1515 memcpy(&gpreg_pair[0], &result, 2 * sizeof(int32_t)); |
| 1511 set_register(v0, gpreg_pair[0]); | 1516 set_register(v0, gpreg_pair[0]); |
| 1512 set_register(v1, gpreg_pair[1]); | 1517 set_register(v1, gpreg_pair[1]); |
| 1513 } | 1518 } |
| 1514 } else if (redirection->type() == ExternalReference::DIRECT_API_CALL) { | 1519 } else if (redirection->type() == ExternalReference::DIRECT_API_CALL) { |
| 1515 // See DirectCEntryStub::GenerateCall for explanation of register usage. | 1520 // See DirectCEntryStub::GenerateCall for explanation of register usage. |
| 1516 SimulatorRuntimeDirectApiCall target = | 1521 SimulatorRuntimeDirectApiCall target = |
| 1517 reinterpret_cast<SimulatorRuntimeDirectApiCall>(external); | 1522 reinterpret_cast<SimulatorRuntimeDirectApiCall>(external); |
| 1518 if (::v8::internal::FLAG_trace_sim) { | 1523 if (::v8::internal::FLAG_trace_sim) { |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2827 } | 2832 } |
| 2828 | 2833 |
| 2829 | 2834 |
| 2830 #undef UNSUPPORTED | 2835 #undef UNSUPPORTED |
| 2831 | 2836 |
| 2832 } } // namespace v8::internal | 2837 } } // namespace v8::internal |
| 2833 | 2838 |
| 2834 #endif // USE_SIMULATOR | 2839 #endif // USE_SIMULATOR |
| 2835 | 2840 |
| 2836 #endif // V8_TARGET_ARCH_MIPS | 2841 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |