public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* PowerPC Stack Frames
@ 1999-12-06  9:05 Dick Ginther
  1999-12-06 13:06 ` Andrew Klossner
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dick Ginther @ 1999-12-06  9:05 UTC (permalink / raw)
  To: help-gcc

Hi,
	I am using egcs-2.91.66 for a PowerPC.  I would like
some help understanding how registers and the stack are used
on PowerPC with GCC.  I know that R1 is the stack pointer, but
are there other registers reserved for other purposes?
	On an interrupt do I have to save all 32 registers or
are there a sub-set that are usually used.
	Thanks in advance.
-- 
Dick Ginther                   E-mail: dick.ginther@develcon.com
Develcon Electronics Ltd.      Web:    http://www.develcon.com
856 - 51st Street East         Phone:  306 931-1339
Saskatoon, SK  Canada S7K 5C7  Fax:    306 931-1352

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PowerPC Stack Frames
  1999-12-06  9:05 PowerPC Stack Frames Dick Ginther
@ 1999-12-06 13:06 ` Andrew Klossner
  1999-12-31 22:24   ` Andrew Klossner
  1999-12-09 11:44 ` Frank Herold
  1999-12-31 22:24 ` Dick Ginther
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Klossner @ 1999-12-06 13:06 UTC (permalink / raw)
  To: help-gcc

> I am using egcs-2.91.66 for a PowerPC.  I would like
> some help understanding how registers and the stack are used
> on PowerPC with GCC.

It depends on which ABI you're using.  If it's the EABI (Embedded):
You have to save GPR registers 0 and 3-12, LR, CTR, XER, and CR.  If
the C routines you'll call use floating point, you must also save FP
registers 0-13 and FPSCR.  The C routines will save/restore anything
else they use.

  -=- Andrew Klossner (andrew@teleport.com)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PowerPC Stack Frames
  1999-12-06  9:05 PowerPC Stack Frames Dick Ginther
  1999-12-06 13:06 ` Andrew Klossner
@ 1999-12-09 11:44 ` Frank Herold
  1999-12-31 22:24   ` Frank Herold
  1999-12-31 22:24 ` Dick Ginther
  2 siblings, 1 reply; 6+ messages in thread
From: Frank Herold @ 1999-12-09 11:44 UTC (permalink / raw)
  To: help-gcc

Try this side:

http://www.esofta.com/softspecs.html

The PowerPc stack framing is explained in document (2) in detail.


Frank Herold                        E-mail    fh@cellware.de



Dick Ginther schrieb in Nachricht < 82gpv3$bjn@sirius.develcon.com >...
>Hi,
> I am using egcs-2.91.66 for a PowerPC.  I would like
>some help understanding how registers and the stack are used
>on PowerPC with GCC.  I know that R1 is the stack pointer, but
>are there other registers reserved for other purposes?
> On an interrupt do I have to save all 32 registers or
>are there a sub-set that are usually used.
> Thanks in advance.
>--
>Dick Ginther                   E-mail: dick.ginther@develcon.com
>Develcon Electronics Ltd.      Web:    http://www.develcon.com
>856 - 51st Street East         Phone:  306 931-1339
>Saskatoon, SK  Canada S7K 5C7  Fax:    306 931-1352


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PowerPC Stack Frames
  1999-12-06 13:06 ` Andrew Klossner
@ 1999-12-31 22:24   ` Andrew Klossner
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Klossner @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

> I am using egcs-2.91.66 for a PowerPC.  I would like
> some help understanding how registers and the stack are used
> on PowerPC with GCC.

It depends on which ABI you're using.  If it's the EABI (Embedded):
You have to save GPR registers 0 and 3-12, LR, CTR, XER, and CR.  If
the C routines you'll call use floating point, you must also save FP
registers 0-13 and FPSCR.  The C routines will save/restore anything
else they use.

  -=- Andrew Klossner (andrew@teleport.com)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PowerPC Stack Frames
  1999-12-09 11:44 ` Frank Herold
@ 1999-12-31 22:24   ` Frank Herold
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Herold @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

Try this side:

http://www.esofta.com/softspecs.html

The PowerPc stack framing is explained in document (2) in detail.


Frank Herold                        E-mail    fh@cellware.de



Dick Ginther schrieb in Nachricht < 82gpv3$bjn@sirius.develcon.com >...
>Hi,
> I am using egcs-2.91.66 for a PowerPC.  I would like
>some help understanding how registers and the stack are used
>on PowerPC with GCC.  I know that R1 is the stack pointer, but
>are there other registers reserved for other purposes?
> On an interrupt do I have to save all 32 registers or
>are there a sub-set that are usually used.
> Thanks in advance.
>--
>Dick Ginther                   E-mail: dick.ginther@develcon.com
>Develcon Electronics Ltd.      Web:    http://www.develcon.com
>856 - 51st Street East         Phone:  306 931-1339
>Saskatoon, SK  Canada S7K 5C7  Fax:    306 931-1352


^ permalink raw reply	[flat|nested] 6+ messages in thread

* PowerPC Stack Frames
  1999-12-06  9:05 PowerPC Stack Frames Dick Ginther
  1999-12-06 13:06 ` Andrew Klossner
  1999-12-09 11:44 ` Frank Herold
@ 1999-12-31 22:24 ` Dick Ginther
  2 siblings, 0 replies; 6+ messages in thread
From: Dick Ginther @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

Hi,
	I am using egcs-2.91.66 for a PowerPC.  I would like
some help understanding how registers and the stack are used
on PowerPC with GCC.  I know that R1 is the stack pointer, but
are there other registers reserved for other purposes?
	On an interrupt do I have to save all 32 registers or
are there a sub-set that are usually used.
	Thanks in advance.
-- 
Dick Ginther                   E-mail: dick.ginther@develcon.com
Develcon Electronics Ltd.      Web:    http://www.develcon.com
856 - 51st Street East         Phone:  306 931-1339
Saskatoon, SK  Canada S7K 5C7  Fax:    306 931-1352

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-12-31 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-06  9:05 PowerPC Stack Frames Dick Ginther
1999-12-06 13:06 ` Andrew Klossner
1999-12-31 22:24   ` Andrew Klossner
1999-12-09 11:44 ` Frank Herold
1999-12-31 22:24   ` Frank Herold
1999-12-31 22:24 ` Dick Ginther

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).