| www.delorie.com/archives/browse.cgi | search | 
| From: | "Lawrence Rust" <lvr AT nospam DOT softsystem DOT co DOT uk> | 
| Newsgroups: | comp.os.msdos.djgpp | 
| References: | <zdZ19.3130$6j5 DOT 101432 AT newsfep2-win DOT server DOT ntli DOT net> <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: | <jjQ29.1434$mB4.86758@newsfep1-win.server.ntli.net> | 
| 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" <ams AT speedy DOT ludd DOT luth DOT se> wrote...
> Lawrence Rust <lvr AT nospam DOT softsystem DOT co DOT uk> 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
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |