diff --git a/src/cpu/core_16/main.h b/src/cpu/core_16/main.h index c6e7a670..30944784 100644 --- a/src/cpu/core_16/main.h +++ b/src/cpu/core_16/main.h @@ -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 diff --git a/src/cpu/core_16/support.h b/src/cpu/core_16/support.h index 8ee24827..e6008cd9 100644 --- a/src/cpu/core_16/support.h +++ b/src/cpu/core_16/support.h @@ -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; \ -// } \ diff --git a/src/cpu/slow_16.cpp b/src/cpu/slow_16.cpp index e0bf5114..aaed2d80 100644 --- a/src/cpu/slow_16.cpp +++ b/src/cpu/slow_16.cpp @@ -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); diff --git a/src/dosbox.cpp b/src/dosbox.cpp index ce7dba6f..735491be 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -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();