Path: chuka.playstation.co.uk!news From: Majik Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: -O Optimising levels Date: Thu, 12 Mar 1998 18:12:10 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 24 Message-ID: <3508257A.7717@127.0.0.1> References: <6e905o$sv61@emeka.playstation.co.uk> NNTP-Posting-Host: darkstar.stnc.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) Lewis_Evans@Playstation.sony.com wrote: > Firstly, odd-sized arrays are saving very little memory, > so best to make them even-sized. I found that odd-sized arrays crash the PSX (i don't think gcc likes them) and even if it did, it would just pad them out anyway, make sure arrays are 32bit aligned. > Other than that, try isolating which part(s) of the code are going > astray under optimisation, and use -O2 because that's bestest > (highest level before you get to O3 which unrolls loops, > sounds great but on the PSX is very liable to give you > instruction cache misses and hence anti-optimisation). personally I never use O3, because of this. other than that, I couldn't say whats causing the trouble. Majik. -- -- Majik - Owner/Curator of the Sinclair Microcomputer Museum -- Spod in a suitcase - ' Have Compiler, will travel ' -- http://mudhole.spodnet.uk.com/~majik/ --