diff options
author | Richard Henderson <rth@twiddle.net> | 2010-03-19 11:36:30 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-03-26 21:29:10 +0100 |
commit | c02244a5088eaa7d8ff69f51fba8b67da094f604 (patch) | |
tree | 2cc5d6e5e533b5d43366790ced2f12cba75b7689 /tcg/tcg.h | |
parent | 8a56e840911572391019cd8b4ee86976dac2f593 (diff) |
tcg: Change TCGType to an enumeration.
The TCGType name was already used consistently. Changing it
to an enumeration instead of a set of defines aids debugging.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -96,17 +96,22 @@ typedef struct TCGPool { this value, they are statically allocated in the TB stack frame */ #define TCG_STATIC_CALL_ARGS_SIZE 128 -typedef int TCGType; - -#define TCG_TYPE_I32 0 -#define TCG_TYPE_I64 1 -#define TCG_TYPE_COUNT 2 /* number of different types */ +typedef enum TCGType { + TCG_TYPE_I32, + TCG_TYPE_I64, + TCG_TYPE_COUNT, /* number of different types */ #if TCG_TARGET_REG_BITS == 32 -#define TCG_TYPE_PTR TCG_TYPE_I32 + TCG_TYPE_PTR = TCG_TYPE_I32, +#else + TCG_TYPE_PTR = TCG_TYPE_I64, +#endif +#if TARGET_LONG_BITS == 64 + TCG_TYPE_TL = TCG_TYPE_I64, #else -#define TCG_TYPE_PTR TCG_TYPE_I64 + TCG_TYPE_TL = TCG_TYPE_I32, #endif +} TCGType; typedef tcg_target_ulong TCGArg; |