mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 02:09:36 +02:00
Fix compilation from 32-bit CPU by avoiding use of aint variable in for loop
This commit is contained in:
parent
ea812d1c2e
commit
c2ffd51c63
@ -1597,12 +1597,14 @@ begin
|
|||||||
if Count > 0 then
|
if Count > 0 then
|
||||||
begin
|
begin
|
||||||
tmpreg1 := GetIntRegister(list, OS_INT);
|
tmpreg1 := GetIntRegister(list, OS_INT);
|
||||||
for count2 := 1 to Count do
|
count2:=1;
|
||||||
|
while count2 <= Count do
|
||||||
begin
|
begin
|
||||||
list.concat(taicpu.op_reg_ref(A_LW, tmpreg1, src));
|
list.concat(taicpu.op_reg_ref(A_LW, tmpreg1, src));
|
||||||
list.concat(taicpu.op_reg_ref(A_SW, tmpreg1, dst));
|
list.concat(taicpu.op_reg_ref(A_SW, tmpreg1, dst));
|
||||||
Inc(src.offset, 4);
|
Inc(src.offset, 4);
|
||||||
Inc(dst.offset, 4);
|
Inc(dst.offset, 4);
|
||||||
|
Inc(count2);
|
||||||
end;
|
end;
|
||||||
len := len mod 4;
|
len := len mod 4;
|
||||||
end;
|
end;
|
||||||
@ -1674,12 +1676,14 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ unrolled loop }
|
{ unrolled loop }
|
||||||
tmpreg1 := GetIntRegister(list, OS_INT);
|
tmpreg1 := GetIntRegister(list, OS_INT);
|
||||||
for i := 1 to len do
|
i:=1;
|
||||||
|
while i <= len do
|
||||||
begin
|
begin
|
||||||
list.concat(taicpu.op_reg_ref(A_LBU, tmpreg1, src));
|
list.concat(taicpu.op_reg_ref(A_LBU, tmpreg1, src));
|
||||||
list.concat(taicpu.op_reg_ref(A_SB, tmpreg1, dst));
|
list.concat(taicpu.op_reg_ref(A_SB, tmpreg1, dst));
|
||||||
Inc(src.offset);
|
Inc(src.offset);
|
||||||
Inc(dst.offset);
|
Inc(dst.offset);
|
||||||
|
Inc(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user