Path: chuka.playstation.co.uk!news From: "Jon Prestidge (alias Moose)" Newsgroups: scee.yaroze.programming.codewarrior Subject: register variables again :-) Date: 11 Apr 1998 23:11:13 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 28 Message-ID: <01bd659f$e094de60$780c93c3@default> References: <01bd6477$65581880$c20f93c3@default> <352EAEA6.5C225F79@ndirect.co.uk> NNTP-Posting-Host: client1278.globalnet.co.uk X-Newsreader: Microsoft Internet News 4.70.1155 Cheers for the reply Alex... I wonder how many spare registers there are roughly. I'll have to try some dissasembling too to see what's typical ... unless anyone knows off hand --- someone from MetroWerks perhaps..(hint, hint!). Also is there just one type of register in this CPU or are they split betwen address and data registers .. if so presumably that would determin how pointers or integers etc. get assigned to each spare register. The reason I'm interested is that if you know roughly how many register variables are available you can code accordingly.... eg. if you have a few at your disposal you can use a few meaningful variable names to help make the code more readable and still get the speed advantage ... but if you only had one spare you might want to keep reusing the same variable within a routine and call it 'temp' or somthing ... if you see what I mean. Alex Herbert wrote in article <352EAEA6.5C225F79@ndirect.co.uk>... > 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)