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]

Re: GBR on Hitachi SH


>   > 	I am writing a small, multitasking operating system for the Hitachi SH1
>   > processor.  I would like to use the GBR (Global Base Register) as a pointer
>   >  to my current task struct in the kernel but I need to make sure that egcs never
>   > uses that register normally.  Also, if egcs does not normally use that
>   > register, is there an asm() directive I can use to make accesses to the current
>   > task struct efficient?  There are a couple of addressing modes using the GBR
>   > that would be nice if egcs used.
> You can prevent the compiler from using most registers, please
> refer to the gcc manual.  Specificly look at the -ffixed-<reg>
> switch.

In the case of the GBR for the Hiatchi SH, this is not necessary;
the GBR is already a fixed register.


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