Changeset 3bc42bd in mainline
- Timestamp:
- 2013-11-26T18:49:32Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a218709
- Parents:
- a7372ccf
- Location:
- uspace/lib/c/arch/sparc32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/sparc32/include/libarch/stack.h
ra7372ccf r3bc42bd 33 33 */ 34 34 35 #ifndef LIBC_sparc 64_STACK_H_36 #define LIBC_sparc 64_STACK_H_35 #ifndef LIBC_sparc32_STACK_H_ 36 #define LIBC_sparc32_STACK_H_ 37 37 38 #define STACK_ITEM_SIZE 838 #define STACK_ITEM_SIZE 4 39 39 40 40 /** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */ -
uspace/lib/c/arch/sparc32/include/libarch/stackarg.h
ra7372ccf r3bc42bd 27 27 */ 28 28 29 /** @addtogroup libcsparc 6429 /** @addtogroup libcsparc32 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef LIBC_sparc 64_STACKARG_H_36 #define LIBC_sparc 64_STACKARG_H_35 #ifndef LIBC_sparc32_STACKARG_H_ 36 #define LIBC_sparc32_STACKARG_H_ 37 37 38 38 #endif -
uspace/lib/c/arch/sparc32/include/libarch/thread.h
ra7372ccf r3bc42bd 28 28 */ 29 29 30 /** @addtogroup libcsparc 6430 /** @addtogroup libcsparc32 31 31 * @{ 32 32 */ 33 33 34 #ifndef LIBC_sparc 64_THREAD_H_35 #define LIBC_sparc 64_THREAD_H_34 #ifndef LIBC_sparc32_THREAD_H_ 35 #define LIBC_sparc32_THREAD_H_ 36 36 37 37 #endif -
uspace/lib/c/arch/sparc32/src/entry.s
ra7372ccf r3bc42bd 44 44 save %sp, -176, %sp 45 45 # XXX flushw 46 mov 7, %g1 47 1: subcc %g1, 1, %g1 48 bg 1b 49 save %sp, -64, %sp 50 51 mov 7, %g1 52 1: subcc %g1, 1, %g1 53 bg 1b 54 55 # XXX end flush 46 56 # add %g0, -0x7ff, %fp 47 57 set 0x80000000, %fp -
uspace/lib/c/arch/sparc32/src/fibril.S
ra7372ccf r3bc42bd 31 31 .text 32 32 33 .global flush_windows 33 34 .global context_save 34 35 .global context_restore … … 39 40 # should a thread switch occur. 40 41 # 42 mov 7, %g1 43 1: subcc %g1, 1, %g1 44 bg 1b 45 save %sp, -64, %sp 46 47 mov 7, %g1 48 1: subcc %g1, 1, %g1 49 bg 1b 50 restore 51 41 52 CONTEXT_SAVE_ARCH_CORE %o0 42 53 retl … … 52 63 # XXX 53 64 # flushw 65 # ta 0x4f 66 # nop 67 mov 7, %g1 68 1: subcc %g1, 1, %g1 69 bg 1b 70 save %sp, -64, %sp 71 72 mov 7, %g1 73 1: subcc %g1, 1, %g1 74 bg 1b 75 restore 54 76 55 77 CONTEXT_RESTORE_ARCH_CORE %o0 -
uspace/lib/c/arch/sparc32/src/stacktrace.c
ra7372ccf r3bc42bd 2 2 * Copyright (c) 2010 Jakub Jermar 3 3 * Copyright (c) 2010 Jiri Svoboda 4 * Copyright (c) 2013 Jakub Klama 4 5 * All rights reserved. 5 6 * … … 28 29 */ 29 30 30 /** @addtogroup sparc 6431 /** @addtogroup sparc32 31 32 * @{ 32 33 */ … … 41 42 #include <stacktrace.h> 42 43 43 #define FRAME_OFFSET_FP_PREV (14 * 8)44 #define FRAME_OFFSET_RA (15 * 8)44 #define FRAME_OFFSET_FP_PREV (14 * 4) 45 #define FRAME_OFFSET_RA (15 * 4) 45 46 46 47 bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp) -
uspace/lib/c/arch/sparc32/src/stacktrace_asm.S
ra7372ccf r3bc42bd 38 38 save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp 39 39 # Flush all other windows to memory so that we can read their contents. 40 # XXX flushw 40 mov 7, %g1 41 1: subcc %g1, 1, %g1 42 bg 1b 43 save %sp, -64, %sp 44 45 mov 7, %g1 46 1: subcc %g1, 1, %g1 47 bg 1b 48 41 49 ret 42 50 restore -
uspace/lib/c/arch/sparc32/src/thread_entry.s
ra7372ccf r3bc42bd 40 40 save %sp, -176, %sp 41 41 # XXX flushw 42 add %g0, -0x7ff, %fp 42 mov 7, %g1 43 1: subcc %g1, 1, %g1 44 bg 1b 45 save %sp, -64, %sp 46 47 mov 7, %g1 48 1: subcc %g1, 1, %g1 49 bg 1b 50 # XXX end flushw 51 set 0x80000000, %fp 43 52 44 53 #
Note:
See TracChangeset
for help on using the changeset viewer.