Skip to contentSkip to conversation

tcg: Remove temp_buf

PATCH In review Richard Henderson 3 participants 5 messages Apr 19, 2013 – Apr 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg: Remove temp_buf

All targets have been converted to allocating space for temporaries on the stack. No need to allocate space within the CPU_COMMON block.

---
This depends on my tcg-arm patch set that's still outstanding.

r~

---
 include/exec/cpu-defs.h | 2 --
 1 file changed, 2 deletions(-)
include/exec/cpu-defs.h +0 -2
index d8c64e9..41f5b32 100644
@@ -152,8 +152,6 @@ typedef struct CPUWatchpoint {
                                      memory was accessed */             \
     CPU_COMMON_TLB                                                      \
     struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];           \
-    /* buffer for temporaries in the code generator */                  \
-    long temp_buf[CPU_TEMP_BUF_NLONGS];                                 \
                                                                         \
     int64_t icount_extra; /* Instructions until next timer event.  */   \
     /* Number of cycles left, with interrupt flag in high bit.          \
Signature · 1 line
1.8.1.4
#1 lore raw

Hi,

Am 19.04.2013 10:27, schrieb Richard Henderson:

Quoted 6 lines

All targets have been converted to allocating space for temporaries on the stack. No need to allocate space within the CPU_COMMON block.

---
This depends on my tcg-arm patch set that's still outstanding.

My tree still has exactly one user in tcg/arm/, so once that disappears feel free to add my Reviewed-by. Thanks for helping clean this up!

One question...

Quoted 12 lines

r~

---
 include/exec/cpu-defs.h | 2 --
 1 file changed, 2 deletions(-)
include/exec/cpu-defs.h +0 -0
index d8c64e9..41f5b32 100644

include/exec/cpu-defs.h typedef struct CPUWatchpoint { · line 156

Quoted 5 lines
include/exec/cpu-defs.h +0 -2
@@ -152,8 +152,6 @@ typedef struct CPUWatchpoint {
                                      memory was accessed */             \
     CPU_COMMON_TLB                                                      \
     struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];           \
-    /* buffer for temporaries in the code generator */                  \
-    long temp_buf[CPU_TEMP_BUF_NLONGS];                                 \

Could CPU_TEMP_BUF_NLONGS be removed, too?

Andreas

Quoted 4 lines
include/exec/cpu-defs.h +0 -0
                                                                         \
     int64_t icount_extra; /* Instructions until next timer event.  */   \
     /* Number of cycles left, with interrupt flag in high bit.          \
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#2 lore raw

Am 19.04.2013 14:11, schrieb Andreas Färber:

Quoted 22 lines

Hi,

Am 19.04.2013 10:27, schrieb Richard Henderson:

Quoted 6 lines

All targets have been converted to allocating space for temporaries on the stack. No need to allocate space within the CPU_COMMON block.

---
This depends on my tcg-arm patch set that's still outstanding.

My tree still has exactly one user in tcg/arm/, so once that disappears feel free to add my Reviewed-by. Thanks for helping clean this up!

One question...

Quoted 7 lines

r~

---
 include/exec/cpu-defs.h | 2 --
 1 file changed, 2 deletions(-)
Quoted 12 lines

include/exec/cpu-defs.h typedef struct CPUWatchpoint { · line 156

Quoted 10 lines
include/exec/cpu-defs.h +0 -2
index d8c64e9..41f5b32 100644
@@ -152,8 +152,6 @@ typedef struct CPUWatchpoint {
                                      memory was accessed */             \
     CPU_COMMON_TLB                                                      \
     struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];           \
-    /* buffer for temporaries in the code generator */                  \
-    long temp_buf[CPU_TEMP_BUF_NLONGS];                                 \

Could CPU_TEMP_BUF_NLONGS be removed, too?

More precisely, seeing that all targets actually still use it despite in most cases not actually accessing temp_buf, can you rename it to TCG_TEMP_STACK_NLONGS and move it to some TCG header as a follow-up please?

Andreas

