mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 21:09:03 +01:00
m68k: do not allocate/free the regset dynamically having it as a normal field is perfectly fine
git-svn-id: trunk@33665 -
This commit is contained in:
parent
e4baf67722
commit
3e2319ff3a
@ -419,7 +419,7 @@ interface
|
|||||||
top_conditioncode : (cc : TAsmCond);
|
top_conditioncode : (cc : TAsmCond);
|
||||||
{$endif defined(arm) or defined(aarch64)}
|
{$endif defined(arm) or defined(aarch64)}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
top_regset : (dataregset,addrregset,fpuregset:^tcpuregisterset);
|
top_regset : (dataregset,addrregset,fpuregset: tcpuregisterset);
|
||||||
{$endif m68k}
|
{$endif m68k}
|
||||||
{$ifdef jvm}
|
{$ifdef jvm}
|
||||||
top_single : (sval:single);
|
top_single : (sval:single);
|
||||||
@ -2686,14 +2686,6 @@ implementation
|
|||||||
top_regset:
|
top_regset:
|
||||||
dispose(regset);
|
dispose(regset);
|
||||||
{$endif ARM}
|
{$endif ARM}
|
||||||
{$ifdef m68k}
|
|
||||||
top_regset:
|
|
||||||
begin
|
|
||||||
dispose(dataregset);
|
|
||||||
dispose(addrregset);
|
|
||||||
dispose(fpuregset);
|
|
||||||
end;
|
|
||||||
{$endif m68k}
|
|
||||||
{$ifdef jvm}
|
{$ifdef jvm}
|
||||||
top_string:
|
top_string:
|
||||||
freemem(pcval);
|
freemem(pcval);
|
||||||
|
|||||||
@ -125,26 +125,23 @@ type
|
|||||||
begin
|
begin
|
||||||
if typ<>top_regset then
|
if typ<>top_regset then
|
||||||
clearop(opidx);
|
clearop(opidx);
|
||||||
new(dataregset);
|
dataregset:=dataregs;
|
||||||
new(addrregset);
|
addrregset:=addrregs;
|
||||||
new(fpuregset);
|
fpuregset:=fpuregs;
|
||||||
dataregset^:=dataregs;
|
|
||||||
addrregset^:=addrregs;
|
|
||||||
fpuregset^:=fpuregs;
|
|
||||||
typ:=top_regset;
|
typ:=top_regset;
|
||||||
for i:=RS_D0 to RS_D7 do
|
for i:=RS_D0 to RS_D7 do
|
||||||
begin
|
begin
|
||||||
if assigned(add_reg_instruction_hook) and (i in dataregset^) then
|
if assigned(add_reg_instruction_hook) and (i in dataregset) then
|
||||||
add_reg_instruction_hook(self,newreg(R_INTREGISTER,i,R_SUBWHOLE));
|
add_reg_instruction_hook(self,newreg(R_INTREGISTER,i,R_SUBWHOLE));
|
||||||
end;
|
end;
|
||||||
for i:=RS_A0 to RS_SP do
|
for i:=RS_A0 to RS_SP do
|
||||||
begin
|
begin
|
||||||
if assigned(add_reg_instruction_hook) and (i in addrregset^) then
|
if assigned(add_reg_instruction_hook) and (i in addrregset) then
|
||||||
add_reg_instruction_hook(self,newreg(R_ADDRESSREGISTER,i,R_SUBWHOLE));
|
add_reg_instruction_hook(self,newreg(R_ADDRESSREGISTER,i,R_SUBWHOLE));
|
||||||
end;
|
end;
|
||||||
for i:=RS_FP0 to RS_FP7 do
|
for i:=RS_FP0 to RS_FP7 do
|
||||||
begin
|
begin
|
||||||
if assigned(add_reg_instruction_hook) and (i in fpuregset^) then
|
if assigned(add_reg_instruction_hook) and (i in fpuregset) then
|
||||||
add_reg_instruction_hook(self,newreg(R_FPUREGISTER,i,R_SUBWHOLE));
|
add_reg_instruction_hook(self,newreg(R_FPUREGISTER,i,R_SUBWHOLE));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -163,17 +163,17 @@ interface
|
|||||||
getopstr:='';
|
getopstr:='';
|
||||||
for i:=RS_D0 to RS_D7 do
|
for i:=RS_D0 to RS_D7 do
|
||||||
begin
|
begin
|
||||||
if i in o.dataregset^ then
|
if i in o.dataregset then
|
||||||
getopstr:=getopstr+gas_regname(newreg(R_INTREGISTER,i,R_SUBWHOLE))+'/';
|
getopstr:=getopstr+gas_regname(newreg(R_INTREGISTER,i,R_SUBWHOLE))+'/';
|
||||||
end;
|
end;
|
||||||
for i:=RS_A0 to RS_SP do
|
for i:=RS_A0 to RS_SP do
|
||||||
begin
|
begin
|
||||||
if i in o.addrregset^ then
|
if i in o.addrregset then
|
||||||
getopstr:=getopstr+gas_regname(newreg(R_ADDRESSREGISTER,i,R_SUBWHOLE))+'/';
|
getopstr:=getopstr+gas_regname(newreg(R_ADDRESSREGISTER,i,R_SUBWHOLE))+'/';
|
||||||
end;
|
end;
|
||||||
for i:=RS_FP0 to RS_FP7 do
|
for i:=RS_FP0 to RS_FP7 do
|
||||||
begin
|
begin
|
||||||
if i in o.fpuregset^ then
|
if i in o.fpuregset then
|
||||||
getopstr:=getopstr+gas_regname(newreg(R_FPUREGISTER,i,R_SUBNONE))+'/';
|
getopstr:=getopstr+gas_regname(newreg(R_FPUREGISTER,i,R_SUBNONE))+'/';
|
||||||
end;
|
end;
|
||||||
delete(getopstr,length(getopstr),1);
|
delete(getopstr,length(getopstr),1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user