mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
x86: Direct assignment instructions are no longer checked prior to calling CheckJumpMovTransferOpt, instead relying on the callee to do the heavy lifting (also fixed -Os bug)
This commit is contained in:
parent
2ed4071c1e
commit
fcae0e311d
@ -10303,8 +10303,8 @@ unit aoptx86;
|
|||||||
hp1 := GetLabelWithSym(OrigLabel);
|
hp1 := GetLabelWithSym(OrigLabel);
|
||||||
if (taicpu(p).condition=C_None) and assigned(hp1) and SkipLabels(hp1,hp1) and (hp1.typ = ait_instruction) then
|
if (taicpu(p).condition=C_None) and assigned(hp1) and SkipLabels(hp1,hp1) and (hp1.typ = ait_instruction) then
|
||||||
begin
|
begin
|
||||||
case taicpu(hp1).opcode of
|
if taicpu(hp1).opcode = A_RET then
|
||||||
A_RET:
|
begin
|
||||||
{
|
{
|
||||||
change
|
change
|
||||||
jmp .L1
|
jmp .L1
|
||||||
@ -10318,39 +10318,14 @@ unit aoptx86;
|
|||||||
ConvertJumpToRET(p, hp1);
|
ConvertJumpToRET(p, hp1);
|
||||||
result:=true;
|
result:=true;
|
||||||
end;
|
end;
|
||||||
{ Check any kind of direct assignment instruction }
|
end
|
||||||
A_MOV,
|
else if (cs_opt_level3 in current_settings.optimizerswitches) and
|
||||||
A_MOVD,
|
not (cs_opt_size in current_settings.optimizerswitches) and
|
||||||
A_MOVQ,
|
CheckJumpMovTransferOpt(p, hp1, 0, Count) then
|
||||||
A_MOVSX,
|
begin
|
||||||
{$ifdef x86_64}
|
Result := True;
|
||||||
A_MOVSXD,
|
Exit;
|
||||||
{$endif x86_64}
|
end;
|
||||||
A_MOVZX,
|
|
||||||
A_MOVAPS,
|
|
||||||
A_MOVUPS,
|
|
||||||
A_MOVSD,
|
|
||||||
A_MOVAPD,
|
|
||||||
A_MOVUPD,
|
|
||||||
A_MOVDQA,
|
|
||||||
A_MOVDQU,
|
|
||||||
A_VMOVSS,
|
|
||||||
A_VMOVAPS,
|
|
||||||
A_VMOVUPS,
|
|
||||||
A_VMOVSD,
|
|
||||||
A_VMOVAPD,
|
|
||||||
A_VMOVUPD,
|
|
||||||
A_VMOVDQA,
|
|
||||||
A_VMOVDQU:
|
|
||||||
if ((current_settings.optimizerswitches * [cs_opt_level3, cs_opt_size]) <> [cs_opt_size]) and
|
|
||||||
CheckJumpMovTransferOpt(p, hp1, 0, Count) then
|
|
||||||
begin
|
|
||||||
Result := True;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user