From 49cec23ba69be2bc6e3c4ca4729851f99149a49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Sat, 24 Dec 2016 17:43:46 +0000 Subject: [PATCH] for explicit paralocs, don't use the original explicit register as temp, but allocate a new register the same type instead. this fixes issues when the paralocs are also scratch regs and would get overwritten before the call itself git-svn-id: trunk@35192 - --- compiler/paramgr.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/paramgr.pas b/compiler/paramgr.pas index ef69ea4b55..8e21c89276 100644 --- a/compiler/paramgr.pas +++ b/compiler/paramgr.pas @@ -425,7 +425,10 @@ implementation LOC_REGISTER : begin if (vo_has_explicit_paraloc in parasym.varoptions) and (paraloc^.loc = LOC_REGISTER) then - newparaloc^.register:=paraloc^.register + if getregtype(paraloc^.register) = R_ADDRESSREGISTER then + newparaloc^.register:=cg.getaddressregister(list) + else + newparaloc^.register:=cg.getintregister(list,paraloc^.size) else begin {$ifdef cpu_uses_separate_address_registers}