[PATCH v2] m68k: Avoid _Addresses_Add_offset()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jan 18 10:50:49 UTC 2019


This prevents a cyclic dependency between <rtems/score/cpu.h> and
<rtems/score/address.h>.
---
 cpukit/score/cpu/m68k/include/rtems/score/cpu.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/cpukit/score/cpu/m68k/include/rtems/score/cpu.h b/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
index 38fe763fc7..2d48cb08e1 100644
--- a/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
@@ -222,8 +222,6 @@ typedef struct {
     #define _CPU_Context_Initialize_fp( _fp_area ) \
       memset( *(_fp_area), 0, sizeof( Context_Control_fp ) )
   #else
-    #include <rtems/score/address.h>
-
     /*
      *  FP context save area for the M68881/M68882 and 68060 numeric
      *  coprocessors.
@@ -245,8 +243,8 @@ typedef struct {
      */
     #define _CPU_Context_Initialize_fp( _fp_area ) \
        { \
-         uint32_t *_fp_context = _Addresses_Add_offset( \
-           *(_fp_area), CPU_CONTEXT_FP_SIZE - 4); \
+         uint32_t *_fp_context = (uint32_t *) \
+           ( (uintptr_t) *( _fp_area ) + CPU_CONTEXT_FP_SIZE - 4 ); \
          *(--(_fp_context)) = 0; \
          *(_fp_area) = (void *)(_fp_context); \
        }
-- 
2.16.4



More information about the devel mailing list