Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!brl-adm!adm!cb@mitre-bedford.arpa From: cb@mitre-bedford.arpa (Christopher Byrnes) Newsgroups: comp.lang.c Subject: Re: Available No. of Registers Message-ID: <2785@brl-adm.ARPA> Date: Tue, 20-Jan-87 09:21:21 EST Article-I.D.: brl-adm.2785 Posted: Tue Jan 20 09:21:21 1987 Date-Received: Wed, 21-Jan-87 00:11:33 EST Sender: news@brl-adm.ARPA Lines: 28 Several people have pointed out that the number of effective register declarations will vary from CPU architecture to architecture. Register declarations can also vary from `C' compiler to `C' compiler. I've used several different 680x0 compilers. One (of unknown heritage) was effective for up to 6 "integer" or "short" data values (using 68000 registers d2 - d7 with d0 and d1 reserved for function returns and intermediate expressions) AND it was effective for up to 3 "pointer" values (using registers a2 - a4, with a0 and a1 reserved for function returns, a5 as a frame pointer, a6 as the stack pointer and a7 as the program counter). If you were carfeful, you could have up to 9 registers in use at once. I'm now using the Sun `C' compiler on version 3.0 of Sun's UNIX system. Could someone tell me what the magic numbers are for effective register declarations on this `C' compiler. Does the `C' optimizer do register allocations correctly anyways (as some good compilers may do now)? I'd rather not have to wade through assembler listings to try and figure these magic numbers out again. Thanks. /* the usual disclaimers */ Christopher Byrnes The MITRE Corporation Burlington Road M/S A156 Bedford, Mass. 01730 cb@Mitre-Bedford.ARPA ...!decvax!linus!mbunix!cb.UUCP