From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0P2W-0005cM-W7 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 01:49:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0P2O-0002XM-VK for qemu-devel@nongnu.org; Fri, 27 Jun 2014 01:49:36 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:42061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0P2O-0002XD-Lm for qemu-devel@nongnu.org; Fri, 27 Jun 2014 01:49:28 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jun 2014 06:49:26 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id AE77617D8047 for ; Fri, 27 Jun 2014 06:50:51 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5R5nNfj33947858 for ; Fri, 27 Jun 2014 05:49:23 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5R5nMrm028050 for ; Thu, 26 Jun 2014 23:49:22 -0600 Message-ID: <53AD05CC.6040400@fr.ibm.com> Date: Fri, 27 Jun 2014 07:49:00 +0200 From: Cedric Le Goater MIME-Version: 1.0 References: <1403843160-30332-1-git-send-email-rth@twiddle.net> In-Reply-To: <1403843160-30332-1-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] tcg/ppc: Fix failure in tcg_out_mem_long List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org Cc: tommusta@gmail.com, gkurz@linux.vnet.ibm.com On 06/27/2014 06:26 AM, Richard Henderson wrote: > With rt != r0 on loads, we use rt for scratch. If we need an index > register different from base, we can't use rt, but r0 is usable. That fixes the problem : a x86_64 fedora 20 TCG guest now runs under a the latest qemu, (trusty ppc64le host) Thanks, C. Tested-by: Cédric Le Goater > Signed-off-by: Richard Henderson > --- > This ought to fix the problem that Greg reported. > > That we need to use --enable-debug-tcg to see the assert, and that I > didn't previously do testing with that is disappointing. I'm thinking > that we ought to do something like gcc wrt --enable-checking=release > vs development, so that we can't do normal development withing these > asserts enabled. More on that later... > > > r~ > --- > tcg/ppc/tcg-target.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c > index c83fd9f..dd84e76 100644 > --- a/tcg/ppc/tcg-target.c > +++ b/tcg/ppc/tcg-target.c > @@ -805,7 +805,10 @@ static void tcg_out_mem_long(TCGContext *s, int opi, int opx, TCGReg rt, > > /* For unaligned, or very large offsets, use the indexed form. */ > if (offset & align || offset != (int32_t)offset) { > - tcg_debug_assert(rs != base && (!is_store || rs != rt)); > + if (rs == base) { > + rs = TCG_REG_R0; > + } > + tcg_debug_assert(!is_store || rs != rt); > tcg_out_movi(s, TCG_TYPE_PTR, rs, orig); > tcg_out32(s, opx | TAB(rt, base, rs)); > return; >