rpms/fpc/devel fpc-2.2.4-r12475.patch,NONE,1.1

Joost van der Sluis joost at fedoraproject.org
Thu Oct 8 10:25:22 UTC 2009


Author: joost

Update of /cvs/pkgs/rpms/fpc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22788

Added Files:
	fpc-2.2.4-r12475.patch 
Log Message:
* Tue Oct 8 2009 Joost van der Sluis <joost at cnoc.nl> 2.2.4-4
- Added file forgotten in previous commit


fpc-2.2.4-r12475.patch:
 cpupara.pas |   25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

--- NEW FILE fpc-2.2.4-r12475.patch ---
Index: fpcsrc/compiler/powerpc/cpupara.pas
===================================================================
--- fpcsrc/compiler/powerpc/cpupara.pas	(revision 12474)
+++ fpcsrc/compiler/powerpc/cpupara.pas	(revision 12475)
@@ -130,7 +130,12 @@
               result:=LOC_REGISTER;
             classrefdef:
               result:=LOC_REGISTER;
-            procvardef,
+            procvardef:
+              if (target_info.abi = abi_powerpc_aix) or
+                 (p.size = sizeof(pint)) then
+                result:=LOC_REGISTER
+              else
+                result:=LOC_REFERENCE;
             recorddef:
               if (target_info.abi<>abi_powerpc_aix) or
                  ((p.size >= 3) and
@@ -181,8 +186,24 @@
           variantdef,
           formaldef :
             result:=true;
-          recorddef,
+          { regular procvars must be passed by value, because you cannot pass
+            the address of a local stack location when calling e.g.
+            pthread_create with the address of a function (first of all it
+            expects the address of the function to execute and not the address
+            of a memory location containing that address, and secondly if you
+            first store the address on the stack and then pass the address of
+            this stack location, then this stack location may no longer be
+            valid when the newly started thread accesses it.
+
+            However, for "procedure of object" we must use the same calling
+            convention as for "8 byte record" due to the need for
+            interchangeability with the TMethod record type.
+          }
           procvardef :
+            result:=
+              (target_info.abi <> abi_powerpc_aix) and
+              (def.size <> sizeof(pint));
+          recorddef :
             result :=
               (target_info.abi<>abi_powerpc_aix) or
               ((varspez = vs_const) and




More information about the fedora-extras-commits mailing list