linux-mips
[Top] [All Lists]

Re: implementation of software suspend on MIPS. (system log)

To: "J. Scott Kasten" <jscottkasten@yahoo.com>
Subject: Re: implementation of software suspend on MIPS. (system log)
From: "Hyon Lim" <alex@alexlab.net>
Date: Thu, 1 Nov 2007 18:11:51 +0900
Cc: linux-mips@linux-mips.org
In-reply-to: <Pine.SGI.4.60.0710312221360.4697@zeus.tetracon-eng.net>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <DDAE9570F73FC744918E843E20BE598B096E8E@server1.RightHand.righthandtech.com> <dd7dc2bc0710311846ve03e03eued4ed72c89b06e4f@mail.gmail.com> <Pine.SGI.4.60.0710312221360.4697@zeus.tetracon-eng.net>
Sender: linux-mips-bounce@linux-mips.org
I think the reason of assembly implementation is processor context replacement.
Processor context should be replaced when suspend or resume process.
So I think that code should be implemented using assembly language.
The second reason that I thinking is calling convention of C language.
How do you think?
 
On 11/1/07, J. Scott Kasten <jscottkasten@yahoo.com> wrote:

On Thu, 1 Nov 2007, Hyon Lim wrote:

> Yes. you're right. I did same as you said.
> However, is there any options for disassembly with variable name?
> Often I cannot find that variable's allocated register.
> There is only r0,r1... but I want a comment for variable assignment
> status.

I just have to ask the question, but is it really necessary to code the
whole thing in assembly?  I understand that the interface probably does
need to be, but the main body of the function?  If it's very large or
complicated, it would seem simpler to use C and write assembly glue to
pull it all together rather than trying to debug hand assembly.  Many of
us here have spent hours before tracking down problems with stale data in
branch delay slots.  The compiler is a tad more convienient.

Regards,

-S-




--
Hyon Lim (임현)
Mobile. 010-8212-1240 (Intl' Call : +82-10-8212-1240)
Fax. 032-232-0578 (Intl' Available)
Homepage : http://www.alexlab.net
Blog : http://www.alexlab.net/blog
<Prev in Thread] Current Thread [Next in Thread>