From nobody Sat Feb 7 04:32:07 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 152967864738619.431908861142915; Fri, 22 Jun 2018 07:44:07 -0700 (PDT) Received: from localhost ([::1]:34486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWNIE-0007Bb-JD for importer@patchew.org; Fri, 22 Jun 2018 10:44:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMnX-0006H0-98 for qemu-devel@nongnu.org; Fri, 22 Jun 2018 10:12:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMnS-0006CZ-7k for qemu-devel@nongnu.org; Fri, 22 Jun 2018 10:12:23 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:42762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMnS-0006By-0x for qemu-devel@nongnu.org; Fri, 22 Jun 2018 10:12:18 -0400 Received: by mail-wr0-x241.google.com with SMTP id w10-v6so6859609wrk.9 for ; Fri, 22 Jun 2018 07:12:17 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m16-v6sm9415938wro.91.2018.06.22.07.12.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 07:12:11 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D78053E0B62; Fri, 22 Jun 2018 15:12:05 +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=jGliSiRGlVQqHmxgCV6V1SksPNw2IAhko+az9HetiwI+Gz1/3fLaSuJGgSpBnB2se/ WUoc+FIt0Nle8rJqK9fuyNSmALwksA0yUFToVyu8Cp6C3IszBejh1Q15MCfYXeukJq8Q SM/Hp/goxD3PqnbHPGIbmOwYlFCcm3v4uL2Rg= 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=gnjQbMcEvOWsnqbeAngXcPz6Dm5jkNjv56mdnuPBRC0HLOiAdaztR4ZL7XWLVZxacl U2L0ezRAuXAPxJpWDUoce3dTgANHZWv6mzfjXvEIYWtR7zYSyLqaymn9KjCVkljqs+YM l7dXWd1o5IkXGwg3wV/El9Xa79vJCJ0rzEa8TOc/7VmRn9OJA2+c+SJsJjGCd/9tFF0B zqripEPF44/x+uP6moLCyThdNmD/QMMS5m7h5K/2t7wDbkA2/L7OrgjFyjv3nqjFwY9p SApqigSqvEOgf6kzInHlvmclua2vN/RQlQuDnCE8Gixu9mwnzHBG8fLRdtlzL7g+gSK+ 55FA== X-Gm-Message-State: APt69E3unWoTDZO6BDc7jwpNm/KHVlKfl3uAGkUPh/1zJ9PbonYbM/f3 cgrHS3gKCcsLLpSJxHfYm63UvA== X-Google-Smtp-Source: AAOMgpdbZmx1WxIpeRdr+aYenp5JrRqZqYLlGMsyPod9Re38ldu+Wq3YvdDdtndMRWUs2PqWonqWjw== X-Received: by 2002:adf:ac0d:: with SMTP id v13-v6mr1353387wrc.7.1529676736952; Fri, 22 Jun 2018 07:12:16 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Fri, 22 Jun 2018 15:11:54 +0100 Message-Id: <20180622141205.16306-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622141205.16306-1-alex.bennee@linaro.org> References: <20180622141205.16306-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::241 Subject: [Qemu-devel] [RISU PATCH v4 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