瀏覽代碼

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 -
Károly Balogh 8 年之前
父節點
當前提交
49cec23ba6
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compiler/paramgr.pas

+ 4 - 1
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}