Parcourir la source

* Bug reported by Marco fixed: Intel assembler reader: fld qword ptr x
was read as fldq x but it must be fldl x

florian il y a 26 ans
Parent
commit
22ba06f140
2 fichiers modifiés avec 19 ajouts et 5 suppressions
  1. 6 2
      compiler/ag386att.pas
  2. 13 3
      compiler/ra386int.pas

+ 6 - 2
compiler/ag386att.pas

@@ -704,7 +704,7 @@ unit ag386att;
                    (paicpu(hp)^.oper[0].typ=top_reg) and
                    (paicpu(hp)^.oper[0].reg in [R_ST..R_ST7])
                   ) then
-                s:=s+att_opsize2str[paicpu(hp)^.opsize];
+                  s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
                if paicpu(hp)^.ops<>0 then
                 begin
@@ -871,7 +871,11 @@ unit ag386att;
 end.
 {
   $Log$
-  Revision 1.21  1999-12-08 10:39:59  pierre
+  Revision 1.22  1999-12-18 20:00:33  florian
+    * Bug reported by Marco fixed: Intel assembler reader: fld qword ptr x
+      was read as fldq x but it must be fldl x
+
+  Revision 1.21  1999/12/08 10:39:59  pierre
     + allow use of unit var in exports of DLL for win32
       by using direct export writing by default instead of use of DEFFILE
       that does not allow assembler labels that do not

+ 13 - 3
compiler/ra386int.pas

@@ -1441,7 +1441,7 @@ procedure T386IntelInstruction.InitOperands;
 var
   i : longint;
 begin
-  for i:=1to 3 do
+  for i:=1 to 3 do
    Operands[i]:=new(P386IntelOperand,Init);
 end;
 
@@ -1535,7 +1535,13 @@ Begin
             AS_DWORD : size:=S_L;
             AS_WORD  : size:=S_W;
             AS_BYTE  : size:=S_B;
-            AS_QWORD : size:=S_IQ;
+            AS_QWORD : begin
+                          if opcode in [A_FCOM,A_FCOMP,A_FDIV,
+                           A_FDIVR,A_FMUL,A_FSUB,A_FSUBR,A_FLD,A_FST,A_FSTP,A_FADD] then
+                            size:=S_FL
+                          else
+                            size:=S_IQ;
+                       end;
             AS_TBYTE : size:=S_FX;
           end;
           Consume(actasmtoken);
@@ -1768,7 +1774,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.55  1999-12-01 12:42:32  peter
+  Revision 1.56  1999-12-18 20:00:33  florian
+    * Bug reported by Marco fixed: Intel assembler reader: fld qword ptr x
+      was read as fldq x but it must be fldl x
+
+  Revision 1.55  1999/12/01 12:42:32  peter
     * fixed bug 698
     * removed some notes about unused vars