From patchwork Thu Nov 9 15:32:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 118454 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6740265qgn; Thu, 9 Nov 2017 07:36:40 -0800 (PST) X-Google-Smtp-Source: ABhQp+QKIeMP9yg7+CdTH5oBglx6kjtmbDBbw4DDzIDXnZ2FBLsP+U6lgmnkMFIsAic4hwkm+1cg X-Received: by 10.37.178.146 with SMTP id k18mr52007ybj.373.1510241800457; Thu, 09 Nov 2017 07:36:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510241800; cv=none; d=google.com; s=arc-20160816; b=FpSR1k+rA8sHbi9ghaXSqdpBTcN2NKFcxbHoyKXDmD9aLmhuAfVi20TXdUxTu40Gvd 3/Frq+LJLuCwrFZ0kAujXg2NUs088N1+7K6VizSIlTX+FNUTilTux30+ctUYNLSWe7eP YkpJoxmqbxOHLJG0+ntsprdtb65uQlh0Q+edV2Z8jEmXfOV5CnvqFyr2rIiwj0XEsKT2 SaSwhPU4dzj7YzOf6jQgthMJJCzwkjikAFX+C8xUo7AXvjSfmVQhlBoAe6kwGHYjkdZ0 hIaSf74HinheUGUDLV5KpXBfAGGoR4NH6MhOrWI6bVS9WYQLVZKqywFc0IXmqpGako28 Vqfg== 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:arc-authentication-results; bh=UVqQk0chvzKmtnP1la0BjK+T5Z+GsUCD/tfvBNdn9a0=; b=K23Y+R1BDj6GAIL8CVCYMIsPMBw9iFD+ELGKLSGqTm4v4ATf2NhwMYeI2M+mqSN9KM KJz+jZROGXk19eGScIjM3caoAeI0Syd3HqQc2DQvIVYsDPgceJpUXHdJa7dNFLjz7acG Bgk8J2d3prHxOWvJCcl5VEWzegBdhIMZHYXC5ooHkDePjmMukVQa+MNrmPNe1PsRXZj7 SK7X9KwaPtI3sK22ic4L2IP9EZ6ngm1nNr435EXyQw5YIBmw6Ycz9oQwt5FPS25RtLZ5 u32BzCtFzyWpV7TEAcPr0qVmBsnASUJdx/wYIQRub7zinqy2DyidpUkfBzeV394dbOZL H/qQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c196si1617485ywc.363.2017.11.09.07.36.40 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 Nov 2017 07:36:40 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:37533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCosi-000875-2d for patch@linaro.org; Thu, 09 Nov 2017 10:36:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCooU-0005GK-BO for qemu-devel@nongnu.org; Thu, 09 Nov 2017 10:32:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCooT-00035x-07 for qemu-devel@nongnu.org; Thu, 09 Nov 2017 10:32:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49262) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eCooS-00035P-Qv; Thu, 09 Nov 2017 10:32:16 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E482D2CE94F; Thu, 9 Nov 2017 15:32:15 +0000 (UTC) Received: from localhost (ovpn-117-99.ams2.redhat.com [10.36.117.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 813C46F971; Thu, 9 Nov 2017 15:32:15 +0000 (UTC) From: Cornelia Huck To: peter.maydell@linaro.org Date: Thu, 9 Nov 2017 16:32:04 +0100 Message-Id: <20171109153204.26436-3-cohuck@redhat.com> In-Reply-To: <20171109153204.26436-1-cohuck@redhat.com> References: <20171109153204.26436-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 09 Nov 2017 15:32:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL for-2.11 2/2] target/s390x: Finish implementing RISBGN 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: thuth@redhat.com, david@redhat.com, Cornelia Huck , Richard Henderson , agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, rth@twiddle.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson We added the entry to insn-data.def, but failed to update op_risbg to match. No need to special-case the imask inversion, since that is already ~0 for RISBG (and now RISBGN). Fixes: 375ee58bedcda359011fe7fa99e0647f66f9ffa0 Fixes: https://bugs.launchpad.net/qemu/+bug/1701798 (s390x part) Signed-off-by: Richard Henderson Message-Id: <20171107145546.767-1-richard.henderson@linaro.org> Reviewed-by: Thomas Huth Tested-by: Peter Maydell Signed-off-by: Cornelia Huck --- target/s390x/translate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.13.6 diff --git a/target/s390x/translate.c b/target/s390x/translate.c index dee72a787d..85d0a6c3af 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3432,6 +3432,7 @@ static ExitStatus op_risbg(DisasContext *s, DisasOps *o) /* Adjust the arguments for the specific insn. */ switch (s->fields->op2) { case 0x55: /* risbg */ + case 0x59: /* risbgn */ i3 &= 63; i4 &= 63; pmask = ~0; @@ -3447,7 +3448,7 @@ static ExitStatus op_risbg(DisasContext *s, DisasOps *o) pmask = 0x00000000ffffffffull; break; default: - abort(); + g_assert_not_reached(); } /* MASK is the set of bits to be inserted from R2. @@ -3464,11 +3465,7 @@ static ExitStatus op_risbg(DisasContext *s, DisasOps *o) insns, we need to keep the other half of the register. */ imask = ~mask | ~pmask; if (do_zero) { - if (s->fields->op2 == 0x55) { - imask = 0; - } else { - imask = ~pmask; - } + imask = ~pmask; } len = i4 - i3 + 1;