From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Subject: Re: [RFC 2/3] target/ppc: Add IBM PPE42 special instructions
Date: Sat, 16 Aug 2025 00:30:54 +1000 [thread overview]
Message-ID: <04500975-6a94-4bf9-b362-a0f310060dbc@linaro.org> (raw)
In-Reply-To: <20250814223741.29433-3-milesg@linux.ibm.com>
On 8/15/25 08:37, Glenn Miles wrote:
> Adds the following instructions exclusively for
> IBM PPE42 processors:
>
> LSKU
> LCXU
> STSKU
> STCXU
> LVD
> LVDU
> LVDX
> STVD
> STVDU
> STVDX
> SLVD
> SRVD
> CMPWBC
> CMPLWBC
> CMPWIBC
> BNBWI
> BNBW
> CLRBWIBC
> CLRWBC
> DCBQ
> RLDICL
> RLDICR
> RLDIMI
>
> A PPE42 GCC compiler is available here:
> https://github.com/open-power/ppe42-gcc
>
> For more information on the PPE42 processors please visit:
> https://wiki.raptorcs.com/w/images/a/a3/PPE_42X_Core_Users_Manual.pdf
>
> Signed-off-by: Glenn Miles <milesg@linux.ibm.com>
> ---
> target/ppc/helper_regs.c | 15 +-
> target/ppc/insn32.decode | 66 ++-
> target/ppc/translate.c | 29 +-
> target/ppc/translate/ppe-impl.c.inc | 805 ++++++++++++++++++++++++++++
> 4 files changed, 898 insertions(+), 17 deletions(-)
> create mode 100644 target/ppc/translate/ppe-impl.c.inc
Oof. This is really too much at once -- the patch ought to be split.
> diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode
> index e53fd2840d..8beb588a2a 100644
> --- a/target/ppc/insn32.decode
> +++ b/target/ppc/insn32.decode
> @@ -58,6 +58,10 @@
> %ds_rtp 22:4 !function=times_2
> @DS_rtp ...... ....0 ra:5 .............. .. &D rt=%ds_rtp si=%ds_si
>
> +%dd_si 3:s13
Note that the format describes this as shifted left by 3. I see you multiply by 8 in
trans_LSKU, but it's generally easier to have the immediates match the format description.
> +&DD rt ra si:int64_t
Why are you forcing si to int64_t? It's a 16-bit signed immediate.
> +static bool trans_LCXU(DisasContext *ctx, arg_LCXU *a)
> +{
> +#if defined(TARGET_PPC64)
> + return false;
> +#else
> + int i;
> + TCGv base, EA;
> + TCGv lo, hi;
> + TCGv_i64 t8;
> + const uint8_t vd_list[] = {9, 7, 5, 3, 0};
We're trying to move away from having separate binaries for different cpu models. While
target/ppc/ needs quite a bit of work for that to be a reality, let's try to avoid adding
more code that needs cleaning up.
> +
> + if (unlikely(!is_ppe(ctx))) {
> + return false;
> + }
This test should be sufficient to disable the insn for ppc64, without the ifdef.
r~
next prev parent reply other threads:[~2025-08-15 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 22:37 [RFC 0/3] Add IBM PPE42 support Glenn Miles
2025-08-14 22:37 ` [RFC 1/3] target/ppc: Add IBM PPE42 family of processors Glenn Miles
2025-08-14 22:37 ` [RFC 2/3] target/ppc: Add IBM PPE42 special instructions Glenn Miles
2025-08-14 23:12 ` Cédric Le Goater
2025-08-15 14:30 ` Richard Henderson [this message]
2025-08-14 22:37 ` [RFC 3/3] hw/ppc: Add a test machine for the IBM PPE42 CPU Glenn Miles
2025-08-18 7:48 ` [RFC 0/3] Add IBM PPE42 support Thomas Huth
2025-08-18 15:02 ` Miles Glenn
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=04500975-6a94-4bf9-b362-a0f310060dbc@linaro.org \
--to=richard.henderson@linaro.org \
--cc=qemu-devel@nongnu.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).