From patchwork Thu Oct 20 11:52:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 616758 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp282948pvb; Thu, 20 Oct 2022 07:04:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6W/Y8ox+llr2tijVHdOOGzWh/CqXVPLWq88gYY8ogTh+PgE7U7dZYe/3vEzx+gYMevaaW+ X-Received: by 2002:a05:6214:d8b:b0:4b3:ed11:eb59 with SMTP id e11-20020a0562140d8b00b004b3ed11eb59mr11639376qve.80.1666274698716; Thu, 20 Oct 2022 07:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666274698; cv=none; d=google.com; s=arc-20160816; b=XDX2CBgLKdiUL/SNkRn+/B4RtpfHXa0oQTskCnMl3g+OZ+KGizySdg9jUmnXp9UcDN qgmVAflYpIc6wB6AVysZkiETxg4vjjEtCuQKrkERFW+BQ57qaaUagOHcGwoT3nAvK8/Z O7Qqo5y4coOLSLWuSFTcbws6f8zztYQ/y7wp2880zFwJIPcW2M4fRZdAmajrqywm/oXr /1ZwSdYzEhDQYtXE7uOTOs88qaa/QmoJV+FiAJrVM2qQ2ABKTitfEJO6qpyBpFguUNZ1 Vk1mELAYQrB9uQLgxuVpK3ThOjEH2mEUpZJdVUGR8qgtBYjsCe+Fj/pbb3qKSZ4AXIKY k0Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=D1apVJcxnpic/nI7vbdbPH7dVAQUtKqpSfoNGvBLQCc=; b=f0O8ZGy4wq+pvcdOGdpU1BlybnIDpDEz8z8s1CKZFLiZ1AgEuiZTq11iSY0UwJN0JE VvbhbEU+1323q+APlZksSGPq9AnkFYWyGnJTjIGDXoFxqnSCo0R3dU7R6nn7F8101UEc 7HrHXAkYcahI+lcjy2MAhIrmChRPsglh3E7UG5xm7h0a1JqjtFlTWiQhDZUx1gxU8sgc +0vBSCtEjW0Hh/eOF6Wubzaz3ealAQAg0sD36Uv+PCxhZz788ggPVFZsLnrXCKNPH/ys QU1xtwUVaIFR6Dp7dTdDBP2iJJIFnpe3R7DQleN5BhhBxt8sSujGud/4hpeJdj0Bhcwe Lz2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zpft5ngG; 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 x13-20020ac84a0d000000b0035baf834a59si9904768qtq.221.2022.10.20.07.04.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2022 07:04:58 -0700 (PDT) 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=Zpft5ngG; 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]:56852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olWAJ-0004QX-77 for patch@linaro.org; Thu, 20 Oct 2022 10:04:56 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olVxU-00072k-TV for patch@linaro.org; Thu, 20 Oct 2022 09:51:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olU7k-00053E-15 for qemu-devel@nongnu.org; Thu, 20 Oct 2022 07:54:13 -0400 Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]:45887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olU7g-00013Q-36 for qemu-devel@nongnu.org; Thu, 20 Oct 2022 07:54:06 -0400 Received: by mail-vk1-xa2d.google.com with SMTP id m128so9660493vka.12 for ; Thu, 20 Oct 2022 04:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=D1apVJcxnpic/nI7vbdbPH7dVAQUtKqpSfoNGvBLQCc=; b=Zpft5ngG5R5rzg0OmX0XOtV+WbtYxSoHsxTY59/p0BkxgJOKWRxSKIky3BloiI5tRT c84MhOfEQRQVoRVCAVuPcj3pe4CMtSQ+E1X2lNJspwIAsbcxI2U5S5EeNm93JOoz15u9 rIhxRbDvFW7bMsK++BIUMt5mfH9C8lLYzcTAsCtfXcgw7p1BILc0Cim/GKeaJOLEr982 RCuTjLhEpTgN7yb3KI31Qh2PyqRwq6utTqJQ+SxRFbKuMLtPHIUfBHJj8pqZ/CpSB/T0 zcqo5dmTYoXUx9ohSptgKwmpW8pDd9rUryHZtGOpfCu16nRaI+2gSvCJHf+Bqofy+ZUQ 4fjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D1apVJcxnpic/nI7vbdbPH7dVAQUtKqpSfoNGvBLQCc=; b=wbrAfVKHPxbgp/lpHekd1uWuh27Fq0HfmDQNLAaerIK0VxwtmmDq1wVsNUCwqyPI32 Vg923cuLrpmjcf+WHtgFCzjUiYcncD2yi+To02hRbu0ArZPbVIFLzTBU2GrPyh5y0N82 eEwIyU5dbdBPu55Yaw5pSP/Ev4MLh7bF8sgO0198Jbx7Eq11sThunY+7Q9cfmsb3KNiB 6eiO9CmYwm6VotHRhQbEm1PmKNfOFfHY09VQ/Qwsb5OJl5dbHmDBLv13xzs3Vd89d+kZ zaITvUbYocbsjvLSwPkFAr49zGBIzPN7waeMHYqL6gMHh2wpAlB1I5H2KfINwoqWdgZS 0HLQ== X-Gm-Message-State: ACrzQf3hSdwpCklZJ0MKn3wU8BaV72UWnuD4rDjbmQSPGwNjfpFFRnh/ K2w0tkXCyQ0rvGcvHOQi+inUi94AFexubG6M X-Received: by 2002:a17:902:f710:b0:178:a692:b1f7 with SMTP id h16-20020a170902f71000b00178a692b1f7mr13864450plo.112.1666266831117; Thu, 20 Oct 2022 04:53:51 -0700 (PDT) Received: from localhost.localdomain ([149.135.10.35]) by smtp.gmail.com with ESMTPSA id w206-20020a627bd7000000b0056109e15638sm13065464pfc.54.2022.10.20.04.53.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 04:53:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum Date: Thu, 20 Oct 2022 21:52:23 +1000 Message-Id: <20221020115242.2301066-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020115242.2301066-1-richard.henderson@linaro.org> References: <20221020115242.2301066-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::a2d; envelope-from=richard.henderson@linaro.org; helo=mail-vk1-xa2d.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The count is not itself an enumerator. Move it outside to prevent the compiler from considering it with -Wswitch-enum. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/tcg/tcg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index afa18986b1..a631e0bc80 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -294,8 +294,6 @@ typedef enum TCGType { TCG_TYPE_V128, TCG_TYPE_V256, - TCG_TYPE_COUNT, /* number of different types */ - /* An alias for the size of the host register. */ #if TCG_TARGET_REG_BITS == 32 TCG_TYPE_REG = TCG_TYPE_I32, @@ -318,6 +316,9 @@ typedef enum TCGType { #endif } TCGType; +/* Number of different types */ +#define TCG_TYPE_COUNT (TCG_TYPE_V256 + 1) + /** * get_alignment_bits * @memop: MemOp value