Quoted 4 lines
Quoted 4 lines
include/exec/cpu-defs.h +0 -0
                                                                         \
     int64_t icount_extra; /* Instructions until next timer event.  */   \
     /* Number of cycles left, with interrupt flag in high bit.          \
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#3 lore raw
Quoted 36 lines · Andreas Färber

Am 19.04.2013 14:11, schrieb Andreas Färber:

Quoted 22 lines

Hi,

Am 19.04.2013 10:27, schrieb Richard Henderson:

Quoted 6 lines

All targets have been converted to allocating space for temporaries on the stack. No need to allocate space within the CPU_COMMON block.

---
This depends on my tcg-arm patch set that's still outstanding.

My tree still has exactly one user in tcg/arm/, so once that disappears feel free to add my Reviewed-by. Thanks for helping clean this up!

One question...

Quoted 7 lines

r~

---
 include/exec/cpu-defs.h | 2 --
 1 file changed, 2 deletions(-)
Quoted 12 lines

include/exec/cpu-defs.h typedef struct CPUWatchpoint { · line 156

Quoted 10 lines
include/exec/cpu-defs.h +0 -2
index d8c64e9..41f5b32 100644
@@ -152,8 +152,6 @@ typedef struct CPUWatchpoint {
                                      memory was accessed */             \
     CPU_COMMON_TLB                                                      \
     struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];           \
-    /* buffer for temporaries in the code generator */                  \
-    long temp_buf[CPU_TEMP_BUF_NLONGS];                                 \

Could CPU_TEMP_BUF_NLONGS be removed, too?

Quoted 3 lines

More precisely, seeing that all targets actually still use it despite in most cases not actually accessing temp_buf, can you rename it to TCG_TEMP_STACK_NLONGS and move it to some TCG header as a follow-up please?

Much like this patch?

http://lists.nongnu.org/archive/html/qemu-devel/2011-05/msg03086.html

Quoted 12 lines

Andreas

Quoted 4 lines

include/exec/cpu-defs.h typedef struct CPUWatchpoint { · line 157

Quoted 4 lines
include/exec/cpu-defs.h +0 -0
                                                                         \
     int64_t icount_extra; /* Instructions until next timer event.  */   \
     /* Number of cycles left, with interrupt flag in high bit.          \

--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

#4 lore raw
Quoted 33 lines · Blue Swirl
Quoted 32 lines · Andreas Färber

Am 19.04.2013 14:11, schrieb Andreas Färber:

Quoted 31 lines

Hi,

Am 19.04.2013 10:27, schrieb Richard Henderson:

Quoted 6 lines

All targets have been converted to allocating space for temporaries on the stack. No need to allocate space within the CPU_COMMON block.

---
This depends on my tcg-arm patch set that's still outstanding.

My tree still has exactly one user in tcg/arm/, so once that disappears feel free to add my Reviewed-by. Thanks for helping clean this up!

One question...

Quoted 11 lines

r~

---
  include/exec/cpu-defs.h | 2 --
  1 file changed, 2 deletions(-)
include/exec/cpu-defs.h +0 -0
index d8c64e9..41f5b32 100644

include/exec/cpu-defs.h typedef struct CPUWatchpoint { · line 156

Quoted 5 lines
include/exec/cpu-defs.h +0 -2
@@ -152,8 +152,6 @@ typedef struct CPUWatchpoint {
                                       memory was accessed */             \
      CPU_COMMON_TLB                                                      \
      struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];           \
-    /* buffer for temporaries in the code generator */                  \
-    long temp_buf[CPU_TEMP_BUF_NLONGS];                                 \

Could CPU_TEMP_BUF_NLONGS be removed, too?

Quoted 7 lines
Quoted 3 lines

More precisely, seeing that all targets actually still use it despite in most cases not actually accessing temp_buf, can you rename it to TCG_TEMP_STACK_NLONGS and move it to some TCG header as a follow-up please?

Much like this patch?

http://lists.nongnu.org/archive/html/qemu-devel/2011-05/msg03086.html

Yes, that would be the one...

r~