Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.programming.codewarrior Subject: Re: register variables Date: Sat, 11 Apr 1998 00:43:34 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 26 Message-ID: <352EAEA6.5C225F79@ndirect.co.uk> References: <01bd6477$65581880$c20f93c3@default> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: 195.7.226.101 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) To: "Jon Prestidge (alias Moose)" I don't actually know the answer to this question, but, if you switch the optimisation to it's highest level, CW seems to 'convert' as many local variables as posible into register vars. I haven't really checked this out, but when dissasembling, it certainly looked that way. Can anyone verify this? Alex (alias Herbs) Jon Prestidge (alias Moose) wrote: > With CodeWarrior:- > When you declare 'register' variables, how many are likely to acually > be registers > when the compiled/linked program is running? I can't find anything about > this in the targeting PS manual. Also does the compiler assign registers > to register variables in the order they are declared... meaning you should > declare your most heavily used variables as register variables first? > > I'd be greatful for any info on this. Using register variables seems to > make a significant difference on CPU intesive code so it would be > well-worth knowing how far you can go with them. > > Jon Prestidge.