From 924bbde89b80ff2aa8b98fe8f3c7f728ede34edc Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 25 Oct 2014 17:52:39 -0200 Subject: Change some SkyEye defines to const ints This prevents them from interfering with other constants defined in different namespaces. --- src/core/arm/skyeye_common/armdefs.h | 32 ++++++++++++++++---------------- src/core/arm/skyeye_common/armemu.h | 18 ------------------ 2 files changed, 16 insertions(+), 34 deletions(-) (limited to 'src/core/arm/skyeye_common') diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h index 8e71948c6..6e8187c8e 100644 --- a/src/core/arm/skyeye_common/armdefs.h +++ b/src/core/arm/skyeye_common/armdefs.h @@ -799,22 +799,22 @@ pascal void SpinCursor (short increment); /* copied from CursorCtl.h */ #include "list.h" #include "tb.h" */ -#define EQ 0 -#define NE 1 -#define CS 2 -#define CC 3 -#define MI 4 -#define PL 5 -#define VS 6 -#define VC 7 -#define HI 8 -#define LS 9 -#define GE 10 -#define LT 11 -#define GT 12 -#define LE 13 -#define AL 14 -#define NV 15 +const int EQ = 0; +const int NE = 1; +const int CS = 2; +const int CC = 3; +const int MI = 4; +const int PL = 5; +const int VS = 6; +const int VC = 7; +const int HI = 8; +const int LS = 9; +const int GE = 10; +const int LT = 11; +const int GT = 12; +const int LE = 13; +const int AL = 14; +const int NV = 15; #ifndef NFLAG #define NFLAG state->NFlag diff --git a/src/core/arm/skyeye_common/armemu.h b/src/core/arm/skyeye_common/armemu.h index c0f0270fe..075fc7e9e 100644 --- a/src/core/arm/skyeye_common/armemu.h +++ b/src/core/arm/skyeye_common/armemu.h @@ -25,24 +25,6 @@ #define DEBUG(...) DEBUG_LOG(ARM11, __VA_ARGS__) -/* Condition code values. */ -#define EQ 0 -#define NE 1 -#define CS 2 -#define CC 3 -#define MI 4 -#define PL 5 -#define VS 6 -#define VC 7 -#define HI 8 -#define LS 9 -#define GE 10 -#define LT 11 -#define GT 12 -#define LE 13 -#define AL 14 -#define NV 15 - /* Shift Opcodes. */ #define LSL 0 #define LSR 1 -- cgit v1.2.3 From c2588403c0b8cf198f13f903f626851c7e94266c Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Thu, 23 Oct 2014 01:20:01 -0200 Subject: HLE: Revamp error handling throrough the HLE code All service calls in the CTR OS return result codes indicating the success or failure of the call. Previous to this commit, Citra's HLE emulation of services and the kernel universally either ignored errors or returned dummy -1 error codes. This commit makes an initial effort to provide an infrastructure for error reporting and propagation which can be use going forward to make HLE calls accurately return errors as the original system. A few parts of the code have been updated to use the new system where applicable. One part of this effort is the definition of the `ResultCode` type, which provides facilities for constructing and parsing error codes in the structured format used by the CTR. The `ResultVal` type builds on `ResultCode` by providing a container for values returned by function that can report errors. It enforces that correct error checking will be done on function returns by preventing the use of the return value if the function returned an error code. Currently this change is mostly internal since errors are still suppressed on the ARM<->HLE border, as a temporary compatibility hack. As functionality is implemented and tested this hack can be eventually removed. --- src/core/arm/skyeye_common/armdefs.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src/core/arm/skyeye_common') diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h index 6e8187c8e..8343aaa01 100644 --- a/src/core/arm/skyeye_common/armdefs.h +++ b/src/core/arm/skyeye_common/armdefs.h @@ -799,22 +799,24 @@ pascal void SpinCursor (short increment); /* copied from CursorCtl.h */ #include "list.h" #include "tb.h" */ -const int EQ = 0; -const int NE = 1; -const int CS = 2; -const int CC = 3; -const int MI = 4; -const int PL = 5; -const int VS = 6; -const int VC = 7; -const int HI = 8; -const int LS = 9; -const int GE = 10; -const int LT = 11; -const int GT = 12; -const int LE = 13; -const int AL = 14; -const int NV = 15; +enum ConditionCode { + EQ = 0, + NE = 1, + CS = 2, + CC = 3, + MI = 4, + PL = 5, + VS = 6, + VC = 7, + HI = 8, + LS = 9, + GE = 10, + LT = 11, + GT = 12, + LE = 13, + AL = 14, + NV = 15, +}; #ifndef NFLAG #define NFLAG state->NFlag -- cgit v1.2.3