diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-17 11:59:18 -0400 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-17 11:59:18 -0400 |
commit | 265c770a9d663b96a9a422201bac3dd454fa95c0 (patch) | |
tree | e7a1682450b857d80cc2ed0f863f4a82b81142bd /src/core/arm/arm_interface.h | |
parent | a4fd257469bc06d1474a2e6e8df9dbd233ac79a5 (diff) |
updated how we call ARM core to make things much faster
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 4dfe0570..9fdc7ba3 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -17,12 +17,20 @@ public: ~ARM_Interface() { } + /** + * Runs the CPU for the given number of instructions + * @param num_instructions Number of instructions to run + */ + void Run(int num_instructions) { + ExecuteInstructions(num_instructions); + m_num_instructions += num_instructions; + } + /// Step CPU by one instruction void Step() { - ExecuteInstruction(); - m_num_instructions++; + Run(1); } - + /** * Set the Program Counter to an address * @param addr Address to set PC to @@ -68,8 +76,11 @@ public: protected: - /// Execture next instruction - virtual void ExecuteInstruction() = 0; + /** + * Executes the given number of instructions + * @param num_instructions Number of instructions to executes + */ + virtual void ExecuteInstructions(int num_instructions) = 0; private: |