From 24ae32c8551eb67258f2338bea5ec9cc8051f37c Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 9 Sep 2006 16:33:15 +0000 Subject: [PATCH] * fixed passing of record parameters on win64 git-svn-id: trunk@4583 - --- compiler/x86_64/cpupara.pas | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/compiler/x86_64/cpupara.pas b/compiler/x86_64/cpupara.pas index 0793a2c0f0..9727d075fe 100644 --- a/compiler/x86_64/cpupara.pas +++ b/compiler/x86_64/cpupara.pas @@ -98,8 +98,11 @@ unit cpupara; begin if p.size<=16 then begin - {$warning TODO location depends on the fields} - loc1:=LOC_REFERENCE; + if (target_info.system=system_x86_64_win64) and + (p.size<=8) then + loc1:=LOC_REGISTER + else + loc1:=LOC_REFERENCE; end else loc1:=LOC_REFERENCE; @@ -107,13 +110,23 @@ unit cpupara; objectdef: begin if is_object(p) then - loc1:=LOC_REFERENCE + begin + if (target_info.system=system_x86_64_win64) and + (p.size<=8) then + loc1:=LOC_REGISTER + else + loc1:=LOC_REFERENCE; + end else loc1:=LOC_REGISTER; end; arraydef: begin - loc1:=LOC_REFERENCE; + if (target_info.system=system_x86_64_win64) and + (p.size<=8) then + loc1:=LOC_REGISTER + else + loc1:=LOC_REFERENCE; end; variantdef: loc1:=LOC_REFERENCE;