[fpc-pascal] CASE

Marco van de Voort marcov at stack.nl
Wed Nov 9 08:14:54 CET 2005


> >>># [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
> >
> >version 2.1.1 [2005/11/08] for powerpc
> >Same result, Peter :|
> 
> The 2.1.1 compiler contains code to generate jumptables for ppc, see 
> powerpc/nppcset.pas. You'll have to debug the compiler to see why it 
> doesn't use them.

Haven't really debugged, but there is an cs_optimize in aktmodeswitches
somewhere near where this code is called.

Paul: do you enable some -O parameter? Play with it etc.



More information about the fpc-pascal mailing list