| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 inline int32_t rt() const { return get_register(rt_reg()); } | 337 inline int32_t rt() const { return get_register(rt_reg()); } |
| 338 inline uint32_t rt_u() const { | 338 inline uint32_t rt_u() const { |
| 339 return static_cast<uint32_t>(get_register(rt_reg())); | 339 return static_cast<uint32_t>(get_register(rt_reg())); |
| 340 } | 340 } |
| 341 inline int32_t rd_reg() const { return currentInstr_->RdValue(); } | 341 inline int32_t rd_reg() const { return currentInstr_->RdValue(); } |
| 342 inline int32_t fr_reg() const { return currentInstr_->FrValue(); } | 342 inline int32_t fr_reg() const { return currentInstr_->FrValue(); } |
| 343 inline int32_t fs_reg() const { return currentInstr_->FsValue(); } | 343 inline int32_t fs_reg() const { return currentInstr_->FsValue(); } |
| 344 inline int32_t ft_reg() const { return currentInstr_->FtValue(); } | 344 inline int32_t ft_reg() const { return currentInstr_->FtValue(); } |
| 345 inline int32_t fd_reg() const { return currentInstr_->FdValue(); } | 345 inline int32_t fd_reg() const { return currentInstr_->FdValue(); } |
| 346 inline int32_t sa() const { return currentInstr_->SaValue(); } | 346 inline int32_t sa() const { return currentInstr_->SaValue(); } |
| 347 inline int32_t lsa_sa() const { return currentInstr_->LSASaValue(); } |
| 347 | 348 |
| 348 inline void SetResult(int32_t rd_reg, int32_t alu_out) { | 349 inline void SetResult(int32_t rd_reg, int32_t alu_out) { |
| 349 set_register(rd_reg, alu_out); | 350 set_register(rd_reg, alu_out); |
| 350 TraceRegWr(alu_out); | 351 TraceRegWr(alu_out); |
| 351 } | 352 } |
| 352 | 353 |
| 353 void DecodeTypeImmediate(Instruction* instr); | 354 void DecodeTypeImmediate(Instruction* instr); |
| 354 void DecodeTypeJump(Instruction* instr); | 355 void DecodeTypeJump(Instruction* instr); |
| 355 | 356 |
| 356 // Used for breakpoints and traps. | 357 // Used for breakpoints and traps. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 static inline void UnregisterCTryCatch(Isolate* isolate) { | 505 static inline void UnregisterCTryCatch(Isolate* isolate) { |
| 505 Simulator::current(isolate)->PopAddress(); | 506 Simulator::current(isolate)->PopAddress(); |
| 506 } | 507 } |
| 507 }; | 508 }; |
| 508 | 509 |
| 509 } // namespace internal | 510 } // namespace internal |
| 510 } // namespace v8 | 511 } // namespace v8 |
| 511 | 512 |
| 512 #endif // !defined(USE_SIMULATOR) | 513 #endif // !defined(USE_SIMULATOR) |
| 513 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 514 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
| OLD | NEW |