Changeset 50805c9 in mainline
- Timestamp:
- 2014-09-06T09:31:39Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b482287
- Parents:
- 089901e
- Location:
- uspace/lib/c/arch/sparc64
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified uspace/lib/c/arch/sparc64/Makefile.inc ¶
r089901e r50805c9 37 37 38 38 ARCH_AUTOGENS_AG = \ 39 arch/$(UARCH)/include/libarch/istate_struct.ag 39 arch/$(UARCH)/include/libarch/istate_struct.ag \ 40 arch/$(UARCH)/include/libarch/fibril_context.ag 40 41 41 42 .PRECIOUS: arch/$(UARCH)/src/entry.o -
TabularUnified uspace/lib/c/arch/sparc64/include/libarch/fibril.h ¶
r089901e r50805c9 37 37 38 38 #include <libarch/stack.h> 39 #include <libarch/fibril_context.h> 39 40 #include <sys/types.h> 40 41 #include <align.h> … … 51 52 } while (0) 52 53 53 /*54 * Save only registers that must be preserved across55 * function calls.56 */57 typedef struct {58 uintptr_t sp; /* %o6 */59 uintptr_t pc; /* %o7 */60 uint64_t i0;61 uint64_t i1;62 uint64_t i2;63 uint64_t i3;64 uint64_t i4;65 uint64_t i5;66 uintptr_t fp; /* %i6 */67 uintptr_t i7;68 uint64_t l0;69 uint64_t l1;70 uint64_t l2;71 uint64_t l3;72 uint64_t l4;73 uint64_t l5;74 uint64_t l6;75 uint64_t l7;76 uint64_t tp; /* %g7 */77 } context_t;78 79 54 static inline uintptr_t context_get_fp(context_t *ctx) 80 55 { -
TabularUnified uspace/lib/c/arch/sparc64/src/fibril.S ¶
r089901e r50805c9 27 27 # 28 28 29 #include <libarch/ context_offset.h>29 #include <libarch/fibril_context.h> 30 30 31 31 .text … … 39 39 # should a thread switch occur. 40 40 # 41 CONTEXT_SAVE_ARCH_CORE %o0 41 stx %sp, [%o0 + CONTEXT_OFFSET_SP] 42 stx %o7, [%o0 + CONTEXT_OFFSET_PC] 43 stx %i0, [%o0 + CONTEXT_OFFSET_I0] 44 stx %i1, [%o0 + CONTEXT_OFFSET_I1] 45 stx %i2, [%o0 + CONTEXT_OFFSET_I2] 46 stx %i3, [%o0 + CONTEXT_OFFSET_I3] 47 stx %i4, [%o0 + CONTEXT_OFFSET_I4] 48 stx %i5, [%o0 + CONTEXT_OFFSET_I5] 49 stx %fp, [%o0 + CONTEXT_OFFSET_FP] 50 stx %i7, [%o0 + CONTEXT_OFFSET_I7] 51 stx %l0, [%o0 + CONTEXT_OFFSET_L0] 52 stx %l1, [%o0 + CONTEXT_OFFSET_L1] 53 stx %l2, [%o0 + CONTEXT_OFFSET_L2] 54 stx %l3, [%o0 + CONTEXT_OFFSET_L3] 55 stx %l4, [%o0 + CONTEXT_OFFSET_L4] 56 stx %l5, [%o0 + CONTEXT_OFFSET_L5] 57 stx %l6, [%o0 + CONTEXT_OFFSET_L6] 58 stx %l7, [%o0 + CONTEXT_OFFSET_L7] 59 stx %g7, [%o0 + CONTEXT_OFFSET_TP] 42 60 retl 43 61 mov 1, %o0 ! context_save_arch returns 1 … … 52 70 flushw 53 71 54 CONTEXT_RESTORE_ARCH_CORE %o0 72 ldx [%o0 + CONTEXT_OFFSET_SP], %sp 73 ldx [%o0 + CONTEXT_OFFSET_PC], %o7 74 ldx [%o0 + CONTEXT_OFFSET_I0], %i0 75 ldx [%o0 + CONTEXT_OFFSET_I1], %i1 76 ldx [%o0 + CONTEXT_OFFSET_I2], %i2 77 ldx [%o0 + CONTEXT_OFFSET_I3], %i3 78 ldx [%o0 + CONTEXT_OFFSET_I4], %i4 79 ldx [%o0 + CONTEXT_OFFSET_I5], %i5 80 ldx [%o0 + CONTEXT_OFFSET_FP], %fp 81 ldx [%o0 + CONTEXT_OFFSET_I7], %i7 82 ldx [%o0 + CONTEXT_OFFSET_L0], %l0 83 ldx [%o0 + CONTEXT_OFFSET_L1], %l1 84 ldx [%o0 + CONTEXT_OFFSET_L2], %l2 85 ldx [%o0 + CONTEXT_OFFSET_L3], %l3 86 ldx [%o0 + CONTEXT_OFFSET_L4], %l4 87 ldx [%o0 + CONTEXT_OFFSET_L5], %l5 88 ldx [%o0 + CONTEXT_OFFSET_L6], %l6 89 ldx [%o0 + CONTEXT_OFFSET_L7], %l7 90 ldx [%o0 + CONTEXT_OFFSET_TP], %g7 55 91 retl 56 92 xor %o0, %o0, %o0 ! context_restore_arch returns 0
Note:
See TracChangeset
for help on using the changeset viewer.