From 265c770a9d663b96a9a422201bac3dd454fa95c0 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 17 May 2014 11:59:18 -0400 Subject: updated how we call ARM core to make things much faster --- src/core/arm/arm_interface.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/core/arm/arm_interface.h') 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: -- cgit v1.2.3