aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
authorGravatar bunnei <ericbunnie@gmail.com>2014-05-17 11:59:18 -0400
committerGravatar bunnei <ericbunnie@gmail.com>2014-05-17 11:59:18 -0400
commit265c770a9d663b96a9a422201bac3dd454fa95c0 (patch)
treee7a1682450b857d80cc2ed0f863f4a82b81142bd /src/core/arm/arm_interface.h
parenta4fd257469bc06d1474a2e6e8df9dbd233ac79a5 (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.h21
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: