diff options
Diffstat (limited to 'chromium/v8/src/execution/ppc/simulator-ppc.cc')
-rw-r--r-- | chromium/v8/src/execution/ppc/simulator-ppc.cc | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/chromium/v8/src/execution/ppc/simulator-ppc.cc b/chromium/v8/src/execution/ppc/simulator-ppc.cc index 96308f7f5b0..ab8786713b1 100644 --- a/chromium/v8/src/execution/ppc/simulator-ppc.cc +++ b/chromium/v8/src/execution/ppc/simulator-ppc.cc @@ -931,10 +931,12 @@ using SimulatorRuntimeCall = intptr_t (*)(intptr_t arg0, intptr_t arg1, intptr_t arg2, intptr_t arg3, intptr_t arg4, intptr_t arg5, intptr_t arg6, intptr_t arg7, - intptr_t arg8); + intptr_t arg8, intptr_t arg9); using SimulatorRuntimePairCall = ObjectPair (*)(intptr_t arg0, intptr_t arg1, intptr_t arg2, intptr_t arg3, - intptr_t arg4, intptr_t arg5); + intptr_t arg4, intptr_t arg5, + intptr_t arg6, intptr_t arg7, + intptr_t arg8, intptr_t arg9); // These prototypes handle the four types of FP calls. using SimulatorRuntimeCompareCall = int (*)(double darg0, double darg1); @@ -964,7 +966,7 @@ void Simulator::SoftwareInterrupt(Instruction* instr) { (get_register(sp) & (::v8::internal::FLAG_sim_stack_alignment - 1)) == 0; Redirection* redirection = Redirection::FromInstruction(instr); - const int kArgCount = 9; + const int kArgCount = 10; const int kRegisterArgCount = 8; int arg0_regnum = 3; intptr_t result_buffer = 0; @@ -982,9 +984,11 @@ void Simulator::SoftwareInterrupt(Instruction* instr) { } intptr_t* stack_pointer = reinterpret_cast<intptr_t*>(get_register(sp)); // Remaining argument on stack - arg[kRegisterArgCount] = stack_pointer[kStackFrameExtraParamSlot]; - STATIC_ASSERT(kArgCount == kRegisterArgCount + 1); - STATIC_ASSERT(kMaxCParameters == 9); + for (int i = kRegisterArgCount, j = 0; i < kArgCount; i++, j++) { + arg[i] = stack_pointer[kStackFrameExtraParamSlot + j]; + } + STATIC_ASSERT(kArgCount == kRegisterArgCount + 2); + STATIC_ASSERT(kMaxCParameters == kArgCount); bool fp_call = (redirection->type() == ExternalReference::BUILTIN_FP_FP_CALL) || (redirection->type() == ExternalReference::BUILTIN_COMPARE_CALL) || @@ -1161,9 +1165,10 @@ void Simulator::SoftwareInterrupt(Instruction* instr) { "Call to host function at %p,\n" "\t\t\t\targs %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR - ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR, + ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR + ", %08" V8PRIxPTR, reinterpret_cast<void*>(FUNCTION_ADDR(target)), arg[0], arg[1], - arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8]); + arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9]); if (!stack_aligned) { PrintF(" with unaligned stack %08" V8PRIxPTR "\n", get_register(sp)); @@ -1174,8 +1179,8 @@ void Simulator::SoftwareInterrupt(Instruction* instr) { if (redirection->type() == ExternalReference::BUILTIN_CALL_PAIR) { SimulatorRuntimePairCall target = reinterpret_cast<SimulatorRuntimePairCall>(external); - ObjectPair result = - target(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]); + ObjectPair result = target(arg[0], arg[1], arg[2], arg[3], arg[4], + arg[5], arg[6], arg[7], arg[8], arg[9]); intptr_t x; intptr_t y; decodeObjectPair(&result, &x, &y); @@ -1195,7 +1200,7 @@ void Simulator::SoftwareInterrupt(Instruction* instr) { SimulatorRuntimeCall target = reinterpret_cast<SimulatorRuntimeCall>(external); intptr_t result = target(arg[0], arg[1], arg[2], arg[3], arg[4], - arg[5], arg[6], arg[7], arg[8]); + arg[5], arg[6], arg[7], arg[8], arg[9]); if (::v8::internal::FLAG_trace_sim) { PrintF("Returned %08" V8PRIxPTR "\n", result); } |