From patchwork Thu May 27 20:46:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 53849 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 622E2B7D1A for ; Fri, 28 May 2010 09:02:15 +1000 (EST) Received: from localhost ([127.0.0.1]:53555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHm5c-0006Sd-TS for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 19:02:12 -0400 Received: from [140.186.70.92] (port=56499 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjzt-0002XH-1D for qemu-devel@nongnu.org; Thu, 27 May 2010 16:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjzr-0005XO-S3 for qemu-devel@nongnu.org; Thu, 27 May 2010 16:48:08 -0400 Received: from are.twiddle.net ([75.149.56.221]:51290) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjzr-0005XJ-N1 for qemu-devel@nongnu.org; Thu, 27 May 2010 16:48:07 -0400 Received: from anchor.twiddle.home (anchor.twiddle.home [172.31.0.4]) by are.twiddle.net (Postfix) with ESMTPS id 0D7CA576; Thu, 27 May 2010 13:48:07 -0700 (PDT) Received: from anchor.twiddle.home (anchor.twiddle.home [127.0.0.1]) by anchor.twiddle.home (8.14.4/8.14.4) with ESMTP id o4RKm69M031088; Thu, 27 May 2010 13:48:06 -0700 Received: (from rth@localhost) by anchor.twiddle.home (8.14.4/8.14.4/Submit) id o4RKm59v031087; Thu, 27 May 2010 13:48:05 -0700 From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 May 2010 13:46:42 -0700 Message-Id: <1274993204-30766-61-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.0.1 In-Reply-To: <1274993204-30766-1-git-send-email-rth@twiddle.net> References: <1274993204-30766-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: agraf@suse.de, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 60/62] tcg-s390: Fix TLB comparison width. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The TLB comparator is sized for the target. Use a 32-bit compare when appropriate. Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 6101255..ec4c72a 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -174,7 +174,9 @@ typedef enum S390Opcode { RS_SRL = 0x88, RXY_AG = 0xe308, + RXY_AY = 0xe35a, RXY_CG = 0xe320, + RXY_CY = 0xe359, RXY_LB = 0xe376, RXY_LG = 0xe304, RXY_LGB = 0xe377, @@ -198,6 +200,8 @@ typedef enum S390Opcode { RXY_STRVH = 0xe33f, RXY_STY = 0xe350, + RX_A = 0x5a, + RX_C = 0x59, RX_L = 0x58, RX_LH = 0x48, RX_ST = 0x50, @@ -1442,7 +1446,11 @@ static void tcg_prepare_qemu_ldst(TCGContext* s, TCGReg data_reg, } assert(ofs < 0x80000); - tcg_out_insn(s, RXY, CG, arg0, arg1, TCG_AREG0, ofs); + if (TARGET_LONG_BITS == 32) { + tcg_out_mem(s, RX_C, RXY_CY, arg0, arg1, TCG_AREG0, ofs); + } else { + tcg_out_mem(s, 0, RXY_CG, arg0, arg1, TCG_AREG0, ofs); + } if (TARGET_LONG_BITS == 32) { tgen_ext32u(s, arg0, addr_reg); @@ -1494,7 +1502,7 @@ static void tcg_prepare_qemu_ldst(TCGContext* s, TCGReg data_reg, ofs = offsetof(CPUState, tlb_table[mem_index][0].addend); assert(ofs < 0x80000); - tcg_out_insn(s, RXY, AG, arg0, arg1, TCG_AREG0, ofs); + tcg_out_mem(s, 0, RXY_AG, arg0, arg1, TCG_AREG0, ofs); } static void tcg_finish_qemu_ldst(TCGContext* s, uint16_t *label2_ptr)