Re: [fpc-pascal] CASE

2005-11-09 Thread Adriaan van Os

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

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


Re: [fpc-pascal] CASE

2005-11-09 Thread Marco van de Voort
> Marco van de Voort wrote:

> > 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 ?

As far as I can see from the source, try -O1gr

both optimization and "for size" seem to be needed.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] CASE

2005-11-09 Thread Paul Davidson

Thanks Adriaan, Marco.
All is well :)

On Nov 9, 2005, at 4:38, Marco van de Voort wrote:


-O1gr

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


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