summaryrefslogtreecommitdiff
path: root/compiler/ncgcal.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-12-27 16:42:34 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-12-27 16:42:34 +0000
commit1cb1448cb605ebf2432960588bd0856cd1d138e4 (patch)
treec9980e350db8fd131ff01972d546b9e2e3540148 /compiler/ncgcal.pas
parentebbc6ebd79d7b5c045103732dc1a39411ebd0596 (diff)
downloadfpc-1cb1448cb605ebf2432960588bd0856cd1d138e4.tar.gz
* force objects and records only into memory if their address is passed, hint from Jonas, improves code after r29139
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@29344 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncgcal.pas')
-rw-r--r--compiler/ncgcal.pas11
1 files 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