Changeset 619e2a6b in mainline
- Timestamp:
- 2010-10-25T21:29:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 84b7384
- Parents:
- 12c38f5
- Location:
- uspace/lib/c/arch
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/abs32le/include/fibril.h
r12c38f5 r619e2a6b 44 44 (ctx)->pc = (uintptr_t) (_pc); \ 45 45 (ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \ 46 (ctx)->fp = 0; \ 46 47 (ctx)->tls = ((uintptr_t) (ptls)) + sizeof(tcb_t); \ 47 48 } while (0) … … 53 54 typedef struct { 54 55 uintptr_t sp; 56 uintptr_t fp; 55 57 uintptr_t pc; 56 58 uintptr_t tls; 57 59 } context_t; 60 61 static inline uintptr_t context_get_fp(context_t *ctx) 62 { 63 /* On real hardware, this function returns the frame pointer. */ 64 return ctx->fp; 65 } 58 66 59 67 #endif -
uspace/lib/c/arch/amd64/include/fibril.h
r12c38f5 r619e2a6b 56 56 */ 57 57 typedef struct { 58 uint64_t sp; 59 uint64_t pc; 60 61 uint64_t rbx; 62 uint64_t rbp; 58 uint64_t sp; 59 uint64_t pc; 63 60 64 uint64_t r12; 65 uint64_t r13; 66 uint64_t r14; 67 uint64_t r15; 61 uint64_t rbx; 62 uint64_t rbp; 68 63 69 uint64_t tls; 64 uint64_t r12; 65 uint64_t r13; 66 uint64_t r14; 67 uint64_t r15; 68 69 uint64_t tls; 70 70 } context_t; 71 72 static inline uintptr_t context_get_fp(context_t *ctx) 73 { 74 return ctx->rbp; 75 } 71 76 72 77 #endif -
uspace/lib/c/arch/arm32/include/fibril.h
r12c38f5 r619e2a6b 86 86 } context_t; 87 87 88 static inline uintptr_t context_get_fp(context_t *ctx) 89 { 90 return ctx->fp; 91 } 92 88 93 89 94 #endif -
uspace/lib/c/arch/ia32/include/fibril.h
r12c38f5 r619e2a6b 67 67 } context_t; 68 68 69 static inline uintptr_t context_get_fp(context_t *ctx) 70 { 71 return ctx->ebp; 72 } 73 69 74 #endif 70 75 -
uspace/lib/c/arch/ia64/include/fibril.h
r12c38f5 r619e2a6b 130 130 } context_t; 131 131 132 static inline uintptr_t context_get_fp(context_t *ctx) 133 { 134 return 0; /* FIXME */ 135 } 136 132 137 #endif 133 138 -
uspace/lib/c/arch/mips32/include/fibril.h
r12c38f5 r619e2a6b 85 85 } context_t; 86 86 87 static inline uintptr_t context_get_fp(context_t *ctx) 88 { 89 return ctx->sp; 90 } 91 87 92 #endif 88 93 -
uspace/lib/c/arch/ppc32/include/fibril.h
r12c38f5 r619e2a6b 78 78 } __attribute__ ((packed)) context_t; 79 79 80 static inline uintptr_t context_get_fp(context_t *ctx) 81 { 82 return ctx->sp; 83 } 84 80 85 #endif 81 86 -
uspace/lib/c/arch/sparc64/include/fibril.h
r12c38f5 r619e2a6b 77 77 } context_t; 78 78 79 static inline uintptr_t context_get_fp(context_t *ctx) 80 { 81 return ctx->sp + STACK_BIAS; 82 } 83 79 84 #endif 80 85
Note:
See TracChangeset
for help on using the changeset viewer.