From: "Lawrence Rust" Newsgroups: comp.os.msdos.djgpp References: <1028324445 DOT 477046 AT queeg DOT ludd DOT luth DOT se> Subject: Re: Prolog Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: Date: Sat, 3 Aug 2002 13:48:55 +0100 NNTP-Posting-Host: 62.253.142.12 X-Complaints-To: abuse AT ntlworld DOT com X-Trace: newsfep1-win.server.ntli.net 1028378959 62.253.142.12 (Sat, 03 Aug 2002 13:49:19 BST) NNTP-Posting-Date: Sat, 03 Aug 2002 13:49:19 BST Organization: ntl Cablemodem News Service To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Martin Str|mberg" wrote... > Lawrence Rust wrote: > : Is it possible to suppress the prolog and epilog code emitted by gcc in an > : extern function just consisting of asm statements? E.g in: > > : extern void foo( void) > : { > : __asm__ __volatile ( "..."); > : } > > While I agree with Hans-Bernhard that you should put them into their > own .s (or .S) file, one technique I've been using for quick hacks is > just add the __asm__ () outside any function. Lo and behold, you just > made an assembly function in a C file! > > > Right, Thanks, that's just what I was looking for. I notice that it objects to __volatile in this case - a compiler quirk? I also agree with Hans-Bernhard, in the absence of any compiler directives to control the prolog, the best method is a separate assembler file. -- Lawrence Rust