This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: I really need help!


mike stump wrote:
> 
> > Date: Wed, 17 Oct 2001 17:47:49 -0700 (PDT)
> > From: Gavin Li <gavinux@yahoo.com>
> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]