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: 940118 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Qi+XrwSW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41M5V86Lt7z9s8k for ; Fri, 6 Jul 2018 04:09:36 +1000 (AEST) Received: from localhost ([::1]:54189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8hC-0004Nn-BN for incoming@patchwork.ozlabs.org; Thu, 05 Jul 2018 14:09:34 -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-Google-Smtp-Source: AAOMgpfy4/SlUwOuet6Fx3mrew+QvCnFFbP+3KDWciSYOSRc1lRcM+NlBazDzrnJTAg5v4tYsJ2W3g== 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+incoming=patchwork.ozlabs.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(-) 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; }