qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@linux.ibm.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: "Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Greg Kurz" <groug@kaod.org>
Subject: Re: [PATCH] target/ppc: Remove support for the PowerPC 602 CPU
Date: Fri, 28 Jan 2022 11:29:53 -0300	[thread overview]
Message-ID: <874k5odjby.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220128131227.199226-1-clg@kaod.org>

Cédric Le Goater <clg@kaod.org> writes:

> The 602 was derived from the PowerPC 603, for the gaming market it
> seems. It was hardly used and no firmware supporting the CPU could be
> found. Drop support.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>  target/ppc/cpu-models.h      |   1 -
>  target/ppc/cpu.h             |   2 -
>  target/ppc/helper.h          |   1 -
>  target/ppc/cpu-models.c      |   2 -
>  target/ppc/cpu_init.c        | 145 -----------------------------------
>  target/ppc/excp_helper.c     |   1 -
>  target/ppc/int_helper.c      |  21 -----
>  target/ppc/mfrom_table_gen.c |  34 --------
>  target/ppc/translate.c       |  30 --------
>  target/ppc/mfrom_table.c.inc |  78 -------------------
>  10 files changed, 315 deletions(-)
>  delete mode 100644 target/ppc/mfrom_table_gen.c
>  delete mode 100644 target/ppc/mfrom_table.c.inc
>
> diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h
> index bf1dc7e5ca3d..612978a3fbd2 100644
> --- a/target/ppc/cpu-models.h
> +++ b/target/ppc/cpu-models.h
> @@ -208,7 +208,6 @@ enum {
>      CPU_POWERPC_601_v0             = 0x00010001,
>      CPU_POWERPC_601_v1             = 0x00010001,
>      CPU_POWERPC_601_v2             = 0x00010002,
> -    CPU_POWERPC_602                = 0x00050100,
>      CPU_POWERPC_603                = 0x00030100,
>      CPU_POWERPC_603E_v11           = 0x00060101,
>      CPU_POWERPC_603E_v12           = 0x00060102,
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index 66e13075c3df..b9119479958c 100644
> --- a/target/ppc/cpu.h
> +++ b/target/ppc/cpu.h

In cpu.h you could probably remove the MSR_AP and MSR_SA bit definitions
as well. And the code in ppc_cpu_reset that sets them.

> @@ -2142,8 +2142,6 @@ enum {
>      PPC_MFTB           = 0x0000000000000200ULL,
>  
>      /* Fixed-point unit extensions                                           */
> -    /*   PowerPC 602 specific                                                */
> -    PPC_602_SPEC       = 0x0000000000000400ULL,
>      /*   isel instruction                                                    */
>      PPC_ISEL           = 0x0000000000000800ULL,
>      /*   popcntb instruction                                                 */

...

> diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
> index 9bc327bcba5a..d7765fd3e3d8 100644
> --- a/target/ppc/int_helper.c
> +++ b/target/ppc/int_helper.c
> @@ -488,27 +488,6 @@ target_ulong helper_divso(CPUPPCState *env, target_ulong arg1,
>      }
>  }
>  
> -/*****************************************************************************/
> -/* 602 specific instructions */
> -/* mfrom is the most crazy instruction ever seen, imho ! */

How do you have the heart to remove the "most crazy instruction ever
seen"?

> -/* Real implementation uses a ROM table. Do the same */
> -/*
> - * Extremely decomposed:
> - *                      -arg / 256
> - * return 256 * log10(10           + 1.0) + 0.5
> - */
> -#if !defined(CONFIG_USER_ONLY)
> -target_ulong helper_602_mfrom(target_ulong arg)
> -{
> -    if (likely(arg < 602)) {
> -#include "mfrom_table.c.inc"
> -        return mfrom_ROM_table[arg];
> -    } else {
> -        return 0;
> -    }
> -}
> -#endif


  parent reply	other threads:[~2022-01-28 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 13:12 [PATCH] target/ppc: Remove support for the PowerPC 602 CPU Cédric Le Goater
2022-01-28 14:13 ` Víctor Colombo
2022-01-28 20:28   ` Cédric Le Goater
2022-01-28 14:29 ` Fabiano Rosas [this message]
2022-01-28 20:51   ` Cédric Le Goater

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=874k5odjby.fsf@linux.ibm.com \
    --to=farosas@linux.ibm.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).