This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: While use %o register as parameters in callee passed bythe caller in sparc? SOS.


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


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