This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to dedicate a register for special purpose in gcc?
- From: Ian Lance Taylor <iant at google dot com>
- To: 吴曦 <wu dot andrew dot xi at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 04 Jan 2007 21:05:31 -0800
- Subject: Re: How to dedicate a register for special purpose in gcc?
- References: <f63285730701042053p5c8a2a0ar1935274174f27e8e@mail.gmail.com>
"吴曦" <wu.andrew.xi@gmail.com> writes:
> How can I dedicate a register for special purpose, that means,
> the dedicated register only appears in the inserted code of my own,
> but never allocated in the rest of code. I have read some doc(gcc int)
> about the register usage but still have no idea.
This question is not appropriate for this mailing list. It would be
appropriate for gcc-help@gcc.gnu.org. Thanks.
One easy way to do this is to use a global register variable:
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Global-Reg-Vars.html
Another is to use the -ffixed-REG option. See the documentation.
Ian