update parallel rsp

This commit is contained in:
Logan McNaughton committed 2022-12-31 14:56:19 -07:00
1 parent 6830381be8
commit 0ab39610e5
3 files changed
+14

No files matched your search

+1
View File
@@ -78,6 +78,7 @@ extern "C"
if (first_run)
{
RSP::cpu.get_state().last_instruction_type = RSP::VU_INSTRUCTION;
RSP::cpu.get_state().instruction_pipeline = 0;
RSP::cpu.invalidate_imem();
}
+12
View File
@@ -321,9 +321,21 @@ extern "C"
static void add_instruction_count(CPUState *rsp, uint32_t instruction_type)
{
if (instruction_type == rsp->last_instruction_type)
{
++rsp->instruction_count;
rsp->instruction_pipeline = 0;
}
else
{
rsp->last_instruction_type = instruction_type;
if (rsp->instruction_pipeline)
{
++rsp->instruction_count;
rsp->instruction_pipeline = 0;
}
else
rsp->instruction_pipeline = 1;
}
}
}
+1
View File
@@ -144,6 +144,7 @@ struct CPUState
uint32_t pc = 0;
uint32_t instruction_count = 0;
uint32_t last_instruction_type = 0;
uint32_t instruction_pipeline = 0;
uint32_t did_mfc0 = 0;
uint32_t dirty_blocks = 0;
static_assert(CODE_BLOCKS <= 32, "Code blocks must fit in 32-bit register.");