At 04:42 8-11-2005, you wrote:
May be having case statement problem.

App has case statement with 146 sequential labels.
They are in order, from a defined type.
The assembler output is scanning each label, where it seems a jump would be more efficient.

ppc 32, Darwin
/usr/local/bin/ppcppc cape80.pas -Ci -Co -g -gl -O1 -vr -a -al -FEbuild/cape80.build/cape80.build -ocape80

Also tried -O2 and 3

Result:

# [735] case l3o3.FormType of
 // Select 3o3 processor
        lwz     r2,160(r1)
        cmplwi  cr0,r2,0
        beq     cr0,L1051
        cmplwi  cr0,r2,1
        beq     cr0,L1052
        cmplwi  cr0,r2,2
        beq     cr0,L1053
        cmplwi  cr0,r2,3
        beq     cr0,L1054

etc.

Any hints?

Use 2.1.1


Peter

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to