mirror of https://github.com/RPCS3/rpcs3.git
Fix mftbu returning the wrong half of the timebase register.
This commit is contained in:
parent
74cbf1877b
commit
bbe12bf4b1
|
@ -148,7 +148,7 @@ private:
|
|||
case 0x103: return CPU.SPRG[3];
|
||||
|
||||
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 0x111:
|
||||
|
@ -2884,7 +2884,7 @@ private:
|
|||
switch(n)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -542,16 +542,7 @@ public:
|
|||
u64 SPRG[8]; //SPR 0x110 - 0x117 : SPR General-Purpose Registers
|
||||
|
||||
//TBR : Time-Base Registers
|
||||
union
|
||||
{
|
||||
u64 TB; //TBR 0x10C - 0x10D
|
||||
|
||||
struct
|
||||
{
|
||||
u32 TBH;
|
||||
u32 TBL;
|
||||
};
|
||||
};
|
||||
u64 TB; //TBR 0x10C - 0x10D
|
||||
|
||||
u64 cycle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue