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: Why Just even registers get saved during registerwindows under/over flow in Sparc? Thanks.


Thanks for your reply. Do you mean the whole register windows (8 windows)
will all be saved to stack while a context switching happens?  Why I just
can't find the code does such job in the context.S --
"hal_thread_switch_context:"  in the save part it seems it just save a
single register window rather than the whole 8(or less) register windows?
Also in the "hal_thread_load_context" it just load a single register window
from stack rather than 8(or less) register windows. Or am I going in the
wrong way? Thanks a lot!

Best regards!


-----Original Message-----
From: Gary Thomas [mailto:gthomas@ecoscentric.com]
Sent: 13 August 2002 14:15
To: Qiang Huang
Cc: Ecos-Discuss (E-mail)
Subject: Re: [ECOS] Why Just even registers get saved during
registerwindows under/over flow in Sparc? Thanks.


On Tue, 2002-08-13 at 06:24, Qiang Huang wrote:
> Hi all:
>    In the overflow/underflow handler in Sparc why just a single register
> window(Isn't that all the register windows get saved to stack?) get saved
> and why just even register get saved? Thanks a lot.

A Nick indicated yesterday, the entire window set is saved
when a thread switch occurs.  Other than that, it makes sense
to only bother with a single window when an under/overflow
happens.

As for "even registers only"; look more closely.  The registers
are being saved as even/odd register pairs.  For example, the
instruction (std %l0,[%sp+0]) saves registers %l0 and %l1 in
a single instruction.  Much faster.

--
------------------------------------------------------------
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]