From 96f21d28bc9dc7404b664a890da299fdaaf86667 Mon Sep 17 00:00:00 2001
From: Alex Rozenman <rozenman@gmail.com>
Date: Thu, 27 Jan 2011 13:06:32 +0200
Subject: [PATCH] Added ppc440x6 and ppc440x6f cores.
---
target-ppc/translate_init.c | 42 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 2 deletions(-)
@@ -1403,7 +1403,7 @@ static void gen_spr_BookE (CPUPPCState *env, uint64_t ivor_mask)
/* XXX : not implemented */
spr_register(env, SPR_BOOKE_DBCR0, "DBCR0",
SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_generic,
+ &spr_read_generic, &spr_write_40x_dbcr0,
0x00000000);
/* XXX : not implemented */
spr_register(env, SPR_BOOKE_DBCR1, "DBCR1",
@@ -1464,7 +1464,7 @@ static void gen_spr_BookE (CPUPPCState *env, uint64_t ivor_mask)
0x00000000);
spr_register(env, SPR_BOOKE_DECAR, "DECAR",
SPR_NOACCESS, SPR_NOACCESS,
- SPR_NOACCESS, &spr_write_generic,
+ SPR_NOACCESS, &spr_write_40x_pit,
0x00000000);
/* SPRGs */
spr_register(env, SPR_USPRG0, "USPRG0",
@@ -3658,6 +3658,39 @@ static void init_proc_440x5 (CPUPPCState *env)
ppc40x_irq_init(env);
}
+/* PowerPC 440x6 */
+#define POWERPC_INSNS_440x6 (POWERPC_INSNS_440x5 | PPC_DCRX | PPC_DCRUX)
+#define POWERPC_MSRM_440x6 (POWERPC_MSRM_440x5)
+#define POWERPC_MMU_440x6 (POWERPC_MMU_440x5)
+#define POWERPC_EXCP_440x6 (POWERPC_EXCP_440x5)
+#define POWERPC_INPUT_440x6 (POWERPC_INPUT_440x5)
+#define POWERPC_BFDM_440x6 (POWERPC_BFDM_440x5)
+#define POWERPC_FLAG_440x6 (POWERPC_FLAG_440x5)
+#define check_pow_440x6 check_pow_440x5
+
+static void init_proc_440x6 (CPUPPCState *env)
+{
+ init_proc_440x5 (env);
+}
+
+/* PowerPC 440x6f */
+#define POWERPC_INSNS_440x6f (POWERPC_INSNS_440x6 | PPC_FLOAT | \
+ PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \
+ PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
+ PPC_FLOAT_STFIWX)
+#define POWERPC_MSRM_440x6f (POWERPC_MSRM_440x6)
+#define POWERPC_MMU_440x6f (POWERPC_MMU_440x6)
+#define POWERPC_EXCP_440x6f (POWERPC_EXCP_440x6)
+#define POWERPC_INPUT_440x6f (POWERPC_INPUT_440x6)
+#define POWERPC_BFDM_440x6f (POWERPC_BFDM_440x6)
+#define POWERPC_FLAG_440x6f (POWERPC_FLAG_440x6)
+#define check_pow_440x6f check_pow_440x6
+
+static void init_proc_440x6f (CPUPPCState *env)
+{
+ init_proc_440x6 (env);
+}
+
/* PowerPC 460 (guessed) */
#define POWERPC_INSNS_460 (PPC_INSNS_BASE | PPC_STRING | \
PPC_DCR | PPC_DCRX | PPC_DCRUX | \
@@ -6536,6 +6569,8 @@ enum {
CPU_POWERPC_440A4 = xxx,
#endif
CPU_POWERPC_440_XILINX = 0x7ff21910,
+ CPU_POWERPC_440x6 = 0x7ff21910,
+ CPU_POWERPC_440x6f = 0x7ff21910,
#if 0
CPU_POWERPC_440A5 = xxx,
#endif
@@ -7466,6 +7501,9 @@ static const ppc_def_t ppc_defs[] = {
#endif
/* PowerPC 440 Xilinx 5 */
POWERPC_DEF("440-Xilinx", CPU_POWERPC_440_XILINX, 440x5),
+ /* PowerPC 440x6 */
+ POWERPC_DEF("440x6", CPU_POWERPC_440x6, 440x6),
+ POWERPC_DEF("440x6f", CPU_POWERPC_440x6f, 440x6f),
#if defined (TODO)
/* PowerPC 440 A5 */
POWERPC_DEF("440A5", CPU_POWERPC_440A5, 440x5),
--
1.7.0.4