| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <stdarg.h> | 5 #include <stdarg.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_PPC | 9 #if V8_TARGET_ARCH_PPC |
| 10 | 10 |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 int iresult = 0; // integer return value | 1277 int iresult = 0; // integer return value |
| 1278 double dresult = 0; // double return value | 1278 double dresult = 0; // double return value |
| 1279 GetFpArgs(&dval0, &dval1, &ival); | 1279 GetFpArgs(&dval0, &dval1, &ival); |
| 1280 if (::v8::internal::FLAG_trace_sim || !stack_aligned) { | 1280 if (::v8::internal::FLAG_trace_sim || !stack_aligned) { |
| 1281 SimulatorRuntimeCall generic_target = | 1281 SimulatorRuntimeCall generic_target = |
| 1282 reinterpret_cast<SimulatorRuntimeCall>(external); | 1282 reinterpret_cast<SimulatorRuntimeCall>(external); |
| 1283 switch (redirection->type()) { | 1283 switch (redirection->type()) { |
| 1284 case ExternalReference::BUILTIN_FP_FP_CALL: | 1284 case ExternalReference::BUILTIN_FP_FP_CALL: |
| 1285 case ExternalReference::BUILTIN_COMPARE_CALL: | 1285 case ExternalReference::BUILTIN_COMPARE_CALL: |
| 1286 PrintF("Call to host function at %p with args %f, %f", | 1286 PrintF("Call to host function at %p with args %f, %f", |
| 1287 FUNCTION_ADDR(generic_target), dval0, dval1); | 1287 static_cast<void*>(FUNCTION_ADDR(generic_target)), |
| 1288 dval0, dval1); |
| 1288 break; | 1289 break; |
| 1289 case ExternalReference::BUILTIN_FP_CALL: | 1290 case ExternalReference::BUILTIN_FP_CALL: |
| 1290 PrintF("Call to host function at %p with arg %f", | 1291 PrintF("Call to host function at %p with arg %f", |
| 1291 FUNCTION_ADDR(generic_target), dval0); | 1292 static_cast<void*>(FUNCTION_ADDR(generic_target)), |
| 1293 dval0); |
| 1292 break; | 1294 break; |
| 1293 case ExternalReference::BUILTIN_FP_INT_CALL: | 1295 case ExternalReference::BUILTIN_FP_INT_CALL: |
| 1294 PrintF("Call to host function at %p with args %f, %" V8PRIdPTR, | 1296 PrintF("Call to host function at %p with args %f, %" V8PRIdPTR, |
| 1295 FUNCTION_ADDR(generic_target), dval0, ival); | 1297 static_cast<void*>(FUNCTION_ADDR(generic_target)), |
| 1298 dval0, ival); |
| 1296 break; | 1299 break; |
| 1297 default: | 1300 default: |
| 1298 UNREACHABLE(); | 1301 UNREACHABLE(); |
| 1299 break; | 1302 break; |
| 1300 } | 1303 } |
| 1301 if (!stack_aligned) { | 1304 if (!stack_aligned) { |
| 1302 PrintF(" with unaligned stack %08" V8PRIxPTR "\n", | 1305 PrintF(" with unaligned stack %08" V8PRIxPTR "\n", |
| 1303 get_register(sp)); | 1306 get_register(sp)); |
| 1304 } | 1307 } |
| 1305 PrintF("\n"); | 1308 PrintF("\n"); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 target(arg[0], arg[1], Redirection::ReverseRedirection(arg[2])); | 1430 target(arg[0], arg[1], Redirection::ReverseRedirection(arg[2])); |
| 1428 } else { | 1431 } else { |
| 1429 // builtin call. | 1432 // builtin call. |
| 1430 if (::v8::internal::FLAG_trace_sim || !stack_aligned) { | 1433 if (::v8::internal::FLAG_trace_sim || !stack_aligned) { |
| 1431 SimulatorRuntimeCall target = | 1434 SimulatorRuntimeCall target = |
| 1432 reinterpret_cast<SimulatorRuntimeCall>(external); | 1435 reinterpret_cast<SimulatorRuntimeCall>(external); |
| 1433 PrintF( | 1436 PrintF( |
| 1434 "Call to host function at %p,\n" | 1437 "Call to host function at %p,\n" |
| 1435 "\t\t\t\targs %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR | 1438 "\t\t\t\targs %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR |
| 1436 ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR, | 1439 ", %08" V8PRIxPTR ", %08" V8PRIxPTR ", %08" V8PRIxPTR, |
| 1437 FUNCTION_ADDR(target), arg[0], arg[1], arg[2], arg[3], arg[4], | 1440 static_cast<void*>(FUNCTION_ADDR(target)), arg[0], arg[1], |
| 1438 arg[5]); | 1441 arg[2], arg[3], arg[4], arg[5]); |
| 1439 if (!stack_aligned) { | 1442 if (!stack_aligned) { |
| 1440 PrintF(" with unaligned stack %08" V8PRIxPTR "\n", | 1443 PrintF(" with unaligned stack %08" V8PRIxPTR "\n", |
| 1441 get_register(sp)); | 1444 get_register(sp)); |
| 1442 } | 1445 } |
| 1443 PrintF("\n"); | 1446 PrintF("\n"); |
| 1444 } | 1447 } |
| 1445 CHECK(stack_aligned); | 1448 CHECK(stack_aligned); |
| 1446 if (redirection->type() == ExternalReference::BUILTIN_CALL_TRIPLE) { | 1449 if (redirection->type() == ExternalReference::BUILTIN_CALL_TRIPLE) { |
| 1447 SimulatorRuntimeTripleCall target = | 1450 SimulatorRuntimeTripleCall target = |
| 1448 reinterpret_cast<SimulatorRuntimeTripleCall>(external); | 1451 reinterpret_cast<SimulatorRuntimeTripleCall>(external); |
| (...skipping 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4129 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); | 4132 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); |
| 4130 uintptr_t address = *stack_slot; | 4133 uintptr_t address = *stack_slot; |
| 4131 set_register(sp, current_sp + sizeof(uintptr_t)); | 4134 set_register(sp, current_sp + sizeof(uintptr_t)); |
| 4132 return address; | 4135 return address; |
| 4133 } | 4136 } |
| 4134 } // namespace internal | 4137 } // namespace internal |
| 4135 } // namespace v8 | 4138 } // namespace v8 |
| 4136 | 4139 |
| 4137 #endif // USE_SIMULATOR | 4140 #endif // USE_SIMULATOR |
| 4138 #endif // V8_TARGET_ARCH_PPC | 4141 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |