From 4ea86a445e2d52bc98fa23f8c36920e3f3918707 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 12 Mar 2013 15:09:24 +0000 Subject: [PATCH] * fixed functions returning int64 on i8086 git-svn-id: branches/i8086@23807 - --- compiler/i8086/cpupara.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compiler/i8086/cpupara.pas b/compiler/i8086/cpupara.pas index 08818f2e1f..4b07f3bcc0 100644 --- a/compiler/i8086/cpupara.pas +++ b/compiler/i8086/cpupara.pas @@ -149,6 +149,15 @@ unit cpupara; end; end; end; + + { 64-bit types are returned as a parameter pointer, since putting them + in registers would require 4 registers on the i8086 } + if def.size > 4 then + begin + result:=true; + exit; + end; + result:=inherited ret_in_param(def,pd); end; @@ -373,6 +382,8 @@ unit cpupara; begin paraloc:=result.add_location; paraloc^.loc:=LOC_REGISTER; + if retcgsize in [OS_64,OS_S64] then + internalerror(2013031201); if retcgsize in [OS_32,OS_S32] then begin { low 16bits }