Hooked up the new FPU type selection to the UI.
This commit is contained in:
@@ -172,7 +172,6 @@ int is286,
|
||||
is_am486, is_pentium, is_k5, is_k6, is_p6;
|
||||
|
||||
int hasfpu;
|
||||
int fpu_type;
|
||||
|
||||
uint64_t tsc = 0;
|
||||
msr_t msr;
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
#ifndef EMU_CPU_H
|
||||
# define EMU_CPU_H
|
||||
|
||||
extern int fpu_type;
|
||||
|
||||
enum {
|
||||
FPU_NONE,
|
||||
FPU_8087,
|
||||
@@ -592,9 +590,9 @@ extern int sysexit(uint32_t fetchdat);
|
||||
extern int syscall(uint32_t fetchdat);
|
||||
extern int sysret(uint32_t fetchdat);
|
||||
|
||||
int fpu_get_type(int machine, int cpu_manufacturer, int cpu, const char *internal_name);
|
||||
const char *fpu_get_internal_name(int machine, int cpu_manufacturer, int cpu, int type);
|
||||
const char *fpu_get_name_from_index(int machine, int cpu_manufacturer, int cpu, int c);
|
||||
int fpu_get_type_from_index(int machine, int cpu_manufacturer, int cpu, int c);
|
||||
extern int fpu_get_type(int machine, int cpu_manufacturer, int cpu, const char *internal_name);
|
||||
extern const char *fpu_get_internal_name(int machine, int cpu_manufacturer, int cpu, int type);
|
||||
extern const char *fpu_get_name_from_index(int machine, int cpu_manufacturer, int cpu, int c);
|
||||
extern int fpu_get_type_from_index(int machine, int cpu_manufacturer, int cpu, int c);
|
||||
|
||||
#endif /*EMU_CPU_H*/
|
||||
|
||||
@@ -321,7 +321,7 @@ static __inline uint16_t x87_compare(double a, double b)
|
||||
if (!memcmp(&ea, &ia, 8) && !memcmp(&eb, &ib, 8))
|
||||
return C3;
|
||||
|
||||
if (!is386 && !(cpu_state.npxc & 0x1000) &&
|
||||
if ((fpu_type != FPU_287XL) && (fpu_type != FPU_387) && !(cpu_state.npxc & 0x1000) &&
|
||||
((a == INFINITY) || (a == -INFINITY)) && ((b == INFINITY) || (b == -INFINITY)))
|
||||
eb = ea;
|
||||
|
||||
@@ -358,7 +358,7 @@ static __inline uint16_t x87_compare(double a, double b)
|
||||
uint32_t result = 0;
|
||||
double ea = a, eb = b;
|
||||
|
||||
if (!is386 && !(cpu_state.npxc & 0x1000) &&
|
||||
if ((fpu_type != FPU_287XL) && (fpu_type != FPU_387) && !(cpu_state.npxc & 0x1000) &&
|
||||
((a == INFINITY) || (a == -INFINITY)) && ((b == INFINITY) || (b == -INFINITY)))
|
||||
eb = ea;
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ static int opFCOMPP(uint32_t fetchdat)
|
||||
cpu_state.npxs &= ~(C0|C2|C3);
|
||||
p = (uint64_t *)&ST(0);
|
||||
q = (uint64_t *)&ST(1);
|
||||
if ((*p == ((uint64_t)1 << 63) && *q == 0) && is386)
|
||||
if ((*p == ((uint64_t)1 << 63) && *q == 0) && ((fpu_type == FPU_287XL) || (fpu_type == FPU_387)))
|
||||
cpu_state.npxs |= C0; /*Nasty hack to fix 80387 detection*/
|
||||
else
|
||||
cpu_state.npxs |= x87_compare(ST(0), ST(1));
|
||||
|
||||
Reference in New Issue
Block a user