Gekko: Centralize bitmasking of the FPSCR within UReg_FPSCR

Rather than introduce this handling in every system instruction that modifies
the FPSCR directly, we can instead just handle it within the data structure
instead, which avoids duplicating mask handling across instructions.

This also allows handling proper masking from the debugger register
windows themselves without duplicating masking behavior there either.
This commit is contained in:
Lioncash
2018-06-12 13:22:49 -04:00
parent 8a3679bebc
commit 0049ef3a2a
4 changed files with 41 additions and 26 deletions

View File

@ -290,7 +290,7 @@ void RegisterWidget::PopulateTable()
// FPSCR
AddRegister(22, 5, RegisterType::fpscr, "FPSCR", [] { return PowerPC::ppcState.fpscr.Hex; },
[](u64 value) { PowerPC::ppcState.fpscr.Hex = value; });
[](u64 value) { PowerPC::ppcState.fpscr = static_cast<u32>(value); });
// MSR
AddRegister(23, 5, RegisterType::msr, "MSR", [] { return PowerPC::ppcState.msr.Hex; },