* sparc stack analysis
@ 2005-10-28 0:55 ework0
2005-10-28 11:03 ` John Love-Jensen
0 siblings, 1 reply; 2+ messages in thread
From: ework0 @ 2005-10-28 0:55 UTC (permalink / raw)
To: gcc-help
Hello,
I have strong interest in sparc architecture, assuming this small program:
-bash-3.00$ cat foo.c
#include<stdio.h>
void func1(char *);
void func2(char *);
main(int argc, char *argv[])
{
char foo[256];
strcpy(foo,argv[1]);
func1(foo);
exit(1);
}
void
func2(char *foo){
char hello[128];
strcpy(hello,foo);
printf("%s\n",foo);
}
void
func1(char *foo){
func2(foo);
}
1. Would anyone mind to detailed describe how a function main() calls
func1() and func2() as well. I have interested in, where is stored the
return address from main()? how does it work the save/ret schema?
2. What are the components of a typical sparc stack? What are the most
important registers to know?
I know this is a bit off-topic but I am sure many users of this lists,
specially those with interest on Sparc architecture, would find this
very useful.
Thanks for any help, diagram, link, document,
ework0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: sparc stack analysis
2005-10-28 0:55 sparc stack analysis ework0
@ 2005-10-28 11:03 ` John Love-Jensen
0 siblings, 0 replies; 2+ messages in thread
From: John Love-Jensen @ 2005-10-28 11:03 UTC (permalink / raw)
To: ework0, MSX to GCC
Hi ework0,
I think the SPARC ABI is what you want...
http://www.sparc.com/standards/psABI3rd.pdf
HTH,
--Eljay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-28 11:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-28 0:55 sparc stack analysis ework0
2005-10-28 11:03 ` John Love-Jensen
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).