Changeset 99de22b in mainline for uspace/lib/libc/arch/sparc64
- Timestamp:
- 2010-01-15T18:30:25Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eeb643d
- Parents:
- 387416b (diff), 563d6077 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/libc/arch/sparc64
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/sparc64/Makefile.inc
r387416b r99de22b 34 34 35 35 ARCH_SOURCES += arch/$(UARCH)/src/fibril.S \ 36 arch/$(UARCH)/src/tls.c 36 arch/$(UARCH)/src/tls.c \ 37 arch/$(UARCH)/src/stacktrace.S 37 38 38 39 GCC_CFLAGS += -mcpu=ultrasparc -m64 -
uspace/lib/libc/arch/sparc64/include/fibril.h
r387416b r99de22b 46 46 #endif 47 47 48 #define context_set(c, _pc, stack, size, ptls) \ 49 (c)->pc = ((uintptr_t) _pc) - 8; \ 50 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \ 51 STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ 52 (c)->fp = -STACK_BIAS; \ 53 (c)->tp = ptls 48 #define context_set(c, _pc, stack, size, ptls) \ 49 do { \ 50 (c)->pc = ((uintptr_t) _pc) - 8; \ 51 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \ 52 STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ 53 (c)->fp = -STACK_BIAS; \ 54 (c)->tp = ptls; \ 55 } while (0) 54 56 55 57 /* -
uspace/lib/libc/arch/sparc64/src/entry.s
r387416b r99de22b 39 39 # 40 40 __entry: 41 # 42 # Create the first stack frame. 43 # 44 save %sp, -176, %sp 45 flushw 46 add %g0, -0x7ff, %fp 47 41 48 # Pass pcb_ptr as the first argument to __main() 42 mov % o1, %o049 mov %i1, %o0 43 50 sethi %hi(_gp), %l7 44 51 call __main -
uspace/lib/libc/arch/sparc64/src/fibril.S
r387416b r99de22b 35 35 36 36 context_save: 37 # 38 # We rely on the kernel to flush our active register windows to memory 39 # should a thread switch occur. 40 # 37 41 CONTEXT_SAVE_ARCH_CORE %o0 38 42 retl … … 42 46 # 43 47 # Flush all active windows. 44 # This is essential, because CONTEXT_LOAD overwrites 45 # %sp of CWP - 1 with the value written to %fp of CWP. 46 # Flushing all active windows mitigates this problem 47 # as CWP - 1 becomes the overlap window. 48 # 48 # This is essential, because CONTEXT_RESTORE_ARCH_CORE overwrites %sp of 49 # CWP - 1 with the value written to %fp of CWP. Flushing all active 50 # windows mitigates this problem as CWP - 1 becomes the overlap window. 51 # 49 52 flushw 50 53 -
uspace/lib/libc/arch/sparc64/src/thread_entry.s
r387416b r99de22b 35 35 # 36 36 __thread_entry: 37 # 38 # Create the first stack frame. 39 # 40 save %sp, -176, %sp 41 flushw 42 add %g0, -0x7ff, %fp 43 37 44 sethi %hi(_gp), %l7 38 45 call __thread_main ! %o0 contains address of uarg
Note:
See TracChangeset
for help on using the changeset viewer.