From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdRKV-0003Lt-7Q for qemu-devel@nongnu.org; Tue, 18 Aug 2009 12:14:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdRKQ-0003Jy-DY for qemu-devel@nongnu.org; Tue, 18 Aug 2009 12:14:34 -0400 Received: from [199.232.76.173] (port=42501 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdRKQ-0003Jq-28 for qemu-devel@nongnu.org; Tue, 18 Aug 2009 12:14:30 -0400 Received: from mail2.shareable.org ([80.68.89.115]:58262) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MdRKP-0004an-OG for qemu-devel@nongnu.org; Tue, 18 Aug 2009 12:14:29 -0400 Date: Tue, 18 Aug 2009 17:14:24 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Arm emulation tweak Message-ID: <20090818161424.GA1435@shareable.org> References: <4A8ACF77.3090801@bandsman.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8ACF77.3090801@bandsman.co.uk> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nigel Horne Cc: qemu-devel@nongnu.org Nigel Horne wrote: > This small patch reduces (on my machine) the call to new_tmp by 16 > bytes, which may not sound much, but it's called so often that it makes > a nice speed up of Arm emulation: > if (GET_TCGV_I32(temps[num_temps])) > return temps[num_temps++]; > > ! tmp = tcg_temp_new_i32(); > ! temps[num_temps++] = tmp; > ! return tmp; > } becomes > if (GET_TCGV_I32(temps[num_temps])) > return temps[num_temps++]; > > ! return temps[num_temps++] = tcg_temp_new_i32(); > } That's pretty tragic if GCC fails to compile them to identical code, assuming you had optimisation turned on. Have you tried building with -Os, -O2 etc. to see if that makes a difference? Which GCC version are you using? -- Jamie