From nobody Mon Feb 9 15:10:13 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498941313543192.40888552349418; Sat, 1 Jul 2017 13:35:13 -0700 (PDT) Received: from localhost ([::1]:55811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRP6m-0008UP-26 for importer@patchew.org; Sat, 01 Jul 2017 16:35:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dROyQ-0001hs-Uw for qemu-devel@nongnu.org; Sat, 01 Jul 2017 16:26:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dROyM-0006oT-7e for qemu-devel@nongnu.org; Sat, 01 Jul 2017 16:26:33 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:36263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dROyM-0006oN-2b for qemu-devel@nongnu.org; Sat, 01 Jul 2017 16:26:30 -0400 Received: by mail-qk0-x244.google.com with SMTP id v143so6825867qkb.3 for ; Sat, 01 Jul 2017 13:26:30 -0700 (PDT) Received: from bigtime.twiddle.net.com (97-113-165-157.tukw.qwest.net. [97.113.165.157]) by smtp.gmail.com with ESMTPSA id f128sm8559985qkc.13.2017.07.01.13.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2017 13:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=sF4PnPta6pozwwdnk+Waz7Q3LHeBy59cH8d0ustGynw=; b=fMk9YKVHTryLMG5AYtV6WvN4HtgP9RHA1VKeY/W+tFhFyhMb54x/8Khr54oyFqoHPS tXYKZsKYfyiufNd9RRH6hVp/ICgpVCP4+B0/0KaMRFJd1TZNwfEDIY/BSF6jYw1g8sd6 yDgr81hP5c3BZUT436AJILre5WX7xV12f4h8fSia9spNNbyWSstwZt37Oltey1i4hDCU bvJvpDtQNCp5HPfDyzAbHV6EjW05AR9t97iqQg3lzLJoHZC9wJvZ/YFopvSfeeCVAECu kqWgwtELnOkbp7g9PDFYRCEnAvBENMvmgokoeXsHnZ18DBXHBSiyw7qhbQQAboqKjy4I 0Trw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=sF4PnPta6pozwwdnk+Waz7Q3LHeBy59cH8d0ustGynw=; b=REKGQbI5ZzrLzYZC9ijU+MvdR5ZeIKwDxSkBfQdWNkcuKeFyxfGjWthGOmjmLEUKkF vQV5UjLuIwujP1HQCVewVqU3h+Hg6BEQxD2yZ7DxeHHJ/p+CuUTkNq6/gYddzAcmIAwd GxvsHYoRKtaCiO9qzqoZ1gCV4RDv9n1IhBbj9ivY4eKjCheHFiw7scpUP1q7kDsBdwu2 QixLigMSJUAbTHAKZJXb/WphbOKO66rzOjGZFh2tQo9rNfiIGvzfBX3hLGetL8fBqKaK 5JxkU1dnuGfKiTXO0GOjx9G7AEDmJdA/4w/NEhjKQOUE7sFS5gphfeIvt0HLEBszJvKB mXQA== X-Gm-Message-State: AKS2vOwt8XKxj/ngJSZP/WMbCawlA3gQE0S3hiDBpYwoGWSCqyQlirmy aAy22w278U2SJuT7jGM= X-Received: by 10.55.156.193 with SMTP id f184mr32863496qke.102.1498940789310; Sat, 01 Jul 2017 13:26:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 1 Jul 2017 13:26:00 -0700 Message-Id: <20170701202600.14057-9-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170701202600.14057-1-rth@twiddle.net> References: <20170701202600.14057-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PATCH v2 8/8] target/s390x: Fix risbg handling 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: aurelien@aurel32.net, david@redhat.com 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 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The rotation is to the left, but extract shifts to the right. The computation of the extract parameters needs adjusting. For the entry condition, simplify 64 - rot + len <=3D 64 -rot + len <=3D 0 len <=3D rot Reported-by: David Hildenbrand Suggested-by: Aurelien Jarno Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- target/s390x/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 1f0c401..89b2ea5 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3472,8 +3472,8 @@ static ExitStatus op_risbg(DisasContext *s, DisasOps = *o) } =20 /* In some cases we can implement this with extract. */ - if (imask =3D=3D 0 && pos =3D=3D 0 && len > 0 && rot + len <=3D 64) { - tcg_gen_extract_i64(o->out, o->in2, rot, len); + if (imask =3D=3D 0 && pos =3D=3D 0 && len > 0 && len <=3D rot) { + tcg_gen_extract_i64(o->out, o->in2, 64 - rot, len); return NO_EXIT; } =20 --=20 2.9.4