Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > Embedded > Re: Could any o...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 9 Topic 12422 of 13381
Post > Topic >>

Re: Could any one clarify the below codes.

by Coos Haak <chforth@[EMAIL PROTECTED] > Jun 27, 2008 at 06:48 PM

Op 27 Jun 2008 11:57:42 GMT schreef John B:

> On 26/06/2008 Coos Haak wrote:
> 
>> Op Thu, 26 Jun 2008 01:10:21 -0500 schreef Mohan kumar:
>> 
>>> Hi thanks for your reply,
>>> 
>>> the puzzling question that rocks my mind is why should they
>>> terminate the stack by subtracting 64 with the stack pointer(r1)
>>> 
>>> addi r1,r11,__stackstart_pt@[EMAIL PROTECTED]
>>> addi r1,r11,__stackstart_pt@[EMAIL PROTECTED]
>>> addi r0,r0,0
>>> stwu r0,-64(r1)
>>> 
>>> 1. first two lines of code have defined the stack pointer(r1)
>>> 2. third lines has cleared register r0.
>>> 3. r1 is the stack pointer(sp) and sp is already initialised by
>>> first    two lines. and in the fourth line, they carry out this
>>> operation on    stack pointer  "stwu r0,-64(r1)" Instruction does
>>> the following.       =>    Effective address(EA)  r1-64
>>>      =>    EA is stored in stack pointer(r1)
>> Wrong. EA is nowhere stored
> 
> Yes, it is; the calculated value of EA is loaded into r1. See here:
> 
> http://pds.twi.tudelft.nl/vakken/in1200/labcourse/instruction-set/stwu.h
> tml
> 
>>>      =>    value at the effective address is cleared to zero.
>>> 
>>> Why should the stack pointer will now hold the address given by EA.?
>>> 
>>> Any guess?
> 
>> No guess, EA is only used to determine the address where the value of
>> r0 is to be stored.
> 
> Wrong. See link above.

I didn't know the instruction set of the Power PC, obviously.
Some time ago I searched for it, but to no avail.
Now I know that u stands for update.
Thank you!
-- 
Coos
 




 9 Posts in Topic:
Could any one clarify the below codes.
"Mohan kumar" &  2008-06-25 06:22:46 
Re: Could any one clarify the below codes.
cs_posting@[EMAIL PROTECT  2008-06-25 10:04:15 
Re: Could any one clarify the below codes.
"Mohan kumar" &  2008-06-26 01:10:21 
Re: Could any one clarify the below codes.
Coos Haak <chforth@[EM  2008-06-26 15:19:41 
Re: Could any one clarify the below codes.
"John B" <sp  2008-06-27 11:57:42 
Re: Could any one clarify the below codes.
Coos Haak <chforth@[EM  2008-06-27 18:48:31 
Re: Could any one clarify the below codes.
mojaveg@[EMAIL PROTECTED]  2008-06-26 07:13:04 
Re: Could any one clarify the below codes.
cs_posting@[EMAIL PROTECT  2008-06-26 07:13:50 
Re: Could any one clarify the below codes.
cs_posting@[EMAIL PROTECT  2008-06-26 10:02:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 16:59:46 CST 2008.