PowerPC: Add functions to read/write the full timebase value

Allows us to get rid of a silly pointer cast and deduplicate some code
from the front-end when it comes to reading the value.
This commit is contained in:
Lioncash
2018-06-19 13:06:37 -04:00
parent 18c3e0302f
commit 562d2a700b
6 changed files with 20 additions and 18 deletions

View File

@@ -349,6 +349,18 @@ void RunLoop()
Host_UpdateDisasmDialog();
}
u64 ReadFullTimeBaseValue()
{
u64 value;
std::memcpy(&value, &TL, sizeof(value));
return value;
}
void WriteFullTimeBaseValue(u64 value)
{
std::memcpy(&TL, &value, sizeof(value));
}
void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst)
{
switch (MMCR0.PMC1SELECT)