Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMhpY-0007IO-1y for qemu-devel@nongnu.org; Sat, 26 Jul 2008 07:20:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMhpX-0007IC-Ga for qemu-devel@nongnu.org; Sat, 26 Jul 2008 07:20:55 -0400 Received: from [199.232.76.173] (port=58173 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMhpX-0007I9-9h for qemu-devel@nongnu.org; Sat, 26 Jul 2008 07:20:55 -0400 Received: from savannah.gnu.org ([199.232.41.3]:44923 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KMhpX-0001MR-7I for qemu-devel@nongnu.org; Sat, 26 Jul 2008 07:20:55 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KMhpT-0006qO-M4 for qemu-devel@nongnu.org; Sat, 26 Jul 2008 11:20:51 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KMhpT-0006qK-36 for qemu-devel@nongnu.org; Sat, 26 Jul 2008 11:20:51 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Sat, 26 Jul 2008 11:20:51 +0000 Subject: [Qemu-devel] [4946] Fix and improve 64 bit immediate loading Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4946 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4946 Author: malc Date: 2008-07-26 11:20:50 +0000 (Sat, 26 Jul 2008) Log Message: ----------- Fix and improve 64 bit immediate loading Modified Paths: -------------- trunk/tcg/ppc64/tcg-target.c Modified: trunk/tcg/ppc64/tcg-target.c =================================================================== --- trunk/tcg/ppc64/tcg-target.c 2008-07-26 11:20:44 UTC (rev 4945) +++ trunk/tcg/ppc64/tcg-target.c 2008-07-26 11:20:50 UTC (rev 4946) @@ -448,15 +448,18 @@ } else { if ((uint64_t) arg >> 32) { + uint16_t h16 = arg >> 16; + uint16_t l16 = arg; + tcg_out_movi32 (s, ret, (arg >> 32) + (arg32 < 0)); tcg_out_rld (s, RLDICR, ret, ret, 32, 31); - if (arg32) { - tcg_out_movi32 (s, 0, arg32); - tcg_out32 (s, ADD | TAB (ret, ret, 0)); - } + if (h16) tcg_out32 (s, ORIS | RS (ret) | RA (ret) | h16); + if (l16) tcg_out32 (s, ORI | RS (ret) | RA (ret) | l16); } else { tcg_out_movi32 (s, ret, arg32); + if (arg32 < 0) + tcg_out_rld (s, RLDICL, ret, ret, 0, 32); } } }