Rev 526 | Rev 528 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 526 | Rev 527 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | #undef context_set |
47 | #undef context_set |
48 | #endif |
48 | #endif |
49 | 49 | ||
50 | #define context_set(c, _pc, stack, size) \ |
50 | #define context_set(c, _pc, stack, size) \ |
51 | (c)->pc = ((__address) _pc) - 8; \ |
51 | (c)->pc = ((__address) _pc) - 8; \ |
52 | (c)->fp = NULL; \ |
- | |
53 | (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA) |
52 | (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA) |
54 | 53 | ||
55 | /* |
54 | /* |
56 | * Only save registers that must be preserved across |
55 | * Only save registers that must be preserved across |
57 | * function calls and that are not saved in caller's |
56 | * function calls and that are not saved in caller's |
58 | * register window. |
57 | * register window. |
59 | */ |
58 | */ |
60 | struct context { |
59 | struct context { |
61 | __u64 i1; |
60 | __u64 o1; |
62 | __u64 i2; |
61 | __u64 o2; |
63 | __u64 i3; |
62 | __u64 o3; |
64 | __u64 i4; |
63 | __u64 o4; |
65 | __u64 i5; |
64 | __u64 o5; |
66 | __address fp; /* %i6 */ |
65 | __address sp; /* %o6 */ |
67 | __address pc; /* %i7 */ |
66 | __address pc; /* %o7 */ |
68 | __address sp; |
- | |
69 | ipl_t ipl; |
67 | ipl_t ipl; |
70 | }; |
68 | }; |
71 | 69 | ||
72 | #endif |
70 | #endif |