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

View File

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