summary refs log tree commit diff stats
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@amazon.com>2013-12-10 16:14:36 -0800
committerAnthony Liguori <aliguori@amazon.com>2013-12-10 16:14:36 -0800
commit6747f6456fd1e5e986b6385ff5d706c79ebd8a32 (patch)
tree8df855fc003ba01fad22ea0c13f694171aaefd7c /tcg/tcg.h
parentb9aad5d68d0fa636d1a1edbbeffa0d7a80370711 (diff)
parent0ec9eabc7f6020418e1f3b3273d1dd701f7f87f9 (diff)
downloadfocaccia-qemu-6747f6456fd1e5e986b6385ff5d706c79ebd8a32.tar.gz
focaccia-qemu-6747f6456fd1e5e986b6385ff5d706c79ebd8a32.zip
Merge remote-tracking branch 'rth/tcg-temp-order' into staging
# By Richard Henderson
# Via Richard Henderson
* rth/tcg-temp-order:
  tcg: Use bitmaps for free temporaries

Message-id: 1386698065-6661-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 0d9bd293b5..c72af6cfb7 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -26,7 +26,7 @@
 #define TCG_H
 
 #include "qemu-common.h"
-
+#include "qemu/bitops.h"
 #include "tcg-target.h"
 
 /* Default target word size to pointer size.  */
@@ -436,13 +436,15 @@ typedef struct TCGTemp {
                                   basic blocks. Otherwise, it is not
                                   preserved across basic blocks. */
     unsigned int temp_allocated:1; /* never used for code gen */
-    /* index of next free temp of same base type, -1 if end */
-    int next_free_temp;
     const char *name;
 } TCGTemp;
 
 typedef struct TCGContext TCGContext;
 
+typedef struct TCGTempSet {
+    unsigned long l[BITS_TO_LONGS(TCG_MAX_TEMPS)];
+} TCGTempSet;
+
 struct TCGContext {
     uint8_t *pool_cur, *pool_end;
     TCGPool *pool_first, *pool_current, *pool_first_large;
@@ -450,8 +452,6 @@ struct TCGContext {
     int nb_labels;
     int nb_globals;
     int nb_temps;
-    /* index of free temps, -1 if none */
-    int first_free_temp[TCG_TYPE_COUNT * 2]; 
 
     /* goto_tb support */
     uint8_t *code_buf;
@@ -477,6 +477,7 @@ struct TCGContext {
 
     uint8_t *code_ptr;
     TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */
+    TCGTempSet free_temps[TCG_TYPE_COUNT * 2];
 
     GHashTable *helpers;