2019-01-13 15:09:05 +08:00
|
|
|
#ifndef __ARCH_H__
|
|
|
|
#define __ARCH_H__
|
|
|
|
|
2019-01-14 01:18:13 +08:00
|
|
|
struct _Context {
|
2019-02-19 14:02:13 +08:00
|
|
|
union {
|
|
|
|
struct _AddressSpace *prot;
|
|
|
|
uint32_t gpr[32];
|
|
|
|
};
|
2019-01-17 20:09:42 +08:00
|
|
|
uint32_t lo, hi;
|
|
|
|
uint32_t cause, status, epc;
|
2019-01-14 01:18:13 +08:00
|
|
|
};
|
|
|
|
|
2019-02-19 14:02:13 +08:00
|
|
|
#define GPR1 gpr[4]
|
|
|
|
#define GPR2 gpr[5]
|
|
|
|
#define GPR3 gpr[6]
|
|
|
|
#define GPR4 gpr[7]
|
|
|
|
#define GPRx gpr[2]
|
2019-01-17 20:09:42 +08:00
|
|
|
|
2019-01-13 15:09:05 +08:00
|
|
|
#endif
|