* better setting of expectloc

git-svn-id: trunk@44619 -
This commit is contained in:
florian 2020-04-06 20:44:31 +00:00
parent 6a6ef1c8c1
commit 04f3784af5
2 changed files with 8 additions and 4 deletions

View File

@ -3529,7 +3529,11 @@ implementation
(left.resultdef.size=resultdef.size) and
(left.expectloc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER]) then
begin
{$ifdef xtensa}
expectloc:=LOC_REGISTER;
{$else xtensa}
expectloc:=left.expectloc;
{$endif xtensa}
exit;
end;
{ when converting 64bit int to C-ctyle boolean, first convert to an int32 and then }

View File

@ -1317,12 +1317,12 @@ implementation
begin
if (expectloc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER]) then
expectloc:=LOC_REGISTER;
{ before loading it into flags we need to load it into
a register thus 1 register is need PM }
{$ifdef cpuflags}
{ xtensa has boolean registers which are treateed as flags but they
are not used for boolean expressions }
{$if defined(cpuflags) and not(defined(xtensa))}
if left.expectloc<>LOC_JUMP then
expectloc:=LOC_FLAGS;
{$endif def cpuflags}
{$endif defined(cpuflags) and not(defined(xtensa)}
end
else
{$ifdef SUPPORT_MMX}