summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-05-28 20:14:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-05-28 20:14:45 +0000
commita3f5b6be311597f0bb99af6599b7f81f26104e33 (patch)
tree7bcb13ec8008eed08a521dbfda4223f7e9bde3e6
parentPatch rtems-rc-4.5.0-21.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-a3f5b6be311597f0bb99af6599b7f81f26104e33.tar.bz2
Added a special CPU model of "rtems_multilib". This is the beginnings
of an experiment to determine what it will take to multilib most of RTEMS per GNU multilib conventions. It is thought that only interrupt processing and IO are not multlib-able. This means that a BSP Kit should include IRQ processing from score/cpu, all peripheral support (header files from score/cpu, libchip, and libcpu), and the BSPs themselves. The rest of RTEMS should be multlib-able. But to do this, all RTEMS CPU model feature flags must be derivable from gcc cpp predefines. By configuring the bare bsp with the rtems_multilib CPU model, you can try any combination of CPU CFLAGS and see well how the logic in that section of the <CPU>.h works. Once all CPU multilib variations can be built, then RTEMS proper can be multilib'ed and separated from the BSPs.
-rw-r--r--c/src/exec/score/cpu/a29k/rtems/score/a29k.h11
-rw-r--r--c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h10
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/i386.h12
-rw-r--r--c/src/exec/score/cpu/i960/rtems/score/i960.h13
-rw-r--r--c/src/exec/score/cpu/m68k/rtems/score/m68k.h9
-rw-r--r--c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h11
-rw-r--r--c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h11
-rw-r--r--c/src/exec/score/cpu/powerpc/shared/ppc.h23
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/sh.h12
-rw-r--r--c/src/exec/score/cpu/sparc/rtems/score/sparc.h14
-rw-r--r--c/src/exec/score/cpu/unix/rtems/score/unix.h10
11 files changed, 126 insertions, 10 deletions
diff --git a/c/src/exec/score/cpu/a29k/rtems/score/a29k.h b/c/src/exec/score/cpu/a29k/rtems/score/a29k.h
index 7dd9030609..e1e359d075 100644
--- a/c/src/exec/score/cpu/a29k/rtems/score/a29k.h
+++ b/c/src/exec/score/cpu/a29k/rtems/score/a29k.h
@@ -28,7 +28,16 @@ extern "C" {
* of the family.
*/
-#if defined(a29205)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define A29K_HAS_FPU 0
+
+#elif defined(a29205)
#define CPU_MODEL_NAME "a29205"
#define A29K_HAS_FPU 0
diff --git a/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h b/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h
index 049981ea84..1e1e3284df 100644
--- a/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h
+++ b/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h
@@ -35,7 +35,15 @@ extern "C" {
* present in a particular member of the family.
*/
-#if defined(hppa7100)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+
+#elif defined(hppa7100)
#define CPU_MODEL_NAME "hppa 7100"
diff --git a/c/src/exec/score/cpu/i386/rtems/score/i386.h b/c/src/exec/score/cpu/i386/rtems/score/i386.h
index 977670a75b..f113ebee4e 100644
--- a/c/src/exec/score/cpu/i386/rtems/score/i386.h
+++ b/c/src/exec/score/cpu/i386/rtems/score/i386.h
@@ -46,7 +46,17 @@ extern "C" {
*
*/
-#if defined(i386_fp)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define I386_HAS_FPU 0
+#define I386_HAS_BSWAP 0
+
+#elif defined(i386_fp)
#define CPU_MODEL_NAME "i386 with i387"
#define I386_HAS_BSWAP 0
diff --git a/c/src/exec/score/cpu/i960/rtems/score/i960.h b/c/src/exec/score/cpu/i960/rtems/score/i960.h
index ae9a073aff..644bd18a0b 100644
--- a/c/src/exec/score/cpu/i960/rtems/score/i960.h
+++ b/c/src/exec/score/cpu/i960/rtems/score/i960.h
@@ -33,7 +33,18 @@ extern "C" {
* NOTE: RTEMS defines a canonical name for each cpu model.
*/
-#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define I960_HAS_FPU 0
+#define I960_CPU_ALIGNMENT 4
+#define I960_SOFT_RESET_COMMAND 0x30000
+
+#elif defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
#define CPU_MODEL_NAME "i960ca"
#define __RTEMS_I960CA__
diff --git a/c/src/exec/score/cpu/m68k/rtems/score/m68k.h b/c/src/exec/score/cpu/m68k/rtems/score/m68k.h
index 7408aae231..64639220dd 100644
--- a/c/src/exec/score/cpu/m68k/rtems/score/m68k.h
+++ b/c/src/exec/score/cpu/m68k/rtems/score/m68k.h
@@ -79,6 +79,15 @@ extern "C" {
* by having each model specify which core it uses and then go from there.
*/
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines. Notice the only exception to this is that
+ * gcc does not distinguish between CPU32 and CPU32+. This
+ * feature selection logic is setup such that if RTEMS__mcpu32p__
+ * is defined, then CPU32+ rules are used. Otherwise, the safe
+ * but less efficient CPU32 rules are used for the CPU32+.
+ */
+
#if defined(__mc68020__)
#define CPU_MODEL_NAME "m68020"
diff --git a/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h b/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h
index 1ff139f604..425d0cc5fd 100644
--- a/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h
+++ b/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h
@@ -44,7 +44,16 @@ extern "C" {
* of the family.
*/
-#if defined(R4650)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define MIPS64ORION_HAS_FPU 1
+
+#elif defined(R4650)
#define CPU_MODEL_NAME "R4650"
#define MIPS64ORION_HAS_FPU 1
diff --git a/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h b/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h
index 9eae0bbe88..6708a7abbd 100644
--- a/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h
+++ b/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h
@@ -34,7 +34,16 @@ extern "C" {
* to.
*/
-#if defined(no_cpu)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define NOCPU_HAS_FPU 1
+
+#elif defined(no_cpu)
#define CPU_MODEL_NAME "no_cpu_model"
#define NOCPU_HAS_FPU 1
diff --git a/c/src/exec/score/cpu/powerpc/shared/ppc.h b/c/src/exec/score/cpu/powerpc/shared/ppc.h
index e959b0ae05..83a54bfa25 100644
--- a/c/src/exec/score/cpu/powerpc/shared/ppc.h
+++ b/c/src/exec/score/cpu/powerpc/shared/ppc.h
@@ -94,7 +94,28 @@ extern "C" {
#define PPC_LOW_POWER_MODE_NONE 0
#define PPC_LOW_POWER_MODE_STANDARD 1
-#if defined(ppc403)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define PPC_ALIGNMENT 4
+#define PPC_CACHE_ALIGNMENT 16
+#define PPC_HAS_RFCI 1
+#define PPC_HAS_FPU 0
+#define PPC_USE_MULTIPLE 1
+#define PPC_I_CACHE 2048
+#define PPC_D_CACHE 1024
+#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_STANDARD
+#define PPC_HAS_EXCEPTION_PREFIX 0
+#define PPC_HAS_EVPR 0
+#define PPC_INTERRUPT_MAX 16
+#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD
+#define PPC_HAS_DOUBLE 0
+
+#elif defined(ppc403)
/*
* IBM 403
*
diff --git a/c/src/exec/score/cpu/sh/rtems/score/sh.h b/c/src/exec/score/cpu/sh/rtems/score/sh.h
index 4417e6a99d..26c633c190 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/sh.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/sh.h
@@ -39,7 +39,17 @@ extern "C" {
* dependent features are present in a particular member of the family.
*/
-#if defined(sh7032)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define SH_HAS_FPU 0
+#define SH_HAS_SEPARATE_STACKS 1
+
+#elif defined(sh7032)
#define CPU_MODEL_NAME "SH7032"
#define SH_HAS_FPU 0
diff --git a/c/src/exec/score/cpu/sparc/rtems/score/sparc.h b/c/src/exec/score/cpu/sparc/rtems/score/sparc.h
index 0cb44c2df9..9fa52533cd 100644
--- a/c/src/exec/score/cpu/sparc/rtems/score/sparc.h
+++ b/c/src/exec/score/cpu/sparc/rtems/score/sparc.h
@@ -54,7 +54,19 @@ extern "C" {
*
*/
-#if defined(erc32)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+#define SPARC_HAS_FPU 1
+#define SPARC_HAS_BITSCAN 0
+#define SPARC_NUMBER_OF_REGISTER_WINDOWS 8
+#define SPARC_HAS_LOW_POWER_MODE 1
+
+#elif defined(erc32)
#define CPU_MODEL_NAME "erc32"
#define SPARC_HAS_FPU 1
diff --git a/c/src/exec/score/cpu/unix/rtems/score/unix.h b/c/src/exec/score/cpu/unix/rtems/score/unix.h
index 232075ba99..e8a0c7bdd6 100644
--- a/c/src/exec/score/cpu/unix/rtems/score/unix.h
+++ b/c/src/exec/score/cpu/unix/rtems/score/unix.h
@@ -29,7 +29,15 @@ extern "C" {
* of the family.
*/
-#if defined(hpux)
+#if defined(rtems_multilib)
+/*
+ * Figure out all CPU Model Feature Flags based upon compiler
+ * predefines.
+ */
+
+#define CPU_MODEL_NAME "rtems_multilib"
+
+#elif defined(hpux)
#define CPU_MODEL_NAME "HP-UX"