Skip to contentSkip to conversation

tcg: Compress TCGLabelQemuLdst

GIT PULL Richard Henderson 2 participants 2 messages Sep 23, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Ug. Failure to operate the mail program on my phone properly; the following went to Paolo only instead of the list too.

r~

-------- Forwarded Message --------
Subject: Re: [PULL 07/11] tcg: Compress TCGLabelQemuLdst
Date: Mon, 22 Sep 2014 16:10:40 -0700
From: Richard Henderson <[email protected]>
To: Paolo Bonzini <[email protected]>

We probably average less than 10 memory operations per TB, but we reserve space for 640 of them.

Probably what ought to be fixed is tcg's entire notion of preallocated arrays. Obstacks, or similar pooled memory, may well work much better.

I can certainly drop this patch, but Claudio was the only one to comment when it was posted three weeks ago.

r~

Paolo Bonzini <[email protected]> wrote:

Il 22/09/2014 22:57, Richard Henderson ha scritto:

Quoted 9 lines
(quoted diff) +3 -5
+QEMU_BUILD_BUG_ON(TCG_TARGET_NB_REGS > 32);
+QEMU_BUILD_BUG_ON(NB_MMU_MODES > 8);
+
 typedef struct TCGLabelQemuLdst {
-    bool is_ld:1;           /* qemu_ld: true, qemu_st: false */
-    TCGMemOp opc:4;
-    TCGReg addrlo_reg;      /* reg index for low word of guest virtual addr */
-    TCGReg addrhi_reg;      /* reg index for high word of guest virtual addr */
-    TCGReg datalo_reg;      /* reg index for low word to be loaded or stored */

Review

Quoted 10 lines
(quoted diff) +8 -2
-    TCGReg datahi_reg;      /* reg index for high word to be loaded or stored */
-    int mem_index;          /* soft MMU memory index */
+    TCGMemOp opc : 4;
+    bool is_ld : 1;         /* qemu_ld: true, qemu_st: false */
+    TCGReg addrlo_reg : 5;  /* reg index for low word of guest virtual addr */
+    TCGReg addrhi_reg : 5;  /* reg index for high word of guest virtual addr */
+    TCGReg datalo_reg : 5;  /* reg index for low word to be loaded or stored */
+    TCGReg datahi_reg : 5;  /* reg index for high word to be loaded or stored */
+    unsigned mem_index : 3; /* soft MMU memory index */
+    /* 4 bits unused in 32-bit word */

Why? Are there more than 10 or so loads in the typical tb?

Paolo

#2 lore raw

Il 23/09/2014 20:17, Richard Henderson ha scritto:

Quoted 2 lines

Ug. Failure to operate the mail program on my phone properly; the following went to Paolo only instead of the list too.

And my reply too, which was basically "np, just asking".

Paolo

Quoted 19 lines

-------- Forwarded Message --------
Subject: Re: [PULL 07/11] tcg: Compress TCGLabelQemuLdst
Date: Mon, 22 Sep 2014 16:10:40 -0700
From: Richard Henderson <[email protected]>
To: Paolo Bonzini <[email protected]>

We probably average less than 10 memory operations per TB, but we reserve space for 640 of them.

Probably what ought to be fixed is tcg's entire notion of preallocated arrays. Obstacks, or similar pooled memory, may well work much better.

I can certainly drop this patch, but Claudio was the only one to comment when it was posted three weeks ago.

r~