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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 } | 352 } |
353 | 353 |
354 void DecodeTypeImmediate(Instruction* instr); | 354 void DecodeTypeImmediate(Instruction* instr); |
355 void DecodeTypeJump(Instruction* instr); | 355 void DecodeTypeJump(Instruction* instr); |
356 | 356 |
357 // Used for breakpoints and traps. | 357 // Used for breakpoints and traps. |
358 void SoftwareInterrupt(Instruction* instr); | 358 void SoftwareInterrupt(Instruction* instr); |
359 | 359 |
360 // Compact branch guard. | 360 // Compact branch guard. |
361 void CheckForbiddenSlot(int32_t current_pc) { | 361 void CheckForbiddenSlot(int32_t current_pc) { |
362 Instruction* instr_aftter_compact_branch = | 362 Instruction* instr_after_compact_branch = |
363 reinterpret_cast<Instruction*>(current_pc + Instruction::kInstrSize); | 363 reinterpret_cast<Instruction*>(current_pc + Instruction::kInstrSize); |
364 if (instr_aftter_compact_branch->IsForbiddenInBranchDelay()) { | 364 if (instr_after_compact_branch->IsForbiddenAfterBranch()) { |
365 V8_Fatal(__FILE__, __LINE__, | 365 V8_Fatal(__FILE__, __LINE__, |
366 "Error: Unexpected instruction 0x%08x immediately after a " | 366 "Error: Unexpected instruction 0x%08x immediately after a " |
367 "compact branch instruction.", | 367 "compact branch instruction.", |
368 *reinterpret_cast<uint32_t*>(instr_aftter_compact_branch)); | 368 *reinterpret_cast<uint32_t*>(instr_after_compact_branch)); |
369 } | 369 } |
370 } | 370 } |
371 | 371 |
372 // Stop helper functions. | 372 // Stop helper functions. |
373 bool IsWatchpoint(uint32_t code); | 373 bool IsWatchpoint(uint32_t code); |
374 void PrintWatchpoint(uint32_t code); | 374 void PrintWatchpoint(uint32_t code); |
375 void HandleStop(uint32_t code, Instruction* instr); | 375 void HandleStop(uint32_t code, Instruction* instr); |
376 bool IsStopInstruction(Instruction* instr); | 376 bool IsStopInstruction(Instruction* instr); |
377 bool IsEnabledStop(uint32_t code); | 377 bool IsEnabledStop(uint32_t code); |
378 void EnableStop(uint32_t code); | 378 void EnableStop(uint32_t code); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 static inline void UnregisterCTryCatch(Isolate* isolate) { | 505 static inline void UnregisterCTryCatch(Isolate* isolate) { |
506 Simulator::current(isolate)->PopAddress(); | 506 Simulator::current(isolate)->PopAddress(); |
507 } | 507 } |
508 }; | 508 }; |
509 | 509 |
510 } // namespace internal | 510 } // namespace internal |
511 } // namespace v8 | 511 } // namespace v8 |
512 | 512 |
513 #endif // !defined(USE_SIMULATOR) | 513 #endif // !defined(USE_SIMULATOR) |
514 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 514 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
OLD | NEW |