From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdR4I-0004fh-SQ for qemu-devel@nongnu.org; Tue, 18 Aug 2009 11:57:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdR4D-0004db-On for qemu-devel@nongnu.org; Tue, 18 Aug 2009 11:57:50 -0400 Received: from [199.232.76.173] (port=45507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdR4D-0004dU-Jg for qemu-devel@nongnu.org; Tue, 18 Aug 2009 11:57:45 -0400 Received: from relay.ptn-ipout02.plus.net ([212.159.7.36]:64745) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MdR4C-0001oH-V0 for qemu-devel@nongnu.org; Tue, 18 Aug 2009 11:57:45 -0400 Received: from [212.159.106.41] (helo=bandsman.co.uk) by ptb-relay03.plus.net with esmtp (Exim) id 1MdR48-0004D8-3F for qemu-devel@nongnu.org; Tue, 18 Aug 2009 16:57:40 +0100 Received: from [192.168.1.15] (packard.local [192.168.1.15]) (authenticated bits=0) by bandsman.co.uk (8.14.3/8.14.3/Debian-9) with ESMTP id n7IFvden028697 for ; Tue, 18 Aug 2009 16:57:39 +0100 Message-ID: <4A8ACF77.3090801@bandsman.co.uk> Date: Tue, 18 Aug 2009 16:57:43 +0100 From: Nigel Horne MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Arm emulation tweak List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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: *** Otranslate.c 2009-08-18 16:52:42.000000000 +0100 --- translate.c 2009-08-18 16:53:17.000000000 +0100 *************** *** 105,120 **** /* Allocate a temporary variable. */ static TCGv_i32 new_tmp(void) { - TCGv tmp; if (num_temps == MAX_TEMPS) abort(); if (GET_TCGV_I32(temps[num_temps])) return temps[num_temps++]; ! tmp = tcg_temp_new_i32(); ! temps[num_temps++] = tmp; ! return tmp; } /* Release a temporary variable. */ --- 105,117 ---- /* Allocate a temporary variable. */ static TCGv_i32 new_tmp(void) { if (num_temps == MAX_TEMPS) abort(); if (GET_TCGV_I32(temps[num_temps])) return temps[num_temps++]; ! return temps[num_temps++] = tcg_temp_new_i32(); } /* Release a temporary variable. */ -- Nigel Horne. Arranger, Adjudicator, Band Trainer, Composer, Tutor, Typesetter. NJH Music, ICQ#20252325 njh@bandsman.co.uk http://www.bandsman.co.uk