Fixed two operand form of X86 fstp instruction. (throw away second operand!)

This commit is contained in:
Tomas Lindquist Olsen
2009-03-08 02:36:09 +01:00
parent 941ccdfdc3
commit 16668d1508

View File

@@ -213,6 +213,7 @@ namespace AsmParserx8632
Op_FfdR,
Op_Ffd_P,
Op_FfdR_P,
Op_FfdRR_P,
Op_Fd_P,
Op_FdST,
Op_FMath,
@@ -451,8 +452,9 @@ namespace AsmParserx8632
/* Op_Fid_P */ { D|mem, 0, 0, FPInt_Types, Clb_ST }, // push and pop, fild so also 64 bit
/* Op_Ffd */ { D|mfp, 0, 0, FP_Types, 0, Next_Form, Op_FfdR }, // only 16bit and 32bit, DMD defaults to 16bit, reg form doesn't need type
/* Op_FfdR */ { D|rfp, 0, 0 },
/* Op_Ffd_P */ { D|mfp, 0, 0, FP_Types, Clb_ST, Next_Form, Op_FfdR_P, }, // pop, fld so also 80 bit, "
/* Op_FfdR_P */ { D|rfp, 0, 0, 0, Clb_ST },
/* Op_Ffd_P */ { D|mfp, 0, 0, FP_Types, Clb_ST, Next_Form, Op_FfdR_P }, // pop, fld so also 80 bit, "
/* Op_FfdR_P */ { D|rfp, 0, 0, 0, Clb_ST, Next_Form, Op_FfdRR_P },
/* Op_FfdRR_P */ { D|mfp|rfp,rfp,0, 0, Clb_ST },
/* Op_Fd_P */ { D|mem, 0, 0, 0, Clb_ST }, // "
/* Op_FdST */ { D|rfp, 0, 0 },
/* Op_FMath */ { mfp, 0, 0, FP_Types, Clb_ST, Next_Form, Op_FdSTiSTi }, // and only single or double prec
@@ -1747,7 +1749,7 @@ namespace AsmParserx8632
if ( operands[0].dataSize == Far_Ptr ) // %% type=Far_Ptr not set by Seg:Ofss OTOH, we don't support that..
insnTemplate->writebyte ( 'l' );
}
else if ( op == Op_fxch )
else if ( op == Op_fxch || op == Op_FfdRR_P)
{
// gas won't accept the two-operand form
if ( operands[1].cls == Opr_Reg && operands[1].reg == Reg_ST )