Prechádzať zdrojové kódy

* fixed function return location for small records on darwin/i386 and
iphonesim/i386 when not using cdecl/cppdecl/mwpascal calling conventions

git-svn-id: trunk@22350 -

Jonas Maebe 13 rokov pred
rodič
commit
95c69f1f9e
1 zmenil súbory, kde vykonal 17 pridanie a 14 odobranie
  1. 17 14
      compiler/i386/cpupara.pas

+ 17 - 14
compiler/i386/cpupara.pas

@@ -127,24 +127,27 @@ unit cpupara;
           system_i386_darwin,
           system_i386_iphonesim :
             begin
-              case def.typ of
-                recorddef :
-                  begin
-                    size := def.size;
-                    if (size > 0) and
-                       (size <= 8) and
-                       { only if size is a power of 2 }
-                       ((size and (size-1)) = 0) then
+              if calloption in cdecl_pocalls then
+                begin
+                  case def.typ of
+                    recorddef :
+                      begin
+                        size:=def.size;
+                        if (size>0) and
+                           (size<=8) and
+                           { only if size is a power of 2 }
+                           ((size and (size-1)) = 0) then
+                          begin
+                            result:=false;
+                            exit;
+                          end;
+                      end;
+                    procvardef:
                       begin
-                        result := false;
+                        result:=false;
                         exit;
                       end;
                   end;
-                procvardef:
-                  begin
-                    result:=false;
-                    exit;
-                  end;
               end;
             end;
         end;