Cross gcc Mailing List Archive

[Prev][Next][Index][Thread]

Re: Using Register type on PowerPC



| Mike McQuade wrote:
| > 
| >   Does using the "register" type have any effect on PowerPC code generated
| >    with GCC ?
| > 
| >    I would guess that it does not.
| > 
| > MikeMcQuade@connect.com
| Mike,
| 
| I've found that it is taken as a suggestion as to which, if any
| variables should be considered first in priority for assignment
| to registers, if the back end is running out of registers for
| all the locals.  The remaining vars (register or not) are then
| allocated from the stack.

Actually in GCC, that's only true if you don't optimize.  If you
optimize, the only non-warning/error effect that register has is the
compiler doesn't make an effort to protect its value across a setjmp
call.

-- 
Michael Meissner, Cygnus Support (East Coast)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)

References:

Home | Subject Index | Thread Index