* write variable locations of 64 bit integer values on 32 bit targets correctly

* when transforming imag. register variable locations into real ones, take care of the register type

git-svn-id: trunk@18958 -
This commit is contained in:
florian 2011-09-03 19:43:50 +00:00
parent 637a4671d9
commit 6211a83865
2 changed files with 27 additions and 14 deletions

View File

@ -2942,19 +2942,22 @@ implementation
internalerror(2006090920); internalerror(2006090920);
end; end;
if assigned(rr.sym) then
list.concat(tai_varloc.create(rr.sym,rr.new));
{ now that we've change the loadn/temp, also change the node result location } { now that we've change the loadn/temp, also change the node result location }
{$ifndef cpu64bitalu} {$ifndef cpu64bitalu}
if (n.location.size in [OS_64,OS_S64]) then if (n.location.size in [OS_64,OS_S64]) then
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) then
list.concat(tai_varloc.create64(rr.sym,rr.new,rr.newhi));
end end
else else
{$endif not cpu64bitalu} {$endif not cpu64bitalu}
n.location.register := rr.new; begin
n.location.register := rr.new;
if assigned(rr.sym) then
list.concat(tai_varloc.create(rr.sym,rr.new));
end;
end; end;

View File

@ -1678,18 +1678,28 @@ unit rgobj;
end; end;
ait_varloc: ait_varloc:
begin begin
if cs_asm_source in current_settings.globalswitches then if (getregtype(tai_varloc(p).newlocation)=regtype) then
begin begin
setsupreg(tai_varloc(p).newlocation,reginfo[getsupreg(tai_varloc(p).newlocation)].colour); if (cs_asm_source in current_settings.globalswitches) then
hp:=Tai_comment.Create(strpnew('Var '+tai_varloc(p).varsym.realname+' located in register '+ begin
std_regname(tai_varloc(p).newlocation))); setsupreg(tai_varloc(p).newlocation,reginfo[getsupreg(tai_varloc(p).newlocation)].colour);
list.insertafter(hp,p); if tai_varloc(p).newlocationhi<>NR_NO then
begin
setsupreg(tai_varloc(p).newlocationhi,reginfo[getsupreg(tai_varloc(p).newlocationhi)].colour);
hp:=Tai_comment.Create(strpnew('Var '+tai_varloc(p).varsym.realname+' located in register '+
std_regname(tai_varloc(p).newlocationhi)+':'+std_regname(tai_varloc(p).newlocation)));
end
else
hp:=Tai_comment.Create(strpnew('Var '+tai_varloc(p).varsym.realname+' located in register '+
std_regname(tai_varloc(p).newlocation)));
list.insertafter(hp,p);
end;
q:=tai(p.next);
list.remove(p);
p.free;
p:=q;
continue;
end; end;
q:=tai(p.next);
list.remove(p);
p.free;
p:=q;
continue;
end; end;
ait_instruction: ait_instruction: