[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 2/4] target/ppc: isolated SPR read/write callbacks
From: |
David Gibson |
Subject: |
Re: [RFC PATCH 2/4] target/ppc: isolated SPR read/write callbacks |
Date: |
Tue, 27 Apr 2021 13:28:56 +1000 |
On Fri, Apr 23, 2021 at 04:18:05PM -0300, Bruno Larsen (billionai) wrote:
> Moved all functions related to SPR read/write callbacks into a new file
> specific for holding these. This is setting up a better separation of
> SPR registration, which is required to be able to build disabling
> TCG.
>
> The solution to move it to spr_tcg.c.inc and including it in translate.c
> is a work in progress, any better solutions are very much appreciated.
> Also, making the R/W functions not static is required for the next
> commit.
[snip]
> diff --git a/target/ppc/spr_tcg.h b/target/ppc/spr_tcg.h
> new file mode 100644
> index 0000000000..1e09d001a9
> --- /dev/null
> +++ b/target/ppc/spr_tcg.h
> @@ -0,0 +1,132 @@
> +#ifndef SPR_TCG_H
> +#define SPR_TCG_H
> +
> +#include "qemu/osdep.h"
> +#include "cpu.h"
> +#include "exec/translator.h"
> +#include "tcg/tcg.h"
> +
> +/* prototypes for readers and writers for SPRs */
The 2 fscr functions below aren't readers and writers for the FSCR.
Instead they're used by instructions related to facilities the FSCR
can enable and disable - this generates the code to check the FSCR and
generate an exception if the units are disabled.
That doesn't mean they don't belong here, but it does mean
> +
> +#ifdef TARGET_PPC64
> +void gen_fscr_facility_check(DisasContext *ctx, int facility_sprn,
> + int bit, int sprn, int cause);
> +void gen_msr_facility_check(DisasContext *ctx, int facility_sprn,
> + int bit, int sprn, int cause);
> +#endif
--
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
signature.asc
Description: PGP signature
- [RFC PATCH 0/4] target/ppc: code motion to compile translate_init, Bruno Larsen (billionai), 2021/04/23
- [RFC PATCH 2/4] target/ppc: isolated SPR read/write callbacks, Bruno Larsen (billionai), 2021/04/23
- [RFC PATCH 3/4] target/ppc: Move SPR generation to separate file, Bruno Larsen (billionai), 2021/04/23
- [RFC PATCH 4/4] target/ppc: isolated cpu init from translation logic, Bruno Larsen (billionai), 2021/04/23
- Re: [RFC PATCH 0/4] target/ppc: code motion to compile translate_init, Richard Henderson, 2021/04/23