Changeset ecc83bd in mainline
- Timestamp:
- 2008-04-15T20:05:13Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9765182
- Parents:
- 9a5f0cb
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/context_offset.h
r9a5f0cb recc83bd 49 49 #define OFFSET_L7 0x88 50 50 51 #ifndef KERNEL 52 # define OFFSET_TP 0x90 51 53 #endif 54 55 #ifdef __ASM__ 56 57 .macro CONTEXT_SAVE_ARCH_CORE ctx:req 58 stx %sp, [\ctx + OFFSET_SP] 59 stx %o7, [\ctx + OFFSET_PC] 60 stx %i0, [\ctx + OFFSET_I0] 61 stx %i1, [\ctx + OFFSET_I1] 62 stx %i2, [\ctx + OFFSET_I2] 63 stx %i3, [\ctx + OFFSET_I3] 64 stx %i4, [\ctx + OFFSET_I4] 65 stx %i5, [\ctx + OFFSET_I5] 66 stx %fp, [\ctx + OFFSET_FP] 67 stx %i7, [\ctx + OFFSET_I7] 68 stx %l0, [\ctx + OFFSET_L0] 69 stx %l1, [\ctx + OFFSET_L1] 70 stx %l2, [\ctx + OFFSET_L2] 71 stx %l3, [\ctx + OFFSET_L3] 72 stx %l4, [\ctx + OFFSET_L4] 73 stx %l5, [\ctx + OFFSET_L5] 74 stx %l6, [\ctx + OFFSET_L6] 75 stx %l7, [\ctx + OFFSET_L7] 76 #ifndef KERNEL 77 stx %g7, [\ctx + OFFSET_TP] 78 #endif 79 .endm 80 81 .macro CONTEXT_RESTORE_ARCH_CORE ctx:req 82 ldx [\ctx + OFFSET_SP], %sp 83 ldx [\ctx + OFFSET_PC], %o7 84 ldx [\ctx + OFFSET_I0], %i0 85 ldx [\ctx + OFFSET_I1], %i1 86 ldx [\ctx + OFFSET_I2], %i2 87 ldx [\ctx + OFFSET_I3], %i3 88 ldx [\ctx + OFFSET_I4], %i4 89 ldx [\ctx + OFFSET_I5], %i5 90 ldx [\ctx + OFFSET_FP], %fp 91 ldx [\ctx + OFFSET_I7], %i7 92 ldx [\ctx + OFFSET_L0], %l0 93 ldx [\ctx + OFFSET_L1], %l1 94 ldx [\ctx + OFFSET_L2], %l2 95 ldx [\ctx + OFFSET_L3], %l3 96 ldx [\ctx + OFFSET_L4], %l4 97 ldx [\ctx + OFFSET_L5], %l5 98 ldx [\ctx + OFFSET_L6], %l6 99 ldx [\ctx + OFFSET_L7], %l7 100 #ifndef KERNEL 101 ldx [\ctx + OFFSET_TP], %g7 102 #endif 103 .endm 104 105 #endif /* __ASM__ */ 106 107 #endif -
kernel/arch/sparc64/src/context.S
r9a5f0cb recc83bd 37 37 */ 38 38 39 #include <arch/context_offset.h> 40 39 41 .text 40 42 … … 42 44 .global context_restore_arch 43 45 44 .macro CONTEXT_STORE r45 stx %sp, [\r + OFFSET_SP]46 stx %o7, [\r + OFFSET_PC]47 stx %i0, [\r + OFFSET_I0]48 stx %i1, [\r + OFFSET_I1]49 stx %i2, [\r + OFFSET_I2]50 stx %i3, [\r + OFFSET_I3]51 stx %i4, [\r + OFFSET_I4]52 stx %i5, [\r + OFFSET_I5]53 stx %fp, [\r + OFFSET_FP]54 stx %i7, [\r + OFFSET_I7]55 stx %l0, [\r + OFFSET_L0]56 stx %l1, [\r + OFFSET_L1]57 stx %l2, [\r + OFFSET_L2]58 stx %l3, [\r + OFFSET_L3]59 stx %l4, [\r + OFFSET_L4]60 stx %l5, [\r + OFFSET_L5]61 stx %l6, [\r + OFFSET_L6]62 stx %l7, [\r + OFFSET_L7]63 .endm64 65 .macro CONTEXT_LOAD r66 ldx [\r + OFFSET_SP], %sp67 ldx [\r + OFFSET_PC], %o768 ldx [\r + OFFSET_I0], %i069 ldx [\r + OFFSET_I1], %i170 ldx [\r + OFFSET_I2], %i271 ldx [\r + OFFSET_I3], %i372 ldx [\r + OFFSET_I4], %i473 ldx [\r + OFFSET_I5], %i574 ldx [\r + OFFSET_FP], %fp75 ldx [\r + OFFSET_I7], %i776 ldx [\r + OFFSET_L0], %l077 ldx [\r + OFFSET_L1], %l178 ldx [\r + OFFSET_L2], %l279 ldx [\r + OFFSET_L3], %l380 ldx [\r + OFFSET_L4], %l481 ldx [\r + OFFSET_L5], %l582 ldx [\r + OFFSET_L6], %l683 ldx [\r + OFFSET_L7], %l784 .endm85 86 46 context_save_arch: 87 CONTEXT_S TORE %o047 CONTEXT_SAVE_ARCH_CORE %o0 88 48 retl 89 49 mov 1, %o0 ! context_save_arch returns 1 … … 99 59 flushw 100 60 101 CONTEXT_ LOAD%o061 CONTEXT_RESTORE_ARCH_CORE %o0 102 62 retl 103 63 xor %o0, %o0, %o0 ! context_restore_arch returns 0 -
uspace/lib/libc/arch/sparc64/src/fibril.S
r9a5f0cb recc83bd 27 27 # 28 28 29 #include < libarch/context_offset.h>29 #include <kernel/arch/context_offset.h> 30 30 31 31 .text … … 34 34 .global context_restore 35 35 36 .macro CONTEXT_STORE r37 stx %sp, [\r + OFFSET_SP]38 stx %o7, [\r + OFFSET_PC]39 stx %i0, [\r + OFFSET_I0]40 stx %i1, [\r + OFFSET_I1]41 stx %i2, [\r + OFFSET_I2]42 stx %i3, [\r + OFFSET_I3]43 stx %i4, [\r + OFFSET_I4]44 stx %i5, [\r + OFFSET_I5]45 stx %fp, [\r + OFFSET_FP]46 stx %i7, [\r + OFFSET_I7]47 stx %l0, [\r + OFFSET_L0]48 stx %l1, [\r + OFFSET_L1]49 stx %l2, [\r + OFFSET_L2]50 stx %l3, [\r + OFFSET_L3]51 stx %l4, [\r + OFFSET_L4]52 stx %l5, [\r + OFFSET_L5]53 stx %l6, [\r + OFFSET_L6]54 stx %l7, [\r + OFFSET_L7]55 stx %g7, [\r + OFFSET_TP]56 .endm57 58 .macro CONTEXT_LOAD r59 ldx [\r + OFFSET_SP], %sp60 ldx [\r + OFFSET_PC], %o761 ldx [\r + OFFSET_I0], %i062 ldx [\r + OFFSET_I1], %i163 ldx [\r + OFFSET_I2], %i264 ldx [\r + OFFSET_I3], %i365 ldx [\r + OFFSET_I4], %i466 ldx [\r + OFFSET_I5], %i567 ldx [\r + OFFSET_FP], %fp68 ldx [\r + OFFSET_I7], %i769 ldx [\r + OFFSET_L0], %l070 ldx [\r + OFFSET_L1], %l171 ldx [\r + OFFSET_L2], %l272 ldx [\r + OFFSET_L3], %l373 ldx [\r + OFFSET_L4], %l474 ldx [\r + OFFSET_L5], %l575 ldx [\r + OFFSET_L6], %l676 ldx [\r + OFFSET_L7], %l777 ldx [\r + OFFSET_TP], %g778 .endm79 80 36 context_save: 81 CONTEXT_S TORE %o037 CONTEXT_SAVE_ARCH_CORE %o0 82 38 retl 83 39 mov 1, %o0 ! context_save_arch returns 1 … … 93 49 flushw 94 50 95 CONTEXT_ LOAD%o051 CONTEXT_RESTORE_ARCH_CORE %o0 96 52 retl 97 53 xor %o0, %o0, %o0 ! context_restore_arch returns 0
Note:
See TracChangeset
for help on using the changeset viewer.