Ignore:
Timestamp:
2006-09-13T13:16:30Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34d9469e
Parents:
9a5b556
Message:

Support for sparc64 FPU context.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/trap/trap_table.S

    r9a5b556 r6eabb6e6  
    8383        PREEMPTIBLE_HANDLER privileged_opcode
    8484
     85/* TT = 0x20, TL = 0, fb_disabled handler */
     86.org trap_table + TT_FP_DISABLED*ENTRY_SIZE
     87.global fb_disabled_tl0
     88fp_disabled_tl0:
     89        PREEMPTIBLE_HANDLER fp_disabled
     90
    8591/* TT = 0x24, TL = 0, clean_window handler */
    8692.org trap_table + TT_CLEAN_WINDOW*ENTRY_SIZE
    87 .global clean_window_handler_tl0
    88 clean_window_handler_tl0:
     93.global clean_window_tl0
     94clean_window_tl0:
    8995        CLEAN_WINDOW_HANDLER
    9096
     
    490496/* TT = 0x24, TL > 0, clean_window handler */
    491497.org trap_table + (TT_CLEAN_WINDOW+512)*ENTRY_SIZE
    492 .global clean_window_handler_tl1
    493 clean_window_handler_tl1:
     498.global clean_window_tl1
     499clean_window_tl1:
    494500        CLEAN_WINDOW_HANDLER
    495501
     
    689695       
    690696        wrpr %g0, 0, %tl
    691         wrpr %g0, PSTATE_PRIV_BIT, %pstate
     697        wrpr %g0, PSTATE_PRIV_BIT | PSTATE_PEF_BIT, %pstate
    692698        SAVE_GLOBALS
    693699       
     
    706712
    707713        RESTORE_GLOBALS
     714        rdpr %pstate, %l1                       ! we must preserve the PEF bit
    708715        wrpr %g0, PSTATE_AG_BIT | PSTATE_PRIV_BIT, %pstate
    709716        wrpr %g0, 1, %tl
     
    717724
    718725        /*
     726         * Copy PSTATE.PEF to the in-register copy of TSTATE.
     727         */
     728        and %l1, PSTATE_PEF_BIT, %l1
     729        sllx %l1, TSTATE_PSTATE_SHIFT, %l1
     730        sethi %hi(TSTATE_PEF_BIT), %g4
     731        andn %g1, %g4, %g1
     732        or %g1, %l1, %g1
     733
     734        /*
    719735         * Restore TSTATE, TPC and TNPC from saved copies.
    720736         */
     
    722738        wrpr %g2, 0, %tpc
    723739        wrpr %g3, 0, %tnpc
     740
    724741
    725742        /*
Note: See TracChangeset for help on using the changeset viewer.