# HG changeset patch # User Tomas Lindquist Olsen # Date 1236476169 -3600 # Node ID cc723604da958f5f47a272ce75ab08a638642903 # Parent a3d7288c4473c36113fcf872237b511f07fb478c Fixed two operand form of X86 fstp instruction. (throw away second operand!) diff -r a3d7288c4473 -r cc723604da95 gen/asm-x86-32.h --- a/gen/asm-x86-32.h Sun Mar 08 01:26:30 2009 +0100 +++ b/gen/asm-x86-32.h Sun Mar 08 02:36:09 2009 +0100 @@ -213,6 +213,7 @@ Op_FfdR, Op_Ffd_P, Op_FfdR_P, + Op_FfdRR_P, Op_Fd_P, Op_FdST, Op_FMath, @@ -451,8 +452,9 @@ /* 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 @@ 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 )