mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 17:40:28 +02:00
* Notranslation changed into -sr functionality
This commit is contained in:
parent
430621bc9b
commit
63e1b70931
@ -532,7 +532,7 @@ implementation
|
|||||||
internalerror(200208182);
|
internalerror(200208182);
|
||||||
if not assigned(aiclass[t]) then
|
if not assigned(aiclass[t]) then
|
||||||
internalerror(200208183);
|
internalerror(200208183);
|
||||||
//writeln('taiload: ',taitypestr[t]);
|
{writeln('taiload: ',taitypestr[t]);}
|
||||||
{ generate tai of the correct class }
|
{ generate tai of the correct class }
|
||||||
ppuloadai:=aiclass[t].ppuload(t,ppufile);
|
ppuloadai:=aiclass[t].ppuload(t,ppufile);
|
||||||
end
|
end
|
||||||
@ -549,7 +549,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ type, read by ppuloadnode }
|
{ type, read by ppuloadnode }
|
||||||
ppufile.putbyte(byte(n.typ));
|
ppufile.putbyte(byte(n.typ));
|
||||||
//writeln('taiwrite: ',taitypestr[n.typ]);
|
{writeln('taiwrite: ',taitypestr[n.typ]);}
|
||||||
n.ppuwrite(ppufile);
|
n.ppuwrite(ppufile);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1784,7 +1784,7 @@ implementation
|
|||||||
constructor taasmoutput.create;
|
constructor taasmoutput.create;
|
||||||
begin
|
begin
|
||||||
inherited create;
|
inherited create;
|
||||||
// make sure the optimizer won't remove the first tai of this list
|
{ make sure the optimizer won't remove the first tai of this list}
|
||||||
insert(tai_marker.create(marker_blockstart));
|
insert(tai_marker.create(marker_blockstart));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1860,9 +1860,6 @@ implementation
|
|||||||
r:Preference;
|
r:Preference;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef notranslation}
|
|
||||||
exit;
|
|
||||||
{$endif notranslation}
|
|
||||||
p:=Tai(first);
|
p:=Tai(first);
|
||||||
while assigned(p) do
|
while assigned(p) do
|
||||||
begin
|
begin
|
||||||
@ -1902,7 +1899,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.32 2003-08-17 16:59:20 jonas
|
Revision 1.33 2003-08-17 20:47:47 daniel
|
||||||
|
* Notranslation changed into -sr functionality
|
||||||
|
|
||||||
|
Revision 1.32 2003/08/17 16:59:20 jonas
|
||||||
* fixed regvars so they work with newra (at least for ppc)
|
* fixed regvars so they work with newra (at least for ppc)
|
||||||
* fixed some volatile register bugs
|
* fixed some volatile register bugs
|
||||||
+ -dnotranslation option for -dnewra, which causes the registers not to
|
+ -dnotranslation option for -dnewra, which causes the registers not to
|
||||||
|
@ -387,15 +387,12 @@ var
|
|||||||
begin
|
begin
|
||||||
if (cs_asm_regalloc in aktglobalswitches) then
|
if (cs_asm_regalloc in aktglobalswitches) then
|
||||||
begin
|
begin
|
||||||
{$ifndef notranslation}
|
if Tai_Regalloc(hp).reg.enum=R_INTREGISTER then
|
||||||
if Tai_Regalloc(hp).reg.enum>lastreg then
|
AsmWriteLn(target_asm.comment+'Register r'+tostr(byte(tai_regalloc(hp).reg.number shr 8)-1)+
|
||||||
internalerror(200201081);
|
allocstr[tai_regalloc(hp).allocation])
|
||||||
AsmWriteLn(target_asm.comment+'Register '+std_reg2str[tai_regalloc(hp).reg.enum]+
|
else
|
||||||
allocstr[tai_regalloc(hp).allocation]);
|
AsmWriteLn(target_asm.comment+'Register '+std_reg2str[tai_regalloc(hp).reg.enum]+
|
||||||
{$else not notranslation}
|
allocstr[tai_regalloc(hp).allocation]);
|
||||||
AsmWriteLn(target_asm.comment+'Register r'+tostr(ord(tai_regalloc(hp).reg.enum)-1)+
|
|
||||||
allocstr[tai_regalloc(hp).allocation]);
|
|
||||||
{$endif not notranslation}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -825,7 +822,10 @@ var
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.25 2003-08-17 16:59:20 jonas
|
Revision 1.26 2003-08-17 20:47:47 daniel
|
||||||
|
* Notranslation changed into -sr functionality
|
||||||
|
|
||||||
|
Revision 1.25 2003/08/17 16:59:20 jonas
|
||||||
* fixed regvars so they work with newra (at least for ppc)
|
* fixed regvars so they work with newra (at least for ppc)
|
||||||
* fixed some volatile register bugs
|
* fixed some volatile register bugs
|
||||||
+ -dnotranslation option for -dnewra, which causes the registers not to
|
+ -dnotranslation option for -dnewra, which causes the registers not to
|
||||||
|
@ -146,6 +146,7 @@ unit agppcgas;
|
|||||||
function getreferencestring(var ref : treference) : string;
|
function getreferencestring(var ref : treference) : string;
|
||||||
var
|
var
|
||||||
s : string;
|
s : string;
|
||||||
|
i,b:boolean;
|
||||||
begin
|
begin
|
||||||
with ref do
|
with ref do
|
||||||
begin
|
begin
|
||||||
@ -173,13 +174,9 @@ unit agppcgas;
|
|||||||
if (symaddr <> refs_full) then
|
if (symaddr <> refs_full) then
|
||||||
s := s+')'+symaddr2str[symaddr];
|
s := s+')'+symaddr2str[symaddr];
|
||||||
|
|
||||||
{$ifndef notranslation}
|
b:=(base.enum=R_NO) or ((base.enum=R_INTREGISTER) and (base.number=NR_NO));
|
||||||
if (index.enum < firstreg) or (index.enum > lastreg) then
|
i:=(index.enum=R_NO) or ((index.enum=R_INTREGISTER) and (index.number=NR_NO));
|
||||||
internalerror(20030312);
|
if i and not b then
|
||||||
if (base.enum < firstreg) or (base.enum > lastreg) then
|
|
||||||
internalerror(200303123);
|
|
||||||
{$endif notranslation}
|
|
||||||
if (index.enum=R_NO) and (base.enum<>R_NO) then
|
|
||||||
begin
|
begin
|
||||||
if offset=0 then
|
if offset=0 then
|
||||||
begin
|
begin
|
||||||
@ -188,20 +185,18 @@ unit agppcgas;
|
|||||||
else
|
else
|
||||||
s:=s+'0';
|
s:=s+'0';
|
||||||
end;
|
end;
|
||||||
{$ifndef notranslation}
|
if base.enum=R_INTREGISTER then
|
||||||
s:=s+'('+gas_reg2str[base.enum]+')'
|
s:=s+'(reg'+tostr(byte(base.number shr 8))+')'
|
||||||
{$else not notranslation}
|
else
|
||||||
s:=s+'(r'+tostr(ord(base.enum)-1)+')'
|
s:=s+'('+gas_reg2str[base.enum]+')';
|
||||||
{$endif notranslation}
|
|
||||||
end
|
end
|
||||||
else if (index.enum<>R_NO) and (base.enum<>R_NO) and (offset=0) then
|
else if (not i) and (not b) and (offset=0) then
|
||||||
{$ifndef notranslation}
|
if base.enum=R_INTREGISTER then
|
||||||
s:=s+gas_reg2str[base.enum]+','+gas_reg2str[index.enum]
|
s:=s+'r'+tostr(byte(base.number shr 8))+',r'+tostr(byte(index.number shr 8))
|
||||||
|
else
|
||||||
|
s:=s+gas_reg2str[base.enum]+','+gas_reg2str[index.enum]
|
||||||
else if ((index.enum<>R_NO) or (base.enum<>R_NO)) then
|
else if ((index.enum<>R_NO) or (base.enum<>R_NO)) then
|
||||||
internalerror(19992);
|
internalerror(19992);
|
||||||
{$else not notranslation}
|
|
||||||
s:=s+'r'+tostr(ord(base.enum)-1)+',r'+tostr(ord(index.enum)-1);
|
|
||||||
{$endif notranslation}
|
|
||||||
end;
|
end;
|
||||||
getreferencestring:=s;
|
getreferencestring:=s;
|
||||||
end;
|
end;
|
||||||
@ -245,13 +240,10 @@ unit agppcgas;
|
|||||||
case o.typ of
|
case o.typ of
|
||||||
top_reg:
|
top_reg:
|
||||||
begin
|
begin
|
||||||
{$ifndef notranslation}
|
if o.reg.enum=R_INTREGISTER then
|
||||||
if (o.reg.enum < R_0) or (o.reg.enum > lastreg) then
|
getopstr:='reg'+tostr(byte(o.reg.number shr 8))
|
||||||
internalerror(200303125);
|
else
|
||||||
getopstr:=gas_reg2str[o.reg.enum];
|
getopstr:=gas_reg2str[o.reg.enum];
|
||||||
{$else not notranslation}
|
|
||||||
getopstr:='r'+tostr(ord(o.reg.enum)-1);
|
|
||||||
{$endif not notranslation}
|
|
||||||
end;
|
end;
|
||||||
top_const:
|
top_const:
|
||||||
getopstr:=tostr(longint(o.val));
|
getopstr:=tostr(longint(o.val));
|
||||||
@ -379,7 +371,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.24 2003-08-17 16:59:20 jonas
|
Revision 1.25 2003-08-17 20:47:47 daniel
|
||||||
|
* Notranslation changed into -sr functionality
|
||||||
|
|
||||||
|
Revision 1.24 2003/08/17 16:59:20 jonas
|
||||||
* fixed regvars so they work with newra (at least for ppc)
|
* fixed regvars so they work with newra (at least for ppc)
|
||||||
* fixed some volatile register bugs
|
* fixed some volatile register bugs
|
||||||
+ -dnotranslation option for -dnewra, which causes the registers not to
|
+ -dnotranslation option for -dnewra, which causes the registers not to
|
||||||
|
@ -629,12 +629,10 @@ implementation
|
|||||||
reg.number:=(reg.number and not $ff) or cgsize2subreg(OS_INT);
|
reg.number:=(reg.number and not $ff) or cgsize2subreg(OS_INT);
|
||||||
r:=reg;
|
r:=reg;
|
||||||
convert_register_to_enum(r);
|
convert_register_to_enum(r);
|
||||||
{$ifndef notranslation}
|
|
||||||
if r.enum>lastreg then
|
if r.enum>lastreg then
|
||||||
internalerror(200201081);
|
internalerror(200201081);
|
||||||
if (rg.regvar_loaded_other[r.enum]) then
|
if (rg.regvar_loaded_other[r.enum]) then
|
||||||
asml.concat(tai_regalloc.dealloc(reg));
|
asml.concat(tai_regalloc.dealloc(reg));
|
||||||
{$endif notranslation}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -666,7 +664,6 @@ implementation
|
|||||||
i: longint;
|
i: longint;
|
||||||
r: tregister;
|
r: tregister;
|
||||||
begin
|
begin
|
||||||
{$ifndef notranslation}
|
|
||||||
if not assigned(current_procinfo.procdef.regvarinfo) then
|
if not assigned(current_procinfo.procdef.regvarinfo) then
|
||||||
exit;
|
exit;
|
||||||
with pregvarinfo(current_procinfo.procdef.regvarinfo)^ do
|
with pregvarinfo(current_procinfo.procdef.regvarinfo)^ do
|
||||||
@ -686,7 +683,6 @@ implementation
|
|||||||
Message3(cg_d_register_weight,std_reg2str[r.enum],
|
Message3(cg_d_register_weight,std_reg2str[r.enum],
|
||||||
tostr(regvars[i].refs),regvars[i].name);
|
tostr(regvars[i].refs),regvars[i].name);
|
||||||
end;
|
end;
|
||||||
{$endif notranslation}
|
|
||||||
end;
|
end;
|
||||||
{$endif newra}
|
{$endif newra}
|
||||||
|
|
||||||
@ -694,7 +690,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.61 2003-08-17 16:59:20 jonas
|
Revision 1.62 2003-08-17 20:47:47 daniel
|
||||||
|
* Notranslation changed into -sr functionality
|
||||||
|
|
||||||
|
Revision 1.61 2003/08/17 16:59:20 jonas
|
||||||
* fixed regvars so they work with newra (at least for ppc)
|
* fixed regvars so they work with newra (at least for ppc)
|
||||||
* fixed some volatile register bugs
|
* fixed some volatile register bugs
|
||||||
+ -dnotranslation option for -dnewra, which causes the registers not to
|
+ -dnotranslation option for -dnewra, which causes the registers not to
|
||||||
|
Loading…
Reference in New Issue
Block a user