From f87afa72e06842da1f1bb902e4a192195646134b Mon Sep 17 00:00:00 2001 From: grischka Date: Sun, 9 Jul 2017 12:38:25 +0200 Subject: refactor enums Eliminate VT_ENUM as a basic type. Instead use the integral types VT_InT/VT_LLONG with an additional flag to indicate that it is an enum. --- x86_64-gen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'x86_64-gen.c') diff --git a/x86_64-gen.c b/x86_64-gen.c index feedc12..a71e209 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -415,9 +415,11 @@ void load(int r, SValue *sv) } else if ((ft & VT_TYPE) == (VT_SHORT | VT_UNSIGNED)) { b = 0xb70f; /* movzwl */ } else { - assert(((ft & VT_BTYPE) == VT_INT) || ((ft & VT_BTYPE) == VT_LLONG) - || ((ft & VT_BTYPE) == VT_PTR) || ((ft & VT_BTYPE) == VT_ENUM) - || ((ft & VT_BTYPE) == VT_FUNC)); + assert(((ft & VT_BTYPE) == VT_INT) + || ((ft & VT_BTYPE) == VT_LLONG) + || ((ft & VT_BTYPE) == VT_PTR) + || ((ft & VT_BTYPE) == VT_FUNC) + ); ll = is64_type(ft); b = 0x8b; } @@ -1092,7 +1094,7 @@ static X86_64_Mode classify_x86_64_inner(CType *ty) case VT_BOOL: case VT_PTR: case VT_FUNC: - case VT_ENUM: return x86_64_mode_integer; + return x86_64_mode_integer; case VT_FLOAT: case VT_DOUBLE: return x86_64_mode_sse; -- cgit v1.3.1