From patchwork Tue Jun 16 20:57:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 485178 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E712E1402AC for ; Wed, 17 Jun 2015 06:58:14 +1000 (AEST) Received: from localhost ([::1]:42835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4xvv-00034x-SW for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2015 16:58:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4xvi-0002jh-6p for qemu-devel@nongnu.org; Tue, 16 Jun 2015 16:57:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4xvd-00041W-Bg for qemu-devel@nongnu.org; Tue, 16 Jun 2015 16:57:58 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:55119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4xvd-00040r-5Z for qemu-devel@nongnu.org; Tue, 16 Jun 2015 16:57:53 -0400 Received: from weber.rr44.fr ([2001:470:d4ed:0:7e05:7ff:fe0d:f152]) by hall.aurel32.net with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1Z4xvb-0001lR-7R; Tue, 16 Jun 2015 22:57:51 +0200 Received: from aurel32 by weber.rr44.fr with local (Exim 4.85) (envelope-from ) id 1Z4xva-0008MX-8x; Tue, 16 Jun 2015 22:57:50 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Tue, 16 Jun 2015 22:57:47 +0200 Message-Id: <1434488267-32108-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 2.1.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:bc8:30d7:101::1 Cc: Alexander Graf , Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PATCH] target-s390x: fix MOVE LONG instruction X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The MOVE LONG instruction should pad the destination operand with the byte from bit positions 32-39 of the source length (r2 + 1), not with the same byte in the source address. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson --- target-s390x/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c index 3ccbeb9..9f0eb1e 100644 --- a/target-s390x/mem_helper.c +++ b/target-s390x/mem_helper.c @@ -550,7 +550,7 @@ uint32_t HELPER(mvcl)(CPUS390XState *env, uint32_t r1, uint32_t r2) uint64_t dest = get_address_31fix(env, r1); uint64_t srclen = env->regs[r2 + 1] & 0xffffff; uint64_t src = get_address_31fix(env, r2); - uint8_t pad = src >> 24; + uint8_t pad = env->regs[r2 + 1] >> 24; uint8_t v; uint32_t cc;