Date: Tue, 22 Dec 1998 09:45:37 -0500 (EST) From: Alfred Perlstein <bright@hotjobs.com> To: Paolo Di Francesco <paipai@tin.it> Cc: freebsd-sparc@FreeBSD.ORG Subject: Re: Cross compiled code Message-ID: <Pine.BSF.4.05.9812220941370.6331-100000@bright.fx.genx.net> In-Reply-To: <19981222090251.CUQO18112.fep03-svc@winworkstation>
next in thread | previous in thread | raw e-mail | index | archive | help
Try -fomit-frampointer (or equiv) %fp offset looks offwhack, but i'm not sure. the code looks ok and i commented it for you. (*) means i'm unsure, but i'll check my book on the way to work. -Alfred > Can someone if this code is correct? > > > ----- the original program prova.c (c code) ------- > > > main(){ > int a,b; > > a = 10; > b = 20 + a; > } > > -------------------------------------------- > > compiled with xgcc -S > > -------------------------------------------- > .file "prova.c" > .section ".text" > .align 4 > .global main > .type main,#function > .proc 04 > main: > !#PROLOGUE# 0 > save %sp,-208,%sp ! adjust stack fram > !#PROLOGUE# 1 > mov 10,%o0 ! a = 10 > st %o0,[%fp+2027] ! this looks fishy 2027 looks a bit high(*) > ld [%fp+2027],%o0 ! fishy (*) > add %o0,20,%o1 ! a + 20 -> > st %o1,[%fp+2023] ! fishy (*) > .LL1: > return %i7+8 > nop > .LLfe1: > .size main,.LLfe1-main > .ident "GCC: (GNU) egcs-2.91.60 19981201 (egcs-1.1.1 release)" > > --------------------------------------------------------------- > > I have linked it and it seems ok. > > P.S. host=Linux-RedHat5.0 > > > Ciao Ciao > Paolo Di Francesco > _ > ->B<- All Recycled Bytes Message ... > ~ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-sparc" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9812220941370.6331-100000>