diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-04-30 19:29:23 -0700 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-05-04 13:12:59 +1000 |
commit | 72369f5c959bfdade757d89248b260bc6c648130 (patch) | |
tree | 5ac0a803b9945203fcadbaac546eca1d1b674cef /target/ppc | |
parent | 61135639821566fe347332e8a01812df2fdd0237 (diff) | |
download | qemu-72369f5c959bfdade757d89248b260bc6c648130.zip qemu-72369f5c959bfdade757d89248b260bc6c648130.tar.gz qemu-72369f5c959bfdade757d89248b260bc6c648130.tar.bz2 |
target/ppc: Reduce the size of ppc_spr_t
We elide values when registering sprs, we might as well
save space in the array as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210501022923.1179736-3-richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc')
-rw-r--r-- | target/ppc/cpu.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 8a076fa..733a216 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -192,17 +192,21 @@ typedef struct ppc_hash_pte64 ppc_hash_pte64_t; /* SPR access micro-ops generations callbacks */ struct ppc_spr_t { + const char *name; + target_ulong default_value; +#ifndef CONFIG_USER_ONLY + unsigned int gdb_id; +#endif +#ifdef CONFIG_TCG void (*uea_read)(DisasContext *ctx, int gpr_num, int spr_num); void (*uea_write)(DisasContext *ctx, int spr_num, int gpr_num); -#if !defined(CONFIG_USER_ONLY) +# ifndef CONFIG_USER_ONLY void (*oea_read)(DisasContext *ctx, int gpr_num, int spr_num); void (*oea_write)(DisasContext *ctx, int spr_num, int gpr_num); void (*hea_read)(DisasContext *ctx, int gpr_num, int spr_num); void (*hea_write)(DisasContext *ctx, int spr_num, int gpr_num); - unsigned int gdb_id; +# endif #endif - const char *name; - target_ulong default_value; #ifdef CONFIG_KVM /* * We (ab)use the fact that all the SPRs will have ids for the |