Changeset 359e537 in rtems for c/src/lib/libcpu/sparc


Ignore:
Timestamp:
Nov 30, 2009, 5:09:41 AM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
023f1dd9
Parents:
ac7af4a
Message:

Whitespace removal.

Location:
c/src/lib/libcpu/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sparc/reg_win/window.S

    rac7af4a r359e537  
    22 *  window.s
    33 *
    4  *  This file contains the register window management routines for the 
     4 *  This file contains the register window management routines for the
    55 *  SPARC architecture.  Trap handlers for the following capabilities
    66 *  are included in this file:
     
    99 *    + Window Underflow
    1010 *    + Flushing All Windows
    11  * 
     11 *
    1212 *  COPYRIGHT:
    1313 *
    14  *  This file includes the window overflow and underflow handlers from 
    15  *  the file srt0.s provided with the binary distribution of the SPARC 
    16  *  Instruction Simulator (SIS) found at 
     14 *  This file includes the window overflow and underflow handlers from
     15 *  the file srt0.s provided with the binary distribution of the SPARC
     16 *  Instruction Simulator (SIS) found at
    1717 *  ftp://ftp.estec.esa.nl/pub/ws/wsd/erc32.
    1818 *
     
    4242
    4343        /*
    44          *  Calculate new WIM by "rotating" the valid bits in the WIM right 
     44         *  Calculate new WIM by "rotating" the valid bits in the WIM right
    4545         *  by one position.  The following shows how the bits move for a SPARC
    4646         *  cpu implementation where SPARC_NUMBER_OF_REGISTER_WINDOWS is 8.
     
    5050         *
    5151         *  NOTE: New WIM must be stored in a global register since the
    52          *        "save" instruction just prior to the load of the wim 
     52         *        "save" instruction just prior to the load of the wim
    5353         *        register will result in the local register set changing.
    5454         */
     
    5959        sll  %l3, SPARC_NUMBER_OF_REGISTER_WINDOWS-1 , %l4
    6060                                         ! l4 = WIM << (Number Windows - 1)
    61         or   %l4, %g1, %g1               ! g1 = (WIM >> 1) | 
     61        or   %l4, %g1, %g1               ! g1 = (WIM >> 1) |
    6262                                         !      (WIM << (Number Windows - 1))
    6363
     
    9393
    9494        /*
    95          *  Calculate new WIM by "rotating" the valid bits in the WIM left 
     95         *  Calculate new WIM by "rotating" the valid bits in the WIM left
    9696         *  by one position.  The following shows how the bits move for a SPARC
    9797         *  cpu implementation where SPARC_NUMBER_OF_REGISTER_WINDOWS is 8.
     
    101101         *
    102102         *  NOTE: New WIM must be stored in a global register since the
    103          *        "save" instruction just prior to the load of the wim 
     103         *        "save" instruction just prior to the load of the wim
    104104         *        register will result in the local register set changing.
    105105         */
     
    171171         *    l2 = npc
    172172         */
    173  
     173
    174174        PUBLIC(window_flush_trap_handler)
    175  
     175
    176176SYM(window_flush_trap_handler):
    177177        /*
     
    196196
    197197        restore                               ! go back one register window
    198  
     198
    199199save_frame_loop:
    200200        sll     %g4, 1, %g5                   ! rotate the "wim" left 1
    201201        srl     %g4, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g4
    202202        or      %g4, %g5, %g4                 ! g4 = wim if we do one restore
    203  
     203
    204204        /*
    205205         *  If a restore would not underflow, then continue.
    206206         */
    207  
     207
    208208        andcc   %g4, %g2, %g0                 ! Any windows to flush?
    209209        bnz     done_flushing                 ! No, then continue
    210210        nop
    211  
     211
    212212        restore                               ! back one window
    213  
     213
    214214        /*
    215215         *  Now save the window just as if we overflowed to it.
    216216         */
    217  
     217
    218218        std     %l0, [%sp + CPU_STACK_FRAME_L0_OFFSET]
    219219        std     %l2, [%sp + CPU_STACK_FRAME_L2_OFFSET]
    220220        std     %l4, [%sp + CPU_STACK_FRAME_L4_OFFSET]
    221221        std     %l6, [%sp + CPU_STACK_FRAME_L6_OFFSET]
    222  
     222
    223223        std     %i0, [%sp + CPU_STACK_FRAME_I0_OFFSET]
    224224        std     %i2, [%sp + CPU_STACK_FRAME_I2_OFFSET]
    225225        std     %i4, [%sp + CPU_STACK_FRAME_I4_OFFSET]
    226226        std     %i6, [%sp + CPU_STACK_FRAME_I6_FP_OFFSET]
    227  
     227
    228228        ba      save_frame_loop
    229229        nop
    230  
     230
    231231done_flushing:
    232  
     232
    233233        add     %g3, 2, %g3                   ! calculate desired WIM
    234234        and     %g3, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g3
     
    236236        sll     %g4, %g3, %g4                 ! g4 = new WIM
    237237        mov     %g4, %wim
    238  
     238
    239239        mov     %g1, %psr                     ! restore PSR
    240240        nop
  • c/src/lib/libcpu/sparc/syscall/syscall.S

    rac7af4a r359e537  
    88 *    + SYS_irqdis      (disable interrupts)
    99 *    + SYS_irqset      (set interrupt level)
    10  * 
     10 *
    1111 *  COPYRIGHT:
    1212 *
     
    5151        ba,a    9f
    5252
    53 1:                                     
    54         ta      0                       ! halt 
     531:
     54        ta      0                       ! halt
    55559:                                      ! leave
    56         mov     0, %g1                  ! clear %g1 
     56        mov     0, %g1                  ! clear %g1
    5757        jmpl    %l2, %g0
    5858        rett    %l2 + 4
Note: See TracChangeset for help on using the changeset viewer.