qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierre Mallard <mallard.pierre@gmail.com>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: agraf@suze.de, tommusta@gmail.com,
	Pierre Mallard <mallard.pierre@gmail.com>
Subject: [Qemu-devel] [PATCH v2 2/2] target-ppc : Add new processor type 440x5wDFPU
Date: Fri, 12 Sep 2014 21:31:33 +0200	[thread overview]
Message-ID: <1410550293-3814-3-git-send-email-mallard.pierre@gmail.com> (raw)
In-Reply-To: <1410550293-3814-1-git-send-email-mallard.pierre@gmail.com>

This patch add a new processor type 440x5wDFPU for Virtex 5 PPC440
with an external APU FPU in double precision mode

Signed-off-by: Pierre Mallard <mallard.pierre@gmail.com>
---
 target-ppc/cpu-models.c     |    3 +++
 target-ppc/translate_init.c |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c
index 52ac6ec..3f18996 100644
--- a/target-ppc/cpu-models.c
+++ b/target-ppc/cpu-models.c
@@ -309,6 +309,9 @@
 #endif
     POWERPC_DEF("440-Xilinx",    CPU_POWERPC_440_XILINX,             440x5,
                 "PowerPC 440 Xilinx 5")
+
+    POWERPC_DEF("440-Xilinx-w-dfpu",    CPU_POWERPC_440_XILINX, 440x5wDFPU,
+                "PowerPC 440 Xilinx 5 With a Double Prec. FPU")
 #if defined(TODO)
     POWERPC_DEF("440A5",         CPU_POWERPC_440A5,                  440x5,
                 "PowerPC 440 A5")
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index ac4d12a..4baf1f3 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -3923,6 +3923,44 @@ POWERPC_FAMILY(440x5)(ObjectClass *oc, void *data)
                  POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK;
 }
 
+POWERPC_FAMILY(440x5wDFPU)(ObjectClass *oc, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(oc);
+    PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
+
+    dc->desc = "PowerPC 440x5 with double precision FPU";
+    pcc->init_proc = init_proc_440x5;
+    pcc->check_pow = check_pow_nocheck;
+    pcc->insns_flags = PPC_INSNS_BASE | PPC_STRING |
+                       PPC_FLOAT | PPC_FLOAT_FSQRT |
+                       PPC_FLOAT_STFIWX |
+                       PPC_DCR | PPC_WRTEE | PPC_RFMCI |
+                       PPC_CACHE | PPC_CACHE_ICBI |
+                       PPC_CACHE_DCBZ | PPC_CACHE_DCBA |
+                       PPC_MEM_TLBSYNC | PPC_MFTB |
+                       PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC |
+                       PPC_440_SPEC;
+    pcc->insns_flags2 = PPC2_FP_CVT_S64;
+    pcc->msr_mask = (1ull << MSR_POW) |
+                    (1ull << MSR_CE) |
+                    (1ull << MSR_EE) |
+                    (1ull << MSR_PR) |
+                    (1ull << MSR_FP) |
+                    (1ull << MSR_ME) |
+                    (1ull << MSR_FE0) |
+                    (1ull << MSR_DWE) |
+                    (1ull << MSR_DE) |
+                    (1ull << MSR_FE1) |
+                    (1ull << MSR_IR) |
+                    (1ull << MSR_DR);
+    pcc->mmu_model = POWERPC_MMU_BOOKE;
+    pcc->excp_model = POWERPC_EXCP_BOOKE;
+    pcc->bus_model = PPC_FLAGS_INPUT_BookE;
+    pcc->bfd_mach = bfd_mach_ppc_403;
+    pcc->flags = POWERPC_FLAG_CE | POWERPC_FLAG_DWE |
+                 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK;
+}
+
 static void init_proc_460 (CPUPPCState *env)
 {
     /* Time base */
-- 
1.7.10.4

  parent reply	other threads:[~2014-09-12 19:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1410325413>
2014-09-11 19:17 ` [Qemu-devel] [PATCH 0/2] Enabling floating point instruction to 440x5 CPUs Pierre Mallard
2014-09-11 19:17   ` [Qemu-devel] [PATCH 1/2] target-ppc : Allow fc[tf]id[*] mnemonics for non TARGET_PPC64 Pierre Mallard
2014-09-12 14:28     ` Tom Musta
2014-09-12 14:40       ` Tom Musta
2014-09-12 14:56         ` Alexander Graf
2014-09-11 19:17   ` [Qemu-devel] [PATCH 2/2] target-ppc : Add new processor type 440x5wDFPU Pierre Mallard
2014-09-12 14:41     ` Tom Musta
2014-09-12 14:29   ` [Qemu-devel] [PATCH 0/2] Enabling floating point instruction to 440x5 CPUs Tom Musta
2014-09-12 19:27     ` Pierre Mallard
2014-09-12 19:31 ` [Qemu-devel] [PATCH v2 " Pierre Mallard
2014-09-12 19:31   ` [Qemu-devel] [PATCH v2 1/2] target-ppc : Allow fc[tf]id[*] mnemonics for non TARGET_PPC64 Pierre Mallard
2014-09-12 19:31   ` Pierre Mallard [this message]
2014-09-12 19:46   ` [Qemu-devel] [Qemu-ppc] [PATCH v2 0/2] Enabling floating point instruction to 440x5 CPUs Alexander Graf

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=1410550293-3814-3-git-send-email-mallard.pierre@gmail.com \
    --to=mallard.pierre@gmail.com \
    --cc=agraf@suze.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=tommusta@gmail.com \
    /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).