| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <stdlib.h> | 5 #include <stdlib.h> | 
| 6 #include <cmath> | 6 #include <cmath> | 
| 7 #include <cstdarg> | 7 #include <cstdarg> | 
| 8 | 8 | 
| 9 #if V8_TARGET_ARCH_ARM64 | 9 #if V8_TARGET_ARCH_ARM64 | 
| 10 | 10 | 
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 602       // host function if they aren't used. | 602       // host function if they aren't used. | 
| 603       TraceSim("Arguments: " | 603       TraceSim("Arguments: " | 
| 604                "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 604                "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 
| 605                "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 605                "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 
| 606                "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 606                "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 
| 607                "0x%016" PRIx64 ", 0x%016" PRIx64, | 607                "0x%016" PRIx64 ", 0x%016" PRIx64, | 
| 608                xreg(0), xreg(1), xreg(2), xreg(3), | 608                xreg(0), xreg(1), xreg(2), xreg(3), | 
| 609                xreg(4), xreg(5), xreg(6), xreg(7)); | 609                xreg(4), xreg(5), xreg(6), xreg(7)); | 
| 610       ObjectPair result = target(xreg(0), xreg(1), xreg(2), xreg(3), | 610       ObjectPair result = target(xreg(0), xreg(1), xreg(2), xreg(3), | 
| 611                                  xreg(4), xreg(5), xreg(6), xreg(7)); | 611                                  xreg(4), xreg(5), xreg(6), xreg(7)); | 
| 612       TraceSim("Returned: {%p, %p}\n", result.x, result.y); | 612       TraceSim("Returned: {%p, %p}\n", static_cast<void*>(result.x), | 
|  | 613                static_cast<void*>(result.y)); | 
| 613 #ifdef DEBUG | 614 #ifdef DEBUG | 
| 614       CorruptAllCallerSavedCPURegisters(); | 615       CorruptAllCallerSavedCPURegisters(); | 
| 615 #endif | 616 #endif | 
| 616       set_xreg(0, reinterpret_cast<int64_t>(result.x)); | 617       set_xreg(0, reinterpret_cast<int64_t>(result.x)); | 
| 617       set_xreg(1, reinterpret_cast<int64_t>(result.y)); | 618       set_xreg(1, reinterpret_cast<int64_t>(result.y)); | 
| 618       break; | 619       break; | 
| 619     } | 620     } | 
| 620 | 621 | 
| 621     case ExternalReference::BUILTIN_CALL_TRIPLE: { | 622     case ExternalReference::BUILTIN_CALL_TRIPLE: { | 
| 622       // ObjectTriple f(v8::internal::Arguments). | 623       // ObjectTriple f(v8::internal::Arguments). | 
| 623       TraceSim("Type: BUILTIN_CALL TRIPLE\n"); | 624       TraceSim("Type: BUILTIN_CALL TRIPLE\n"); | 
| 624       SimulatorRuntimeTripleCall target = | 625       SimulatorRuntimeTripleCall target = | 
| 625           reinterpret_cast<SimulatorRuntimeTripleCall>(external); | 626           reinterpret_cast<SimulatorRuntimeTripleCall>(external); | 
| 626 | 627 | 
| 627       // We don't know how many arguments are being passed, but we can | 628       // We don't know how many arguments are being passed, but we can | 
| 628       // pass 8 without touching the stack. They will be ignored by the | 629       // pass 8 without touching the stack. They will be ignored by the | 
| 629       // host function if they aren't used. | 630       // host function if they aren't used. | 
| 630       TraceSim( | 631       TraceSim( | 
| 631           "Arguments: " | 632           "Arguments: " | 
| 632           "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 633           "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 
| 633           "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 634           "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 
| 634           "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 635           "0x%016" PRIx64 ", 0x%016" PRIx64 ", " | 
| 635           "0x%016" PRIx64 ", 0x%016" PRIx64, | 636           "0x%016" PRIx64 ", 0x%016" PRIx64, | 
| 636           xreg(0), xreg(1), xreg(2), xreg(3), xreg(4), xreg(5), xreg(6), | 637           xreg(0), xreg(1), xreg(2), xreg(3), xreg(4), xreg(5), xreg(6), | 
| 637           xreg(7)); | 638           xreg(7)); | 
| 638       // Return location passed in x8. | 639       // Return location passed in x8. | 
| 639       ObjectTriple* sim_result = reinterpret_cast<ObjectTriple*>(xreg(8)); | 640       ObjectTriple* sim_result = reinterpret_cast<ObjectTriple*>(xreg(8)); | 
| 640       ObjectTriple result = target(xreg(0), xreg(1), xreg(2), xreg(3), xreg(4), | 641       ObjectTriple result = target(xreg(0), xreg(1), xreg(2), xreg(3), xreg(4), | 
| 641                                    xreg(5), xreg(6), xreg(7)); | 642                                    xreg(5), xreg(6), xreg(7)); | 
| 642       TraceSim("Returned: {%p, %p, %p}\n", result.x, result.y, result.z); | 643       TraceSim("Returned: {%p, %p, %p}\n", static_cast<void*>(result.x), | 
|  | 644                static_cast<void*>(result.y), static_cast<void*>(result.z)); | 
| 643 #ifdef DEBUG | 645 #ifdef DEBUG | 
| 644       CorruptAllCallerSavedCPURegisters(); | 646       CorruptAllCallerSavedCPURegisters(); | 
| 645 #endif | 647 #endif | 
| 646       *sim_result = result; | 648       *sim_result = result; | 
| 647       break; | 649       break; | 
| 648     } | 650     } | 
| 649 | 651 | 
| 650     case ExternalReference::DIRECT_API_CALL: { | 652     case ExternalReference::DIRECT_API_CALL: { | 
| 651       // void f(v8::FunctionCallbackInfo&) | 653       // void f(v8::FunctionCallbackInfo&) | 
| 652       TraceSim("Type: DIRECT_API_CALL\n"); | 654       TraceSim("Type: DIRECT_API_CALL\n"); | 
| (...skipping 3218 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3871   delete[] format; | 3873   delete[] format; | 
| 3872 } | 3874 } | 
| 3873 | 3875 | 
| 3874 | 3876 | 
| 3875 #endif  // USE_SIMULATOR | 3877 #endif  // USE_SIMULATOR | 
| 3876 | 3878 | 
| 3877 }  // namespace internal | 3879 }  // namespace internal | 
| 3878 }  // namespace v8 | 3880 }  // namespace v8 | 
| 3879 | 3881 | 
| 3880 #endif  // V8_TARGET_ARCH_ARM64 | 3882 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW | 
|---|