When using varargs stack repair, only disable native-code peephole opt in functions containing varargs calls.

There is no need to reduce the optimization in other functions, which will not contain any varargs stack repair code.
This commit is contained in:
Stephen Heumann 2018-01-13 21:37:28 -06:00
parent 4a7644e0b5
commit bdd60d9d08
2 changed files with 2 additions and 2 deletions

View File

@ -1762,7 +1762,7 @@ var
begin {GenNative}
{ writeln('GenNative: ',p_opcode:4, ', mode=', ord(p_mode):1,
' operand=', p_operand:1); {debug}
if npeephole then begin
if npeephole and not (strictVararg and hasVarargsCall) then begin
if (nnextspot = 1) and not (p_opcode in nleadOpcodes) then begin
if p_opcode <> d_end then
if registers then

View File

@ -2703,7 +2703,7 @@ if ch in ['a','d','e','i','l','p','u','w'] then begin
commonSubexpression := odd(val >> 4);
loopOptimizations := odd(val >> 5);
strictVararg := not odd(val >> 6);
if saveStack or strictVararg then
if saveStack then
npeepHole := false;
if token.kind <> eolsy then
Error(11);