* don't convert lea to add/inc/dec/sub if there's a symbol in the reference

o fixes make cycle on Darwin/i386

git-svn-id: trunk@46448 -
This commit is contained in:
Jonas Maebe 2020-08-15 12:14:45 +00:00
parent 313790502d
commit ad7c3d9a09

View File

@ -1788,14 +1788,16 @@ unit aoptx86;
InternalError(2020072501);
{ do not mess with the stack point as adjusting it by lea is recommend, except if we optimize for size }
if (taicpu(p).oper[1]^.reg=NR_STACK_POINTER_REG) and
if (p.oper[1]^.reg=NR_STACK_POINTER_REG) and
not(cs_opt_size in current_settings.optimizerswitches) then
exit;
with p.oper[0]^.ref^ do
begin
if (base <> p.oper[1]^.reg) or (index <> NR_NO) then
Exit(False);
if (base <> p.oper[1]^.reg) or
(index <> NR_NO) or
assigned(symbol) then
exit;
l:=offset;
if (l=1) and UseIncDec then