Merge pull request #699 from lioncash/enum

Core: Use an enum for the Gekko exception flags instead of defines
This commit is contained in:
Matthew Parlane 2014-07-30 13:53:58 +12:00
commit 5516b0382c
1 changed files with 12 additions and 9 deletions

View File

@ -790,15 +790,18 @@ enum
};
// Exceptions
#define EXCEPTION_DECREMENTER 0x00000001
#define EXCEPTION_SYSCALL 0x00000002
#define EXCEPTION_EXTERNAL_INT 0x00000004
#define EXCEPTION_DSI 0x00000008
#define EXCEPTION_ISI 0x00000010
#define EXCEPTION_ALIGNMENT 0x00000020
#define EXCEPTION_FPU_UNAVAILABLE 0x00000040
#define EXCEPTION_PROGRAM 0x00000080
#define EXCEPTION_PERFORMANCE_MONITOR 0x00000100
enum
{
EXCEPTION_DECREMENTER = 0x00000001,
EXCEPTION_SYSCALL = 0x00000002,
EXCEPTION_EXTERNAL_INT = 0x00000004,
EXCEPTION_DSI = 0x00000008,
EXCEPTION_ISI = 0x00000010,
EXCEPTION_ALIGNMENT = 0x00000020,
EXCEPTION_FPU_UNAVAILABLE = 0x00000040,
EXCEPTION_PROGRAM = 0x00000080,
EXCEPTION_PERFORMANCE_MONITOR = 0x00000100
};
inline s32 SignExt16(s16 x) {return (s32)(s16)x;}
inline s32 SignExt26(u32 x) {return x & 0x2000000 ? (s32)(x | 0xFC000000) : (s32)(x);}