From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: mrs@windriver.com (mike stump) Cc: gavinux@yahoo.com, gcc@gcc.gnu.org Subject: Re: I really need help! Date: Mon, 22 Oct 2001 06:46:00 -0000 Message-id: <200110221258.NAA09556@meolyon.local> References: <200110180237.TAA11349@kankakee.wrs.com> X-SW-Source: 2001-10/msg01143.html mike stump wrote: > > > Date: Wed, 17 Oct 2001 17:47:49 -0700 (PDT) > > From: Gavin Li > > To: gcc@gcc.gnu.org > > > I am not sure if I should send this mail to here. > > Kinda _not_ what this list is for. > > > void start(void) > > { > > asm ("movl %esp, 0x5000"); > > } > > > My question is how can I get ride of the first two ASM > > instructions? > > Go cheat off of newlib, or libc, or glibc, or netbsd, or freebsd... > > > I want the compiler to compile my inlined ASM instruction as the > > first instruction in the start() function, and the other function > > just as general output. > > Trivial: > > void mystart() { > asm("start:"); > asm("movl %esp, 0x5000"); > } > > or learn to code in assembler. Another option would be to implement the naked function attribute for i386, or making naked [functions] attribute an attribute that has a default implementation for all targets. -- Joern Rennecke | gcc expert for hire amylaar@onetel.net.uk | send enquiries to: jwr_jobs@onetel.net.uk