Dmitry V. Levin | 4f2d1ae | 2015-02-15 03:27:13 +0000 | [diff] [blame] | 1 | struct mips_regs { |
| 2 | uint64_t uregs[38]; |
| 3 | }; |
| 4 | |
| 5 | extern struct mips_regs mips_regs; |
| 6 | |
Dmitry V. Levin | 5503dd2 | 2015-02-13 02:12:14 +0000 | [diff] [blame] | 7 | #define REG_V0 2 |
| 8 | #define REG_A0 4 |
Dmitry V. Levin | 4f2d1ae | 2015-02-15 03:27:13 +0000 | [diff] [blame] | 9 | |
| 10 | #define mips_REG_V0 mips_regs.uregs[REG_V0] |
| 11 | #define mips_REG_A0 mips_regs.uregs[REG_A0 + 0] |
| 12 | #define mips_REG_A1 mips_regs.uregs[REG_A0 + 1] |
| 13 | #define mips_REG_A2 mips_regs.uregs[REG_A0 + 2] |
| 14 | #define mips_REG_A3 mips_regs.uregs[REG_A0 + 3] |
| 15 | #define mips_REG_A4 mips_regs.uregs[REG_A0 + 4] |
| 16 | #define mips_REG_A5 mips_regs.uregs[REG_A0 + 5] |
| 17 | #define mips_REG_SP mips_regs.uregs[29] |
| 18 | #define mips_REG_EPC mips_regs.uregs[34] |