summaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-18 22:35:47 -0400
committerGravatar GitHub2018-03-18 22:35:47 -0400
commit23a0d2d7b77fa619edc7d69d0162bd3071b67b4b (patch)
tree85f20b5e8bbd0b1b2b6e28eac6224908a0f3b7fe /src/core/arm/arm_interface.h
parentMerge pull request #250 from bunnei/buffer-dequeue-wait (diff)
parentImplements citra-emu/citra#3184 (diff)
downloadyuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.tar.gz
yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.tar.xz
yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.zip
Merge pull request #193 from N00byKing/3184_2_robotic_boogaloo
Implement Pull #3184 from citra: core/arm: Improve timing accuracy before service calls in JIT (Rebased)
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r--src/core/arm/arm_interface.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 6667c7dba..32ff3c345 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -25,19 +25,11 @@ public:
25 VAddr tls_address; 25 VAddr tls_address;
26 }; 26 };
27 27
28 /** 28 /// Runs the CPU until an event happens
29 * Runs the CPU for the given number of instructions 29 virtual void Run() = 0;
30 * @param num_instructions Number of instructions to run
31 */
32 void Run(int num_instructions) {
33 ExecuteInstructions(num_instructions);
34 this->num_instructions += num_instructions;
35 }
36 30
37 /// Step CPU by one instruction 31 /// Step CPU by one instruction
38 void Step() { 32 virtual void Step() = 0;
39 Run(1);
40 }
41 33
42 /// Maps a backing memory region for the CPU 34 /// Maps a backing memory region for the CPU
43 virtual void MapBackingMemory(VAddr address, size_t size, u8* memory, 35 virtual void MapBackingMemory(VAddr address, size_t size, u8* memory,
@@ -126,19 +118,4 @@ public:
126 118
127 /// Prepare core for thread reschedule (if needed to correctly handle state) 119 /// Prepare core for thread reschedule (if needed to correctly handle state)
128 virtual void PrepareReschedule() = 0; 120 virtual void PrepareReschedule() = 0;
129
130 /// Getter for num_instructions
131 u64 GetNumInstructions() const {
132 return num_instructions;
133 }
134
135protected:
136 /**
137 * Executes the given number of instructions
138 * @param num_instructions Number of instructions to executes
139 */
140 virtual void ExecuteInstructions(int num_instructions) = 0;
141
142private:
143 u64 num_instructions = 0; ///< Number of instructions executed
144}; 121};