mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:29:25 +02:00
* 16-bit and 8-bit ALU fixes in tcgtempdeletenode.pass_generate_code
git-svn-id: trunk@26272 -
This commit is contained in:
parent
39c54bf077
commit
99770d367f
@ -554,14 +554,56 @@ interface
|
||||
begin
|
||||
{ make sure the register allocator doesn't reuse the }
|
||||
{ register e.g. in the middle of a loop }
|
||||
{$ifndef cpu64bitalu}
|
||||
{$if defined(cpu32bitalu)}
|
||||
if tempinfo^.location.size in [OS_64,OS_S64] then
|
||||
begin
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register64.reghi);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register64.reglo);
|
||||
end
|
||||
else
|
||||
{$endif not cpu64bitalu}
|
||||
{$elseif defined(cpu16bitalu)}
|
||||
if tempinfo^.location.size in [OS_64,OS_S64] then
|
||||
begin
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register64.reghi);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register64.reghi));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register64.reglo);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register64.reglo));
|
||||
end
|
||||
else
|
||||
if tempinfo^.location.size in [OS_32,OS_S32] then
|
||||
begin
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register));
|
||||
end
|
||||
else
|
||||
{$elseif defined(cpu8bitalu)}
|
||||
if tempinfo^.location.size in [OS_64,OS_S64] then
|
||||
begin
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register64.reghi);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register64.reghi));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(GetNextReg(tempinfo^.location.register64.reghi)));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(GetNextReg(GetNextReg(tempinfo^.location.register64.reghi))));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register64.reglo);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register64.reglo));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(GetNextReg(tempinfo^.location.register64.reglo)));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(GetNextReg(GetNextReg(tempinfo^.location.register64.reglo))));
|
||||
end
|
||||
else
|
||||
if tempinfo^.location.size in [OS_32,OS_S32] then
|
||||
begin
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(GetNextReg(tempinfo^.location.register)));
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(GetNextReg(GetNextReg(tempinfo^.location.register))));
|
||||
end
|
||||
else
|
||||
if tempinfo^.location.size in [OS_16,OS_S16] then
|
||||
begin
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register);
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,GetNextReg(tempinfo^.location.register));
|
||||
end
|
||||
else
|
||||
{$endif}
|
||||
cg.a_reg_sync(current_asmdata.CurrAsmList,tempinfo^.location.register);
|
||||
end;
|
||||
if release_to_normal then
|
||||
|
Loading…
Reference in New Issue
Block a user