summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
authorHuw Pascoe <huw.pascoe@gmail.com>2017-09-30 18:25:49 +0200
committerHuw Pascoe <huw.pascoe@gmail.com>2017-09-30 18:38:14 +0200
commit529f4a01318a450f999ffa7e01c5c26f801d22e0 (patch)
tree8728152f1726aeb775c2bba2ecc60bc67354e083 /src/core/arm
parentServices/UDS: Handle the rest of the connection sequence. (#2963) (diff)
downloadyuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.tar
yuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.tar.gz
yuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.tar.bz2
yuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.tar.lz
yuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.tar.xz
yuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.tar.zst
yuzu-529f4a01318a450f999ffa7e01c5c26f801d22e0.zip
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/arm_interface.h9
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp9
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.h2
-rw-r--r--src/core/arm/dyncom/arm_dyncom.cpp8
-rw-r--r--src/core/arm/dyncom/arm_dyncom.h2
5 files changed, 2 insertions, 28 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 2aa017a54..ba528403c 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -125,12 +125,6 @@ public:
virtual void SetCP15Register(CP15Register reg, u32 value) = 0;
/**
- * Advance the CPU core by the specified number of ticks (e.g. to simulate CPU execution time)
- * @param ticks Number of ticks to advance the CPU core
- */
- virtual void AddTicks(u64 ticks) = 0;
-
- /**
* Saves the current CPU context
* @param ctx Thread context to save
*/
@@ -150,9 +144,6 @@ public:
return num_instructions;
}
- s64 down_count = 0; ///< A decreasing counter of remaining cycles before the next event,
- /// decreased by the cpu run loop
-
protected:
/**
* Executes the given number of instructions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp
index 42ae93ae8..2cb56d12f 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic.cpp
@@ -124,13 +124,6 @@ void ARM_Dynarmic::SetCP15Register(CP15Register reg, u32 value) {
interpreter_state->CP15[reg] = value;
}
-void ARM_Dynarmic::AddTicks(u64 ticks) {
- down_count -= ticks;
- if (down_count < 0) {
- CoreTiming::Advance();
- }
-}
-
MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64));
void ARM_Dynarmic::ExecuteInstructions(int num_instructions) {
@@ -139,7 +132,7 @@ void ARM_Dynarmic::ExecuteInstructions(int num_instructions) {
std::size_t ticks_executed = jit->Run(static_cast<unsigned>(num_instructions));
- AddTicks(ticks_executed);
+ CoreTiming::AddTicks(ticks_executed);
}
void ARM_Dynarmic::SaveContext(ARM_Interface::ThreadContext& ctx) {
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h
index 96148a1a5..0b00158a5 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.h
+++ b/src/core/arm/dynarmic/arm_dynarmic.h
@@ -32,8 +32,6 @@ public:
u32 GetCP15Register(CP15Register reg) override;
void SetCP15Register(CP15Register reg, u32 value) override;
- void AddTicks(u64 ticks) override;
-
void SaveContext(ThreadContext& ctx) override;
void LoadContext(const ThreadContext& ctx) override;
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp
index da955c9b9..4d72aef77 100644
--- a/src/core/arm/dyncom/arm_dyncom.cpp
+++ b/src/core/arm/dyncom/arm_dyncom.cpp
@@ -77,12 +77,6 @@ void ARM_DynCom::SetCP15Register(CP15Register reg, u32 value) {
state->CP15[reg] = value;
}
-void ARM_DynCom::AddTicks(u64 ticks) {
- down_count -= ticks;
- if (down_count < 0)
- CoreTiming::Advance();
-}
-
void ARM_DynCom::ExecuteInstructions(int num_instructions) {
state->NumInstrsToExecute = num_instructions;
@@ -90,7 +84,7 @@ void ARM_DynCom::ExecuteInstructions(int num_instructions) {
// executing one instruction at a time. Otherwise, if a block is being executed, more
// instructions may actually be executed than specified.
unsigned ticks_executed = InterpreterMainLoop(state.get());
- AddTicks(ticks_executed);
+ CoreTiming::AddTicks(ticks_executed);
}
void ARM_DynCom::SaveContext(ThreadContext& ctx) {
diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h
index 0ae535671..fc1ffed6a 100644
--- a/src/core/arm/dyncom/arm_dyncom.h
+++ b/src/core/arm/dyncom/arm_dyncom.h
@@ -31,8 +31,6 @@ public:
u32 GetCP15Register(CP15Register reg) override;
void SetCP15Register(CP15Register reg, u32 value) override;
- void AddTicks(u64 ticks) override;
-
void SaveContext(ThreadContext& ctx) override;
void LoadContext(const ThreadContext& ctx) override;