- removed tabstractnormalvarsym.currentregloc: the new location will

always be different from the old location, since we just allocated
    the registers for the new one above. Should the old registers ever
    be needed again for tai_varloc: rr.old/rr.oldhi contains it

git-svn-id: trunk@34086 -
This commit is contained in:
Jonas Maebe 2016-07-08 07:46:51 +00:00
parent fb0f4394c0
commit 571d053a60
3 changed files with 3 additions and 18 deletions

View File

@ -4301,13 +4301,9 @@ implementation
begin begin
n.location.register128.reglo := rr.new; n.location.register128.reglo := rr.new;
n.location.register128.reghi := rr.newhi; n.location.register128.reghi := rr.newhi;
if assigned(rr.sym) and if assigned(rr.sym) then
((rr.sym.currentregloc.register<>rr.new) or
(rr.sym.currentregloc.registerhi<>rr.newhi)) then
begin begin
varloc:=tai_varloc.create128(rr.sym,rr.new,rr.newhi); varloc:=tai_varloc.create128(rr.sym,rr.new,rr.newhi);
rr.sym.currentregloc.register:=rr.new;
rr.sym.currentregloc.registerHI:=rr.newhi;
list.concat(varloc); list.concat(varloc);
end; end;
end end
@ -4317,13 +4313,9 @@ implementation
begin begin
n.location.register64.reglo := rr.new; n.location.register64.reglo := rr.new;
n.location.register64.reghi := rr.newhi; n.location.register64.reghi := rr.newhi;
if assigned(rr.sym) and if assigned(rr.sym) then
((rr.sym.currentregloc.register<>rr.new) or
(rr.sym.currentregloc.registerhi<>rr.newhi)) then
begin begin
varloc:=tai_varloc.create64(rr.sym,rr.new,rr.newhi); varloc:=tai_varloc.create64(rr.sym,rr.new,rr.newhi);
rr.sym.currentregloc.register:=rr.new;
rr.sym.currentregloc.registerHI:=rr.newhi;
list.concat(varloc); list.concat(varloc);
end; end;
end end
@ -4331,10 +4323,9 @@ implementation
{$endif cpu64bitalu} {$endif cpu64bitalu}
begin begin
n.location.register := rr.new; n.location.register := rr.new;
if assigned(rr.sym) and (rr.sym.currentregloc.register<>rr.new) then if assigned(rr.sym) then
begin begin
varloc:=tai_varloc.create(rr.sym,rr.new); varloc:=tai_varloc.create(rr.sym,rr.new);
rr.sym.currentregloc.register:=rr.new;
list.concat(varloc); list.concat(varloc);
end; end;
end; end;
@ -4581,7 +4572,6 @@ implementation
end; end;
end; end;
vs.localloc:=vs.initialloc; vs.localloc:=vs.initialloc;
FillChar(vs.currentregloc,sizeof(vs.currentregloc),0);
end; end;
procedure thlcgobj.paravarsym_set_initialloc_to_paraloc(vs: tparavarsym); procedure thlcgobj.paravarsym_set_initialloc_to_paraloc(vs: tparavarsym);

View File

@ -1943,7 +1943,6 @@ implementation
end; end;
end; end;
vs.localloc:=vs.initialloc; vs.localloc:=vs.initialloc;
FillChar(vs.currentregloc,sizeof(vs.currentregloc),0);
end; end;

View File

@ -235,8 +235,6 @@ interface
localloc : TLocation; localloc : TLocation;
{ initial location so it can still be initialized later after the location was changed by SSA } { initial location so it can still be initialized later after the location was changed by SSA }
initialloc : TLocation; initialloc : TLocation;
{ current registers for register variables with moving register numbers }
currentregloc : TLocation;
{ migrated to a parentfpstruct because of nested access (not written to ppu, because not important and would change interface crc) } { migrated to a parentfpstruct because of nested access (not written to ppu, because not important and would change interface crc) }
inparentfpstruct : boolean; inparentfpstruct : boolean;
{ the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var { the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
@ -1838,7 +1836,6 @@ implementation
begin begin
inherited create(st,n,vsp,def,vopts,doregister); inherited create(st,n,vsp,def,vopts,doregister);
fillchar(localloc,sizeof(localloc),0); fillchar(localloc,sizeof(localloc),0);
fillchar(currentregloc,sizeof(localloc),0);
fillchar(initialloc,sizeof(initialloc),0); fillchar(initialloc,sizeof(initialloc),0);
defaultconstsym:=nil; defaultconstsym:=nil;
end; end;
@ -1848,7 +1845,6 @@ implementation
begin begin
inherited ppuload(st,ppufile); inherited ppuload(st,ppufile);
fillchar(localloc,sizeof(localloc),0); fillchar(localloc,sizeof(localloc),0);
fillchar(currentregloc,sizeof(localloc),0);
fillchar(initialloc,sizeof(initialloc),0); fillchar(initialloc,sizeof(initialloc),0);
ppufile.getderef(defaultconstsymderef); ppufile.getderef(defaultconstsymderef);
end; end;