From patchwork Mon Aug 3 08:20:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 503045 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 59CDC1402DE for ; Mon, 3 Aug 2015 18:30:10 +1000 (AEST) Received: from localhost ([::1]:58010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMB8K-00058m-A2 for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2015 04:30:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMB7v-0004UP-7u for qemu-devel@nongnu.org; Mon, 03 Aug 2015 04:29:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMB7u-00062h-FO for qemu-devel@nongnu.org; Mon, 03 Aug 2015 04:29:43 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:32808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMAz8-0003Gz-Tz for qemu-devel@nongnu.org; Mon, 03 Aug 2015 04:20:39 -0400 Received: from weber.rr44.fr ([2001:bc8:30d7:120: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 1ZMAyy-0005i2-Gd; Mon, 03 Aug 2015 10:20:28 +0200 Received: from aurel32 by weber.rr44.fr with local (Exim 4.85) (envelope-from ) id 1ZMAyx-0004R9-TT; Mon, 03 Aug 2015 10:20:27 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Mon, 3 Aug 2015 10:20:18 +0200 Message-Id: <1438590019-16932-4-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438590019-16932-1-git-send-email-aurelien@aurel32.net> References: <1438590019-16932-1-git-send-email-aurelien@aurel32.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:bc8:30d7:100::1 Cc: Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PULL 3/4] tcg/s390x: Mask TCGMemOp appropriately for indexing 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 Commit 2b7ec66f fixed TCGMemOp masking following the MO_AMASK addition, but two cases were forgotten in the TCG S390 backend. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/s390/tcg-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 921991e..aa718ec 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -1390,7 +1390,7 @@ static void tcg_out_call(TCGContext *s, tcg_insn_unit *dest) static void tcg_out_qemu_ld_direct(TCGContext *s, TCGMemOp opc, TCGReg data, TCGReg base, TCGReg index, int disp) { - switch (opc) { + switch (opc & (MO_SSIZE | MO_BSWAP)) { case MO_UB: tcg_out_insn(s, RXY, LLGC, data, base, index, disp); break; @@ -1449,7 +1449,7 @@ static void tcg_out_qemu_ld_direct(TCGContext *s, TCGMemOp opc, TCGReg data, static void tcg_out_qemu_st_direct(TCGContext *s, TCGMemOp opc, TCGReg data, TCGReg base, TCGReg index, int disp) { - switch (opc) { + switch (opc & (MO_SIZE | MO_BSWAP)) { case MO_UB: if (disp >= 0 && disp < 0x1000) { tcg_out_insn(s, RX, STC, data, base, index, disp);