summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-02-15 06:13:10 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-02-15 06:13:10 +0000
commit4b61f6e58019a811c26a329e316ad046655ca07a (patch)
treeb2321c0606032b4d73bb43f26631d0e05ea19859 /cpukit/score
parent2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org> (diff)
downloadrtems-4b61f6e58019a811c26a329e316ad046655ca07a.tar.bz2
2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org>
* rtems/old-exceptions/cpu.h: Add _CPU_MSG_GET (old/new exception processing ABI compatibility). * rtems/powerpc/registers.h: Use C99 fixed size types.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/cpu/powerpc/ChangeLog6
-rw-r--r--cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h8
-rw-r--r--cpukit/score/cpu/powerpc/rtems/powerpc/registers.h16
3 files changed, 21 insertions, 9 deletions
diff --git a/cpukit/score/cpu/powerpc/ChangeLog b/cpukit/score/cpu/powerpc/ChangeLog
index c4fde11dbf..e092409e13 100644
--- a/cpukit/score/cpu/powerpc/ChangeLog
+++ b/cpukit/score/cpu/powerpc/ChangeLog
@@ -1,5 +1,11 @@
2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org>
+ * rtems/old-exceptions/cpu.h: Add _CPU_MSG_GET
+ (old/new exception processing ABI compatibility).
+ * rtems/powerpc/registers.h: Use C99 fixed size types.
+
+2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org>
+
* rtems/score/powerpc.h: Add __ALTIVEC__ support.
2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org>
diff --git a/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h b/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h
index fbc303ab23..3657f3e4f7 100644
--- a/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h
@@ -685,12 +685,18 @@ void _CPU_Initialize_vectors(void);
#ifndef ASM
extern const unsigned int _PPC_MSR_DISABLE_MASK;
-#define _CPU_MSR_Value( _msr_value ) \
+#define _CPU_MSR_GET( _msr_value ) \
do { \
_msr_value = 0; \
asm volatile ("mfmsr %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); \
} while (0)
+/* FIXME: Backward compatibility
+ * new-exception-processing uses _CPU_MSR_GET
+ * old-exception-processing had used _CPU_MSR_Value
+ */
+#define _CPU_MSR_Value(_msr_value) _CPU_MSR_GET(_msr_value)
+
#define _CPU_MSR_SET( _msr_value ) \
{ asm volatile ("mtmsr %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); }
diff --git a/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h b/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h
index 2783abc337..38a4b2bf37 100644
--- a/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h
+++ b/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h
@@ -255,12 +255,12 @@ lidate */
* Routines to access the time base register
*/
-static inline unsigned long long PPC_Get_timebase_register( void )
+static inline uint64_t PPC_Get_timebase_register( void )
{
- unsigned long tbr_low;
- unsigned long tbr_high;
- unsigned long tbr_high_old;
- unsigned long long tbr;
+ uint32_t tbr_low;
+ uint32_t tbr_high;
+ uint32_t tbr_high_old;
+ uint64_t tbr;
do {
asm volatile( "mftbu %0" : "=r" (tbr_high_old));
@@ -274,10 +274,10 @@ static inline unsigned long long PPC_Get_timebase_register( void )
return tbr;
}
-static inline void PPC_Set_timebase_register (unsigned long long tbr)
+static inline void PPC_Set_timebase_register (uint64_t tbr)
{
- unsigned long tbr_low;
- unsigned long tbr_high;
+ uint32_t tbr_low;
+ uint32_t tbr_high;
tbr_low = (tbr & 0xffffffff) ;
tbr_high = (tbr >> 32) & 0xffffffff;