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> <3d48a1d8$0$1421$272ea4a1 AT news DOT execpc DOT com> |
Subject: | Re: Prolog |
Lines: | 40 |
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: | <b6729.2752$U44.166519@newsfep2-gui> |
Date: | Thu, 1 Aug 2002 10:23:15 +0100 |
NNTP-Posting-Host: | 62.253.142.12 |
X-Complaints-To: | abuse AT ntlworld DOT com |
X-Trace: | newsfep2-gui 1028193799 62.253.142.12 (Thu, 01 Aug 2002 10:23:19 BST) |
NNTP-Posting-Date: | Thu, 01 Aug 2002 10:23: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 |
"Chris Giese" <NoEmailAds AT execpc DOT com> 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 ( "..."); > >} > > > >Even in an optimised (-O3) build the compiler emits: > > > > pushl %ebp > > movl %esp,%ebp > > ... > > movl %ebp,%esp > > popl %ebp > > ret > > Maybe "gcc -fomit-frame-pointer ..." ? Thanks, that suppresses the prolog for all functions in a file but I was hoping that there might be a way to suppress it from within the source file, either using an __attribute__() declaration or by a #pragma or something. The problem is that the source is part of a library that will be compiled by others and I can't guarantee that the final makefile will specify '-fomit-frame-pointer'. The function modifies the sp register so it's important that the calling stack frame format is known. Alternatively is there a way of determining a compile time if '-fomit-frame-pointer' is on or off? TIA -- Lawrence Rust
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |