Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
116 user(s) are online (106 user(s) are browsing Forums)

Members: 0
Guests: 116

more...

Support us!

Headlines

 
  Register To Post  

PPC assembly
Just can't stay away
Just can't stay away


See User information
Do anybody know what PPC command stw for example: stw r0,4(r11) do ? Are those two registers used as data registers or memory address registers in that example ?

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: PPC assembly
Home away from home
Home away from home


See User information
@TSK

A quick search for: "powerpc stw" will get you links to websites that document the instruction set, including IBM's PowerPC stw page.

For your example:
Quote:

TSK wrote:
Do anybody know what PPC command stw for example: stw r0,4(r11) do ? Are those two registers used as data registers or memory address registers in that example ?


This would store the contents of register 0 into the address given by register 11 + an offset of 4. So if r0 = 100 and r11 = 9000 then this would write 100 to address 9004.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: PPC assembly
Not too shy to talk
Not too shy to talk


See User information
Hans already answered but for information on PowerPC, common integer registers (from r0 to r31) are called General Purpose Registers (GPR).
It was different on 680x0 where some registers where dedicated to be used with data or addresses.

Here, in the example given by Hans, if the next instruction where :
stw r11, 0(r11)
The value 9000 would be written at address 9000.

Last, stw means "store word"

You can fan many documents about PowerPC programming on Internet.

Go to top
Re: PPC assembly
Just can't stay away
Just can't stay away


See User information
@Hans + corto

Thanks ! I thought to ask because I thought somebody might remember from memory and don't need to do any searching.

Quote:
common integer registers (from r0 to r31)

I knew that somehow. So it depends on the command which register is used for data and which one for address.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project