From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJBye-0003nO-3r for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:48:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJByY-0003h4-BB for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:48:19 -0400 Received: from [199.232.76.173] (port=53659 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJByX-0003gb-V0 for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:48:13 -0400 Received: from mx20.gnu.org ([199.232.41.8]:25325) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJByX-0007Pf-Kr for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:48:13 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJByW-0003Gu-FU for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:48:12 -0400 Date: Tue, 23 Jun 2009 12:48:10 -0700 From: Nathan Froyd Subject: Re: [Qemu-devel] [PATCH] target-ppc: fix evmergelo and evmergelohi Message-ID: <20090623194810.GL1119@codesourcery.com> References: <1244148401-12191-1-git-send-email-froydnj@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1244148401-12191-1-git-send-email-froydnj@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Jun 04, 2009 at 01:46:41PM -0700, Nathan Froyd wrote: > For 32-bit PPC targets, we translated: > > evmergelo rX, rX, rY > > as: > > rX-lo = rY-lo > rX-hi = rX-lo > > which is wrong, because we should be transferring rX-lo first. This > problem is fixed by swapping the order in which we write the parts of > rX. > > Similarly, we translated: > > evmergelohi rX, rX, rY > > as: > > rX-lo = rY-hi > rX-hi = rX-lo > > In this case, we can't swap the assignment statements, because that > would just cause problems for: > > evmergelohi rX, rY, rX > > Instead, we detect the first case and save rX-lo in a temporary > variable: > > tmp = rX-lo > rX-lo = rY-hi > rX-hi = tmp > > These problems don't occur on PPC64 targets because we don't split the > SPE registers into hi/lo parts for such targets. Ping. -Nathan