PPC Context_Control layout with __SPE__ defined

Till Straumann strauman at slac.stanford.edu
Mon Aug 8 20:00:29 UTC 2011


Sebastian.

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.

I.e.,

instead of (score/cpu/powerpc/rtems/score/cpu.h)

#ifdef __SPE__
    uint32_t context [ ];
#endif

I would suggest

    uint32_t pad1;
    uint32_t pad2;
    uint32_t gpr1;
    uint32_t msr;
    uint32_t lr;
    uint32_t cr;
    uint32_t gpr14;
    ...


Another possibility would be removing the non-essential
registers (r2, r13, pc) from the non-SPE context, too
and use an identical layout for SPE and non-SPE.


WKR
-- Till



More information about the users mailing list