Changes in kernel/arch/sparc64/src/context.S [9d58539:a52e2f4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/context.S
r9d58539 ra52e2f4 27 27 # 28 28 29 #include <arch/context_offset.h> 29 #include <abi/asmtool.h> 30 #include <arch/context_struct.h> 30 31 #include <arch/arch.h> 31 32 #include <arch/regdef.h> … … 33 34 .text 34 35 35 .global context_save_arch36 .global context_restore_arch37 38 36 /* 39 37 * context_save_arch() is required not to create its own stack frame. See the 40 38 * generic context.h for explanation. 41 39 */ 42 context_save_arch: 40 FUNCTION_BEGIN(context_save_arch) 43 41 # 44 42 # Force all our active register windows to memory so that we can find … … 47 45 flushw 48 46 49 CONTEXT_SAVE_ARCH_CORE %o0 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] 50 65 retl 51 66 mov 1, %o0 ! context_save_arch returns 1 67 FUNCTION_END(context_save_arch) 52 68 53 context_restore_arch: 69 FUNCTION_BEGIN(context_restore_arch) 54 70 # 55 71 # Forget all previous windows, they are not going to be needed again. … … 69 85 wrpr %l0, %pstate 70 86 71 CONTEXT_RESTORE_ARCH_CORE %o0 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 72 105 retl 73 106 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.