From: David Gibson <david@gibson.dropbear.id.au>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-ppc@nongnu.org, luis.pires@eldorado.org.br,
matheus.ferst@eldorado.org.br, qemu-devel@nongnu.org,
bruno.larsen@eldorado.org.br
Subject: Re: [PATCH 2/2] target/ppc: Reduce the size of ppc_spr_t
Date: Mon, 3 May 2021 13:48:37 +1000 [thread overview]
Message-ID: <YI9ylakaG9PDPlav@yekko> (raw)
In-Reply-To: <20210501022923.1179736-3-richard.henderson@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]
On Fri, Apr 30, 2021 at 07:29:23PM -0700, Richard Henderson wrote:
> 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>
Applied to ppc-for-6.1, thanks.
> ---
> target/ppc/cpu.h | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index e73416da68..b704261b49 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
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-05-03 4:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-01 2:29 [PATCH 0/2] target/ppc: Clean up _spr_register Richard Henderson
2021-05-01 2:29 ` [PATCH 1/2] target/ppc: Clean up _spr_register et al Richard Henderson
2021-05-03 3:47 ` David Gibson
2021-05-01 2:29 ` [PATCH 2/2] target/ppc: Reduce the size of ppc_spr_t Richard Henderson
2021-05-03 3:48 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YI9ylakaG9PDPlav@yekko \
--to=david@gibson.dropbear.id.au \
--cc=bruno.larsen@eldorado.org.br \
--cc=luis.pires@eldorado.org.br \
--cc=matheus.ferst@eldorado.org.br \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).