mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 23:09:38 +02:00
* 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:
parent
637a4671d9
commit
6211a83865
compiler
@ -2942,19 +2942,22 @@ implementation
|
||||
internalerror(2006090920);
|
||||
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 }
|
||||
{$ifndef cpu64bitalu}
|
||||
if (n.location.size in [OS_64,OS_S64]) then
|
||||
begin
|
||||
n.location.register64.reglo := rr.new;
|
||||
n.location.register64.reghi := rr.newhi;
|
||||
if assigned(rr.sym) then
|
||||
list.concat(tai_varloc.create64(rr.sym,rr.new,rr.newhi));
|
||||
end
|
||||
else
|
||||
{$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;
|
||||
|
||||
|
||||
|
@ -1678,18 +1678,28 @@ unit rgobj;
|
||||
end;
|
||||
ait_varloc:
|
||||
begin
|
||||
if cs_asm_source in current_settings.globalswitches then
|
||||
if (getregtype(tai_varloc(p).newlocation)=regtype) then
|
||||
begin
|
||||
setsupreg(tai_varloc(p).newlocation,reginfo[getsupreg(tai_varloc(p).newlocation)].colour);
|
||||
hp:=Tai_comment.Create(strpnew('Var '+tai_varloc(p).varsym.realname+' located in register '+
|
||||
std_regname(tai_varloc(p).newlocation)));
|
||||
list.insertafter(hp,p);
|
||||
if (cs_asm_source in current_settings.globalswitches) then
|
||||
begin
|
||||
setsupreg(tai_varloc(p).newlocation,reginfo[getsupreg(tai_varloc(p).newlocation)].colour);
|
||||
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;
|
||||
q:=tai(p.next);
|
||||
list.remove(p);
|
||||
p.free;
|
||||
p:=q;
|
||||
continue;
|
||||
end;
|
||||
|
||||
ait_instruction:
|
||||
|
Loading…
Reference in New Issue
Block a user