summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-12 17:46:47 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-12 17:46:47 +0000
commit7d953c2d08e6abd17bd81b75b6c3de920f7fe3c3 (patch)
tree328ff0f48fe5f9a3674cb3fec4cd0357c8531221 /c
parentbc5fc7a6f4623848fabba8dcb325db3d731d9f4a (diff)
downloadrtems-7d953c2d08e6abd17bd81b75b6c3de920f7fe3c3.tar.bz2
2001-10-12 Joel Sherrill <joel@OARcorp.com>
* asm.h, cpu.c, rtems.c, rtems/score/cpu.h, rtems/score/sh.h, rtems/score/sh_io.h, rtems/score/shtypes.h: Consistency changes and made sure there were no includes from the libcpu tree.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/score/cpu/sh/ChangeLog6
-rw-r--r--c/src/exec/score/cpu/sh/asm.h3
-rw-r--r--c/src/exec/score/cpu/sh/cpu.c8
-rw-r--r--c/src/exec/score/cpu/sh/rtems.c3
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/cpu.h8
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/sh.h47
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/sh_io.h3
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/shtypes.h3
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/types.h3
9 files changed, 59 insertions, 25 deletions
diff --git a/c/src/exec/score/cpu/sh/ChangeLog b/c/src/exec/score/cpu/sh/ChangeLog
index e743a074bc..af0a4b13c4 100644
--- a/c/src/exec/score/cpu/sh/ChangeLog
+++ b/c/src/exec/score/cpu/sh/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-12 Joel Sherrill <joel@OARcorp.com>
+
+ * asm.h, cpu.c, rtems.c, rtems/score/cpu.h, rtems/score/sh.h,
+ rtems/score/sh_io.h, rtems/score/shtypes.h: Consistency changes
+ and made sure there were no includes from the libcpu tree.
+
2001-10-12 Alexandra Kossovsky <sasha@oktet.ru>
* cpu.c, rtems/score/cpu.h, rtems/score/sh.h: Modified to
diff --git a/c/src/exec/score/cpu/sh/asm.h b/c/src/exec/score/cpu/sh/asm.h
index 446d77b276..d4882bd4ba 100644
--- a/c/src/exec/score/cpu/sh/asm.h
+++ b/c/src/exec/score/cpu/sh/asm.h
@@ -27,9 +27,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/c/src/exec/score/cpu/sh/cpu.c b/c/src/exec/score/cpu/sh/cpu.c
index b63be7c4c2..31ba6cd0d9 100644
--- a/c/src/exec/score/cpu/sh/cpu.c
+++ b/c/src/exec/score/cpu/sh/cpu.c
@@ -12,9 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -29,11 +28,6 @@
#include <rtems/score/cpu.h>
#include <rtems/score/sh.h>
-/* FIXME: This should not be here */
-#if defined(__SH4__)
-#include <rtems/score/sh4_regs.h>
-#endif
-
/* referenced in start.S */
extern proc_ptr vectab[] ;
diff --git a/c/src/exec/score/cpu/sh/rtems.c b/c/src/exec/score/cpu/sh/rtems.c
index b0e0e22e02..539ebe0065 100644
--- a/c/src/exec/score/cpu/sh/rtems.c
+++ b/c/src/exec/score/cpu/sh/rtems.c
@@ -15,9 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/c/src/exec/score/cpu/sh/rtems/score/cpu.h b/c/src/exec/score/cpu/sh/rtems/score/cpu.h
index 16777170db..60d3fbd6ed 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/cpu.h
@@ -12,9 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -135,8 +134,8 @@ extern "C" {
*/
#if SH_HAS_FPU
-/* FIXME: What about CPU_SOFTWARE_FP ? */
#define CPU_HARDWARE_FP TRUE
+#define CPU_SOFTWARE_FP FALSE
#else
#define CPU_SOFTWARE_FP FALSE
#define CPU_HARDWARE_FP FALSE
@@ -211,9 +210,6 @@ extern "C" {
#if SH_HAS_FPU
#define CPU_USE_DEFERRED_FP_SWITCH FALSE
#else
-/* FIXME: Is this needed?
- * Only here for backward compatibility with previous versions
- */
#define CPU_USE_DEFERRED_FP_SWITCH TRUE
#endif
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 1ad5b564f4..a48dea97f0 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/sh.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/sh.h
@@ -13,9 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -219,6 +218,50 @@ extern unsigned int sh_set_irq_priority(
#endif /* !ASM */
+/*
+ * Bits on SH-4 registers.
+ * See SH-4 Programming manual for more details.
+ *
+ * Added by Alexandra Kossovsky <sasha@oktet.ru>
+ */
+
+#if defined(__SH4__)
+#define SH4_SR_MD 0x40000000 /* Priveleged mode */
+#define SH4_SR_RB 0x20000000 /* General register bank specifier */
+#define SH4_SR_BL 0x10000000 /* Exeption/interrupt masking bit */
+#define SH4_SR_FD 0x00008000 /* FPU disable bit */
+#define SH4_SR_M 0x00000200 /* For signed division:
+ divisor (module) is negative */
+#define SH4_SR_Q 0x00000100 /* For signed division:
+ dividend (and quotient) is negative */
+#define SH4_SR_IMASK 0x000000f0 /* Interrupt mask level */
+#define SH4_SR_IMASK_S 4
+#define SH4_SR_S 0x00000002 /* Saturation for MAC instruction:
+ if set, data in MACH/L register
+ is restricted to 48/32 bits
+ for MAC.W/L instructions */
+#define SH4_SR_T 0x00000001 /* 1 if last condiyion was true */
+#define SH4_SR_RESERV 0x8fff7d0d /* Reserved bits, read/write as 0 */
+
+/* FPSCR -- FPU Starus/Control Register */
+#define SH4_FPSCR_FR 0x00200000 /* FPU register bank specifier */
+#define SH4_FPSCR_SZ 0x00100000 /* FMOV 64-bit transfer mode */
+#define SH4_FPSCR_PR 0x00080000 /* Double-percision floating-point
+ operations flag */
+ /* SH4_FPSCR_SZ & SH4_FPSCR_PR != 1 */
+#define SH4_FPSCR_DN 0x00040000 /* Treat denormalized number as zero */
+#define SH4_FPSCR_CAUSE 0x0003f000 /* FPU exeption cause field */
+#define SH4_FPSCR_CAUSE_S 12
+#define SH4_FPSCR_ENABLE 0x00000f80 /* FPU exeption enable field */
+#define SH4_FPSCR_ENABLE_s 7
+#define SH4_FPSCR_FLAG 0x0000007d /* FPU exeption flag field */
+#define SH4_FPSCR_FLAG_S 2
+#define SH4_FPSCR_RM 0x00000001 /* Rounding mode:
+ 1/0 -- round to zero/nearest */
+#define SH4_FPSCR_RESERV 0xffd00000 /* Reserved bits, read/write as 0 */
+
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/c/src/exec/score/cpu/sh/rtems/score/sh_io.h b/c/src/exec/score/cpu/sh/rtems/score/sh_io.h
index 2a9111e307..188e504385 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/sh_io.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/sh_io.h
@@ -14,9 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/c/src/exec/score/cpu/sh/rtems/score/shtypes.h b/c/src/exec/score/cpu/sh/rtems/score/shtypes.h
index 853479c13b..d0e7180788 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/shtypes.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/shtypes.h
@@ -12,9 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/c/src/exec/score/cpu/sh/rtems/score/types.h b/c/src/exec/score/cpu/sh/rtems/score/types.h
index 853479c13b..d0e7180788 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/types.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/types.h
@@ -12,9 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
- * COPYRIGHT (c) 1998.
+ * COPYRIGHT (c) 1998-2001.
* On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at