Re: some basic problems with ppc assembler

2003-07-02 Thread Segher Boessenkool
Oliver Ripka wrote: .LC0://I guess this means .LC0 .LC0 is a label. .string "Hello World" //is a global string Outputs a string to object code. It can be accessed via the label .LC0 . .globl main //within the main label. Declares 'main' as a global symbol (it wil

Re: some basic problems with ppc assembler

2003-07-02 Thread Segher Boessenkool
Benjamin Herrenschmidt wrote: The stwu will do r1=r1-32 and store old r1 there (stack pointer). This will basically sets up the stackframe for the function. The LR is backed up in r0 (the return address) and stored in the stackframe. r31 is a non-volatile register, since the compiler thinks it wi

Re: some basic problems with ppc assembler

2003-07-02 Thread Segher Boessenkool
Brad Boyer wrote: Do you actually have a document for the official ABI? I found a link to a document in some old messages, but it was a dead link. A generic search of the web didn't turn up anything, although I might have been searching for the wrong words... System V application binary interfa

Re: some basic problems with ppc assembler

2003-06-25 Thread Kevin B. Hendricks
Hi, Grab http://crunch.ivey.uwo.ca/khendricks/PPC_docs.tar.gz There is an old ABI document. Please note. PPC 32 does not follow the published ABI all of the time: 1. does not return small structures (size of 8 or less) in registers 2. does not pass floating point signals as doubles aligned to

Re: some basic problems with ppc assembler

2003-06-25 Thread John F Davis
| | cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>, Oliver Ripka <[EMAIL PROTECTED]>, | |debian-powerpc@lists.debian.org | | Subject: Re: some b

Re: some basic problems with ppc assembler

2003-06-25 Thread paubert
On Wed, Jun 25, 2003 at 01:56:54PM -0700, Brad Boyer wrote: > On Wed, Jun 25, 2003 at 05:02:40PM +, paubert wrote: > > It is specified in the ABI for functions with variable number of argumentsi: > > the crxor indicates that no parameters have been passed in the floating > > point > > register

Re: some basic problems with ppc assembler

2003-06-25 Thread Brad Boyer
On Wed, Jun 25, 2003 at 05:02:40PM +, paubert wrote: > It is specified in the ABI for functions with variable number of argumentsi: > the crxor indicates that no parameters have been passed in the floating point > registers so an integer only task will not save fpr1-fpr8 to walk the > argument

Re: some basic problems with ppc assembler

2003-06-25 Thread paubert
On Wed, Jun 25, 2003 at 04:02:13PM +0200, Benjamin Herrenschmidt wrote: > > main: > > stwu 1,-32(1) //I do not understand this. > > mflr 0 //Does this > > stw 31,28(1)//setup some > > stw 0,36(1) //GPRs for

Re: some basic problems with ppc assembler

2003-06-25 Thread Benjamin Herrenschmidt
> main: > stwu 1,-32(1) //I do not understand this. > mflr 0//Does this > stw 31,28(1) //setup some > stw 0,36(1) //GPRs for the > mr 31,1 //begin of the code?? The stwu will do r

Re: some basic problems with ppc assembler

2003-06-25 Thread paubert
On Wed, Jun 25, 2003 at 11:26:35AM +0200, Geert Uytterhoeven wrote: > On Wed, 25 Jun 2003, Oliver Ripka wrote: > > I try to understand some ppc-assembler-code but it is harder than > > x86 to me because of the missing documentation. I have a big reference > > from ibm here. And some websites which

Re: some basic problems with ppc assembler

2003-06-25 Thread Boris Bezlaj
Try these links: http://www-106.ibm.com/developerworks/linux/library/l-ppc/ http://developer.apple.com/techpubs/macosx/DeveloperTools/Assembler/AssemblerTOC.html http://www.lightsoft.co.uk/Fantasm/Beginners/begin1.html http://www.mactech.com/articles/develop/issue_21/21balance.html http://penguinp

Re: some basic problems with ppc assembler

2003-06-25 Thread Geert Uytterhoeven
On Wed, 25 Jun 2003, Oliver Ripka wrote: > I try to understand some ppc-assembler-code but it is harder than > x86 to me because of the missing documentation. I have a big reference > from ibm here. And some websites which deal with this topic. There's lots of documentation about PPC assembler on

some basic problems with ppc assembler

2003-06-25 Thread Oliver Ripka
Hi, I try to understand some ppc-assembler-code but it is harder than x86 to me because of the missing documentation. I have a big reference from ibm here. And some websites which deal with this topic. So I experiment now with the assembler code of c programms translated with gcc -S file.c For a