OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 MIPS instructions if we are not generating a native | 6 // Declares a Simulator for MIPS instructions if we are not generating a native |
7 // MIPS binary. This Simulator allows us to run and debug MIPS code generation | 7 // MIPS binary. This Simulator allows us to run and debug MIPS code generation |
8 // on regular desktop machines. | 8 // on 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // calculates the stack limit based on that value. | 63 // calculates the stack limit based on that value. |
64 // NOTE: The check for overflow is not safe as there is no guarantee that the | 64 // NOTE: The check for overflow is not safe as there is no guarantee that the |
65 // running thread has its stack in all memory up to address 0x00000000. | 65 // running thread has its stack in all memory up to address 0x00000000. |
66 #define GENERATED_CODE_STACK_LIMIT(limit) \ | 66 #define GENERATED_CODE_STACK_LIMIT(limit) \ |
67 (reinterpret_cast<uintptr_t>(this) >= limit ? \ | 67 (reinterpret_cast<uintptr_t>(this) >= limit ? \ |
68 reinterpret_cast<uintptr_t>(this) - limit : 0) | 68 reinterpret_cast<uintptr_t>(this) - limit : 0) |
69 | 69 |
70 #else // !defined(USE_SIMULATOR) | 70 #else // !defined(USE_SIMULATOR) |
71 // Running with a simulator. | 71 // Running with a simulator. |
72 | 72 |
| 73 #include "src/assembler.h" |
73 #include "src/hashmap.h" | 74 #include "src/hashmap.h" |
74 #include "src/assembler.h" | |
75 | 75 |
76 namespace v8 { | 76 namespace v8 { |
77 namespace internal { | 77 namespace internal { |
78 | 78 |
79 // ----------------------------------------------------------------------------- | 79 // ----------------------------------------------------------------------------- |
80 // Utility functions | 80 // Utility functions |
81 | 81 |
82 class CachePage { | 82 class CachePage { |
83 public: | 83 public: |
84 static const int LINE_VALID = 0; | 84 static const int LINE_VALID = 0; |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 static inline void UnregisterCTryCatch() { | 408 static inline void UnregisterCTryCatch() { |
409 Simulator::current(Isolate::Current())->PopAddress(); | 409 Simulator::current(Isolate::Current())->PopAddress(); |
410 } | 410 } |
411 }; | 411 }; |
412 | 412 |
413 } } // namespace v8::internal | 413 } } // namespace v8::internal |
414 | 414 |
415 #endif // !defined(USE_SIMULATOR) | 415 #endif // !defined(USE_SIMULATOR) |
416 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 416 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
OLD | NEW |