Changeset ee69c49 in mainline
- Timestamp:
- 2005-12-01T10:36:02Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74813216
- Parents:
- 5ff4f6b
- Location:
- arch/sparc64
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/sparc64/include/context.h
r5ff4f6b ree69c49 30 30 #define __sparc64_CONTEXT_H__ 31 31 32 #include <arch/stack.h> 33 32 34 #ifndef __sparc64_TYPES_H__ 33 35 # include <arch/types.h> … … 38 40 #endif 39 41 40 /** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */ 41 #define STACK_ALIGNMENT 16 42 43 #define STACK_ITEM_SIZE sizeof(__u64) 44 45 /** 46 * 16-extended-word save area for %i[0-7] and %l[0-7] registers. 47 */ 48 #define SAVE_AREA (16*STACK_ITEM_SIZE) 49 #define SP_DELTA SAVE_AREA 50 51 /** 52 * By convention, the actual top of the stack is %sp + BIAS. 53 */ 54 #define BIAS 2047 42 #define SP_DELTA STACK_WINDOW_SAVE_AREA_SIZE 55 43 56 44 #ifdef context_set … … 60 48 #define context_set(c, _pc, stack, size) \ 61 49 (c)->pc = ((__address) _pc) - 8; \ 62 (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - ( BIAS + SP_DELTA)50 (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA) 63 51 64 52 /* -
arch/sparc64/src/context.S
r5ff4f6b ree69c49 28 28 29 29 #include <arch/context_offset.h> 30 #include <arch/stack.h> 30 31 31 32 .text … … 73 74 74 75 context_save_arch: 75 save %sp, - 128, %sp76 save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp 76 77 CONTEXT_STORE %i0 77 78 … … 82 83 83 84 context_restore_arch: 84 save %sp, - 128, %sp85 save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp 85 86 CONTEXT_LOAD %i0 86 87 … … 88 89 xor %i0, %i0, %i0 89 90 ret 90 restore %sp, 128, %sp91 restore %sp, STACK_WINDOW_SAVE_AREA_SIZE, %sp
Note:
See TracChangeset
for help on using the changeset viewer.