Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KakUw-0007w6-5H for qemu-devel@nongnu.org; Wed, 03 Sep 2008 01:01:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KakUu-0007vW-CM for qemu-devel@nongnu.org; Wed, 03 Sep 2008 01:01:41 -0400 Received: from [199.232.76.173] (port=41632 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KakUu-0007vS-84 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 01:01:40 -0400 Received: from hall.aurel32.net ([91.121.138.14]:52413) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KakUt-0003kn-Ok for qemu-devel@nongnu.org; Wed, 03 Sep 2008 01:01:39 -0400 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KakUr-0007JZ-TF for qemu-devel@nongnu.org; Wed, 03 Sep 2008 07:01:38 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1KakUq-0007E4-Kq for qemu-devel@nongnu.org; Wed, 03 Sep 2008 07:01:36 +0200 Date: Wed, 3 Sep 2008 07:01:36 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] TCG: 64-bit temporaries on 32-bit target? Message-ID: <20080903050136.GW4681@volta.aurel32.net> References: <3C0132E5-E97D-43FA-9E97-47B8BE82E5BB@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3C0132E5-E97D-43FA-9E97-47B8BE82E5BB@web.de> 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 On Wed, Sep 03, 2008 at 02:00:38AM +0200, Andreas Färber wrote: > Hello, > > On PowerPC there appear to be some "SPE" instructions that operate on > 64-bit registers while the rest of the target is 32-bit. In dyngen code, > they can easily use T0_64 then. > > In TCG however, cpu_T[0] is tl==i32 for ppc, only for ppc64 would > cpu_T[0] work due to tl==i64. At the same time I was told I can't use > tcg_gen_movi_i32 for tl cpu_T[n], so it seems we can't just > unconditionally use i64 for cpu_T[0..2] either? That solution would be a performance regression anyway. > This issue prevents dyngen op_load_gpr_{T0,T1} from being removed > because ppc64 gen_op_load_gpr64_{T0,T1} reuses them. > The same solution than dyngen should work, that is defining cpu_T64[0] and cpu_T64[1], either as i64 on the 32-bit target, or are an alias (#define) of cpu_T[0] and cpu_T[1] on the 64-bit target. Then you can use _i64 TCG instructions. Always defining cpu_T64[0] and cpu_T64_[1] as i64 and independantly than cpu_T[0] and cpu_T[1] should also work, as anyway those variables should disappear when optimising the TCG code. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net