[fpc-pascal] CASE
Paul Davidson
pdavidson at coraxnetworks.com
Tue Nov 8 04:42:15 CET 2005
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?
P Davidson
More information about the fpc-pascal
mailing list