PPC Context_Control layout with __SPE__ defined

Peter Dufault dufault at hda.com
Tue Aug 9 12:46:13 UTC 2011


On Aug 8, 2011, at 4:00 , Till Straumann wrote:

> Is there any good reason for the layout of the Context_Control struct
> being radically different (from a C- point of view)
> if __SPE__ is enabled?
> 
> IMHO it would be preferable to adhere to the existing scheme so that
> e.g., unbundled diagnostics and tools which access register contents
> in a task context don't break.

If it is to stay as it is, what's the explanation for the naming convention:

  #define PPC_CONTEXT_SET_SP( _context, _sp ) \
    do { \
      PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_SP ) = _sp; \
    } while (0)

...

  #define _CPU_Context_Get_SP( _context ) \
    PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_SP )

Why PPC_CONTEXT_SET_SP() versus _CPU_Context_Get_SP()?  Is the second one required and used elsewhere in score?

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering





More information about the users mailing list