2007-11-13 Till Straumann <strauman@slac.stanford.edu>

* rtems/score/powerpc.h: Added a '__ppc_generic' CPU variant.
	The goal would be making cpukit and hopefully libcpu work
	for all (or at least most) CPUs/BSPs with -D__ppc_generic so
	that eventually all tests [#if defined(<cpu_flavor>)] for CPU
	flavors can be eliminated.
This commit is contained in:
Till Straumann
2007-11-14 05:19:59 +00:00
parent 6ae32a269e
commit 61c98010e6
2 changed files with 25 additions and 3 deletions

View File

@@ -1,3 +1,11 @@
2007-11-13 Till Straumann <strauman@slac.stanford.edu>
* rtems/score/powerpc.h: Added a '__ppc_generic' CPU variant.
The goal would be making cpukit and hopefully libcpu work
for all (or at least most) CPUs/BSPs with -D__ppc_generic so
that eventually all tests [#if defined(<cpu_flavor>)] for CPU
flavors can be eliminated.
2007-11-13 Till Straumann <strauman@slac.stanford.edu>
* rtems/powerpc/registers.h: Added SPR definitions for BookE

View File

@@ -218,10 +218,24 @@ extern "C" {
#define PPC_ALIGNMENT 8
#define PPC_CACHE_ALIGNMENT 32
#define PPC_INTERRUPT_MAX 125
#elif defined(__ppc_generic)
/* Generic ppc */
#ifdef _SOFT_FLOAT
#define CPU_MODEL_NAME "PowerPC Generic (no FPU)"
#elif defined(__NO_FPRS__)
#define CPU_MODEL_NAME "PowerPC Generic (E500/float-gprs)"
#else
#define CPU_MODEL_NAME "PowerPC Generic"
#endif
#define PPC_ALIGNMENT 8
#else
#error "Unsupported CPU Model"
#endif
/*
@@ -300,7 +314,7 @@ extern "C" {
*/
#ifndef PPC_HAS_FPU
#ifdef _SOFT_FLOAT
#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) /* e500 has unified integer/FP registers */
#define PPC_HAS_FPU 0
#else
#define PPC_HAS_FPU 1