Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!dcl-cs!aber-cs!pcg From: pcg@aber-cs.UUCP (Piercarlo Grandi) Newsgroups: comp.arch Subject: Re: Number of registers, MIPS, GNU cc Message-ID: <2200@aber-cs.UUCP> Date: 9 Jan 91 19:29:35 GMT Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi) Organization: Dept of CS, UCW Aberystwyth (Disclaimer: my statements are purely personal) Lines: 36 I (pcg) had written: name total spare preserved U12 12* 5 5 U16 16* 9 9 U24 24* 17 9 U32 32 25 9 In article <37605@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes: How come spare + preserved - total is +-2 all the time rather than 0? What are the other -+2 registers? Sorry for not being clear here: 'preserved' and 'spare' overlap. For example U24 has 32 real registers, 8 are marked unavailable, 7 are marked fixed use (really the same as the previous 8), 17 are marked available, and 9 of these 17 are preserved across function calls (callee saves). Have a look at the tail of the original message, where the definitions of the relevant arrays are, and everything will be clear. I have done some further experiments that show that the number of registers saved by the callee or by the caller does not matter, at least in this case. Incidentally: I have measured, for fun, also the time taken by the GNU cpp on the same source. There number of registers seems to make a far more pronounced difference than for GNU cc1. This is highly perplexing, so I am looking into it -- will report, eventually. Finally: if comebody has some substantial floating point program(s), it would be interesting to see hwo number of registers affect them. -- Piercarlo Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk