Newer
Older
emul / emul_reg.h
@TakayunDev TakayunDev on 6 May 2016 710 bytes initial commit
#ifndef EMUL_REG__
#define EMUL_REG__

#define Szero 0	// Zero register

#define Sat 1	// using asem

#define Sv0 2	// return
#define Sv1 3

#define Sa0 4	// argment
#define Sa1 5
#define Sa2 6
#define Sa3 7

#define St0 8	// temp
#define St1 9
#define St2 10
#define St3 11
#define St4 12
#define St5 13
#define St6 14
#define St7 15

#define Ss0 16	// var
#define Ss1 17
#define Ss2 18
#define Ss3 19
#define Ss4 20
#define Ss5 21
#define Ss6 22
#define Ss7 23

#define Sk0 26	// kernel
#define Sk1 27

#define Sgp 28	// grobal

#define Ssp 29	// stack

#define Sfp 30	// frame

#define Sra 31	// return address


int reg[32];

/* initialize register 
 * this must be called */
void emul_reg_init();

#endif