mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 02:59:33 +02:00
* To check the size of a register(s) corresponding to a variable it is needed to use localloc.size instead of def_cgsize(vardef).
git-svn-id: trunk@45834 -
This commit is contained in:
parent
15f411a332
commit
a258774ba9
@ -1157,21 +1157,21 @@ implementation
|
||||
LOC_CREGISTER :
|
||||
if (pi_has_label in current_procinfo.flags) then
|
||||
{$if defined(cpu64bitalu)}
|
||||
if def_cgsize(vardef) in [OS_128,OS_S128] then
|
||||
if localloc.size in [OS_128,OS_S128] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register128.reglo);
|
||||
cg.a_reg_sync(list,localloc.register128.reghi);
|
||||
end
|
||||
else
|
||||
{$elseif defined(cpu32bitalu)}
|
||||
if def_cgsize(vardef) in [OS_64,OS_S64] then
|
||||
if localloc.size in [OS_64,OS_S64] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register64.reglo);
|
||||
cg.a_reg_sync(list,localloc.register64.reghi);
|
||||
end
|
||||
else
|
||||
{$elseif defined(cpu16bitalu)}
|
||||
if def_cgsize(vardef) in [OS_64,OS_S64] then
|
||||
if localloc.size in [OS_64,OS_S64] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register64.reglo);
|
||||
cg.a_reg_sync(list,cg.GetNextReg(localloc.register64.reglo));
|
||||
@ -1179,14 +1179,14 @@ implementation
|
||||
cg.a_reg_sync(list,cg.GetNextReg(localloc.register64.reghi));
|
||||
end
|
||||
else
|
||||
if def_cgsize(vardef) in [OS_32,OS_S32] then
|
||||
if localloc.size in [OS_32,OS_S32] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register);
|
||||
cg.a_reg_sync(list,cg.GetNextReg(localloc.register));
|
||||
end
|
||||
else
|
||||
{$elseif defined(cpu8bitalu)}
|
||||
if def_cgsize(vardef) in [OS_64,OS_S64] then
|
||||
if localloc.size in [OS_64,OS_S64] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register64.reglo);
|
||||
cg.a_reg_sync(list,cg.GetNextReg(localloc.register64.reglo));
|
||||
@ -1198,7 +1198,7 @@ implementation
|
||||
cg.a_reg_sync(list,cg.GetNextReg(cg.GetNextReg(cg.GetNextReg(localloc.register64.reghi))));
|
||||
end
|
||||
else
|
||||
if def_cgsize(vardef) in [OS_32,OS_S32] then
|
||||
if localloc.size in [OS_32,OS_S32] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register);
|
||||
cg.a_reg_sync(list,cg.GetNextReg(localloc.register));
|
||||
@ -1206,7 +1206,7 @@ implementation
|
||||
cg.a_reg_sync(list,cg.GetNextReg(cg.GetNextReg(cg.GetNextReg(localloc.register))));
|
||||
end
|
||||
else
|
||||
if def_cgsize(vardef) in [OS_16,OS_S16] then
|
||||
if localloc.size in [OS_16,OS_S16] then
|
||||
begin
|
||||
cg.a_reg_sync(list,localloc.register);
|
||||
cg.a_reg_sync(list,cg.GetNextReg(localloc.register));
|
||||
|
Loading…
Reference in New Issue
Block a user