Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #699 from lioncash/enum
Core: Use an enum for the Gekko exception flags instead of defines
  • Loading branch information
Parlane committed Jul 30, 2014
2 parents a3ca3b0 + ad3ade1 commit 5516b03
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Source/Core/Core/PowerPC/Gekko.h
Expand Up @@ -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);}

0 comments on commit 5516b03

Please sign in to comment.