[rtems commit] score: Remove volatile from asm statements

Sebastian Huber sebh at rtems.org
Fri Feb 14 09:22:33 UTC 2014


Module:    rtems
Branch:    master
Commit:    6f90ef752db1e5ae1af661fc15acef6d07d2c097
Changeset: http://git.rtems.org/rtems/commit/?id=6f90ef752db1e5ae1af661fc15acef6d07d2c097

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb 13 13:08:46 2014 +0100

score: Remove volatile from asm statements

The instructions to get the processor current index have no
side-effects.

---

 cpukit/score/cpu/arm/rtems/score/cpu.h     |    2 +-
 cpukit/score/cpu/powerpc/rtems/score/cpu.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index b423dba..d7c54ad 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -476,7 +476,7 @@ void _CPU_Context_validate( uintptr_t pattern );
     uint32_t mpidr;
 
     /* Use ARMv7 Multiprocessor Affinity Register (MPIDR) */
-    __asm__ volatile (
+    __asm__ (
       "mrc p15, 0, %[mpidr], c0, c0, 5\n"
       : [mpidr] "=&r" (mpidr)
     );
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 647c665..f4aa9c4 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -1040,7 +1040,7 @@ void _CPU_Context_validate( uintptr_t pattern );
     uint32_t pir;
 
     /* Use Book E Processor ID Register (PIR) */
-    __asm__ volatile (
+    __asm__ (
       "mfspr %[pir], 286"
       : [pir] "=&r" (pir)
     );




More information about the vc mailing list