1
0
Fork 0

Fix ANTIGOK1.EXE and other basic programs compiled with the same compiler that use load zero, change sign, write as BCD as template for reading in negative values.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3531
This commit is contained in:
Peter Veenstra 2010-01-11 12:31:35 +00:00
parent b8dd53b7fc
commit 79bcdc6c38

View file

@ -106,7 +106,7 @@ static Real64 FPU_FLD80(PhysPt addr) {
Bit64s sign = (test.begin&0x8000)?1:0;
FPU_Reg result;
result.ll = (sign <<63)|(exp64final << 52)| mant64;
return result.d;
return result.d;
//mant64= test.mant80/2***64 * 2 **53
}
@ -239,7 +239,7 @@ static void FPU_FST_I64(PhysPt addr) {
static void FPU_FBST(PhysPt addr) {
FPU_Reg val = fpu.regs[TOP];
bool sign = false;
if(val.d<0.0){ //sign
if(fpu.regs[TOP].ll & LONGTYPE(0x8000000000000000)) { //sign
sign=true;
val.d=-val.d;
}
@ -519,7 +519,7 @@ static void FPU_FXTRACT(void) {
Bit64s exp80final = (exp80>>52) - BIAS64;
Real64 mant = test.d / (pow(2.0,static_cast<Real64>(exp80final)));
fpu.regs[TOP].d = static_cast<Real64>(exp80final);
FPU_PUSH(mant);
FPU_PUSH(mant);
}
static void FPU_FCHS(void){