Browse Source

* fpuvaroffset problems solved

pierre 26 years ago
parent
commit
da2d4a76ce
2 changed files with 16 additions and 4 deletions
  1. 9 2
      compiler/cg386inl.pas
  2. 7 2
      compiler/tgeni386.pas

+ 9 - 2
compiler/cg386inl.pas

@@ -414,6 +414,7 @@ implementation
                             floatdef :
                               begin
                                 emitcall(rdwrprefix[doread]+'FLOAT');
+                                inc(fpuvaroffset);
                                 if doread then
                                   StoreDirectFuncResult(hp^.left);
                               end;
@@ -699,7 +700,10 @@ implementation
 
            Case dest_para^.resulttype^.deftype of
              floatdef:
-               procedureprefix := 'FPC_VAL_REAL_';
+               begin
+                  procedureprefix := 'FPC_VAL_REAL_';
+                  inc(fpuvaroffset);
+               end;
              orddef:
                if is_64bitint(dest_para^.resulttype) then
                  begin
@@ -1313,7 +1317,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.65  1999-08-04 00:22:47  florian
+  Revision 1.66  1999-08-10 12:47:53  pierre
+   * fpuvaroffset problems solved
+
+  Revision 1.65  1999/08/04 00:22:47  florian
     * renamed i386asm and i386base to cpuasm and cpubase
 
   Revision 1.64  1999/08/03 22:02:42  peter

+ 7 - 2
compiler/tgeni386.pas

@@ -433,7 +433,9 @@ implementation
       begin
          unused:=usableregs;
          usablereg32:=c_usableregs;
-         fpuvaroffset:=0;
+         {fpuvaroffset:=0;
+          this must only be resetted at each procedure
+          compilation start PM }
       end;
 
 
@@ -480,7 +482,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.30  1999-08-04 13:45:32  florian
+  Revision 1.31  1999-08-10 12:47:55  pierre
+   * fpuvaroffset problems solved
+
+  Revision 1.30  1999/08/04 13:45:32  florian
     + floating point register variables !!
     * pairegalloc is now generated for register variables