This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: While use %o register as parameters in callee passed bythe caller in sparc? SOS.
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: Qiang Huang <jameshq at liverpool dot ac dot uk>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 17 Sep 2002 08:44:47 -0600
- Subject: Re: [ECOS] While use %o register as parameters in callee passed bythe caller in sparc? SOS.
- References: <JLEEKKOKIIGFPMMBJKJJMEAMCAAA.jameshq@liv.ac.uk>
On Tue, 2002-09-17 at 08:37, Qiang Huang wrote:
> Hi:
> I just wondering why in the context.S the parameter passed by the caller
> to the callee routine: hal_thread_switch_context() still appears as %o,
> shouldn't that be %i in callee's register window? or are they share the same
> register window??
Exactly. The register window only changes (and hence, %oX becomes
%iX) after the execution of a "save" instruction. This is a very
special function which does not use "save" as part of it's preamble.
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss