| 1 | #define SaveIP() reg_eip=(Bit32u)(inst.cseip-SegBase(cs)); |
| 2 | #define LoadIP() inst.cseip=SegBase(cs)+reg_eip; |
| 3 | #define GetIP() (inst.cseip-SegBase(cs)) |
| 4 | |
| 5 | #define RunException() { \ |
| 6 | CPU_Exception(cpu.exception.which,cpu.exception.error); \ |
| 7 | continue; \ |
| 8 | } |
| 9 | |
| 10 | static INLINE Bit8u the_Fetchb(EAPoint & loc) { |
| 11 | Bit8u temp=LoadMb(loc); |
| 12 | loc+=1; |
| 13 | return temp; |
| 14 | } |
| 15 | |
| 16 | static INLINE Bit16u the_Fetchw(EAPoint & loc) { |
| 17 | Bit16u temp=LoadMw(loc); |
| 18 | loc+=2; |
| 19 | return temp; |
| 20 | } |
| 21 | static INLINE Bit32u the_Fetchd(EAPoint & loc) { |
| 22 | Bit32u temp=LoadMd(loc); |
| 23 | loc+=4; |
| 24 | return temp; |
| 25 | } |
| 26 | |
| 27 | #define Fetchb() the_Fetchb(inst.cseip) |
| 28 | #define Fetchw() the_Fetchw(inst.cseip) |
| 29 | #define Fetchd() the_Fetchd(inst.cseip) |
| 30 | |
| 31 | #define Fetchbs() (Bit8s)the_Fetchb(inst.cseip) |
| 32 | #define Fetchws() (Bit16s)the_Fetchw(inst.cseip) |
| 33 | #define Fetchds() (Bit32s)the_Fetchd(inst.cseip) |
| 34 | |
| 35 | #define Push_16 CPU_Push16 |
| 36 | #define Push_32 CPU_Push32 |
| 37 | #define Pop_16 CPU_Pop16 |
| 38 | #define Pop_32 CPU_Pop32 |
| 39 |