Ignore:
Timestamp:
Jul 18, 2017, 1:11:41 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
600d88d
Parents:
b2e1bded
git-author:
Sebastian Huber <sebastian.huber@…> (07/18/17 13:11:41)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/25/17 09:41:11)
Message:

sparc: Rename SPARC_USE_SAFE_FP_SUPPORT

Rename SPARC_USE_SAFE_FP_SUPPORT in SPARC_USE_SYNCHRONOUS_FP_SWITCH.
Update comment.

Update #3077.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    rb2e1bded ra400d06f  
    2929/* conditional compilation parameters */
    3030
    31 #if defined(RTEMS_SMP)
    32   /*
    33    * The SPARC ABI is a bit special with respect to the floating point context.
    34    * The complete floating point context is volatile.  Thus from an ABI point
    35    * of view nothing needs to be saved and restored during a context switch.
    36    * Instead the floating point context must be saved and restored during
    37    * interrupt processing.  Historically the deferred floating point switch is
    38    * used for SPARC and the complete floating point context is saved and
    39    * restored during a context switch to the new floating point unit owner.
    40    * This is a bit dangerous since post-switch actions (e.g. signal handlers)
    41    * and context switch extensions may silently corrupt the floating point
    42    * context.  The floating point unit is disabled for interrupt handlers.
    43    * Thus in case an interrupt handler uses the floating point unit then this
    44    * will result in a trap.
    45    *
    46    * On SMP configurations the deferred floating point switch is not
    47    * supported in principle.  So use here a safe floating point support.  Safe
    48    * means that the volatile floating point context is saved and restored
    49    * around a thread dispatch issued during interrupt processing.  Thus
    50    * post-switch actions and context switch extensions may safely use the
    51    * floating point unit.
    52    */
    53   #define SPARC_USE_SAFE_FP_SUPPORT
     31/*
     32 * The SPARC ABI is a bit special with respect to the floating point context.
     33 * The complete floating point context is volatile.  Thus from an ABI point
     34 * of view nothing needs to be saved and restored during a context switch.
     35 * Instead the floating point context must be saved and restored during
     36 * interrupt processing.  Historically, the deferred floating point switch is
     37 * used for SPARC and the complete floating point context is saved and
     38 * restored during a context switch to the new floating point unit owner.
     39 * This is a bit dangerous since post-switch actions (e.g. signal handlers)
     40 * and context switch extensions may silently corrupt the floating point
     41 * context.  The floating point unit is disabled for interrupt handlers.
     42 * Thus in case an interrupt handler uses the floating point unit then this
     43 * will result in a trap.
     44 *
     45 * In SMP configurations, the deferred floating point switch is not supported
     46 * in principle.  So, use here a synchronous floating point switching.
     47 * Synchronous means that the volatile floating point context is saved and
     48 * restored around a thread dispatch issued during interrupt processing.  Thus
     49 * post-switch actions and context switch extensions may safely use the
     50 * floating point unit.
     51 */
     52#if SPARC_HAS_FPU == 1
     53  #if defined(RTEMS_SMP)
     54    #define SPARC_USE_SYNCHRONOUS_FP_SWITCH
     55  #endif
    5456#endif
    5557
     
    118120 * This is set based upon the multilib settings.
    119121 */
    120 #if ( SPARC_HAS_FPU == 1 ) && !defined(SPARC_USE_SAFE_FP_SUPPORT)
     122#if ( SPARC_HAS_FPU == 1 ) && !defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    121123  #define CPU_HARDWARE_FP     TRUE
    122124#else
     
    168170 * it is safe to defer floating point context switches.
    169171 */
    170 #if defined(SPARC_USE_SAFE_FP_SUPPORT)
     172#if defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    171173  #define CPU_USE_DEFERRED_FP_SWITCH FALSE
    172174#else
Note: See TracChangeset for help on using the changeset viewer.