From 1ec3768b845f8838f2edce5da2b9331b4b0a52e2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 27 Aug 2021 11:12:24 -0400 Subject: [PATCH] Gekko: Convert UReg_SDR1 over to using Common::BitField Also fixes a typo in the struct name, since it was referring to SPR1 instead of SDR1. Given this isn't used anywhere yet, it's a painless change. --- Source/Core/Core/PowerPC/Gekko.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/PowerPC/Gekko.h b/Source/Core/Core/PowerPC/Gekko.h index 4062eeca9a..9642e6d757 100644 --- a/Source/Core/Core/PowerPC/Gekko.h +++ b/Source/Core/Core/PowerPC/Gekko.h @@ -608,16 +608,14 @@ union UReg_HID4 explicit UReg_HID4(u32 hex_) : Hex{hex_} {} }; -// SPR1 - Page Table format -union UReg_SPR1 +// SDR1 - Page Table format +union UReg_SDR1 { - u32 Hex; - struct - { - u32 htaborg : 16; - u32 : 7; - u32 htabmask : 9; - }; + BitField<0, 16, u32> htaborg; + BitField<16, 7, u32> reserved; + BitField<23, 9, u32> htabmask; + + u32 Hex = 0; }; // MMCR0 - Monitor Mode Control Register 0 format