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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 void GetFpArgs(double* x, double* y, int32_t* z); | 356 void GetFpArgs(double* x, double* y, int32_t* z); |
357 void SetFpResult(const double& result); | 357 void SetFpResult(const double& result); |
358 void TrashCallerSaveRegisters(); | 358 void TrashCallerSaveRegisters(); |
359 | 359 |
360 template<class ReturnType, int register_size> | 360 template<class ReturnType, int register_size> |
361 ReturnType GetFromVFPRegister(int reg_index); | 361 ReturnType GetFromVFPRegister(int reg_index); |
362 | 362 |
363 template<class InputType, int register_size> | 363 template<class InputType, int register_size> |
364 void SetVFPRegister(int reg_index, const InputType& value); | 364 void SetVFPRegister(int reg_index, const InputType& value); |
365 | 365 |
| 366 void SetSpecialRegister(SRegisterFieldMask reg_and_mask, uint32_t value); |
| 367 uint32_t GetFromSpecialRegister(SRegister reg); |
| 368 |
366 void CallInternal(byte* entry); | 369 void CallInternal(byte* entry); |
367 | 370 |
368 // Architecture state. | 371 // Architecture state. |
369 // Saturating instructions require a Q flag to indicate saturation. | 372 // Saturating instructions require a Q flag to indicate saturation. |
370 // There is currently no way to read the CPSR directly, and thus read the Q | 373 // There is currently no way to read the CPSR directly, and thus read the Q |
371 // flag, so this is left unimplemented. | 374 // flag, so this is left unimplemented. |
372 int32_t registers_[16]; | 375 int32_t registers_[16]; |
373 bool n_flag_; | 376 bool n_flag_; |
374 bool z_flag_; | 377 bool z_flag_; |
375 bool c_flag_; | 378 bool c_flag_; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { | 467 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { |
465 Simulator::current(isolate)->PopAddress(); | 468 Simulator::current(isolate)->PopAddress(); |
466 } | 469 } |
467 }; | 470 }; |
468 | 471 |
469 } // namespace internal | 472 } // namespace internal |
470 } // namespace v8 | 473 } // namespace v8 |
471 | 474 |
472 #endif // !defined(USE_SIMULATOR) | 475 #endif // !defined(USE_SIMULATOR) |
473 #endif // V8_ARM_SIMULATOR_ARM_H_ | 476 #endif // V8_ARM_SIMULATOR_ARM_H_ |
OLD | NEW |