diff options
| author | 2014-05-17 13:35:20 -0400 | |
|---|---|---|
| committer | 2014-05-17 13:35:20 -0400 | |
| commit | 3fac6dc39e6e94aa068d93535261eede97224e50 (patch) | |
| tree | 41b5a266814d633b94d090f13bc46c89e8f7f622 /src/core/arm/arm_interface.h | |
| parent | - added enum ThreadProcessorId (diff) | |
| parent | updated how we call ARM core to make things much faster (diff) | |
| download | yuzu-3fac6dc39e6e94aa068d93535261eede97224e50.tar.gz yuzu-3fac6dc39e6e94aa068d93535261eede97224e50.tar.xz yuzu-3fac6dc39e6e94aa068d93535261eede97224e50.zip | |
Merge branch 'master' into threading
Diffstat (limited to 'src/core/arm/arm_interface.h')
| -rw-r--r-- | src/core/arm/arm_interface.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 602c91e30..5c382ebbd 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h | |||
| @@ -17,12 +17,20 @@ public: | |||
| 17 | ~ARM_Interface() { | 17 | ~ARM_Interface() { |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | /** | ||
| 21 | * Runs the CPU for the given number of instructions | ||
| 22 | * @param num_instructions Number of instructions to run | ||
| 23 | */ | ||
| 24 | void Run(int num_instructions) { | ||
| 25 | ExecuteInstructions(num_instructions); | ||
| 26 | m_num_instructions += num_instructions; | ||
| 27 | } | ||
| 28 | |||
| 20 | /// Step CPU by one instruction | 29 | /// Step CPU by one instruction |
| 21 | void Step() { | 30 | void Step() { |
| 22 | ExecuteInstruction(); | 31 | Run(1); |
| 23 | m_num_instructions++; | ||
| 24 | } | 32 | } |
| 25 | 33 | ||
| 26 | /** | 34 | /** |
| 27 | * Set the Program Counter to an address | 35 | * Set the Program Counter to an address |
| 28 | * @param addr Address to set PC to | 36 | * @param addr Address to set PC to |
| @@ -74,8 +82,11 @@ public: | |||
| 74 | 82 | ||
| 75 | protected: | 83 | protected: |
| 76 | 84 | ||
| 77 | /// Execture next instruction | 85 | /** |
| 78 | virtual void ExecuteInstruction() = 0; | 86 | * Executes the given number of instructions |
| 87 | * @param num_instructions Number of instructions to executes | ||
| 88 | */ | ||
| 89 | virtual void ExecuteInstructions(int num_instructions) = 0; | ||
| 79 | 90 | ||
| 80 | private: | 91 | private: |
| 81 | 92 | ||