Message ID | 20241212151412.570454-4-mark.cave-ayland@ilande.co.uk (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | target/ppc: implement legacy address-swizzling MSR_LE support | expand |
On 12/12/24 09:14, Mark Cave-Ayland wrote: > This function is intended to be used for all memory store operations. Convert the > GEN_QEMU_STORE_TL() macro to use it as a starting point. > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> > --- > target/ppc/translate.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/target/ppc/translate.c b/target/ppc/translate.c > index 5fb0aa36ce..bf94f3a5de 100644 > --- a/target/ppc/translate.c > +++ b/target/ppc/translate.c > @@ -2616,12 +2616,18 @@ GEN_QEMU_LOAD_64(ld64, DEF_MEMOP(MO_UQ)) > GEN_QEMU_LOAD_64(ld64ur, BSWAP_MEMOP(MO_UQ)) > #endif > > +static void gen_st_tl(DisasContext *ctx, TCGv val, TCGv addr, TCGArg idx, > + MemOp memop) > +{ > + tcg_gen_qemu_st_tl(val, addr, idx, memop); > +} > + > #define GEN_QEMU_STORE_TL(stop, op) \ > static void glue(gen_qemu_, stop)(DisasContext *ctx, \ > TCGv val, \ > TCGv addr) \ > { \ > - tcg_gen_qemu_st_tl(val, addr, ctx->mem_idx, op); \ > + gen_st_tl(ctx, val, addr, ctx->mem_idx, op); \ > } > > #if defined(TARGET_PPC64) || !defined(CONFIG_USER_ONLY) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 5fb0aa36ce..bf94f3a5de 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -2616,12 +2616,18 @@ GEN_QEMU_LOAD_64(ld64, DEF_MEMOP(MO_UQ)) GEN_QEMU_LOAD_64(ld64ur, BSWAP_MEMOP(MO_UQ)) #endif +static void gen_st_tl(DisasContext *ctx, TCGv val, TCGv addr, TCGArg idx, + MemOp memop) +{ + tcg_gen_qemu_st_tl(val, addr, idx, memop); +} + #define GEN_QEMU_STORE_TL(stop, op) \ static void glue(gen_qemu_, stop)(DisasContext *ctx, \ TCGv val, \ TCGv addr) \ { \ - tcg_gen_qemu_st_tl(val, addr, ctx->mem_idx, op); \ + gen_st_tl(ctx, val, addr, ctx->mem_idx, op); \ } #if defined(TARGET_PPC64) || !defined(CONFIG_USER_ONLY)
This function is intended to be used for all memory store operations. Convert the GEN_QEMU_STORE_TL() macro to use it as a starting point. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- target/ppc/translate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)