qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Arm emulation tweak
@ 2009-08-18 15:57 Nigel Horne
  2009-08-18 16:14 ` Jamie Lokier
  0 siblings, 1 reply; 5+ messages in thread
From: Nigel Horne @ 2009-08-18 15:57 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-19 10:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-18 15:57 [Qemu-devel] Arm emulation tweak Nigel Horne
2009-08-18 16:14 ` Jamie Lokier
2009-08-19  9:46   ` Filip Navara
2009-08-19 10:12     ` Nigel Horne
2009-08-19 10:38       ` Filip Navara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).