Previous 15994 Revisions Next

r14045 Sunday 15th January, 2012 at 16:04:33 UTC by Angelo Salese
x87: fix for single-precision operations [Peter Farrie]
[src/emu/cpu/i386]x87ops.c

src/emu/cpu/i386/x87ops.c
r14044r14045
138138   if (modrm < 0xc0)
139139   {
140140      UINT32 ea = GetEA(cpustate,modrm);
141      UINT32 src = READ32(cpustate,ea);
141      UINT32 tmp32 = READ32(cpustate,ea);
142      float  src;
142143
144      src = *((float *) &tmp32); /* must bypass type conversion */
145
143146      switch ((modrm >> 3) & 0x7)
144147      {
145148         case 0:    // FADD short
r14044r14045
306309      {
307310         case 0:         // FLD single-precision
308311         {
312            UINT32 tmp32;
309313            X87_REG t;
310            t.i = READ32(cpustate,ea);
314            tmp32 = READ32(cpustate,ea);
315            t.f = *((float *) &tmp32); /* must bypass type conversion */
311316            FPU_PUSH(cpustate,t);
312317            CYCLES(cpustate,3);
313318            break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team