Skip to content

Commit a4de92f

Browse files
committed
i386.cpp: correct buggy fxsave and fxrstor opcodes and let chihiro show 3D again
1 parent 2d8233a commit a4de92f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/devices/cpu/i386/pentops.hxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2808,7 +2808,7 @@ void i386_device::sse_group_0fae() // Opcode 0f ae
28082808
WRITE16(ea + 0, m_x87_cw);
28092809
WRITE16(ea + 2, m_x87_sw);
28102810
for(int i = 0; i < 8; i++)
2811-
if((m_x87_tw & (3 << i)) != 3) atag |= 1 << i;
2811+
if (((m_x87_tw >> (i * 2)) & 3) != X87_TW_EMPTY) atag |= 1 << i;
28122812
WRITE16(ea + 4, atag);
28132813
WRITE16(ea + 6, m_x87_opcode);
28142814
WRITE32(ea + 8, m_x87_inst_ptr);
@@ -2850,7 +2850,7 @@ void i386_device::sse_group_0fae() // Opcode 0f ae
28502850
m_x87_reg[i].high = READ16(ea + i*16 + 40);
28512851
if(!(atag & (1 << i)))
28522852
tag = X87_TW_EMPTY;
2853-
if(floatx80_is_zero(m_x87_reg[i]))
2853+
else if(floatx80_is_zero(m_x87_reg[i]))
28542854
tag = X87_TW_ZERO;
28552855
else if(floatx80_is_inf(m_x87_reg[i]) || floatx80_is_nan(m_x87_reg[i]))
28562856
tag = X87_TW_SPECIAL;

0 commit comments

Comments
 (0)