| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 | 5 |
| 6 // Declares a Simulator for ARM instructions if we are not generating a native | 6 // Declares a Simulator for ARM instructions if we are not generating a native |
| 7 // ARM binary. This Simulator allows us to run and debug ARM code generation on | 7 // ARM binary. This Simulator allows us to run and debug ARM code generation on |
| 8 // regular desktop machines. | 8 // regular desktop machines. |
| 9 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, | 9 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, |
| 10 // which will start execution in the Simulator or forwards to the real entry | 10 // which will start execution in the Simulator or forwards to the real entry |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 return c_limit; | 48 return c_limit; |
| 49 } | 49 } |
| 50 | 50 |
| 51 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { | 51 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { |
| 52 return try_catch_address; | 52 return try_catch_address; |
| 53 } | 53 } |
| 54 | 54 |
| 55 static inline void UnregisterCTryCatch() { } | 55 static inline void UnregisterCTryCatch() { } |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } } // namespace v8::internal | 58 } // namespace internal |
| 59 } // namespace v8 |
| 59 | 60 |
| 60 #else // !defined(USE_SIMULATOR) | 61 #else // !defined(USE_SIMULATOR) |
| 61 // Running with a simulator. | 62 // Running with a simulator. |
| 62 | 63 |
| 63 #include "src/arm/constants-arm.h" | 64 #include "src/arm/constants-arm.h" |
| 64 #include "src/assembler.h" | 65 #include "src/assembler.h" |
| 65 #include "src/hashmap.h" | 66 #include "src/hashmap.h" |
| 66 | 67 |
| 67 namespace v8 { | 68 namespace v8 { |
| 68 namespace internal { | 69 namespace internal { |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { | 453 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { |
| 453 Simulator* sim = Simulator::current(Isolate::Current()); | 454 Simulator* sim = Simulator::current(Isolate::Current()); |
| 454 return sim->PushAddress(try_catch_address); | 455 return sim->PushAddress(try_catch_address); |
| 455 } | 456 } |
| 456 | 457 |
| 457 static inline void UnregisterCTryCatch() { | 458 static inline void UnregisterCTryCatch() { |
| 458 Simulator::current(Isolate::Current())->PopAddress(); | 459 Simulator::current(Isolate::Current())->PopAddress(); |
| 459 } | 460 } |
| 460 }; | 461 }; |
| 461 | 462 |
| 462 } } // namespace v8::internal | 463 } // namespace internal |
| 464 } // namespace v8 |
| 463 | 465 |
| 464 #endif // !defined(USE_SIMULATOR) | 466 #endif // !defined(USE_SIMULATOR) |
| 465 #endif // V8_ARM_SIMULATOR_ARM_H_ | 467 #endif // V8_ARM_SIMULATOR_ARM_H_ |
| OLD | NEW |