Ver código fonte

* revert part of r45810 which was accidently committed

git-svn-id: trunk@45813 -
florian 5 anos atrás
pai
commit
14bc6674a6
2 arquivos alterados com 6 adições e 4 exclusões
  1. 3 4
      compiler/symdef.pas
  2. 3 0
      compiler/symsym.pas

+ 3 - 4
compiler/symdef.pas

@@ -2352,10 +2352,9 @@ implementation
                  not trecorddef(self).contains_cross_aword_field and
                  { records cannot go into registers on 16 bit targets for now }
                  (sizeof(aint)>2) and
-                 (not trecorddef(self).contains_float_field) or
-                  (recsize <= sizeof(aint))
-                 ) and
-                 not needs_inittable;
+                 not trecorddef(self).contains_float_field
+                ) and
+                not needs_inittable;
 {$endif cpuhighleveltarget}
             end;
           else

+ 3 - 0
compiler/symsym.pas

@@ -1728,6 +1728,8 @@ implementation
 
 
     function tabstractvarsym.is_regvar(refpara: boolean):boolean;
+      var
+        tempdef : tdef;
       begin
         { Register variables are not allowed in the following cases:
            - regvars are disabled
@@ -1746,6 +1748,7 @@ implementation
 {$if not defined(powerpc) and not defined(powerpc64)}
                 and ((vardef.typ <> recorddef) or
                      (varregable = vr_addr) or
+                     tabstractrecordsymtable(tabstractrecorddef(vardef).symtable).has_single_field(tempdef) or
                      not(varstate in [vs_written,vs_readwritten]));
 {$endif}
       end;