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 From: Richard Henderson Date: Thu, 27 May 2010 13:46:42 -0700 Message-Id: <1274993204-30766-61-git-send-email-rth@twiddle.net> In-Reply-To: <1274993204-30766-1-git-send-email-rth@twiddle.net> References: <1274993204-30766-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 60/62] tcg-s390: Fix TLB comparison width. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agraf@suse.de, aurelien@aurel32.net 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) -- 1.7.0.1