mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
Fix mftbu returning the wrong half of the timebase register.
This commit is contained in:
parent
74cbf1877b
commit
bbe12bf4b1
2 changed files with 3 additions and 12 deletions
|
@ -148,7 +148,7 @@ private:
|
||||||
case 0x103: return CPU.SPRG[3];
|
case 0x103: return CPU.SPRG[3];
|
||||||
|
|
||||||
case 0x10C: CPU.TB = get_time(); return CPU.TB;
|
case 0x10C: CPU.TB = get_time(); return CPU.TB;
|
||||||
case 0x10D: CPU.TB = get_time(); return CPU.TBH;
|
case 0x10D: CPU.TB = get_time(); return CPU.TB >> 32;
|
||||||
|
|
||||||
case 0x110:
|
case 0x110:
|
||||||
case 0x111:
|
case 0x111:
|
||||||
|
@ -2884,7 +2884,7 @@ private:
|
||||||
switch(n)
|
switch(n)
|
||||||
{
|
{
|
||||||
case 0x10C: CPU.GPR[rd] = CPU.TB; break;
|
case 0x10C: CPU.GPR[rd] = CPU.TB; break;
|
||||||
case 0x10D: CPU.GPR[rd] = CPU.TBH; break;
|
case 0x10D: CPU.GPR[rd] = CPU.TB >> 32; break;
|
||||||
default: throw fmt::Format("mftb r%d, %d", rd, spr);
|
default: throw fmt::Format("mftb r%d, %d", rd, spr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -542,16 +542,7 @@ public:
|
||||||
u64 SPRG[8]; //SPR 0x110 - 0x117 : SPR General-Purpose Registers
|
u64 SPRG[8]; //SPR 0x110 - 0x117 : SPR General-Purpose Registers
|
||||||
|
|
||||||
//TBR : Time-Base Registers
|
//TBR : Time-Base Registers
|
||||||
union
|
u64 TB; //TBR 0x10C - 0x10D
|
||||||
{
|
|
||||||
u64 TB; //TBR 0x10C - 0x10D
|
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
u32 TBH;
|
|
||||||
u32 TBL;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
u64 cycle;
|
u64 cycle;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue