From 743b05e911d335857152bfd67736432ba9c713ea Mon Sep 17 00:00:00 2001
From: Jonas Maebe <jonas@freepascal.org>
Date: Fri, 14 Jul 2006 17:55:45 +0000
Subject: [PATCH]   * fixed and released optimization to prevent some
 superfluous     parameter copying for ppc32/ppc64

git-svn-id: trunk@4186 -
---
 compiler/paramgr.pas | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/paramgr.pas b/compiler/paramgr.pas
index 437985e3a2..7c403dedb5 100644
--- a/compiler/paramgr.pas
+++ b/compiler/paramgr.pas
@@ -322,12 +322,13 @@ implementation
             newparaloc:=cgpara.add_location;
             newparaloc^.size:=paraloc^.size;
 {$warning maybe release this optimization for all targets?}
-{$ifdef sparc}
+{$if defined(sparc) or defined(powerpc) or defined(powerpc64)}
             { Does it fit a register? }
-            if len<=sizeof(aint) then
+            if (len<=sizeof(aint)) and
+               (cgpara.size in [OS_8,OS_16,OS_32,OS_64,OS_128,OS_S8,OS_S16,OS_S32,OS_S64,OS_S128]) then
               newparaloc^.loc:=LOC_REGISTER
             else
-{$endif sparc}
+{$endif defined(sparc) or defined(powerpc) or defined(powerpc64) }
               newparaloc^.loc:=paraloc^.loc;
             case newparaloc^.loc of
               LOC_REGISTER :