| Index: src/arm/simulator-arm.cc
|
| diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc
|
| index 6e7c0e6897ebe550442326d1d4c50f0fd8941640..ac36687fcabe13209c2311a4973d611845ae41c4 100644
|
| --- a/src/arm/simulator-arm.cc
|
| +++ b/src/arm/simulator-arm.cc
|
| @@ -846,6 +846,12 @@ class Redirection {
|
| return reinterpret_cast<Redirection*>(addr_of_redirection);
|
| }
|
|
|
| + static void* ReverseRedirection(int32_t reg) {
|
| + Redirection* redirection = FromSwiInstruction(
|
| + reinterpret_cast<Instruction*>(reinterpret_cast<void*>(reg)));
|
| + return redirection->external_function();
|
| + }
|
| +
|
| private:
|
| void* external_function_;
|
| uint32_t swi_instruction_;
|
| @@ -1689,12 +1695,12 @@ typedef double (*SimulatorRuntimeFPIntCall)(double darg0, int32_t arg0);
|
| // This signature supports direct call in to API function native callback
|
| // (refer to InvocationCallback in v8.h).
|
| typedef void (*SimulatorRuntimeDirectApiCall)(int32_t arg0);
|
| -typedef void (*SimulatorRuntimeProfilingApiCall)(int32_t arg0, int32_t arg1);
|
| +typedef void (*SimulatorRuntimeProfilingApiCall)(int32_t arg0, void* arg1);
|
|
|
| // This signature supports direct call to accessor getter callback.
|
| typedef void (*SimulatorRuntimeDirectGetterCall)(int32_t arg0, int32_t arg1);
|
| typedef void (*SimulatorRuntimeProfilingGetterCall)(
|
| - int32_t arg0, int32_t arg1, int32_t arg2);
|
| + int32_t arg0, int32_t arg1, void* arg2);
|
|
|
| // Software interrupt instructions are used by the simulator to call into the
|
| // C-based V8 runtime.
|
| @@ -1833,7 +1839,7 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
|
| CHECK(stack_aligned);
|
| SimulatorRuntimeProfilingApiCall target =
|
| reinterpret_cast<SimulatorRuntimeProfilingApiCall>(external);
|
| - target(arg0, arg1);
|
| + target(arg0, Redirection::ReverseRedirection(arg1));
|
| } else if (
|
| redirection->type() == ExternalReference::DIRECT_GETTER_CALL) {
|
| if (::v8::internal::FLAG_trace_sim || !stack_aligned) {
|
| @@ -1862,7 +1868,7 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
|
| SimulatorRuntimeProfilingGetterCall target =
|
| reinterpret_cast<SimulatorRuntimeProfilingGetterCall>(
|
| external);
|
| - target(arg0, arg1, arg2);
|
| + target(arg0, arg1, Redirection::ReverseRedirection(arg2));
|
| } else {
|
| // builtin call.
|
| ASSERT(redirection->type() == ExternalReference::BUILTIN_CALL);
|
|
|