From patchwork Sat May 18 19:01:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164444 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp3703332ili; Sat, 18 May 2019 12:07:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMlhuWuWB2Q5+GlAmCFvPoCNmA/fhIi6YRV5XuLOGqxeKmVzlDyBbssULHIuixZoIjrrF8 X-Received: by 2002:aa7:c34f:: with SMTP id j15mr64905424edr.285.1558206458002; Sat, 18 May 2019 12:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558206457; cv=none; d=google.com; s=arc-20160816; b=reUuKbkNBB/FTxA9epLc2Z8GHNYhbKt6qWJxd3E+8dRfd8vJoOnc2jXuPGmEgFthyy YeFErD4fczRoiyLklNZTdtjzlJC/dvgugglvgSH8w2tri+uLrE1w1WQYnM0sH1DR2llh tujnAYVlBtVUp2RmwxFFb5kBHCcMKtmpPReLIt5LZPTPDp+FSRBcDy5ARXfBZzs4OAJ6 hTUZZGGv5/l/1WByAUQ2kxiW5UiLcdSv4jGe/9luhaBOInfyotNzqpSefMwBV1OwMp6B JjditmEwELPtF7ZzgNbQqU3IrJ5DugLj4ABSxyJNDGE4xitiOcOZTkTpx/LSYvRtJG8t aNwQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=h2THfX9yFXUdDN24lXnYzdU4v3sPNpuvs1LZ+ysU720=; b=HDFd3qPnekD5rYbJmQOE9He9Mq2qtgKg1vF2BNfU3Bns7zaSuBYIIBEO1H1UxjAM5O X4FWoZmUruz+O/e/1n0Tk0QZprVDUMADlcZXHjJBS+qyXbp2CmkVsRnLEpwd9dP8b8DT doXjNPstoPAmjTlAxZK7R0T87ZQAbnprcXRUxB5sbYuJWT9yhVqUk2VhxdfwIelZPeOU yMkN3IPPuawh4jtzMV8i3xNblP0RaUmPzxIWbEYSpfluMeyOtTU0OQcufzAYbsoBIiYA l1CA+HXHyGdBgN680i2t/FkgOwrnOouZymHTOkpm76NzodFLyWqe44m7yZPIr/MyMdk5 67ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T2fohxur; 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=fail (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 p9si3595648ejq.110.2019.05.18.12.07.37 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 18 May 2019 12:07:37 -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=fail header.i=@linaro.org header.s=google header.b=T2fohxur; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:37603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hS4gB-0005cC-KN for patch@linaro.org; Sat, 18 May 2019 15:07:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hS4dJ-0002nw-7b for qemu-devel@nongnu.org; Sat, 18 May 2019 15:04:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hS4ax-0002eT-7f for qemu-devel@nongnu.org; Sat, 18 May 2019 15:02:12 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:36729) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hS4ax-0002dm-22 for qemu-devel@nongnu.org; Sat, 18 May 2019 15:02:11 -0400 Received: by mail-pf1-x443.google.com with SMTP id v80so5259821pfa.3 for ; Sat, 18 May 2019 12:02:10 -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; bh=h2THfX9yFXUdDN24lXnYzdU4v3sPNpuvs1LZ+ysU720=; b=T2fohxur4IW6l9ZWBNTX2HfN2q2lDq6NzTStZEBEfzfNbyatAVicax5GJJXsY3xKjL pVrMgNYV3YpkmgoGtxPt6CdDMfJmngTNRhiMZBlJVsRPQ13RL4HIsvNxvQ/QFOnavGRR SNYEeGEgRrMd37b304TOf0dZcebF4tuqY+BpL3CvMfKC/3ZsONdt95AKxpL4LEffZJ0Q 6yhPD9hjQ+rWVA5rCvR2VJsoOoEIVIsFJY8BdwIqZ+OWnMX9px+GRSsDKOzPqfgW7Wuw BPA/FJeAqz4hCTD2AOq3+h3VNFGI0ZFpEJUwuOLsJ4t6H5dUYTCpFDi+gKvz4vWaYp1Q Ponw== 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; bh=h2THfX9yFXUdDN24lXnYzdU4v3sPNpuvs1LZ+ysU720=; b=ReG1ItfpLk4tPmGErsYfNNCgQEQauyzs+4KQwvYFLDYjbquIaqPuCw/Cv3PCiLSguR bJE9o/C2pV1DsImjGl/1YzZRMmC9oSYsCs3AjawFDzKUBBe2YwUkauk737dSfc8NLoMv 4tJ2pKt8vBgChe031GbPVefGJLKhhN5DqfmRvsBWdlfzI2A1jGsHwPJwasS+6Lwrg2Q0 SKDd5S0dUbU8UhP6VmoYWSxzUeOxad3q6SZIREakVHftsar9cQZ7nfOLKLyM8hICLR1s zmvsghzQ2SoTXw/c9Vs8ucyEPXMRNJfwR9xtlU4OOcQ226LsZK0jkE6MlWtGx2z8NbEP PfYw== X-Gm-Message-State: APjAAAVry/4bosLMwiARxSonj3SgAKvYQifjLiD5elohkZZnyQiFzWBR zEpDNwGDDzar1wsgkmcxoWBWjWSCcNw= X-Received: by 2002:a62:e201:: with SMTP id a1mr69446977pfi.67.1558206129695; Sat, 18 May 2019 12:02:09 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id m9sm2751274pgd.23.2019.05.18.12.02.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 May 2019 12:02:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 18 May 2019 12:01:48 -0700 Message-Id: <20190518190157.21255-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190518190157.21255-1-richard.henderson@linaro.org> References: <20190518190157.21255-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::443 Subject: [Qemu-devel] [PATCH 07/16] tcg: Add TCG_OPF_NOT_PRESENT if TCG_TARGET_HAS_foo is negative 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" If INDEX_op_foo is always expanded by tcg_expand_vec_op, then there may be no reasonable set of constraints to return from tcg_target_op_def for that opcode. Let TCG_TARGET_HAS_foo be specified as -1 in that case. Thus a boolean test for TCG_TARGET_HAS_foo is true, but we will not assert within process_op_defs when no constraints are specified. Compare this with tcg_can_emit_vec_op, which already uses this tri-state indication. Signed-off-by: Richard Henderson --- tcg/tcg-opc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h index c7d971fa3d..242d608e6d 100644 --- a/tcg/tcg-opc.h +++ b/tcg/tcg-opc.h @@ -35,7 +35,7 @@ DEF(call, 0, 0, 3, TCG_OPF_CALL_CLOBBER | TCG_OPF_NOT_PRESENT) DEF(br, 0, 0, 1, TCG_OPF_BB_END) -#define IMPL(X) (__builtin_constant_p(X) && !(X) ? TCG_OPF_NOT_PRESENT : 0) +#define IMPL(X) (__builtin_constant_p(X) && (X) <= 0 ? TCG_OPF_NOT_PRESENT : 0) #if TCG_TARGET_REG_BITS == 32 # define IMPL64 TCG_OPF_64BIT | TCG_OPF_NOT_PRESENT #else