cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/23/07:15:27

From: "Alberto Chessa" <fiargbgm AT tin DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How prevent GCC from inlining a function?
Date: 23 Apr 1998 06:40:56 GMT
Organization: FIAR S.p.A.
Lines: 26
Message-ID: <01bd6e03$d66bfb00$92c809c0@CHESSA>
References: <3537E4CB DOT 5B59 AT icrdl DOT net>
Reply-To: "\"Alberto Chessa\" <Alberto Chessa" <fiargbgm AT tin DOT it>
NNTP-Posting-Host: milano28-39.tin.it
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


Michel Huot <huotm AT icrdl DOT net> wrote in article <3537E4CB DOT 5B59 AT icrdl DOT net>...
> I am writing a program and, for speed reasons, i must inline some
> function that has a label and a loop in it, like that:
> 
> void foo(. . .)
> {
>   asm volatile (" ...
>         Loop1:    ...
>                   loop Loop1
>                   ... ");
> }
> 
> GCC compiles and say me that Loop1 is already defined. I found that
> everywhere I call foo, the compiler inline it and put the label
"Loop1"...

Look for as.info, node: "Symbols Names". It say that you can use up to ten
local labels (0..9) and make reference to the nearest ([f]orward of
[b]ackward) one:
   asm volatile (" ...
         0:    ...			// the local label
                loop 0b		// refer to the most recent definition of 0
                   ... ");

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019