[fpc-pascal] CASE
Peter Vreman
peter at freepascal.org
Tue Nov 8 18:11:28 CET 2005
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
More information about the fpc-pascal
mailing list