From ad3ade1510398fa5a3ac31796acff9da896a9570 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 29 Jul 2014 21:51:30 -0400 Subject: [PATCH] Core: Use an enum for the Gekko exception flags instead of defines --- Source/Core/Core/PowerPC/Gekko.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/PowerPC/Gekko.h b/Source/Core/Core/PowerPC/Gekko.h index dc1d165583..56c3e1bb57 100644 --- a/Source/Core/Core/PowerPC/Gekko.h +++ b/Source/Core/Core/PowerPC/Gekko.h @@ -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);}