From patchwork Fri Jul 26 17:49:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 169864 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp353444ilk; Fri, 26 Jul 2019 10:50:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrEbUCa6fZOPNRjktjfIqwOJyFiDtIHreRgwQWzY1go0ASxJY4wfI8IfWJQbek9JIz+M+O X-Received: by 2002:a17:906:e95:: with SMTP id p21mr72730520ejf.205.1564163454789; Fri, 26 Jul 2019 10:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564163454; cv=none; d=google.com; s=arc-20160816; b=NhMzHR205DvbFEdsGi5NIMKxoGMZeSavoktnIiyvDaKm0f6BPSRDY8hF8bdUt+lsEv BjtDSey85gFXcCLq2zclVyeCwcPFCJAPbuXe5/k8bBRdnw3WrUnI5vnSpJRGbgPGgRQ1 fbX6NZk5fHFuCTuXPnwssJrnKkIGKVaOatrkjASyT8H8jpP3X56kBcPZ4W0B43twXNxl SLDYqzuQHr9PD82OGfKqE41kHz5ysMgSp4YlD79DHleD3EQVWpEpMdR9CAm/+/rJE84D pLhGgGy0+7Lz3LZHeeSm+fOt3RM6YcmJXIIuXfioumS5s1epAIePg19kqOIUAQzc9AYn +50Q== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ynwokCS+Kqgt3LfDdzexRygGm/TpfqdWtRJ/K6TofxQ=; b=oyFrItfEXHXtQhbUDw1Ls/Kp+xxkkrBcTHxtHU8RXH0cntrkA3PHk4DfNGaw/CvqvC +NdMCkHsuA9rmyCQs5WRaQlKN0ibA84GX547aK8qDK3VUKExZr2U0H6eCHypaRz8bmLq lCXwl71EHFTwJrJzGpEAqW9XQno8VICyVoDatNROgUaj4RIk3w4J/Pn46ZfZVwW7l9rg dlwn72N1C8Mt9wWkR51y9SGl6DFJLmqNBX3c6WKbSZLWBGC8+CISWADm0QWiScxO3DNn OWHtUha5UDBiXZggIymG90L5U+g3OXsib1ZwVtuNzUfPfwmo9k57/EBU7ebDFbD86PoH 7uHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oXKkjU8f; 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 gu21si10692008ejb.329.2019.07.26.10.50.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jul 2019 10:50:54 -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=oXKkjU8f; 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 ([::1]:42166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4Mm-0001qR-3d for patch@linaro.org; Fri, 26 Jul 2019 13:50:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56905) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4MY-0001ks-Ry for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:50:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr4MX-0007Aa-Pd for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:50:38 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:37653) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr4MX-00076A-KW for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:50:37 -0400 Received: by mail-pf1-x444.google.com with SMTP id 19so24852619pfa.4 for ; Fri, 26 Jul 2019 10:50:36 -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:in-reply-to:references; bh=ynwokCS+Kqgt3LfDdzexRygGm/TpfqdWtRJ/K6TofxQ=; b=oXKkjU8fglSAI1Jty8wDUH65ezOiFiflanv1iU7NYrrwB/qUNs7CJHIvK3eHLc6yJh vvfKYGb5XJCTgGneoT8ZzCTyuCWTywlHOcGOgGfxyHrGMeYP9YNN5ZJZ9lYxS+UikDKN x6NaBqJ2fTIeCKyhV8N6PJ/4AzT8lRR2oVtoOPT1rzONK4nBYbOPdHbTko7VQzmwYlQ4 tA4UwkjLpwjIQp6YQ8eYt5FNLZUlX3Dk3jnptgCokx/9J1CWJdbewYYCXKK6jg/YeDQb n8Ia07lzEC9oS+n+RvYVNor2nRRqHhxIto7TFlUl8myyIKiBDTn+hSPVBmlC7eRWvu11 fL9w== 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:in-reply-to :references; bh=ynwokCS+Kqgt3LfDdzexRygGm/TpfqdWtRJ/K6TofxQ=; b=tdXzd95eI10P3EqYQf7ZDm7lxcx+GjWi2knYxeHu5zGjDr+FuvMgQYbCa5WN4paanq bvu1dyjBVYAW1tDzBd3Ypea+MqaykJPERzAxIz85iFaIU1fTsiWz3dUCj2ZAemPlHILN wL/8ppXpK1DTTVVz/2QHDEQvK8DndLTWchFFY4dZrySUk6buuxRE3QwSXlrrWMFaLr7n u57fZ8/wPqZYTw47TU/JilDl15c0+F/KflNzFiYRBg4aktRsILMSNH5wbiKBy7Ux5KJ+ ototNItibZlEMKimACBin8EeNZeexMOZBHLkR9ru8SLoSWXcrw3rVu1cVj8IqO1fGB5E 9NIA== X-Gm-Message-State: APjAAAXk7FhcfSNdysMF6wX1BSpm6zHmUP0O/wZwB4yTwwIzz9NfQCPF iTRa9GeVpvAewbJNWUdNR0NwzY1B8kc= X-Received: by 2002:a63:2c8:: with SMTP id 191mr91125178pgc.139.1564163435378; Fri, 26 Jul 2019 10:50:35 -0700 (PDT) Received: from localhost.localdomain (97-126-117-207.tukw.qwest.net. [97.126.117.207]) by smtp.gmail.com with ESMTPSA id o24sm104287919pfp.135.2019.07.26.10.50.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 10:50:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 10:49:26 -0700 Message-Id: <20190726175032.6769-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726175032.6769-1-richard.henderson@linaro.org> References: <20190726175032.6769-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::444 Subject: [Qemu-devel] [PATCH 01/67] decodetree: Allow !function with no input bits 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: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" With this, we can have the function return a value from the DisasContext. Signed-off-by: Richard Henderson --- scripts/decodetree.py | 5 ++++- tests/decode/succ_function.decode | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/decode/succ_function.decode -- 2.17.1 diff --git a/scripts/decodetree.py b/scripts/decodetree.py index d7a59d63ac..4259d87a95 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -195,7 +195,10 @@ class MultiField: """Class representing a compound instruction field""" def __init__(self, subs, mask): self.subs = subs - self.sign = subs[0].sign + if len(subs): + self.sign = subs[0].sign + else: + self.sign = 0 self.mask = mask def __str__(self): diff --git a/tests/decode/succ_function.decode b/tests/decode/succ_function.decode new file mode 100644 index 0000000000..632a9de252 --- /dev/null +++ b/tests/decode/succ_function.decode @@ -0,0 +1,2 @@ +%foo !function=foo +foo 00000000000000000000000000000000 %foo