Pack all of the non-pointer data into one 32-bit word. Use TCGReg. Signed-off-by: Richard Henderson <r...@twiddle.net> --- tcg/tcg.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h index b99302a..16048ca 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -216,14 +216,17 @@ typedef tcg_target_ulong TCGArg; TCG_MAX_HELPER_LABELS is defined as same as OPC_BUF_SIZE in exec-all.h. */ #define TCG_MAX_QEMU_LDST 640 +QEMU_BUILD_BUG_ON(TCG_TARGET_NB_REGS > 64); +QEMU_BUILD_BUG_ON(NB_MMU_MODES > 8); + typedef struct TCGLabelQemuLdst { - int is_ld:1; /* qemu_ld: 1, qemu_st: 0 */ - int opc:4; - int addrlo_reg; /* reg index for low word of guest virtual addr */ - int addrhi_reg; /* reg index for high word of guest virtual addr */ - int datalo_reg; /* reg index for low word to be loaded or stored */ - int datahi_reg; /* reg index for high word to be loaded or stored */ - int mem_index; /* soft MMU memory index */ + int is_ld : 1; /* qemu_ld: 1, qemu_st: 0 */ + int opc : 4; + unsigned mem_index : 3; /* asserted max idx < 8 */ + TCGReg addrlo_reg : 6; /* asserted max regno < 64 */ + TCGReg addrhi_reg : 6; + TCGReg datalo_reg : 6; + TCGReg datahi_reg : 6; uint8_t *raddr; /* gen code addr of the next IR of qemu_ld/st IR */ uint8_t *label_ptr[2]; /* label pointers to be updated */ } TCGLabelQemuLdst; -- 1.8.1.4