From nobody Mon Feb 9 08:06:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528895348669845.7683624631119; Wed, 13 Jun 2018 06:09:08 -0700 (PDT) Received: from localhost ([::1]:34101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT5WN-0004N3-Qi for importer@patchew.org; Wed, 13 Jun 2018 09:09:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT5Jx-0002l7-Fz for qemu-devel@nongnu.org; Wed, 13 Jun 2018 08:56:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fT5Ju-0005GY-3u for qemu-devel@nongnu.org; Wed, 13 Jun 2018 08:56:17 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:42679) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fT5Jt-0005Ev-Ua for qemu-devel@nongnu.org; Wed, 13 Jun 2018 08:56:14 -0400 Received: by mail-wr0-x242.google.com with SMTP id w10-v6so2645484wrk.9 for ; Wed, 13 Jun 2018 05:56:13 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t17-v6sm3574692wrr.82.2018.06.13.05.56.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 05:56:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B86393E126F; Wed, 13 Jun 2018 13:56:01 +0100 (BST) 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 :mime-version:content-transfer-encoding; bh=Uth4Ys8aYr8FACWERzidZ+kd8JZrxlxpRTXWTNIlyrE=; b=SR/e8YKrX19lZs5Xdiqc0isonzk3Iva2jQCnZpKYEYyMp315GkLP2QJMaAR9jr90TR vLA7XKr/xW6GFSH7uB8c8hPqp64tTDg7s46+0w63JHFeNKvKPCou+5UuIviUjq1n5Dzk ufk2HfPO58cGFewSWhGgQPPwO2Mika1ohbmug= 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:mime-version:content-transfer-encoding; bh=Uth4Ys8aYr8FACWERzidZ+kd8JZrxlxpRTXWTNIlyrE=; b=ALIAcPoe8BOJG8CyKwtsbbMzG4SbPoXPDhOlgBLWwr5QSsWdZNMSs2quhzFSo9+U1Z nSwBA87ZhQNYAsRC0pWGUJmNEXDJlAHtmqH1IpSUWDFtSp+8d5rNW7s04P9gi063uxX6 O425OLilSAbguT1ga8FeORsHwYdZ5K5ZErMfu5aaEtqjSR1XIeiHirjMGeTxMijKMmuG zBUy5iRJ6EzBtFZ2ve3AmHrW7XmxARrhlKweft1EZmD5Z2IUalbpxz8ezzsFCCft/3Y9 6nsTHN340h02orDKdv/bgVs2ayBwqHN3bjTWXmmq2tRU5HO76+iP7M4mBJCpQAGnGdJR 4W+w== X-Gm-Message-State: APt69E0IfuNOzM+tb2VtpZkiEzIeWs+7Y2dV29OYirAEiNVMBC+NEPbs Iv0/qrHt6G6cbYRdcs+Sm8ZS74LMwjk= X-Google-Smtp-Source: ADUXVKLUhHf6JOV1omOfq2kbWCiMDf/OZ6pzgN49AFxuGMcmIx4rmtZCV+zjJi/AfgEwxBNvbsd/qQ== X-Received: by 2002:adf:a3c3:: with SMTP id m3-v6mr3894552wrb.208.1528894572781; Wed, 13 Jun 2018 05:56:12 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 13 Jun 2018 13:55:50 +0100 Message-Id: <20180613125601.14371-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180613125601.14371-1-alex.bennee@linaro.org> References: <20180613125601.14371-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [RISU PATCH v3 11/22] risugen: add dtype_msz address helper 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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-arm@nongnu.org, richard.henderson@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e --- risugen_arm.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/risugen_arm.pm b/risugen_arm.pm index 696bf5f..8d423b1 100644 --- a/risugen_arm.pm +++ b/risugen_arm.pm @@ -765,6 +765,15 @@ sub write_get_offset() write_risuop($OP_GETMEMBLOCK); } =20 +# Return the log2 of the memory size of an operation described by dtype. +sub dtype_msz($) +{ + my ($dtype) =3D @_; + my $dth =3D $dtype >> 2; + my $dtl =3D $dtype & 3; + return $dtl >=3D $dth ? $dth : 3 - $dth; +} + sub reg($@) { my ($base, @trashed) =3D @_; --=20 2.17.1