[PATCH 4/5] target/i386: Remove default in cc_op_live

Richard Henderson posted 5 patches 3 months, 2 weeks ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
[PATCH 4/5] target/i386: Remove default in cc_op_live
Posted by Richard Henderson 3 months, 2 weeks ago
Now that CC_OP_NB is gone, push the assert after the switch.
This will allow -Wswitch to diagnose missing entries.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/i386/tcg/translate.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index e5a8aaf793..e675afca47 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -318,9 +318,8 @@ static uint8_t cc_op_live(CCOp op)
     case CC_OP_SBBB ... CC_OP_SBBQ:
     case CC_OP_ADCOX:
         return USES_CC_DST | USES_CC_SRC | USES_CC_SRC2;
-    default:
-        g_assert_not_reached();
     }
+    g_assert_not_reached();
 }
 
 static void set_cc_op_1(DisasContext *s, CCOp op, bool dirty)
-- 
2.34.1