Changeset 6eabb6e6 in mainline for kernel/arch/sparc64/src/asm.S


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/asm.S

    r9a5b556 r6eabb6e6  
    228228
    229229.macro WRITE_ALTERNATE_REGISTER reg, bit
     230        rdpr %pstate, %g1                               ! save PSTATE.PEF
    230231        wrpr %g0, (\bit | PSTATE_PRIV_BIT), %pstate
    231232        mov %o0, \reg
     233        wrpr %g0, PSTATE_PRIV_BIT, %pstate
    232234        retl
    233         wrpr %g0, PSTATE_PRIV_BIT, %pstate
     235        wrpr %g1, 0, %pstate                            ! restore PSTATE.PEF
    234236.endm
    235237
    236238.macro READ_ALTERNATE_REGISTER reg, bit
     239        rdpr %pstate, %g1                               ! save PSTATE.PEF
    237240        wrpr %g0, (\bit | PSTATE_PRIV_BIT), %pstate
    238241        mov \reg, %o0
     242        wrpr %g0, PSTATE_PRIV_BIT, %pstate
    239243        retl
    240         wrpr %g0, PSTATE_PRIV_BIT, %pstate
     244        wrpr %g1, 0, %pstate                            ! restore PSTATE.PEF
    241245.endm
    242246
Note: See TracChangeset for help on using the changeset viewer.