1
0
Fork 0

FPU Support and some clean-up.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@84
This commit is contained in:
Sjoerd van der Berg 2002-07-28 16:26:29 +00:00
parent e9ad5eb51e
commit 184f57d77e
4 changed files with 19 additions and 64 deletions

View file

@ -944,33 +944,24 @@ restart:
reg_al=LoadMb(SegBase(ds)+(Bit16u)(reg_bx+reg_al));
}
break;
#ifdef USE_FPU
#include "../../fpu/fpu_core_16/support.h"
#ifdef CPU_FPU
case 0xd8: /* FPU ESC 0 */
FPU_ESC_0;
break;
FPU_ESC(0);break;
case 0xd9: /* FPU ESC 1 */
FPU_ESC_1;
break;
FPU_ESC(1);break;
case 0xda: /* FPU ESC 2 */
FPU_ESC_2;
break;
FPU_ESC(2);break;
case 0xdb: /* FPU ESC 3 */
FPU_ESC_3;
break;
FPU_ESC(3);break;
case 0xdc: /* FPU ESC 4 */
FPU_ESC_4;
break;
FPU_ESC(4);break;
case 0xdd: /* FPU ESC 5 */
FPU_ESC_5;
break;
FPU_ESC(5);break;
case 0xde: /* FPU ESC 6 */
FPU_ESC_6;
break;
FPU_ESC(6);break;
case 0xdf: /* FPU ESC 7 */
FPU_ESC_7;
break;
#else
FPU_ESC(7);break;
#else
case 0xd8: /* FPU ESC 0 */
case 0xd9: /* FPU ESC 1 */
case 0xda: /* FPU ESC 2 */
@ -980,9 +971,8 @@ restart:
case 0xde: /* FPU ESC 6 */
case 0xdf: /* FPU ESC 7 */
{
GetRM;
if( rm < 0xc0 )
GetEAa;
Bit8u rm;
if (rm<0xc0) GetEAa;
}
break;
#endif

View file

@ -44,9 +44,6 @@ static INLINE void ADDIPFAST(Bit16s blah) {
IPPoint+=blah;
}
#define ERRORRETURN(a) { error_ret=a;goto errorreturn; }
static INLINE Bit8u Fetchb() {
Bit8u temp=LoadMb(IPPoint);
IPPoint+=1;
@ -75,7 +72,6 @@ static INLINE Bit32s Fetchds() {
return Fetchd();
}
static INLINE void Push_16(Bit16u blah) {
reg_sp-=2;
SaveMw(SegBase(ss)+reg_sp,blah);
@ -98,12 +94,6 @@ static INLINE Bit32u Pop_32() {
return temp;
};
#define stringDI \
EAPoint to; \
to=SegBase(es)+reg_di
@ -185,7 +175,3 @@ static INLINE void Rep_66(Bit16s direct,EAPoint from,EAPoint to) {
}
// if (flags.tf) { \
// cpudecoder=CPU_Real_16_Slow_Decode_Special; \
// return CBRET_NONE; \
// } \

View file

@ -24,7 +24,6 @@
#include "pic.h"
#include "fpu.h"
typedef PhysPt EAPoint;
#define SegBase(seg) Segs[seg].phys
@ -41,27 +40,6 @@ typedef PhysPt EAPoint;
#define SaveMw(off,val) mem_writew(off,val)
#define SaveMd(off,val) mem_writed(off,val)
/*
typedef HostOff EAPoint;
#define SegBase(seg) Segs[seg].host
#define LoadMb(off) readb(off)
#define LoadMw(off) readw(off)
#define LoadMd(off) readd(off)
#define LoadMbs(off) (Bit8s)(LoadMb(off))
#define LoadMws(off) (Bit16s)(LoadMw(off))
#define LoadMds(off) (Bit32s)(LoadMd(off))
#define SaveMb(off,val) writeb(off,val)
#define SaveMw(off,val) writew(off,val)
#define SaveMd(off,val) writed(off,val)
*/
#define LoadRb(reg) reg
#define LoadRw(reg) reg
#define LoadRd(reg) reg
@ -72,12 +50,11 @@ typedef HostOff EAPoint;
extern Bitu cycle_count;
#define CPU_386
#define USE_FPU
#define FPU_386
//TODO Change name
#define FULLFLAGS
/* Enable parts of the cpu emulation */
#define CPU_386 //Enable 386 instructions
#ifdef C_FPU
#define CPU_FPU //Enable FPU escape instructions
#endif
#include "core_16/support.h"
static Bitu CPU_Real_16_Slow_Decode_Special(Bitu count);

View file

@ -207,7 +207,9 @@ static void InitSystems(void) {
HARDWARE_Init();
TIMER_Init();
CPU_Init();
#ifdef C_FPU
FPU_Init();
#endif
MIXER_Init();
#ifdef C_DEBUG
DEBUG_Init();