Subversion Repositories HelenOS

Rev

Rev 525 | Rev 527 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 525 Rev 526
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#ifndef __sparc64_CONTEXT_H__
29
#ifndef __sparc64_CONTEXT_H__
30
#define __sparc64_CONTEXT_H__
30
#define __sparc64_CONTEXT_H__
31
 
31
 
-
 
32
#ifndef __sparc64_STACK_H__
32
#include <arch/stack.h>
33
#include <arch/stack.h>
-
 
34
#endif
33
 
35
 
34
#ifndef __sparc64_TYPES_H__
36
#ifndef __sparc64_TYPES_H__
35
# include <arch/types.h>
37
# include <arch/types.h>
36
#endif
38
#endif
37
 
39
 
Line 45... Line 47...
45
#undef context_set
47
#undef context_set
46
#endif
48
#endif
47
 
49
 
48
#define context_set(c, _pc, stack, size)                                                                \
50
#define context_set(c, _pc, stack, size)                                                                \
49
        (c)->pc = ((__address) _pc) - 8;                                                                \
51
        (c)->pc = ((__address) _pc) - 8;                                                                \
-
 
52
    (c)->fp = NULL;                                         \
50
        (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA)
53
        (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA)
51
 
54
 
52
/*
55
/*
53
 * Only save registers that must be preserved across
56
 * Only save registers that must be preserved across
-
 
57
 * function calls and that are not saved in caller's
54
 * function calls.
58
 * register window.
55
 */
59
 */
56
struct context {
60
struct context {
57
    __u64 l0;
-
 
58
    __u64 l1;
-
 
59
    __u64 l2;
-
 
60
    __u64 l3;
-
 
61
    __u64 l4;
-
 
62
    __u64 l5;
-
 
63
    __u64 l6;
-
 
64
    __u64 l7;
-
 
65
    __u64 i1;
61
    __u64 i1;
66
    __u64 i2;
62
    __u64 i2;
67
    __u64 i3;
63
    __u64 i3;
68
    __u64 i4;
64
    __u64 i4;
69
    __u64 i5;
65
    __u64 i5;
70
    __address sp;       /* %i6 */
66
    __address fp;       /* %i6 */
71
    __address pc;       /* %i7 */
67
    __address pc;       /* %i7 */
-
 
68
    __address sp;
72
    ipl_t ipl;
69
    ipl_t ipl;
73
};
70
};
74
 
71
 
75
#endif
72
#endif