This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to dedicate a register for special purpose in gcc?


"吴曦" <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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]