xinyangli
8e4feb4010
NJU-ProjectN/abstract-machine 3348db971fd860be5cb28e21c18f9d0e65d0c96a Merge pull request #8 from Jasonyanyusong/master
16 lines
295 B
C
16 lines
295 B
C
#ifndef __ARCH_H__
|
|
#define __ARCH_H__
|
|
|
|
struct Context {
|
|
// TODO: fix the order of these members to match trap.S
|
|
uintptr_t hi, gpr[32], epc, cause, lo, status;
|
|
void *pdir;
|
|
};
|
|
|
|
#define GPR1 gpr[2] // v0
|
|
#define GPR2 gpr[0]
|
|
#define GPR3 gpr[0]
|
|
#define GPR4 gpr[0]
|
|
#define GPRx gpr[0]
|
|
|
|
#endif
|