Changeset a7372ccf in mainline
- Timestamp:
- 2013-11-17T21:27:39Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3bc42bd
- Parents:
- a3b034b
- Location:
- uspace/lib/c/arch/sparc32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/sparc32/include/libarch/fibril.h
ra3b034b ra7372ccf 46 46 (c)->pc = ((uintptr_t) _pc) - 8; \ 47 47 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \ 48 STACK_ALIGNMENT) - (S TACK_BIAS + SP_DELTA); \49 (c)->fp = -STACK_BIAS; \48 STACK_ALIGNMENT) - (SP_DELTA); \ 49 (c)->fp = 0; \ 50 50 (c)->tp = (uint32_t) ptls; \ 51 51 } while (0) … … 58 58 uintptr_t sp; /* %o6 */ 59 59 uintptr_t pc; /* %o7 */ 60 uint 64_t i0;61 uint 64_t i1;62 uint 64_t i2;63 uint 64_t i3;64 uint 64_t i4;65 uint 64_t i5;60 uint32_t i0; 61 uint32_t i1; 62 uint32_t i2; 63 uint32_t i3; 64 uint32_t i4; 65 uint32_t i5; 66 66 uintptr_t fp; /* %i6 */ 67 67 uintptr_t i7; 68 uint 64_t l0;69 uint 64_t l1;70 uint 64_t l2;71 uint 64_t l3;72 uint 64_t l4;73 uint 64_t l5;74 uint 64_t l6;75 uint 64_t l7;76 uint 64_t tp; /* %g7 */68 uint32_t l0; 69 uint32_t l1; 70 uint32_t l2; 71 uint32_t l3; 72 uint32_t l4; 73 uint32_t l5; 74 uint32_t l6; 75 uint32_t l7; 76 uint32_t tp; /* %g7 */ 77 77 } context_t; 78 78 79 79 static inline uintptr_t context_get_fp(context_t *ctx) 80 80 { 81 return ctx->sp + STACK_BIAS;81 return ctx->sp; 82 82 } 83 83 -
uspace/lib/c/arch/sparc32/include/libarch/stack.h
ra3b034b ra7372ccf 39 39 40 40 /** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */ 41 #define STACK_ALIGNMENT 1641 #define STACK_ALIGNMENT 8 42 42 43 43 /** … … 51 51 #define STACK_ARG_SAVE_AREA_SIZE (6 * STACK_ITEM_SIZE) 52 52 53 /**54 * By convention, the actual top of the stack is %sp + STACK_BIAS.55 */56 #define STACK_BIAS 204757 58 53 #endif 59 54 -
uspace/lib/c/arch/sparc32/src/stacktrace.c
ra3b034b ra7372ccf 57 57 rc = (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, &bprev); 58 58 if (rc == EOK) 59 *prev = bprev + STACK_BIAS;59 *prev = bprev; 60 60 return rc; 61 61 } -
uspace/lib/c/arch/sparc32/src/stacktrace_asm.S
ra3b034b ra7372ccf 45 45 # Add the stack bias to %sp to get the actual address. 46 46 retl 47 add %sp, STACK_BIAS,%o047 mov %sp, %o0 48 48 49 49 stacktrace_pc_get:
Note:
See TracChangeset
for help on using the changeset viewer.