| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // Get Double Higher / Lower word. | 258 // Get Double Higher / Lower word. |
| 259 inline int32_t GetDoubleHIW(double* addr); | 259 inline int32_t GetDoubleHIW(double* addr); |
| 260 inline int32_t GetDoubleLOW(double* addr); | 260 inline int32_t GetDoubleLOW(double* addr); |
| 261 // Set Double Higher / Lower word. | 261 // Set Double Higher / Lower word. |
| 262 inline int32_t SetDoubleHIW(double* addr); | 262 inline int32_t SetDoubleHIW(double* addr); |
| 263 inline int32_t SetDoubleLOW(double* addr); | 263 inline int32_t SetDoubleLOW(double* addr); |
| 264 | 264 |
| 265 // Executing is handled based on the instruction type. | 265 // Executing is handled based on the instruction type. |
| 266 void DecodeTypeRegister(Instruction* instr); | 266 void DecodeTypeRegister(Instruction* instr); |
| 267 | 267 |
| 268 // Called from DecodeTypeRegisterCOP1 |
| 269 void DecodeTypeRegisterDRsType(Instruction* instr, const int32_t& fr_reg, |
| 270 const int32_t& fs_reg, const int32_t& ft_reg, |
| 271 const int32_t& fd_reg); |
| 272 void DecodeTypeRegisterWRsType(Instruction* instr, int32_t& alu_out, |
| 273 const int32_t& fd_reg, const int32_t& fs_reg); |
| 274 void DecodeTypeRegisterSRsType(Instruction* instr, const int32_t& ft_reg, |
| 275 const int32_t& fs_reg, const int32_t& fd_reg); |
| 276 void DecodeTypeRegisterLRsType(Instruction* instr, const int32_t& ft_reg, |
| 277 const int32_t& fs_reg, const int32_t& fd_reg); |
| 278 |
| 279 // Functions called from DeocodeTypeRegister |
| 280 void DecodeTypeRegisterCOP1( |
| 281 Instruction* instr, const int32_t& rs_reg, const int32_t& rs, |
| 282 const uint32_t& rs_u, const int32_t& rt_reg, const int32_t& rt, |
| 283 const uint32_t& rt_u, const int32_t& rd_reg, const int32_t& fr_reg, |
| 284 const int32_t& fs_reg, const int32_t& ft_reg, const int32_t& fd_reg, |
| 285 int64_t& i64hilo, uint64_t& u64hilo, int32_t& alu_out, bool& do_interrupt, |
| 286 int32_t& current_pc, int32_t& next_pc, int32_t& return_addr_reg); |
| 287 |
| 288 |
| 289 void DecodeTypeRegisterCOP1X(Instruction* instr, const int32_t& fr_reg, |
| 290 const int32_t& fs_reg, const int32_t& ft_reg, |
| 291 const int32_t& fd_reg); |
| 292 |
| 293 |
| 294 void DecodeTypeRegisterSPECIAL( |
| 295 Instruction* instr, const int32_t& rs_reg, const int32_t& rs, |
| 296 const uint32_t& rs_u, const int32_t& rt_reg, const int32_t& rt, |
| 297 const uint32_t& rt_u, const int32_t& rd_reg, const int32_t& fr_reg, |
| 298 const int32_t& fs_reg, const int32_t& ft_reg, const int32_t& fd_reg, |
| 299 int64_t& i64hilo, uint64_t& u64hilo, int32_t& alu_out, bool& do_interrupt, |
| 300 int32_t& current_pc, int32_t& next_pc, int32_t& return_addr_reg); |
| 301 |
| 302 |
| 303 void DecodeTypeRegisterSPECIAL2(Instruction* instr, const int32_t& rd_reg, |
| 304 int32_t& alu_out); |
| 305 |
| 306 void DecodeTypeRegisterSPECIAL3(Instruction* instr, const int32_t& rt_reg, |
| 307 int32_t& alu_out); |
| 308 |
| 268 // Helper function for DecodeTypeRegister. | 309 // Helper function for DecodeTypeRegister. |
| 269 void ConfigureTypeRegister(Instruction* instr, | 310 void ConfigureTypeRegister(Instruction* instr, |
| 270 int32_t* alu_out, | 311 int32_t* alu_out, |
| 271 int64_t* i64hilo, | 312 int64_t* i64hilo, |
| 272 uint64_t* u64hilo, | 313 uint64_t* u64hilo, |
| 273 int32_t* next_pc, | 314 int32_t* next_pc, |
| 274 int32_t* return_addr_reg, | 315 int32_t* return_addr_reg, |
| 275 bool* do_interrupt); | 316 bool* do_interrupt); |
| 276 | 317 |
| 277 void DecodeTypeImmediate(Instruction* instr); | 318 void DecodeTypeImmediate(Instruction* instr); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 454 |
| 414 static inline void UnregisterCTryCatch() { | 455 static inline void UnregisterCTryCatch() { |
| 415 Simulator::current(Isolate::Current())->PopAddress(); | 456 Simulator::current(Isolate::Current())->PopAddress(); |
| 416 } | 457 } |
| 417 }; | 458 }; |
| 418 | 459 |
| 419 } } // namespace v8::internal | 460 } } // namespace v8::internal |
| 420 | 461 |
| 421 #endif // !defined(USE_SIMULATOR) | 462 #endif // !defined(USE_SIMULATOR) |
| 422 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 463 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
| OLD | NEW |