From patchwork Fri Feb 5 22:56:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 377013 Delivered-To: patch@linaro.org Received: by 2002:a17:906:48d2:0:0:0:0 with SMTP id d18csp2583922ejt; Fri, 5 Feb 2021 15:16:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLdg/VL2x1TiYlDh6u2Skwm0SH1h7vccPSzcTAEOFEVToigy+r12oluiYqj4TfeuGdMRek X-Received: by 2002:a25:6d8a:: with SMTP id i132mr9828462ybc.337.1612566962311; Fri, 05 Feb 2021 15:16:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612566962; cv=none; d=google.com; s=arc-20160816; b=XcjKiwRiksA6do5ADd7+IckPWRIHmJLtzfHzJplBvP2puwGjUVNLZQdoWziE5Tju0S OlSmWY0GsxgFfjc4UPZgjZsHw3yoktrx7hvzVgCarZYFtBc6QjH6syP2sEnCAaBM4y9o +3fSvwbv5Z7f+8iC2adyjnGaBA8+5mh2Hw4y0nOw7yQaA3JFrwsHl8p2wM4BRfegRNgx 853kJn8+ItBjy/t+J9bJWpzCOM87t90m3znCyHCFkcMURo7N8SBZYrFSPsd5VhsywN7Z 71+f1uzVV1mp1D61yEexPd7cumfvEXBbfIVfgbHO+4pFJO9EKkHMSCEfs0YJ/RYCkDir x9iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PJmFss8croBP2fe7sUR8rqNmFHSeMIecdaY2so4F4z0=; b=fpBqJhx64OiJZm9YHnmWnlp38adOXv2Im7XdqR5sUIzfu3VcRVvIIdOmu84RKgMcKK fKg1olBgyKsq/np1lo2V/KlERQI2we5rMm40o5H0hsHz8yWkTeQiUayYsMFvOPZe/zTn EyvO3kS7fSbCqbQbMxxUayP7iqDiMIUZSujLxyleoeH5/6hU56y8N3WYhCr3fO9Unnwm 60/ncmcESb5cwK5n10VJp94gdGuJfGnuqAXvbwO+VpXo547vnh9LWeWE4JPy3Tw6BXxq dAfG7iKROmoB3XMc4Y7IJ2c7G6UumuwUXHTCNOPn9szuWnY2wSpd5xfgEZ3u0LtIWZNO Zigg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eRluxCym; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x18si9690672ybj.403.2021.02.05.15.16.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Feb 2021 15:16:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eRluxCym; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8AKX-0001Ea-5y for patch@linaro.org; Fri, 05 Feb 2021 18:16:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8A2k-0002Mw-Ua for qemu-devel@nongnu.org; Fri, 05 Feb 2021 17:57:40 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:46783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8A2i-0003Si-M7 for qemu-devel@nongnu.org; Fri, 05 Feb 2021 17:57:38 -0500 Received: by mail-pf1-x42d.google.com with SMTP id f63so5279713pfa.13 for ; Fri, 05 Feb 2021 14:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PJmFss8croBP2fe7sUR8rqNmFHSeMIecdaY2so4F4z0=; b=eRluxCym/LTibO4o6UQwsQrv+gNWVamQ0oAUBHzghfMBvAkPllOdG+41lNNDc/Heby vs/Pbz56SliKQG0LSKZRRaNxSkplTf4LlxNKlI3M2wSNo70cRL3thfTsMuBYNJJ3n4G+ wlCtQCetIBPoA1NR7VIn65svK+gqoAl50alnema9MbLQSqleZWk1FygrDEWXgAK3Jvhh Lt6RzZhlYmII8gkUpRNpmeytvT3AJ5zJHF0JhKC3nNXUAnabKLkffNIUtfDEu1zmHUie g7Rt5+i4rLwM+2ltJKY1e1Sk+P/osUDnugelro4Uoqe+gekD551DUqUHEXQa1Jo9WLJX A5qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PJmFss8croBP2fe7sUR8rqNmFHSeMIecdaY2so4F4z0=; b=eDSsOombzdf0Yk6q34qzi7IMof9aHRHe9pcTd5JSoTvID8NJTj29qdx9kc2h0HB5CY BccRGYdSdI+8r2j+2Ms2sN3rsRvy3Z5QJaY5WgltvzSk76kR2567HzPx4RzwrHvRX6OD qTM2j7Lj9V6OZCon/6BhJQHNgAvIMa7iK704xPDbRbrGJI+hGJ8ZyDChxbbl+eMWkYc+ j/4Tv4nGNyXDROH76vyS3VN4nF0es2PnKM7TwCParFau82arSyAEjUk1qu5Y5KSfOvoO Ncgs6Vif2GJ1oD8vPaSA/kpoDITaAWL03iycXd9WHzM1Dv7rMVc2E6ak7VrNTmZVJeTz Trkw== X-Gm-Message-State: AOAM531cfEj1TsXmWm84ZTDVrE/VqX/92wtpmwKcQpXwCAOUyrWT+n6k ko8/S6XLzYMsqs6ZBFwExA/iBdsBg3ESalkQ X-Received: by 2002:aa7:9596:0:b029:1be:28cc:cfe8 with SMTP id z22-20020aa795960000b02901be28cccfe8mr6460463pfj.49.1612565854476; Fri, 05 Feb 2021 14:57:34 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id c23sm12155149pgc.72.2021.02.05.14.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 14:57:33 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 22/46] tcg/tci: Use g_assert_not_reached Date: Fri, 5 Feb 2021 12:56:26 -1000 Message-Id: <20210205225650.1330794-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210205225650.1330794-1-richard.henderson@linaro.org> References: <20210205225650.1330794-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Stefan Weil Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Three TODO instances are never happen cases. Other uses of tcg_abort are also indicating unreachable cases. Tested-by: Alex Bennée Reviewed-by: Stefan Weil Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) -- 2.25.1 diff --git a/tcg/tci.c b/tcg/tci.c index eb70672efb..36d594672f 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -362,7 +362,7 @@ static bool tci_compare32(uint32_t u0, uint32_t u1, TCGCond condition) result = (u0 > u1); break; default: - TODO(); + g_assert_not_reached(); } return result; } @@ -404,7 +404,7 @@ static bool tci_compare64(uint64_t u0, uint64_t u1, TCGCond condition) result = (u0 > u1); break; default: - TODO(); + g_assert_not_reached(); } return result; } @@ -1114,7 +1114,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, tmp32 = qemu_ld_beul; break; default: - tcg_abort(); + g_assert_not_reached(); } tci_write_reg(regs, t0, tmp32); break; @@ -1163,7 +1163,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, tmp64 = qemu_ld_beq; break; default: - tcg_abort(); + g_assert_not_reached(); } tci_write_reg(regs, t0, tmp64); if (TCG_TARGET_REG_BITS == 32) { @@ -1191,7 +1191,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, qemu_st_bel(t0); break; default: - tcg_abort(); + g_assert_not_reached(); } break; case INDEX_op_qemu_st_i64: @@ -1221,7 +1221,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, qemu_st_beq(tmp64); break; default: - tcg_abort(); + g_assert_not_reached(); } break; case INDEX_op_mb: @@ -1229,8 +1229,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, smp_mb(); break; default: - TODO(); - break; + g_assert_not_reached(); } tci_assert(tb_ptr == old_code_ptr + op_size); }