Skip to content

Commit

Permalink
Support FISTP m32int
Browse files Browse the repository at this point in the history
  • Loading branch information
captainys committed Jan 17, 2022
1 parent 8736d85 commit 2530fd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/FB386.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def Run(argv):
"../testdata/CMOS.bin",
"-DONTAUTOSAVECMOS",
# "-PAUSE",
"-USEFPU",
]+argv).wait()


Expand Down
11 changes: 10 additions & 1 deletion src/cpu/i486inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6330,7 +6330,6 @@ unsigned int i486DX::RunOneInstruction(Memory &mem,InOut &io)
{
switch(Instruction::GetREG(inst.operand[0]))
{
case 3: // FISTP m32int
case 1:
case 2:
case 4:
Expand All @@ -6343,6 +6342,16 @@ unsigned int i486DX::RunOneInstruction(Memory &mem,InOut &io)
clocksPassed=state.fpuState.FILD_m32int(*this,value.byteData);
}
break;
case 3: // FISTP m32int
{
OperandValue value;
state.fpuState.GetSTAsSignedInt(*this,value);
state.fpuState.Pop(*this);
value.numBytes=4;
StoreOperandValue(op1,mem,inst.addressSize,inst.segOverride,value);
clocksPassed=33;
}
break;
case 5: // FLD m80real
{
auto value=EvaluateOperand80(mem,inst.addressSize,inst.segOverride,op1);
Expand Down

0 comments on commit 2530fd8

Please sign in to comment.