From 82d90273744d6c910e4ecbbf01fca51b5759f96b Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 3 Oct 2022 11:29:21 +1030 Subject: [PATCH] Core: Fix up XContext --- Source/Project64-core/N64System/Mips/Register.cpp | 2 +- Source/Project64-core/N64System/Mips/Register.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Project64-core/N64System/Mips/Register.cpp b/Source/Project64-core/N64System/Mips/Register.cpp index 378b8cadc..3b10f0d0b 100644 --- a/Source/Project64-core/N64System/Mips/Register.cpp +++ b/Source/Project64-core/N64System/Mips/Register.cpp @@ -503,7 +503,7 @@ void CRegisters::DoAddressError(bool DelaySlot, uint64_t BadVaddr, bool FromRead BAD_VADDR_REGISTER = BadVaddr; CONTEXT_REGISTER.BadVPN2 = BadVaddr >> 13; XCONTEXT_REGISTER.BadVPN2 = BadVaddr >> 13; - XCONTEXT_REGISTER.R = BadVaddr >> 62; + XCONTEXT_REGISTER.R = BadVaddr >> 61; if (DelaySlot) { diff --git a/Source/Project64-core/N64System/Mips/Register.h b/Source/Project64-core/N64System/Mips/Register.h index 59388525f..0f31070ab 100644 --- a/Source/Project64-core/N64System/Mips/Register.h +++ b/Source/Project64-core/N64System/Mips/Register.h @@ -38,10 +38,10 @@ union COP0XContext struct { - unsigned : 4; - unsigned BadVPN2 : 27; - unsigned R : 2; - unsigned PTEBase : 31; + uint64_t : 4; + uint64_t BadVPN2 : 27; + uint64_t R : 2; + uint64_t PTEBase : 31; }; };