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 | 5 |
6 // Declares a Simulator for PPC instructions if we are not generating a native | 6 // Declares a Simulator for PPC instructions if we are not generating a native |
7 // PPC binary. This Simulator allows us to run and debug PPC code generation on | 7 // PPC binary. This Simulator allows us to run and debug PPC 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 void ExecuteInstruction(Instruction* instr); | 334 void ExecuteInstruction(Instruction* instr); |
335 | 335 |
336 // ICache. | 336 // ICache. |
337 static void CheckICache(base::CustomMatcherHashMap* i_cache, | 337 static void CheckICache(base::CustomMatcherHashMap* i_cache, |
338 Instruction* instr); | 338 Instruction* instr); |
339 static void FlushOnePage(base::CustomMatcherHashMap* i_cache, intptr_t start, | 339 static void FlushOnePage(base::CustomMatcherHashMap* i_cache, intptr_t start, |
340 int size); | 340 int size); |
341 static CachePage* GetCachePage(base::CustomMatcherHashMap* i_cache, | 341 static CachePage* GetCachePage(base::CustomMatcherHashMap* i_cache, |
342 void* page); | 342 void* page); |
343 | 343 |
344 // Runtime call support. | 344 // Runtime call support. Uses the isolate in a thread-safe way. |
345 static void* RedirectExternalReference( | 345 static void* RedirectExternalReference( |
346 Isolate* isolate, void* external_function, | 346 Isolate* isolate, void* external_function, |
347 v8::internal::ExternalReference::Type type); | 347 v8::internal::ExternalReference::Type type); |
348 | 348 |
349 // Handle arguments and return value for runtime FP functions. | 349 // Handle arguments and return value for runtime FP functions. |
350 void GetFpArgs(double* x, double* y, intptr_t* z); | 350 void GetFpArgs(double* x, double* y, intptr_t* z); |
351 void SetFpResult(const double& result); | 351 void SetFpResult(const double& result); |
352 void TrashCallerSaveRegisters(); | 352 void TrashCallerSaveRegisters(); |
353 | 353 |
354 void CallInternal(byte* entry); | 354 void CallInternal(byte* entry); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 514 |
515 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { | 515 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { |
516 Simulator::current(isolate)->PopAddress(); | 516 Simulator::current(isolate)->PopAddress(); |
517 } | 517 } |
518 }; | 518 }; |
519 } // namespace internal | 519 } // namespace internal |
520 } // namespace v8 | 520 } // namespace v8 |
521 | 521 |
522 #endif // !defined(USE_SIMULATOR) | 522 #endif // !defined(USE_SIMULATOR) |
523 #endif // V8_PPC_SIMULATOR_PPC_H_ | 523 #endif // V8_PPC_SIMULATOR_PPC_H_ |
OLD | NEW |