Rev 1702 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1702 | Rev 1780 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | #ifdef context_set |
52 | #ifdef context_set |
53 | #undef context_set |
53 | #undef context_set |
54 | #endif |
54 | #endif |
55 | 55 | ||
56 | #define context_set(c, _pc, stack, size) \ |
56 | #define context_set(c, _pc, stack, size) \ |
57 | (c)->pc = ((__address) _pc) - 8; \ |
57 | (c)->pc = ((uintptr_t) _pc) - 8; \ |
58 | (c)->sp = ((__address) stack) + ALIGN_UP((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ |
58 | (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ |
59 | (c)->fp = -STACK_BIAS; \ |
59 | (c)->fp = -STACK_BIAS; \ |
60 | (c)->cleanwin = 0 |
60 | (c)->cleanwin = 0 |
61 | 61 | ||
62 | 62 | ||
63 | /* |
63 | /* |
64 | * Only save registers that must be preserved across |
64 | * Only save registers that must be preserved across |
65 | * function calls. |
65 | * function calls. |
66 | */ |
66 | */ |
67 | struct context { |
67 | struct context { |
68 | __address sp; /* %o6 */ |
68 | uintptr_t sp; /* %o6 */ |
69 | __address pc; /* %o7 */ |
69 | uintptr_t pc; /* %o7 */ |
70 | __u64 i0; |
70 | uint64_t i0; |
71 | __u64 i1; |
71 | uint64_t i1; |
72 | __u64 i2; |
72 | uint64_t i2; |
73 | __u64 i3; |
73 | uint64_t i3; |
74 | __u64 i4; |
74 | uint64_t i4; |
75 | __u64 i5; |
75 | uint64_t i5; |
76 | __address fp; /* %i6 */ |
76 | uintptr_t fp; /* %i6 */ |
77 | __address i7; |
77 | uintptr_t i7; |
78 | __u64 l0; |
78 | uint64_t l0; |
79 | __u64 l1; |
79 | uint64_t l1; |
80 | __u64 l2; |
80 | uint64_t l2; |
81 | __u64 l3; |
81 | uint64_t l3; |
82 | __u64 l4; |
82 | uint64_t l4; |
83 | __u64 l5; |
83 | uint64_t l5; |
84 | __u64 l6; |
84 | uint64_t l6; |
85 | __u64 l7; |
85 | uint64_t l7; |
86 | ipl_t ipl; |
86 | ipl_t ipl; |
87 | __u64 cleanwin; |
87 | uint64_t cleanwin; |
88 | }; |
88 | }; |
89 | 89 | ||
90 | #endif |
90 | #endif |
91 | 91 | ||
92 | /** @} |
92 | /** @} |