diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2018-04-09 23:04:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-09 23:04:09 +0200 |
| commit | 0bfeb37a1f50193d39559d29802cb48f45db2b02 (patch) | |
| tree | bdb69bd4514355393c444f8d3deabf10b572cfdf /Source/Core | |
| parent | 0e1ca1e17cdb9f42ab2b59512dfd79e3373fd937 (diff) | |
| parent | 181539e04987decc93ef7969d2e9669b8d4a38a5 (diff) | |
Merge pull request #6604 from lioncash/dcbz_l
Interpreter_LoadStore: Generate a program exception if dcbz_l is executed when HID2[LCE] is zero
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp index 075abb8add..ede2e49525 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp @@ -30,6 +30,11 @@ void GenerateDSIException(u32 address) PowerPC::ppcState.Exceptions |= EXCEPTION_DSI; PowerPC::ppcState.spr[SPR_DAR] = address; } + +void GenerateProgramException() +{ + PowerPC::ppcState.Exceptions |= EXCEPTION_PROGRAM; +} } u32 Interpreter::Helper_Get_EA(const UGeckoInstruction inst) @@ -526,6 +531,12 @@ void Interpreter::dcbz(UGeckoInstruction inst) void Interpreter::dcbz_l(UGeckoInstruction inst) { + if (!HID2.LCE) + { + GenerateProgramException(); + return; + } + const u32 address = Helper_Get_EA_X(inst); if (!HID0.DCE) |
