From patchwork Thu May 20 15:28:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12270943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B06CC433B4 for ; Thu, 20 May 2021 15:38:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50DEF61163 for ; Thu, 20 May 2021 15:38:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50DEF61163 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljkl6-0005rR-Ay for qemu-devel@archiver.kernel.org; Thu, 20 May 2021 11:38:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljkbS-00080L-Ke for qemu-devel@nongnu.org; Thu, 20 May 2021 11:28:50 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:36511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljkbP-0000g8-MU for qemu-devel@nongnu.org; Thu, 20 May 2021 11:28:50 -0400 Received: by mail-wm1-x32e.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so5701290wmk.1 for ; Thu, 20 May 2021 08:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Kn3QkvhPIEBYzulaH/PbJ8DasheOBiuundvI2boBDto=; b=qyzc2Mpj5+XhPWOzuw0+RbtK2QCHdDQHMJD7NT29FDS1ANQqgW/0f5j80+yj9hjjEW nSjSom3wSBxc519uZXu6yVAS9z2Nh6+jmSkBjKwLBzr9ivdKxjq5MCR84h0r+ESbP75i FjbZ0Ck9mTsQCPfu1BdzTNCzUz7ENwlKdkn6yC3wYlCY7LF5eMv2tMQoejWmhoxZ9tOm nJCKjgzPukmo6c1sT4wZftiMD951yD+68EJcGTt1efMHGfScBJ6ANp+ClqBUM/9zA0De cQ6dpg92KOkvhBK/BjTKU8Fd0e4nxBgTBz1YNw9aqYUsQlo3PHxCqESSn6c/LjnyfEQ/ dnSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kn3QkvhPIEBYzulaH/PbJ8DasheOBiuundvI2boBDto=; b=sKZD+rSocWjxpjXdxdd58k5ZATwtJjNE33g3tN4g9OacBEAhWbR4OzEVodDThR1kBh XU3Vx0jH/ji42YYXzCepAXIRd9vf7FW3kZvECcuhFpDs4JlwpR3xBey6hovj6T/a1gQ9 d9Gx4ok6gBAZyyBdeb0cZ3hd35VGnqAYk/KYeylQNSckMG4Nui+Is+JKygEzIWEFqr1p 5YHYuH9n2C9Hqnd7SOEFvMWVmg1IslveiDfHoJEyyKpDfgvz420XrkPJaxxnvXawQ5B7 NnrAfUvjz2waXs9MVqRJLyM6DMuWI9ltB2yN7yhUfiZlP2y6EjeQnkUmKYCWvV79ZvBQ oO0A== X-Gm-Message-State: AOAM53117rQSEuV5UyPxChMdHDqhx11OU4NOGzlWyRDggyFMbEstZzU3 xMMIsyh1oqZkqXfOLhhOLgt/szVoeH8I6xQR X-Google-Smtp-Source: ABdhPJye3Uj8lof/Cmg4MM737t1gvcHD7Mgmbw8fkHeXJfS9AU4haJvpBggJppUt9WgkG+0vdCzalQ== X-Received: by 2002:a1c:7313:: with SMTP id d19mr4294854wmb.14.1621524526146; Thu, 20 May 2021 08:28:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id r2sm3916126wrv.39.2021.05.20.08.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 08:28:45 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 5/9] target/arm: Fix return values in fp_sysreg_checks() Date: Thu, 20 May 2021 16:28:36 +0100 Message-Id: <20210520152840.24453-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210520152840.24453-1-peter.maydell@linaro.org> References: <20210520152840.24453-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The fp_sysreg_checks() function is supposed to be returning an FPSysRegCheckResult, which is an enum with three possible values. However, three places in the function "return false" (a hangover from a previous iteration of the design where the function just returned a bool). Make these return FPSysRegCheckFailed instead (for no functional change, since both false and FPSysRegCheckFailed are zero). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/translate-vfp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/translate-vfp.c b/target/arm/translate-vfp.c index ac5832a4ed5..791c4f5f70b 100644 --- a/target/arm/translate-vfp.c +++ b/target/arm/translate-vfp.c @@ -691,16 +691,16 @@ static FPSysRegCheckResult fp_sysreg_checks(DisasContext *s, int regno) break; case ARM_VFP_FPSCR_NZCVQC: if (!arm_dc_feature(s, ARM_FEATURE_V8_1M)) { - return false; + return FPSysRegCheckFailed; } break; case ARM_VFP_FPCXT_S: case ARM_VFP_FPCXT_NS: if (!arm_dc_feature(s, ARM_FEATURE_V8_1M)) { - return false; + return FPSysRegCheckFailed; } if (!s->v8m_secure) { - return false; + return FPSysRegCheckFailed; } break; default: