OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <limits.h> | 5 #include <limits.h> |
6 #include <stdarg.h> | 6 #include <stdarg.h> |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #if V8_TARGET_ARCH_MIPS | 10 #if V8_TARGET_ARCH_MIPS |
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 // pass it to the target function. | 2200 // pass it to the target function. |
2201 ObjectTriple result = target(arg1, arg2, arg3, arg4, arg5); | 2201 ObjectTriple result = target(arg1, arg2, arg3, arg4, arg5); |
2202 if (::v8::internal::FLAG_trace_sim) { | 2202 if (::v8::internal::FLAG_trace_sim) { |
2203 PrintF("Returned { %p, %p, %p }\n", result.x, result.y, result.z); | 2203 PrintF("Returned { %p, %p, %p }\n", result.x, result.y, result.z); |
2204 } | 2204 } |
2205 // Return is passed back in address pointed to by hidden first argument. | 2205 // Return is passed back in address pointed to by hidden first argument. |
2206 ObjectTriple* sim_result = reinterpret_cast<ObjectTriple*>(arg0); | 2206 ObjectTriple* sim_result = reinterpret_cast<ObjectTriple*>(arg0); |
2207 *sim_result = result; | 2207 *sim_result = result; |
2208 set_register(v0, arg0); | 2208 set_register(v0, arg0); |
2209 } else { | 2209 } else { |
| 2210 DCHECK(redirection->type() == ExternalReference::BUILTIN_CALL || |
| 2211 redirection->type() == ExternalReference::BUILTIN_CALL_PAIR); |
2210 SimulatorRuntimeCall target = | 2212 SimulatorRuntimeCall target = |
2211 reinterpret_cast<SimulatorRuntimeCall>(external); | 2213 reinterpret_cast<SimulatorRuntimeCall>(external); |
2212 if (::v8::internal::FLAG_trace_sim) { | 2214 if (::v8::internal::FLAG_trace_sim) { |
2213 PrintF( | 2215 PrintF( |
2214 "Call to host function at %p " | 2216 "Call to host function at %p " |
2215 "args %08x, %08x, %08x, %08x, %08x, %08x\n", | 2217 "args %08x, %08x, %08x, %08x, %08x, %08x\n", |
2216 FUNCTION_ADDR(target), | 2218 FUNCTION_ADDR(target), |
2217 arg0, | 2219 arg0, |
2218 arg1, | 2220 arg1, |
2219 arg2, | 2221 arg2, |
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4613 | 4615 |
4614 | 4616 |
4615 #undef UNSUPPORTED | 4617 #undef UNSUPPORTED |
4616 | 4618 |
4617 } // namespace internal | 4619 } // namespace internal |
4618 } // namespace v8 | 4620 } // namespace v8 |
4619 | 4621 |
4620 #endif // USE_SIMULATOR | 4622 #endif // USE_SIMULATOR |
4621 | 4623 |
4622 #endif // V8_TARGET_ARCH_MIPS | 4624 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |