1
0
Fork 0

Use CPU_Push/CPU_Pop functions for pushing and popping

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1586
This commit is contained in:
Sjoerd van der Berg 2004-01-14 17:20:28 +00:00
parent e5cf2a9b40
commit 83711af671
2 changed files with 24 additions and 5 deletions

View file

@ -27,26 +27,34 @@ static INLINE Bit32u the_Fetchd(EAPoint & loc) {
#define Fetchws() (Bit16s)the_Fetchw(IPPoint)
#define Fetchds() (Bit32s)the_Fetchd(IPPoint)
#if 0
static INLINE void Push_16(Bit16u blah) {
reg_esp-=2;
SaveMw(SegBase(ss) + (reg_esp & cpu.stack.mask),blah);
SaveMw(SegBase(ss)+(reg_esp & cpu.stack.mask),blah);
}
static INLINE void Push_32(Bit32u blah) {
reg_esp-=4;
SaveMd(SegBase(ss) + (reg_esp & cpu.stack.mask),blah);
SaveMd(SegBase(ss)+(reg_esp & cpu.stack.mask),blah);
}
static INLINE Bit16u Pop_16(void) {
Bit16u temp=LoadMw(SegBase(ss) + (reg_esp & cpu.stack.mask));
Bit16u temp=LoadMw(SegBase(ss)+(reg_esp & cpu.stack.mask));
reg_esp+=2;
return temp;
}
static INLINE Bit32u Pop_32(void) {
Bit32u temp=LoadMd(SegBase(ss) + (reg_esp & cpu.stack.mask));
Bit32u temp=LoadMd(SegBase(ss)+(reg_esp & cpu.stack.mask));
reg_esp+=4;
return temp;
}
#else
#define Push_16 CPU_Push16
#define Push_32 CPU_Push32
#define Pop_16 CPU_Pop16
#define Pop_32 CPU_Pop32
#endif

View file

@ -79,6 +79,8 @@ static INLINE Bit32s Fetchds() {
return Fetchd();
}
#if 0
static INLINE void Push_16(Bit16u blah) {
reg_esp-=2;
SaveMw(SegBase(ss)+(reg_esp & cpu.stack.mask),blah);
@ -101,6 +103,15 @@ static INLINE Bit32u Pop_32() {
return temp;
};
#else
#define Push_16 CPU_Push16
#define Push_32 CPU_Push32
#define Pop_16 CPU_Pop16
#define Pop_32 CPU_Pop32
#endif
#define JumpSIb(blah) \
if (blah) { \
ADDIPFAST(Fetchbs()); \