Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #6925 from lioncash/exception
Interpreter: Move common exception functions to ExceptionUtils.h
- Loading branch information
Showing
5 changed files
with
34 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright 2018 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "Common/CommonTypes.h" | ||
| #include "Core/PowerPC/Gekko.h" | ||
| #include "Core/PowerPC/PowerPC.h" | ||
|
|
||
| inline void GenerateAlignmentException(u32 address) | ||
| { | ||
| PowerPC::ppcState.Exceptions |= EXCEPTION_ALIGNMENT; | ||
| PowerPC::ppcState.spr[SPR_DAR] = address; | ||
| } | ||
|
|
||
| inline void GenerateDSIException(u32 address) | ||
| { | ||
| PowerPC::ppcState.Exceptions |= EXCEPTION_DSI; | ||
| PowerPC::ppcState.spr[SPR_DAR] = address; | ||
| } | ||
|
|
||
| inline void GenerateProgramException() | ||
| { | ||
| PowerPC::ppcState.Exceptions |= EXCEPTION_PROGRAM; | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters