Browse Source

* correctly compile constant multiplications by 6 for 80386 (fix needed only for 3.2.x), resolves #40230

florian 2 years ago
parent
commit
15194c6ee9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/i386/aoptcpu.pas

+ 1 - 1
compiler/i386/aoptcpu.pas

@@ -252,7 +252,7 @@ begin
                                     begin
                                       TmpRef.base := taicpu(p).oper[2]^.reg;
                                       TmpRef.ScaleFactor := 4;
-                                      hp1 :=  taicpu.op_ref_reg(A_LEA, S_L, TmpRef, taicpu(p).oper[1]^.reg);
+                                      hp1 :=  taicpu.op_ref_reg(A_LEA, S_L, TmpRef, taicpu(p).oper[2]^.reg);
                                     end
                                   else
                                     begin