public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GBR on Hitachi SH
@ 1998-05-04 12:46 Aaron Passey
  1998-05-04 19:47 ` Jeffrey A Law
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Aaron Passey @ 1998-05-04 12:46 UTC (permalink / raw)
  To: mlist-egcs

Hi,

	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.

For example, if I declare my current pointer as:
struct task {
	struct regset *regs;
	int state;
	/* ... */
};

register struct task *current asm ("gbr");

and I do:
current->state = 10;

Will the compiler be smart enough to generate:
mov     #10, r0
mov.l   r0, @(1, GBR)


Thanks,

Aaron

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <199805060005.BAA23536@cygnus.co.uk>]

end of thread, other threads:[~1998-05-06  6:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-04 12:46 GBR on Hitachi SH Aaron Passey
1998-05-04 19:47 ` Jeffrey A Law
1998-05-05  8:20   ` Joern Rennecke
1998-05-05 10:59 ` Joern Rennecke
1998-05-05 19:14   ` Aaron Passey
1998-05-05 19:14 ` Jim Wilson
     [not found] <199805060005.BAA23536@cygnus.co.uk>
1998-05-06  6:22 ` Joern Rennecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).