Subversion Repositories HelenOS-historic

Rev

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

Rev 413 Rev 414
Line 28... Line 28...
28
 
28
 
29
#ifndef __ia64_CONTEXT_H__
29
#ifndef __ia64_CONTEXT_H__
30
#define __ia64_CONTEXT_H__
30
#define __ia64_CONTEXT_H__
31
 
31
 
32
#include <arch/types.h>
32
#include <arch/types.h>
-
 
33
#include <typedefs.h>
33
#include <align.h>
34
#include <align.h>
34
 
35
 
35
#define STACK_ITEM_SIZE 16
36
#define STACK_ITEM_SIZE 16
36
#define STACK_ALIGNMENT 16
37
#define STACK_ALIGNMENT 16
37
 
38
 
Line 48... Line 49...
48
#endif
49
#endif
49
 
50
 
50
#define context_set(c, _pc, stack, size)                        \
51
#define context_set(c, _pc, stack, size)                        \
51
    (c)->pc = (__address) _pc;                          \
52
    (c)->pc = (__address) _pc;                          \
52
    (c)->bsp = ((__address) stack) + ALIGN(sizeof(the_t), STACK_ALIGNMENT);     \
53
    (c)->bsp = ((__address) stack) + ALIGN(sizeof(the_t), STACK_ALIGNMENT);     \
53
    (c)->sp = ((__address) stack) + ALIGN((size) - SP_DELTA, STACK_ALIGNMENT);
54
    (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - SP_DELTA;
54
 
55
 
55
/*
56
/*
56
 * Only save registers that must be preserved across
57
 * Only save registers that must be preserved across
57
 * function calls.
58
 * function calls.
58
 */
59
 */
Line 63... Line 64...
63
     */
64
     */
64
    __u64 ar_pfs;
65
    __u64 ar_pfs;
65
    __u64 ar_unat_caller;
66
    __u64 ar_unat_caller;
66
    __u64 ar_unat_callee;
67
    __u64 ar_unat_callee;
67
    __u64 ar_rsc;
68
    __u64 ar_rsc;
68
    __u64 bsp;  /* ar_bsp */
69
    __address bsp;      /* ar_bsp */
69
    __u64 ar_rnat;
70
    __u64 ar_rnat;
70
    __u64 ar_lc;
71
    __u64 ar_lc;
71
 
72
 
72
    /*
73
    /*
73
     * General registers
74
     * General registers
Line 75... Line 76...
75
    __u64 r1;
76
    __u64 r1;
76
    __u64 r4;
77
    __u64 r4;
77
    __u64 r5;
78
    __u64 r5;
78
    __u64 r6;
79
    __u64 r6;
79
    __u64 r7;
80
    __u64 r7;
80
    __u64 sp;       /* r12 */
81
    __address sp;       /* r12 */
81
    __u64 r13;
82
    __u64 r13;
82
   
83
   
83
    /*
84
    /*
84
     * Branch registers
85
     * Branch registers
85
     */
86
     */
86
    __u64 pc;       /* b0 */
87
    __address pc;       /* b0 */
87
    __u64 b1;
88
    __u64 b1;
88
    __u64 b2;
89
    __u64 b2;
89
    __u64 b3;
90
    __u64 b3;
90
    __u64 b4;
91
    __u64 b4;
91
    __u64 b5;
92
    __u64 b5;