Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/context.S

    ra52e2f4 r9d58539  
    2727#
    2828
    29 #include <abi/asmtool.h>
    30 #include <arch/context_struct.h>
     29#include <arch/context_offset.h>
    3130#include <arch/arch.h>
    3231#include <arch/regdef.h>
     
    3433.text   
    3534
     35.global context_save_arch
     36.global context_restore_arch
     37
    3638/*
    3739 * context_save_arch() is required not to create its own stack frame. See the
    3840 * generic context.h for explanation.
    3941 */
    40 FUNCTION_BEGIN(context_save_arch)
     42context_save_arch:
    4143        #
    4244        # Force all our active register windows to memory so that we can find
     
    4547        flushw
    4648
    47         stx %sp, [%o0 + CONTEXT_OFFSET_SP]
    48         stx %o7, [%o0 + CONTEXT_OFFSET_PC]
    49         stx %i0, [%o0 + CONTEXT_OFFSET_I0]
    50         stx %i1, [%o0 + CONTEXT_OFFSET_I1]
    51         stx %i2, [%o0 + CONTEXT_OFFSET_I2]
    52         stx %i3, [%o0 + CONTEXT_OFFSET_I3]
    53         stx %i4, [%o0 + CONTEXT_OFFSET_I4]
    54         stx %i5, [%o0 + CONTEXT_OFFSET_I5]
    55         stx %fp, [%o0 + CONTEXT_OFFSET_FP]
    56         stx %i7, [%o0 + CONTEXT_OFFSET_I7]
    57         stx %l0, [%o0 + CONTEXT_OFFSET_L0]
    58         stx %l1, [%o0 + CONTEXT_OFFSET_L1]
    59         stx %l2, [%o0 + CONTEXT_OFFSET_L2]
    60         stx %l3, [%o0 + CONTEXT_OFFSET_L3]
    61         stx %l4, [%o0 + CONTEXT_OFFSET_L4]
    62         stx %l5, [%o0 + CONTEXT_OFFSET_L5]
    63         stx %l6, [%o0 + CONTEXT_OFFSET_L6]
    64         stx %l7, [%o0 + CONTEXT_OFFSET_L7]
     49        CONTEXT_SAVE_ARCH_CORE %o0
    6550        retl
    6651        mov 1, %o0              ! context_save_arch returns 1
    67 FUNCTION_END(context_save_arch)
    6852
    69 FUNCTION_BEGIN(context_restore_arch)
     53context_restore_arch:
    7054        #
    7155        # Forget all previous windows, they are not going to be needed again.
     
    8569        wrpr %l0, %pstate
    8670
    87         ldx [%o0 + CONTEXT_OFFSET_SP], %sp
    88         ldx [%o0 + CONTEXT_OFFSET_PC], %o7
    89         ldx [%o0 + CONTEXT_OFFSET_I0], %i0
    90         ldx [%o0 + CONTEXT_OFFSET_I1], %i1
    91         ldx [%o0 + CONTEXT_OFFSET_I2], %i2
    92         ldx [%o0 + CONTEXT_OFFSET_I3], %i3
    93         ldx [%o0 + CONTEXT_OFFSET_I4], %i4
    94         ldx [%o0 + CONTEXT_OFFSET_I5], %i5
    95         ldx [%o0 + CONTEXT_OFFSET_FP], %fp
    96         ldx [%o0 + CONTEXT_OFFSET_I7], %i7
    97         ldx [%o0 + CONTEXT_OFFSET_L0], %l0
    98         ldx [%o0 + CONTEXT_OFFSET_L1], %l1
    99         ldx [%o0 + CONTEXT_OFFSET_L2], %l2
    100         ldx [%o0 + CONTEXT_OFFSET_L3], %l3
    101         ldx [%o0 + CONTEXT_OFFSET_L4], %l4
    102         ldx [%o0 + CONTEXT_OFFSET_L5], %l5
    103         ldx [%o0 + CONTEXT_OFFSET_L6], %l6
    104         ldx [%o0 + CONTEXT_OFFSET_L7], %l7
     71        CONTEXT_RESTORE_ARCH_CORE %o0
    10572        retl
    10673        xor %o0, %o0, %o0       ! context_restore_arch returns 0
    107 FUNCTION_END(context_restore_arch)
Note: See TracChangeset for help on using the changeset viewer.