* don't change a sequence of shifts and sub/adds into a lea() in case

the flags are read afterwards (broke shldl/sub/sbb sequence generated
    for 64 bit "*2", which appears in bitpacked size calculation)

git-svn-id: trunk@7336 -
This commit is contained in:
Jonas Maebe 2007-05-14 20:37:42 +00:00
parent c9c82ddbf8
commit 20206500aa
3 changed files with 13 additions and 1 deletions

1
.gitattributes vendored
View File

@ -6879,6 +6879,7 @@ tests/test/tprec10.pp svneol=native#text/plain
tests/test/tprec11.pp svneol=native#text/plain
tests/test/tprec12.pp svneol=native#text/plain
tests/test/tprec13.pp svneol=native#text/plain
tests/test/tprec14.pp svneol=native#text/plain
tests/test/tprec2.pp svneol=native#text/plain
tests/test/tprec3.pp svneol=native#text/plain
tests/test/tprec4.pp svneol=native#text/plain

View File

@ -1497,7 +1497,9 @@ begin
(((taicpu(hp1).opcode = A_INC) or
(taicpu(hp1).opcode = A_DEC)) and
(taicpu(hp1).oper[0]^.typ = Top_Reg) and
(taicpu(hp1).oper[0]^.reg = taicpu(p).oper[1]^.reg))) Do
(taicpu(hp1).oper[0]^.reg = taicpu(p).oper[1]^.reg))) and
(not GetNextInstruction(hp1,hp2) or
not instrReadsFlags(hp2)) Do
begin
TmpBool1 := False;
if (taicpu(hp1).oper[0]^.typ = Top_Const) then

9
tests/test/tprec14.pp Normal file
View File

@ -0,0 +1,9 @@
type
tr = bitpacked record
l: longint;
end;
begin
if bitsizeof(tr) <> 32 then
halt(1);
end.