summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-03-24 16:24:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-03-24 16:24:39 +0000
commit3ec7bfc7c4ff9e217d2a24635751b74757635dd7 (patch)
tree3cb4539f082a621655fae9e6b999d6ca0c0f8c73 /c
parentnew file (diff)
downloadrtems-3ec7bfc7c4ff9e217d2a24635751b74757635dd7.tar.bz2
Rename hppa1_1 to hppa1.1 and switched to using __XXX__ macros for
the CPU family name constants.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/score/cpu/unix/cpu.c8
-rw-r--r--c/src/exec/score/cpu/unix/cpu.h20
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/Makefile.in2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c4
-rw-r--r--c/src/lib/libbsp/shmdr/shm.h14
-rw-r--r--c/src/lib/libbsp/shmdr/shm_driver.h14
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/clock/clock.c2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/timer/timer.c2
-rw-r--r--c/src/lib/start/README2
-rw-r--r--c/src/libchip/shmdr/shm_driver.h14
-rw-r--r--c/src/tests/samples/cdtest/main.cc2
-rw-r--r--c/src/tests/sptests/spsize/size.c14
12 files changed, 48 insertions, 50 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c
index e931775c54..428ae99c3b 100644
--- a/c/src/exec/score/cpu/unix/cpu.c
+++ b/c/src/exec/score/cpu/unix/cpu.c
@@ -174,7 +174,7 @@ void _CPU_Signal_initialize( void )
void _CPU_Context_From_CPU_Init()
{
-#if defined(hppa1_1) && defined(RTEMS_UNIXLIB_SETJMP)
+#if defined(__hppa__) && defined(RTEMS_UNIXLIB_SETJMP)
/*
* HACK - set the _SYSTEM_ID to 0x20c so that setjmp/longjmp
* will handle the full 32 floating point registers.
@@ -474,7 +474,7 @@ void _CPU_Context_Initialize(
addr = (unsigned32 *)_the_context;
-#if defined(hppa1_1)
+#if defined(__hppa__)
*(addr + RP_OFF) = jmp_addr;
*(addr + SP_OFF) = (unsigned32)(_stack_low + CPU_FRAME_SIZE);
@@ -489,7 +489,7 @@ void _CPU_Context_Initialize(
jmp_addr &= 0xfffffffc;
*(addr + RP_OFF) = *(unsigned32 *)jmp_addr;
}
-#elif defined(sparc)
+#elif defined(__sparc__)
/*
* See /usr/include/sys/stack.h in Solaris 2.3 for a nice
@@ -502,7 +502,7 @@ void _CPU_Context_Initialize(
*(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
*(addr + FP_OFF) = (unsigned32)(_stack_high);
-#elif defined(i386) || defined(__i386__)
+#elif defined(__i386__)
/*
* This information was gathered by disassembling setjmp().
diff --git a/c/src/exec/score/cpu/unix/cpu.h b/c/src/exec/score/cpu/unix/cpu.h
index 9497ca24f7..13558267a0 100644
--- a/c/src/exec/score/cpu/unix/cpu.h
+++ b/c/src/exec/score/cpu/unix/cpu.h
@@ -242,9 +242,9 @@ extern "C" {
* If FALSE, then the grows toward smaller addresses.
*/
-#if defined(hppa1_1)
+#if defined(__hppa__)
#define CPU_STACK_GROWS_UP TRUE
-#elif defined(sparc) || defined(i386) || defined(__i386__)
+#elif defined(__sparc__) || defined(__i386__)
#define CPU_STACK_GROWS_UP FALSE
#else
#error "unknown CPU!!"
@@ -282,11 +282,11 @@ extern "C" {
* routines are handled.
*/
-#if defined(hppa1_1) || defined(sparc)
+#if defined(__hppa__) || defined(__sparc__)
#define CPU_CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
#define CPU_BIG_ENDIAN TRUE
#define CPU_LITTLE_ENDIAN FALSE
-#elif defined(i386) || defined(__i386__)
+#elif defined(__i386__)
#define CPU_CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
#define CPU_BIG_ENDIAN FALSE
#define CPU_LITTLE_ENDIAN TRUE
@@ -313,7 +313,7 @@ extern "C" {
/* may need to put some structures here. */
-#if defined(hppa1_1)
+#if defined(__hppa__)
/*
* Word indices within a jmp_buf structure
*/
@@ -363,7 +363,7 @@ extern "C" {
#endif
#endif
-#if defined(i386) || defined(__i386__)
+#if defined(__i386__)
#ifdef RTEMS_NEWLIB
#error "Newlib not installed"
@@ -384,7 +384,7 @@ extern "C" {
#endif
-#if defined(sparc)
+#if defined(__sparc__)
/*
* Word indices within a jmp_buf structure
@@ -550,11 +550,11 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
* The size of a frame on the stack
*/
-#if defined(hppa1_1)
+#if defined(__hppa__)
#define CPU_FRAME_SIZE (32 * 4)
-#elif defined(sparc)
+#elif defined(__sparc__)
#define CPU_FRAME_SIZE (112) /* based on disassembled test code */
-#elif defined(i386) || defined(__i386__)
+#elif defined(__i386__)
#define CPU_FRAME_SIZE (24) /* return address, sp, and bp pushed plus fudge */
#else
#error "Unknown CPU!!!"
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.in b/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.in
index f5b7ef0799..2dc18158d3 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.in
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.in
@@ -14,4 +14,4 @@ include $(RTEMS_ROOT)/make/directory.cfg
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
# NOTE: we pick up HPPA clock and timer from libcpu/hppa
-SUB_DIRS=tools include startup tty shmsupp wrapup
+SUB_DIRS=tools include start startup tty shmsupp wrapup
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c b/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
index 2a41b46a33..11e14a3efb 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
@@ -331,7 +331,7 @@ asm("
_already7:
movew %sp@+,%d0
");
-#if defined (__m68000__) && !defined(__mc68020__)
+#if defined (__mc68000__) && !defined(__mc68020__)
asm("
lea %sp@(4),%sp"); /* pull off 68000 return address */
#endif
@@ -551,7 +551,7 @@ void _returnFromException(Frame *frame)
frame->fsaveHeader = -1; /* restore regs, but we dont have fsave info*/
}
-#if defined(__m68000__) && !defined(__mc68020__)
+#if defined(__mc68000__) && !defined(__mc68020__)
/* a 68000 cannot use the internal info pushed onto a bus error
* or address error frame when doing an RTE so don't put this info
* onto the stack or the stack will creep every time this happens.
diff --git a/c/src/lib/libbsp/shmdr/shm.h b/c/src/lib/libbsp/shmdr/shm.h
index 8fc1162617..8875525983 100644
--- a/c/src/lib/libbsp/shmdr/shm.h
+++ b/c/src/lib/libbsp/shmdr/shm.h
@@ -119,27 +119,27 @@ extern "C" {
* view of the VMEbus address space) are not addressed yet.
*/
-#if defined(i960)
+#if defined(__i960__)
#define SHM_LOCK_VALUE 0x00000080
#define SHM_UNLOCK_VALUE 0
-#elif defined(m68k)
+#elif defined(__mc68000__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(i386)
+#elif defined(__i386__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(mips64orion)
+#elif defined(__mips__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(hppa1_1)
+#elif defined(__hppa__)
#define SHM_LOCK_VALUE 0
#define SHM_UNLOCK_VALUE 1
-#elif defined(ppc)
+#elif defined(__PPC__)
#define SHM_LOCK_VALUE 1
#define SHM_UNLOCK_VALUE 0
-#elif defined(unix)
+#elif defined(__unix__)
#define SHM_LOCK_VALUE 0
#define SHM_UNLOCK_VALUE 1
#elif defined(no_cpu) /* for this values are irrelevant */
diff --git a/c/src/lib/libbsp/shmdr/shm_driver.h b/c/src/lib/libbsp/shmdr/shm_driver.h
index 8fc1162617..8875525983 100644
--- a/c/src/lib/libbsp/shmdr/shm_driver.h
+++ b/c/src/lib/libbsp/shmdr/shm_driver.h
@@ -119,27 +119,27 @@ extern "C" {
* view of the VMEbus address space) are not addressed yet.
*/
-#if defined(i960)
+#if defined(__i960__)
#define SHM_LOCK_VALUE 0x00000080
#define SHM_UNLOCK_VALUE 0
-#elif defined(m68k)
+#elif defined(__mc68000__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(i386)
+#elif defined(__i386__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(mips64orion)
+#elif defined(__mips__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(hppa1_1)
+#elif defined(__hppa__)
#define SHM_LOCK_VALUE 0
#define SHM_UNLOCK_VALUE 1
-#elif defined(ppc)
+#elif defined(__PPC__)
#define SHM_LOCK_VALUE 1
#define SHM_UNLOCK_VALUE 0
-#elif defined(unix)
+#elif defined(__unix__)
#define SHM_LOCK_VALUE 0
#define SHM_UNLOCK_VALUE 1
#elif defined(no_cpu) /* for this values are irrelevant */
diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
index dad00372ad..4a8f66d643 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
@@ -18,7 +18,7 @@
* i-cubed limited makes no representations about the suitability
* of this software for any purpose.
*
- * Derived from c/src/lib/libcpu/hppa1_1/clock/clock.c:
+ * Derived from c/src/lib/libcpu/hppa1.1/clock/clock.c:
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
index cd6fc82519..0881eef128 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
@@ -21,7 +21,7 @@
* i-cubed limited makes no representations about the suitability
* of this software for any purpose.
*
- * Derived from c/src/lib/libcpu/hppa1_1/timer/timer.c:
+ * Derived from c/src/lib/libcpu/hppa1.1/timer/timer.c:
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
diff --git a/c/src/lib/start/README b/c/src/lib/start/README
index bec0349374..52556d4bb1 100644
--- a/c/src/lib/start/README
+++ b/c/src/lib/start/README
@@ -6,5 +6,5 @@ entry code transfers control to target board specific
code).
For some processors this code exists in some external (to RTEMS)
-library such as libgloss or the host system (for example the hppa1_1
+library such as libgloss or the host system (for example the hppa1.1
and UNIX cpu's)
diff --git a/c/src/libchip/shmdr/shm_driver.h b/c/src/libchip/shmdr/shm_driver.h
index 8fc1162617..8875525983 100644
--- a/c/src/libchip/shmdr/shm_driver.h
+++ b/c/src/libchip/shmdr/shm_driver.h
@@ -119,27 +119,27 @@ extern "C" {
* view of the VMEbus address space) are not addressed yet.
*/
-#if defined(i960)
+#if defined(__i960__)
#define SHM_LOCK_VALUE 0x00000080
#define SHM_UNLOCK_VALUE 0
-#elif defined(m68k)
+#elif defined(__mc68000__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(i386)
+#elif defined(__i386__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(mips64orion)
+#elif defined(__mips__)
#define SHM_LOCK_VALUE 0x80000000
#define SHM_UNLOCK_VALUE 0
-#elif defined(hppa1_1)
+#elif defined(__hppa__)
#define SHM_LOCK_VALUE 0
#define SHM_UNLOCK_VALUE 1
-#elif defined(ppc)
+#elif defined(__PPC__)
#define SHM_LOCK_VALUE 1
#define SHM_UNLOCK_VALUE 0
-#elif defined(unix)
+#elif defined(__unix__)
#define SHM_LOCK_VALUE 0
#define SHM_UNLOCK_VALUE 1
#elif defined(no_cpu) /* for this values are irrelevant */
diff --git a/c/src/tests/samples/cdtest/main.cc b/c/src/tests/samples/cdtest/main.cc
index 0203ccaba1..19f7d50174 100644
--- a/c/src/tests/samples/cdtest/main.cc
+++ b/c/src/tests/samples/cdtest/main.cc
@@ -126,8 +126,6 @@ cdtest(void)
// in many implementations in order to get global constructors
// run.
//
-// Ref: c/src/lib/libbsp/hppa1_1/pxfl/startup/bspstart.c
-//
rtems_task main_task(
diff --git a/c/src/tests/sptests/spsize/size.c b/c/src/tests/sptests/spsize/size.c
index a62c7777d8..fd47e18833 100644
--- a/c/src/tests/sptests/spsize/size.c
+++ b/c/src/tests/sptests/spsize/size.c
@@ -352,7 +352,7 @@ uninitialized = 0;
#ifndef unix /* make sure this is not a native compile */
-#ifdef i386
+#ifdef __i386__
/* cpu.h */
uninitialized += (sizeof _CPU_Null_fp_context) +
@@ -361,7 +361,7 @@ uninitialized += (sizeof _CPU_Null_fp_context) +
#endif
-#ifdef i960
+#ifdef __i960__
/* cpu.h */
uninitialized += (sizeof _CPU_Interrupt_stack_low) +
@@ -369,7 +369,7 @@ uninitialized += (sizeof _CPU_Interrupt_stack_low) +
#endif
-#ifdef hppa1_1
+#ifdef __hppa__
/* cpu.h */
uninitialized += (sizeof _CPU_Null_fp_context) +
@@ -380,7 +380,7 @@ uninitialized += (sizeof _CPU_Null_fp_context) +
(sizeof _CPU_Interrupt_stack_high);
#endif
-#ifdef m68k
+#ifdef __mc68000__
/* cpu.h */
uninitialized += (sizeof _CPU_Interrupt_stack_low) +
@@ -388,7 +388,7 @@ uninitialized += (sizeof _CPU_Interrupt_stack_low) +
#endif
-#ifdef sparc
+#ifdef __sparc__
/* cpu.h */
uninitialized += (sizeof _CPU_Interrupt_stack_low) +
@@ -417,7 +417,7 @@ uninitialized += (sizeof _CPU_Null_fp_context) +
#endif
-#ifdef ppc
+#ifdef __PPC__
/* cpu.h */
uninitialized += (sizeof _CPU_Interrupt_stack_low) +
@@ -440,7 +440,7 @@ initialized +=
(sizeof _TOD_Days_since_last_leap_year);
#ifndef unix /* make sure this is not native */
-#ifdef sparc
+#ifdef __sparc__
initialized += (sizeof _CPU_Trap_slot_template);