summaryrefslogtreecommitdiffstats
path: root/target-ppc/cpu.h
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-24 06:50:21 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-24 06:50:21 +0000
commit35cdaad645d7a97e67690582feb1fc3a050c92ad (patch)
tree9a628a9108b9be0e9ea3a56f8b4b85b9bfcbceb1 /target-ppc/cpu.h
parentc294fc587a52f4991b1dcbb328b5a9d09f8c8e2e (diff)
downloadhqemu-35cdaad645d7a97e67690582feb1fc3a050c92ad.zip
hqemu-35cdaad645d7a97e67690582feb1fc3a050c92ad.tar.gz
Code provision for new PowerPC embedded target support with:
- 1 kB page size - 64 bits GPR - 64 bits physical address space - SPE extension support. Change TARGET_PPCSPE into TARGET_PPCEMB git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2718 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/cpu.h')
-rw-r--r--target-ppc/cpu.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 4a241f1..a25d30a 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -23,11 +23,13 @@
#include "config.h"
#include <inttypes.h>
+#if !defined(TARGET_PPCEMB)
#if defined(TARGET_PPC64) || (HOST_LONG_BITS >= 64)
/* When using 64 bits temporary registers,
* we can use 64 bits GPR with no extra cost
*/
-#define TARGET_PPCSPE
+#define TARGET_PPCEMB
+#endif
#endif
#if defined (TARGET_PPC64)
@@ -35,7 +37,8 @@ typedef uint64_t ppc_gpr_t;
#define TARGET_LONG_BITS 64
#define TARGET_GPR_BITS 64
#define REGX "%016" PRIx64
-#elif defined(TARGET_PPCSPE)
+#define TARGET_PAGE_BITS 12
+#elif defined(TARGET_PPCEMB)
/* e500v2 have 36 bits physical address space */
#define TARGET_PHYS_ADDR_BITS 64
/* GPR are 64 bits: used by vector extension */
@@ -43,11 +46,14 @@ typedef uint64_t ppc_gpr_t;
#define TARGET_LONG_BITS 32
#define TARGET_GPR_BITS 64
#define REGX "%016" PRIx64
+/* Pages can be 1 kB small */
+#define TARGET_PAGE_BITS 10
#else
typedef uint32_t ppc_gpr_t;
#define TARGET_LONG_BITS 32
#define TARGET_GPR_BITS 32
#define REGX "%08" PRIx32
+#define TARGET_PAGE_BITS 12
#endif
#include "cpu-defs.h"
@@ -893,7 +899,6 @@ int ppcemb_tlb_search (CPUPPCState *env, target_ulong address);
int ppc_dcr_read (ppc_dcr_t *dcr_env, int dcrn, target_ulong *valp);
int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, target_ulong val);
-#define TARGET_PAGE_BITS 12
#include "cpu-all.h"
/*****************************************************************************/
OpenPOWER on IntegriCloud