Browse Source

* fixed fpu suffix parsing for att reader

peter 25 years ago
parent
commit
80e64da3df
7 changed files with 598 additions and 594 deletions
  1. 5 2
      compiler/ag386att.pas
  2. 7 2
      compiler/cpubase.pas
  3. 470 470
      compiler/i386atts.inc
  4. 61 61
      compiler/i386ins.dat
  5. 27 27
      compiler/i386tab.inc
  6. 6 18
      compiler/ra386att.pas
  7. 22 14
      compiler/utils/nasmconv.pp

+ 5 - 2
compiler/ag386att.pas

@@ -699,7 +699,7 @@ unit ag386att;
              { call maybe not translated to call }
                s:=#9+att_op2str[op]+cond2str[paicpu(hp)^.condition];
                if (not calljmp) and
-                  (att_needsuffix[op]) and
+                  (att_needsuffix[op]<>AttSufNONE) and
                   not(
                    (paicpu(hp)^.oper[0].typ=top_reg) and
                    (paicpu(hp)^.oper[0].reg in [R_ST..R_ST7])
@@ -871,7 +871,10 @@ unit ag386att;
 end.
 {
   $Log$
-  Revision 1.23  2000-01-07 01:14:18  peter
+  Revision 1.24  2000-01-28 09:41:39  peter
+    * fixed fpu suffix parsing for att reader
+
+  Revision 1.23  2000/01/07 01:14:18  peter
     * updated copyright to 2000
 
   Revision 1.22  1999/12/18 20:00:33  florian

+ 7 - 2
compiler/cpubase.pas

@@ -189,6 +189,8 @@ const
   IF_PASS2  = $80000000;  { if the instruction can change in a second pass }
 
 type
+  TAttSuffix = (AttSufNONE,AttSufINT,AttSufFPU);
+
   TAsmOp=
 {$i i386op.inc}
 
@@ -218,7 +220,7 @@ const
   att_op2str:op2strtable=
 {$i i386att.inc}
 
-  att_needsuffix:array[tasmop] of boolean=
+  att_needsuffix:array[tasmop] of TAttSuffix=
 {$i i386atts.inc}
 {$endif ATTOP}
 
@@ -899,7 +901,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.20  2000-01-07 01:14:23  peter
+  Revision 1.21  2000-01-28 09:41:39  peter
+    * fixed fpu suffix parsing for att reader
+
+  Revision 1.20  2000/01/07 01:14:23  peter
     * updated copyright to 2000
 
   Revision 1.19  1999/12/02 19:28:29  peter

+ 470 - 470
compiler/i386atts.inc

@@ -1,473 +1,473 @@
 { don't edit, this file is generated from i386ins.dat }
 (
-false,
-false,
-true,
-true,
-false,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-false,
-false,
-false,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-false,
-false,
-true,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-false,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-false,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-false,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-false,
-true,
-true,
-true,
-false,
-true,
-true,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-false,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-true,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-true,
-true,
-false,
-false,
-false,
-false,
-true,
-false,
-false,
-true,
-true,
-false,
-false,
-false,
-false,
-false,
-true,
-true,
-true,
-false,
-false,
-true,
-true,
-false,
-true,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false,
-false
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufINT,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufINT,
+attsufINT,
+attsufFPU,
+attsufINT,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE
 );

+ 61 - 61
compiler/i386ins.dat

@@ -355,7 +355,7 @@ void                  \2\xD9\xF0                      8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xD9\xE1                      8086,FPU
 
-[FADD,faddX]
+[FADD,faddF]
 (Ch_FPU, Ch_None, Ch_None)
 mem32                 \300\1\xD8\200                  8086,FPU
 mem64                 \300\1\xDC\200                  8086,FPU
@@ -365,18 +365,18 @@ fpureg,fpu0           \1\xDC\10\xC0                   8086,FPU
 fpureg                \1\xD8\10\xC0                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xC0                   8086,FPU
 
-[FADDP,faddpX]
+[FADDP,faddpF]
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xDE\xC1                      8086,FPU
 fpureg                \1\xDE\10\xC0                   8086,FPU
 fpureg,fpu0           \1\xDE\10\xC0                   8086,FPU
 
-[FBLD,fbldX]
+[FBLD,fbldF]
 (Ch_Rop1, Ch_FPU, Ch_None)
 mem80                 \300\1\xDF\204                  8086,FPU
 mem                   \300\1\xDF\204                  8086,FPU
 
-[FBSTP,fbstpX]
+[FBSTP,fbstpF]
 (Ch_Wop1, Ch_FPU, Ch_None)
 mem80                 \300\1\xDF\206                  8086,FPU
 mem                   \300\1\xDF\206                  8086,FPU
@@ -389,55 +389,55 @@ void                  \2\xD9\xE0                      8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \3\x9B\xDB\xE2                  8086,FPU
 
-[FCMOVB,fcmovbX]
+[FCMOVB,fcmovbF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDA\xC1                      P6,FPU
 fpureg                \1\xDA\10\xC0                   P6,FPU
 fpu0,fpureg           \1\xDA\11\xC0                   P6,FPU
 
-[FCMOVBE,fcmovbeX]
+[FCMOVBE,fcmovbeF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDA\xD1                      P6,FPU
 fpureg                \1\xDA\10\xD0                   P6,FPU
 fpu0,fpureg           \1\xDA\11\xD0                   P6,FPU
 
-[FCMOVE,fcmoveX]
+[FCMOVE,fcmoveF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDA\xC9                      P6,FPU
 fpureg                \1\xDA\10\xC8                   P6,FPU
 fpu0,fpureg           \1\xDA\11\xC8                   P6,FPU
 
-[FCMOVNB,fcmovnbX]
+[FCMOVNB,fcmovnbF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDB\xC1                      P6,FPU
 fpureg                \1\xDB\10\xC0                   P6,FPU
 fpu0,fpureg           \1\xDB\11\xC0                   P6,FPU
 
-[FCMOVNBE,fcmovnbeX]
+[FCMOVNBE,fcmovnbeF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDB\xD1                      P6,FPU
 fpureg                \1\xDB\10\xD0                   P6,FPU
 fpu0,fpureg           \1\xDB\11\xD0                   P6,FPU
 
-[FCMOVNE,fcmovneX]
+[FCMOVNE,fcmovneF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDB\xC9                      P6,FPU
 fpureg                \1\xDB\10\xC8                   P6,FPU
 fpu0,fpureg           \1\xDB\11\xC8                   P6,FPU
 
-[FCMOVNU,fcmovnuX]
+[FCMOVNU,fcmovnuF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDB\xD9                      P6,FPU
 fpureg                \1\xDB\10\xD8                   P6,FPU
 fpu0,fpureg           \1\xDB\11\xD8                   P6,FPU
 
-[FCMOVU,fcmovuX]
+[FCMOVU,fcmovuF]
 (Ch_FPU, Ch_RFLAGS, Ch_None)
 void                  \2\xDA\xD9                      P6,FPU
 fpureg                \1\xDA\10\xD8                   P6,FPU
 fpu0,fpureg           \1\xDA\11\xD8                   P6,FPU
 
-[FCOM,fcomX]
+[FCOM,fcomF]
 (Ch_FPU, Ch_None, Ch_None)
 mem32                 \300\1\xD8\202                  8086,FPU
 mem64                 \300\1\xDC\202                  8086,FPU
@@ -445,19 +445,19 @@ void                  \2\xD8\xD1                      8086,FPU
 fpureg                \1\xD8\10\xD0                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xD0                   8086,FPU
 
-[FCOMI,fcomiX]
+[FCOMI,fcomiF]
 (Ch_WFLAGS, Ch_None, Ch_None)
 void                  \2\xDB\xF1                      P6,FPU
 fpureg                \1\xDB\10\xF0                   P6,FPU
 fpu0,fpureg           \1\xDB\11\xF0                   P6,FPU
 
-[FCOMIP,fcomipX]
+[FCOMIP,fcomipF]
 (Ch_FPU, Ch_WFLAGS, Ch_None)
 void                  \2\xDF\xF1                      P6,FPU
 fpureg                \1\xDF\10\xF0                   P6,FPU
 fpu0,fpureg           \1\xDF\11\xF0                   P6,FPU
 
-[FCOMP,fcompX]
+[FCOMP,fcompF]
 (Ch_FPU, Ch_None, Ch_None)
 mem32                 \300\1\xD8\203                  8086,FPU
 mem64                 \300\1\xDC\203                  8086,FPU
@@ -481,7 +481,7 @@ void                  \2\xD9\xF6                      8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \3\x9B\xDB\xE1                  8086,FPU
 
-[FDIV,fdivX]
+[FDIV,fdivF]
 (Ch_FPU, Ch_None, Ch_None)
 mem32                 \300\1\xD8\206                  8086,FPU
 mem64                 \300\1\xDC\206                  8086,FPU
@@ -491,13 +491,13 @@ fpureg,fpu0           \1\xDC\10\xF0                   8086,FPU
 fpureg                \1\xD8\10\xF0                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xF0                   8086,FPU
 
-[FDIVP,fdivpX]
+[FDIVP,fdivpF]
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xDE\xF1                      8086,FPU
 fpureg,fpu0           \1\xDE\10\xF0                   8086,FPU
 fpureg                \1\xDE\10\xF0                   8086,FPU
 
-[FDIVR,fdivrX]
+[FDIVR,fdivrF]
 (Ch_FPU, Ch_None, Ch_None)
 mem32                 \300\1\xD8\207                  8086,FPU
 mem64                 \300\1\xDC\207                  8086,FPU
@@ -507,7 +507,7 @@ fpureg,fpu0           \1\xDC\10\xF8                   8086,FPU
 fpureg                \1\xD8\10\xF8                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xF8                   8086,FPU
 
-[FDIVRP,fdivrpX]
+[FDIVRP,fdivrpF]
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xDE\xF9                      8086,FPU
 fpureg                \1\xDE\10\xF8                   8086,FPU
@@ -525,41 +525,41 @@ void                  \3\x9B\xDB\xE0                  8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 fpureg                \1\xDD\10\xC0                   8086,FPU
 
-[FIADD,fiaddX]
+[FIADD,fiaddF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\200                  8086,FPU
-mem16                 \300\1\xDE\200                  8086,FPU
+mem32                 \300\1\xDE\200                  8086,FPU
+mem64                 \300\1\xDA\200                  8086,FPU
 
-[FICOM,ficomX]
+[FICOM,ficomF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\202                  8086,FPU
-mem16                 \300\1\xDE\202                  8086,FPU
+mem32                 \300\1\xDE\202                  8086,FPU
+mem64                 \300\1\xDA\202                  8086,FPU
 
-[FICOMP,ficompX]
+[FICOMP,ficompF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\203                  8086,FPU
-mem16                 \300\1\xDE\203                  8086,FPU
+mem32                 \300\1\xDE\203                  8086,FPU
+mem64                 \300\1\xDA\203                  8086,FPU
 
-[FIDIV,fidivX]
+[FIDIV,fidivF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\206                  8086,FPU
-mem16                 \300\1\xDE\206                  8086,FPU
+mem32                 \300\1\xDE\206                  8086,FPU
+mem64                 \300\1\xDA\206                  8086,FPU
 
-[FIDIVR,fidivrX]
+[FIDIVR,fidivrF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\207                  8086,FPU
-mem16                 \300\1\xDE\207                  8086,FPU
+mem32                 \300\1\xDE\207                  8086,FPU
+mem64                 \300\1\xDA\207                  8086,FPU
 
 [FILD,fildX]
 (Ch_FPU, Ch_None, Ch_None)
 mem32                 \300\1\xDB\200                  8086,FPU
-mem16                 \300\1\xDF\200                  8086,FPU
+mem16                 \320\300\1\xDF\200              8086,FPU
 mem64                 \300\1\xDF\205                  8086,FPU
 
-[FIMUL,fimulX]
+[FIMUL,fimulF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\201                  8086,FPU
-mem16                 \300\1\xDE\201                  8086,FPU
+mem32                 \300\1\xDE\201                  8086,FPU
+mem64                 \300\1\xDA\201                  8086,FPU
 
 [FINCSTP]
 (Ch_FPU, Ch_None, Ch_None)
@@ -572,25 +572,25 @@ void                  \3\x9B\xDB\xE3                  8086,FPU
 [FIST,fistX]
 (Ch_Wop1, Ch_None, Ch_None)
 mem32                 \300\1\xDB\202                  8086,FPU
-mem16                 \300\1\xDF\202                  8086,FPU
+mem16                 \320\300\1\xDF\202              8086,FPU
 
 [FISTP,fistpX]
 (Ch_Wop1, Ch_None, Ch_None)
 mem32                 \300\1\xDB\203                  8086,FPU
-mem16                 \300\1\xDF\203                  8086,FPU
+mem16                 \320\300\1\xDF\203              8086,FPU
 mem64                 \300\1\xDF\207                  8086,FPU
 
-[FISUB,fisubX]
+[FISUB,fisubF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\204                  8086,FPU
-mem16                 \300\1\xDE\204                  8086,FPU
+mem32                 \300\1\xDE\204                  8086,FPU
+mem64                 \300\1\xDA\204                  8086,FPU
 
-[FISUBR,fisubrX]
+[FISUBR,fisubrF]
 (Ch_FPU, Ch_None, Ch_None)
-mem32                 \300\1\xDA\205                  8086,FPU
-mem16                 \300\1\xDE\205                  8086,FPU
+mem32                 \300\1\xDE\205                  8086,FPU
+mem64                 \300\1\xDA\205                  8086,FPU
 
-[FLD,fldX]
+[FLD,fldF]
 (Ch_Rop1, Ch_FPU, Ch_None)
 mem32                 \300\1\xD9\200                  8086,FPU
 mem64                 \300\1\xDD\200                  8086,FPU
@@ -633,7 +633,7 @@ void                  \2\xD9\xEB                      8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xD9\xEE                      8086,FPU
 
-[FMUL,fmulX]
+[FMUL,fmulF]
 (Ch_ROp1, Ch_FPU, Ch_None)
 mem32                 \300\1\xD8\201                  8086,FPU
 mem64                 \300\1\xDC\201                  8086,FPU
@@ -643,7 +643,7 @@ fpureg,fpu0           \1\xDC\10\xC8                   8086,FPU
 fpureg                \1\xD8\10\xC8                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xC8                   8086,FPU
 
-[FMULP,fmulpX]
+[FMULP,fmulpF]
 (Ch_ROp1, Ch_FPU, Ch_None)
 void                  \2\xDE\xC9                      8086,FPU
 fpureg                \1\xDE\10\xC8                   8086,FPU
@@ -738,7 +738,7 @@ void                  \2\xD9\xFB                      386,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xD9\xFA                      8086,FPU
 
-[FST,fstX]
+[FST,fstF]
 (Ch_Wop1, Ch_None, Ch_None)
 mem32                 \300\1\xD9\202                  8086,FPU
 mem64                 \300\1\xDD\202                  8086,FPU
@@ -752,7 +752,7 @@ mem                   \300\2\x9B\xD9\207              8086,FPU,SW
 (Ch_Wop1, Ch_None, Ch_None)
 mem                   \300\2\x9B\xD9\206              8086,FPU
 
-[FSTP,fstpX]
+[FSTP,fstpF]
 (Ch_Wop1, Ch_FPU, Ch_None)
 mem32                 \300\1\xD9\203                  8086,FPU
 mem64                 \300\1\xDD\203                  8086,FPU
@@ -765,7 +765,7 @@ mem                   \300\2\x9B\xDD\207              8086,FPU,SW
 void                  \3\x9B\xDF\xE0                  286,FPU
 reg_ax                \3\x9B\xDF\xE0                  286,FPU
 
-[FSUB,fsubX]
+[FSUB,fsubF]
 (Ch_ROp1, Ch_FPU, Ch_None)
 mem32                 \300\1\xD8\204                  8086,FPU
 mem64                 \300\1\xDC\204                  8086,FPU
@@ -775,13 +775,13 @@ fpureg,fpu0           \1\xDC\10\xE0                   8086,FPU
 fpureg                \1\xD8\10\xE0                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xE0                   8086,FPU
 
-[FSUBP,fsubpX]
+[FSUBP,fsubpF]
 (Ch_ROp1, Ch_FPU, Ch_None)
 void                  \2\xDE\xE1                      8086,FPU
 fpureg                \1\xDE\10\xE0                   8086,FPU
 fpureg,fpu0           \1\xDE\10\xE0                   8086,FPU
 
-[FSUBR,fsubrX]
+[FSUBR,fsubrF]
 (Ch_ROp1, Ch_FPU, Ch_None)
 mem32                 \300\1\xD8\205                  8086,FPU
 mem64                 \300\1\xDC\205                  8086,FPU
@@ -791,7 +791,7 @@ fpureg,fpu0           \1\xDC\10\xE8                   8086,FPU
 fpureg                \1\xD8\10\xE8                   8086,FPU
 fpu0,fpureg           \1\xD8\11\xE8                   8086,FPU
 
-[FSUBRP,fsubrpX]
+[FSUBRP,fsubrpF]
 (Ch_ROp1, Ch_FPU, Ch_None)
 void                  \2\xDE\xE9                      8086,FPU
 fpureg                \1\xDE\10\xE8                   8086,FPU
@@ -801,25 +801,25 @@ fpureg,fpu0           \1\xDE\10\xE8                   8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xD9\xE4                      8086,FPU
 
-[FUCOM,fucomX]
+[FUCOM,fucomF]
 (Ch_None, Ch_None, Ch_None)
 void                  \2\xDD\xE1                      386,FPU
 fpureg                \1\xDD\10\xE0                   386,FPU
 fpu0,fpureg           \1\xDD\11\xE0                   386,FPU
 
-[FUCOMI,fucomiX]
+[FUCOMI,fucomiF]
 (Ch_WFLAGS, Ch_None, Ch_None)
 void                  \2\xDB\xE9                      P6,FPU
 fpureg                \1\xDB\10\xE8                   P6,FPU
 fpu0,fpureg           \1\xDB\11\xE8                   P6,FPU
 
-[FUCOMIP,fucomipX]
+[FUCOMIP,fucomipF]
 (Ch_FPU, Ch_WFLAGS, Ch_None)
 void                  \2\xDF\xE9                      P6,FPU
 fpureg                \1\xDF\10\xE8                   P6,FPU
 fpu0,fpureg           \1\xDF\11\xE8                   P6,FPU
 
-[FUCOMP,fucompX]
+[FUCOMP,fucompF]
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xDD\xE9                      386,FPU
 fpureg                \1\xDD\10\xE8                   386,FPU
@@ -837,7 +837,7 @@ void                  \1\x9B                          8086,FPU
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xD9\xE5                      8086,FPU
 
-[FXCH,fxchX]
+[FXCH,fxchF]
 (Ch_FPU, Ch_None, Ch_None)
 void                  \2\xD9\xC9                      8086,FPU
 fpureg                \1\xD9\10\xC8                   8086,FPU

+ 27 - 27
compiler/i386tab.inc

@@ -2013,70 +2013,70 @@
     opcode  : A_FIADD;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#128;
+    code    : #192#1#222#128;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FIADD;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#128;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#128;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FICOM;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#130;
+    code    : #192#1#222#130;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FICOM;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#130;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#130;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FICOMP;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#131;
+    code    : #192#1#222#131;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FICOMP;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#131;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#131;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FIDIV;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#134;
+    code    : #192#1#222#134;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FIDIV;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#134;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#134;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FIDIVR;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#135;
+    code    : #192#1#222#135;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FIDIVR;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#135;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#135;
     flags   : if_8086 or if_fpu
   ),
   (
@@ -2090,7 +2090,7 @@
     opcode  : A_FILD;
     ops     : 1;
     optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#223#128;
+    code    : #208#192#1#223#128;
     flags   : if_8086 or if_fpu
   ),
   (
@@ -2104,14 +2104,14 @@
     opcode  : A_FIMUL;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#129;
+    code    : #192#1#222#129;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FIMUL;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#129;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#129;
     flags   : if_8086 or if_fpu
   ),
   (
@@ -2139,7 +2139,7 @@
     opcode  : A_FIST;
     ops     : 1;
     optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#223#130;
+    code    : #208#192#1#223#130;
     flags   : if_8086 or if_fpu
   ),
   (
@@ -2153,7 +2153,7 @@
     opcode  : A_FISTP;
     ops     : 1;
     optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#223#131;
+    code    : #208#192#1#223#131;
     flags   : if_8086 or if_fpu
   ),
   (
@@ -2167,28 +2167,28 @@
     opcode  : A_FISUB;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#132;
+    code    : #192#1#222#132;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FISUB;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#132;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#132;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FISUBR;
     ops     : 1;
     optypes : (ot_memory or ot_bits32,ot_none,ot_none);
-    code    : #192#1#218#133;
+    code    : #192#1#222#133;
     flags   : if_8086 or if_fpu
   ),
   (
     opcode  : A_FISUBR;
     ops     : 1;
-    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
-    code    : #192#1#222#133;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#218#133;
     flags   : if_8086 or if_fpu
   ),
   (

+ 6 - 18
compiler/ra386att.pas

@@ -121,21 +121,6 @@ end;
   {                    Routines for the tokenizing                     }
   {---------------------------------------------------------------------}
 
-function is_fpuopcode(op:tasmop):boolean;
-{$ifndef NOAG386BIN}
-var
-  i : longint;
-{$endif}
-begin
-  is_fpuopcode:=false;
-{$ifdef NOAG386BINFAKE}
-  i:=InsTabCache^[ActOpcode];
-  if i<>-1 then
-   is_fpuopcode:=((instab[i].flags and IF_FPU)=IF_FPU);
-{$endif}
-end;
-
-
 function is_asmopcode(const s: string):boolean;
 const
   { We need first to check the long prefixes, else we get probs
@@ -176,7 +161,7 @@ Begin
          if (length(hid) > 0) and (hid=iasmops^[i]) then
           begin
             actopcode:=i;
-            if is_fpuopcode(actopcode) then
+            if att_needsuffix[actopcode]=attsufFPU then
              actopsize:=att_sizefpusuffix[sufidx]
             else
              actopsize:=att_sizesuffix[sufidx];
@@ -197,7 +182,7 @@ Begin
                   if Cond=Upper(cond2str[cnd]) then
                    begin
                      actopcode:=CondASmOp[j];
-                     if is_fpuopcode(actopcode) then
+                     if att_needsuffix[actopcode]=attsufFPU then
                       actopsize:=att_sizefpusuffix[sufidx]
                      else
                       actopsize:=att_sizesuffix[sufidx];
@@ -2000,7 +1985,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.69  2000-01-21 10:10:25  daniel
+  Revision 1.70  2000-01-28 09:41:39  peter
+    * fixed fpu suffix parsing for att reader
+
+  Revision 1.69  2000/01/21 10:10:25  daniel
     * should work on linux also
 
   Revision 1.68  2000/01/21 00:46:47  peter

+ 22 - 14
compiler/utils/nasmconv.pp

@@ -195,9 +195,10 @@ end;
 
 
 var
+   attsuffix,
    hs : string;
    j : longint;
-   firstopcode,attsuffix,
+   firstopcode,
    first : boolean;
    maxinfolen,
    code : byte;
@@ -251,7 +252,7 @@ begin
                  (intopcode[length(intopcode)-1]='c') then
                 dec(byte(intopcode[0]),2);
               attopcode:=intopcode;
-              attsuffix:=false;
+              attsuffix:='attsufNONE';
             end
            else
             begin
@@ -263,13 +264,20 @@ begin
                 dec(byte(intopcode[0]),2);
               attopcode:=Copy(s,i+1,j-i-1);
               { att Suffix }
-              if attopcode[length(attopcode)]='X' then
-               begin
-                 dec(attopcode[0]);
-                 attsuffix:=true;
-               end
-              else
-               attsuffix:=false;
+              case attopcode[length(attopcode)] of
+                'X' :
+                  begin
+                    dec(attopcode[0]);
+                    attsuffix:='attsufINT';
+                  end;
+                'F' :
+                  begin
+                    dec(attopcode[0]);
+                    attsuffix:='attsufFPU';
+                  end;
+                else
+                  attsuffix:='attsufNONE';
+              end;
               { att Conditional }
               if (attopcode[length(attopcode)]='C') and
                  (attopcode[length(attopcode)-1]='C') then
@@ -290,10 +298,7 @@ begin
            write(opfile,opcode);
            write(intfile,'''',intopcode,'''');
            write(attfile,'''',attopcode,'''');
-           if attsuffix then
-            write(attsuffile,'true')
-           else
-            write(attsuffile,'false');
+           write(attsuffile,attsuffix);
            { read the next line which contains the Change options }
            repeat
              readln(infile,s);
@@ -413,7 +418,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.6  2000-01-07 01:15:01  peter
+  Revision 1.7  2000-01-28 09:41:39  peter
+    * fixed fpu suffix parsing for att reader
+
+  Revision 1.6  2000/01/07 01:15:01  peter
     * updated copyright to 2000
 
   Revision 1.5  1999/10/28 09:47:45  peter