From 1178fdc98fb8f67c971c51c65ff328b29f3cbde7 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 27 Dec 2014 16:42:34 +0000 Subject: [PATCH] * force objects and records only into memory if their address is passed, hint from Jonas, improves code after r29139 git-svn-id: trunk@29344 - --- compiler/ncgcal.pas | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/ncgcal.pas b/compiler/ncgcal.pas index f624e215ca..005c32ad4b 100644 --- a/compiler/ncgcal.pas +++ b/compiler/ncgcal.pas @@ -325,12 +325,13 @@ implementation paramanager.push_addr_param(parasym.varspez,parasym.vardef, aktcallnode.procdefinition.proccalloption)); - { objects or advanced records could be located in registers if they are the result of a type case, see e.g. webtbs\tw26075.pp } - if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then - hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef); - if pushaddr then - push_addr_para + begin + { objects or advanced records could be located in registers if they are the result of a type case, see e.g. webtbs\tw26075.pp } + if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then + hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef); + push_addr_para + end else push_value_para; end