[fpc-pascal] CASE

Adriaan van Os fpc at microbizz.nl
Wed Nov 9 10:22:51 CET 2005


Marco van de Voort wrote:

>>>>> # [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.

I think -O1r is the best optimization available for ppc-darwin, isn't 
it ?

Regards,

Adriaan van Os




More information about the fpc-pascal mailing list