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 -
This commit is contained in:
Károly Balogh 2016-12-24 17:43:46 +00:00
parent 2225f90dde
commit 49cec23ba6

View File

@ -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}