mirror of
https://github.com/n64dev/cen64.git
synced 2024-06-20 21:17:58 -04:00
vr4300: Fix a bug in (D) Index Load Tag.
The VALID and DIRTY bits were not being shifted into the proper positions after reading them from the line states.
This commit is contained in:
parent
9886ec2587
commit
a12c5a3e04
|
@ -98,7 +98,7 @@ uint32_t vr4300_dcache_get_taglo(struct vr4300_dcache *dcache, uint64_t vaddr) {
|
|||
struct vr4300_dcache_line *line = get_line(dcache, vaddr);
|
||||
|
||||
uint32_t taglo = ((line->metadata & 0x1) << 1) | ((line->metadata & 0x2) >> 1);
|
||||
return taglo | (line->metadata >> 4 & 0x0FFFFF00U);
|
||||
return (taglo << 6) | (line->metadata >> 4 & 0x0FFFFF00U);
|
||||
}
|
||||
|
||||
// Initializes the instruction cache.
|
||||
|
|
|
@ -440,7 +440,7 @@ cen64_cold static int vr4300_cacheop_ic_invalidate_hit(
|
|||
|
||||
cen64_cold static int vr4300_cacheop_dc_get_taglo(
|
||||
struct vr4300 *vr4300, uint64_t vaddr, uint32_t paddr) {
|
||||
vr4300->regs[VR4300_CP0_REGISTER_TAGLO] =
|
||||
vr4300->regs[VR4300_CP0_REGISTER_TAGLO] = (int32_t)
|
||||
vr4300_dcache_get_taglo(&vr4300->dcache, vaddr);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue