changeset 1056:cc723604da95

Fixed two operand form of X86 fstp instruction. (throw away second operand!)
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Sun, 08 Mar 2009 02:36:09 +0100
parents a3d7288c4473
children ee310a79e9a1
files gen/asm-x86-32.h
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 )