mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 09:59:17 +02:00
* i386: Corrections to IMUL -> LEA/LEA optimisastions (fixes_3_2 only)
This commit is contained in:
parent
3a8d8551e7
commit
2c75fb13b7
@ -248,7 +248,7 @@ begin
|
|||||||
if (current_settings.optimizecputype <= cpu_386) then
|
if (current_settings.optimizecputype <= cpu_386) then
|
||||||
begin
|
begin
|
||||||
TmpRef.index := taicpu(p).oper[1]^.reg;
|
TmpRef.index := taicpu(p).oper[1]^.reg;
|
||||||
if (taicpu(p).ops = 3) then
|
if (taicpu(p).ops = 3) and (taicpu(p).oper[1]^.reg <> taicpu(p).oper[2]^.reg) then
|
||||||
begin
|
begin
|
||||||
TmpRef.base := taicpu(p).oper[2]^.reg;
|
TmpRef.base := taicpu(p).oper[2]^.reg;
|
||||||
TmpRef.ScaleFactor := 4;
|
TmpRef.ScaleFactor := 4;
|
||||||
@ -263,7 +263,7 @@ begin
|
|||||||
reference_reset(tmpref,2,[]);
|
reference_reset(tmpref,2,[]);
|
||||||
TmpRef.index := taicpu(p).oper[1]^.reg;
|
TmpRef.index := taicpu(p).oper[1]^.reg;
|
||||||
TmpRef.ScaleFactor := 2;
|
TmpRef.ScaleFactor := 2;
|
||||||
if (taicpu(p).ops = 3) then
|
if (taicpu(p).ops = 3) and (taicpu(p).oper[1]^.reg <> taicpu(p).oper[2]^.reg) then
|
||||||
begin
|
begin
|
||||||
TmpRef.base := NR_NO;
|
TmpRef.base := NR_NO;
|
||||||
hp1 := taicpu.op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := taicpu.op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
@ -334,7 +334,7 @@ begin
|
|||||||
then
|
then
|
||||||
begin
|
begin
|
||||||
TmpRef.index := taicpu(p).oper[1]^.reg;
|
TmpRef.index := taicpu(p).oper[1]^.reg;
|
||||||
if (taicpu(p).ops = 3) then
|
if (taicpu(p).ops = 3) and (taicpu(p).oper[1]^.reg <> taicpu(p).oper[2]^.reg) then
|
||||||
begin
|
begin
|
||||||
TmpRef.base := taicpu(p).oper[2]^.reg;
|
TmpRef.base := taicpu(p).oper[2]^.reg;
|
||||||
TmpRef.ScaleFactor := 8;
|
TmpRef.ScaleFactor := 8;
|
||||||
@ -349,7 +349,7 @@ begin
|
|||||||
InsertLLItem(p, p.next, hp1);
|
InsertLLItem(p, p.next, hp1);
|
||||||
reference_reset(tmpref,2,[]);
|
reference_reset(tmpref,2,[]);
|
||||||
TmpRef.index := taicpu(p).oper[1]^.reg;
|
TmpRef.index := taicpu(p).oper[1]^.reg;
|
||||||
if (taicpu(p).ops = 3) then
|
if (taicpu(p).ops = 3) and (taicpu(p).oper[1]^.reg <> taicpu(p).oper[2]^.reg) then
|
||||||
begin
|
begin
|
||||||
TmpRef.base := NR_NO;
|
TmpRef.base := NR_NO;
|
||||||
TmpRef.ScaleFactor := 4;
|
TmpRef.ScaleFactor := 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user