Browse Source

Merged revisions 7979 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r7979 | daniel | 2007-07-07 23:01:46 +0200 (Sat, 07 Jul 2007) | 2 lines

* Fix bug #9141 and pass const params <=16 in by value.

........

git-svn-id: branches/fixes_2_2@8207 -

peter 18 years ago
parent
commit
f67e47540e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/x86_64/cpupara.pas

+ 3 - 2
compiler/x86_64/cpupara.pas

@@ -224,7 +224,8 @@ unit cpupara;
           formaldef :
             result:=true;
           recorddef :
-            result:=(varspez=vs_const) or ((target_info.system=system_x86_64_win64) and (def.size>8));
+            result:=((varspez=vs_const) and (def.size>16)) or 
+                    ((target_info.system=system_x86_64_win64) and (def.size>8));
           arraydef :
             begin
               result:=not(
@@ -240,7 +241,7 @@ unit cpupara;
           stringdef :
             result:=(tstringdef(def).stringtype in [st_shortstring,st_longstring]);
           procvardef :
-            result:=(po_methodpointer in tprocvardef(def).procoptions);
+            result:=(po_methodpointer in tprocvardef(def).procoptions) and (target_info.system=system_x86_64_win64);
           setdef :
             result:=(tsetdef(def).settype<>smallset);
         end;