public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* C / Assembly problem
@ 2004-04-16 19:20 Reynolds, Terry (Contractor-SIMTECH)
  0 siblings, 0 replies; only message in thread
From: Reynolds, Terry (Contractor-SIMTECH) @ 2004-04-16 19:20 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

Hi All,

I'm working on porting c & assembly codes to the PPC64 on a G5.  I've worked
through the assembly function stack set up and got that to be happy on the
G5.  One problem I'm having is finding the 9th & 10 arguments on the stack.
According to the spec "PPC-elf64abi-1.7" I found they should show up at
offsets 112 & 120 from the stack pointer( offset 48 to start of parameter
area, 64 to the 9th argument).  They don't seem to be there.  

The assembly output for the function that calls this routine says that's
where they were put.  I also wrote a simple c function and looked at it's
assembly output.  It finds them at 116 & 124 from the stack pointer, and
when compiled, that routine works. 

That doesn't work in my pure assembly routine for some reason.

I'm compiling on gcc3.3.3 under a Linux ppc64 kernel.  I can't get a working
version of gdb compiled on this machine, or I would just go and search
around the stack pointer.

Can someone point me to a reference that might clear this up for me?  Or
just happen to know what I'm doing wrong?

Thanks,

Terry Reynolds
Simulation Technologies, INC.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-16 19:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-16 19:20 C / Assembly problem Reynolds, Terry (Contractor-SIMTECH)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).