aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
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 602c91e3..5c382ebb 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
@@ -74,8 +82,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: