~jakub/helenos/upa

« back to all changes in this revision

Viewing changes to kernel/arch/mips32/include/exception.h

  • Committer: Jakub Jermar
  • Date: 2010-07-22 14:03:56 UTC
  • Revision ID: jakub@jermar.eu-20100722140356-0ud7uf5aybdakwga
Rearrange mips32 istate_t to contain all registers and in a format suitable for syscalls / parameter passing. (Breaks mips32)

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
#define EXC_VCED   31
60
60
 
61
61
typedef struct istate {
 
62
        /*
 
63
         * The first seven registers are arranged so that the istate structure
 
64
         * can be used both for exception handlers and for the syscall handler.
 
65
         */
 
66
        uint32_t a0;    /* arg1 */
 
67
        uint32_t a1;    /* arg2 */
 
68
        uint32_t a2;    /* arg3 */
 
69
        uint32_t a3;    /* arg4 */
 
70
        uint32_t t0;    /* arg5 */
 
71
        uint32_t t1;    /* arg6 */
 
72
        uint32_t v0;    /* arg7 */
 
73
        uint32_t v1;
62
74
        uint32_t at;
63
 
        uint32_t v0;
64
 
        uint32_t v1;
65
 
        uint32_t a0;
66
 
        uint32_t a1;
67
 
        uint32_t a2;
68
 
        uint32_t a3;
69
 
        uint32_t t0;
70
 
        uint32_t t1;
71
75
        uint32_t t2;
72
76
        uint32_t t3;
73
77
        uint32_t t4;
74
78
        uint32_t t5;
75
79
        uint32_t t6;
76
80
        uint32_t t7;
 
81
        uint32_t s0
 
82
        uint32_t s1
 
83
        uint32_t s2
 
84
        uint32_t s3
 
85
        uint32_t s4
 
86
        uint32_t s5
 
87
        uint32_t s6
 
88
        uint32_t s7
77
89
        uint32_t t8;
78
90
        uint32_t t9;
 
91
        uint32_t kt0;
 
92
        uint32_t kt1;   /* We use it as thread-local pointer */
79
93
        uint32_t gp;
80
94
        uint32_t sp;
 
95
        uint32_t s8;
81
96
        uint32_t ra;
82
97
        
83
98
        uint32_t lo;
84
99
        uint32_t hi;
85
100
        
86
 
        uint32_t status;  /* cp0_status */
87
 
        uint32_t epc;     /* cp0_epc */
88
 
        uint32_t k1;      /* We use it as thread-local pointer */
 
101
        uint32_t status;        /* cp0_status */
 
102
        uint32_t epc;           /* cp0_epc */
 
103
 
 
104
        uint32_t alignment;     /* to make sizeof(istate_t) a multiple of 8 */
89
105
} istate_t;
90
106
 
91
107
NO_TRACE static inline void istate_set_retaddr(istate_t *istate,