From patchwork Thu Jul 5 18:04:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 141226 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2238178ljj; Thu, 5 Jul 2018 11:11:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNqdYSLTq4Ri78W4zkKl5jz1JrXCf45vKoeT7PYe26byJIyeFirkU8qnBjiVzKDlzMTmkF X-Received: by 2002:a37:5805:: with SMTP id m5-v6mr5833305qkb.346.1530814297988; Thu, 05 Jul 2018 11:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530814297; cv=none; d=google.com; s=arc-20160816; b=AyJZ/+VyLpLT8qtqzqAFibvzJBdWWiS1h8PcBpfi8z394XdVNmeYKo6jqxtG9e7PPZ ydO9S4SgXpV9o+1F/clmkwN8PVl2Wyn6Q3CDaGXUDwPHkI9Y9OnkAIka1/TssIFOlgm0 9ha8n3Zg+bkmrQwZ8thFBSW2qNifikWE1w50EpyGSL6yzjMgagKqgQiCgkECc1K1jwnX hPaYGXwKfm3skWEp1PJ653LwuI1ASHAcC07tShYkVgPwASh16UwuGpUoQ0wB3BsdSyx2 KWy8AnvH+bbDNeL6tPh3CQpRbRthirXABuTYizjeKyCmQLW3znV22elHgN+VGaMzsbjq QyWw== 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:subject:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=jdOg4dgxjNMVkzsZgmSJWqN4NVWAnxs0bCXicehtz8k=; b=i9b+fmUlJWU6evEmXa2l4qlCVLEzbD1VF6+VLYnOq1JTJ+qtKCMyhuRLNcgQeeJO0k jEhF3jU/85Uhux/Zrh6HUDH0GhhOXyUT4Cw19eoo2aFm3F36QNztf/B9fiLC4A6OPUnK 3BDhOAV1PMl6e9eGcJaBURatghFVMZpr+ZrHU5ugQgW0sH39seT1/eGcDr37cyRECS2W 9IlncmNm3Hkf5oYIoSS03BqJL/USJWBnPcbIQpwv1QuqYmebhil7x8pQ4QN7kxZW+XbJ GNlhgb0+9C+8Z+dqykqRu+gkJbxwr4+2qBJzohU+iKofDm+f8PP9oQWplW9dVBuSxuEd k4Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Qi+XrwSW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j15-v6si1039599qkk.361.2018.07.05.11.11.34 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 05 Jul 2018 11:11:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Qi+XrwSW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8j7-0005bE-Qg for patch@linaro.org; Thu, 05 Jul 2018 14:11:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8by-0000Ut-Hg for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:04:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb8bv-0004yA-EN for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:04:10 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:46180) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb8bv-0004xd-0B for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:04:07 -0400 Received: by mail-pf0-x242.google.com with SMTP id l123-v6so6091363pfl.13 for ; Thu, 05 Jul 2018 11:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jdOg4dgxjNMVkzsZgmSJWqN4NVWAnxs0bCXicehtz8k=; b=Qi+XrwSW9Yjj9koThHZNBYVhGsa4s9pdWu+UgSBeYHqbp0d4peEh7xFg9UPjZ7ii/T h54hdx6PZgkeA5T+cacNV8OSGb808UglpR3m0XQLZhnnrO9UKXKT56YCw03ym9kptX0p ZZKLt31zvvohiy0eSqy2seqJoOYBYRHN4KnD4= 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; bh=jdOg4dgxjNMVkzsZgmSJWqN4NVWAnxs0bCXicehtz8k=; b=M0Ni6UwntgoIZ0KIGjd3PTe+ttUNVUE/3liPj7GYbkDL+8feoJyIe9/3xzyy453rrk F87Gv0OR8MsT5IevYdqLtDv1KaZ3MOUJMRRUIk9kyU7pnxo0QIgV6nUdj6WeAx7UROd6 th//9PIE0DSzW9lra1VCbJnmtf/0lpXRsxyn7wKCdmSXciyX+8mrG7CmqPuJ/feWNo0L nLmXCvgmreoyUdRfT8bwpIW8ZLOtpK3ZnJsXj0F8uTXlNYN/dcircfP9/TgxFyWjdyhP 3Owgxrhc39Yo91jqe5L52Rt8Dci1dwW7SX06Cn6g8j/IUn+ZBquiaXNKTfIHm0n/OrDl EDSQ== X-Gm-Message-State: APt69E0+zKEmjT0+3p0swlNDq1FWMMUjDViWTVCQKLex3way8vwqRwMD D4ahxz+pPN7Xoj2KF9Cf2GF2uO7EFDM= X-Received: by 2002:a65:448a:: with SMTP id l10-v6mr6608705pgq.382.1530813845589; Thu, 05 Jul 2018 11:04:05 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id d65-v6sm13177289pfj.20.2018.07.05.11.04.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 11:04:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 5 Jul 2018 11:04:03 -0700 Message-Id: <20180705180403.11928-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [RFC] target/arm: Suppress Coverity warning for PRF X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, armbru@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These instructions must perform the sve_access_check, but since they are implemented as NOPs there is no generated code to elide when the access check fails. Fixes: Coverity issues 1393780 & 1393779. Signed-off-by: Richard Henderson --- Does anyone know if this actually works for Coverity? I'd hate to churn the code without knowing. --- target/arm/translate-sve.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c080345b9c..d41f1155f9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -5164,7 +5164,7 @@ static bool trans_ST1_zpiz(DisasContext *s, arg_ST1_zpiz *a, uint32_t insn) static bool trans_PRF(DisasContext *s, arg_PRF *a, uint32_t insn) { /* Prefetch is a nop within QEMU. */ - sve_access_check(s); + (void)sve_access_check(s); return true; } @@ -5174,7 +5174,7 @@ static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a, uint32_t insn) return false; } /* Prefetch is a nop within QEMU. */ - sve_access_check(s); + (void)sve_access_check(s); return true; }