This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GBR on Hitachi SH
- To: law at cygnus dot com
- Subject: Re: GBR on Hitachi SH
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Tue, 5 May 1998 15:17:46 +0100 (BST)
- Cc: aaronp at ofb dot net, egcs at cygnus dot com
> > 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.