delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/09/11:34:31

Date: Wed, 9 Jul 1997 11:30:37 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: Nate Eldredge <eldredge AT ap DOT net>
Cc: djgpp AT delorie DOT com, billc AT blackmagic DOT tait DOT co DOT nz
Subject: Re: inline asm ("g" or "a" for input... which is faster?) and memory.h
In-Reply-To: <199707081711.KAA26916@adit.ap.net>
Message-Id: <Pine.D-G.3.91.970709112807.5743D-100000@dg1>
Mime-Version: 1.0

On Tue, 8 Jul 1997, Nate Eldredge wrote:

> 
> >> And lastly, does memcpy, memmove, memset and so on, alter memory dwords
> >
> >Depends on the function and the paramteters.  Sometimes they are
> >function calls (the code in libc is well optimised) and athers, they are
> >inlined and the implementation is dependent on the size of the transfer.
> 
> That bothers me slightly. It seems that certain functions such as strcpy,
> memset, etc, are magically known about by the compiler (it refers to them as
> builtin functions). This means I can't put a strcpy of my own in the program
> unless it goes in the same source file; otherwise GCC will inline its own.

Just add the -fno-builtin flag to the compile and the compiler will not 
translate any builtin functions to inline code unless they start with an 
underscore.  Such builtins include: `abort', `abs', `alloca', `cos', 
`exit', `fabs', `ffs', `labs', `memcmp', `memcpy', `sin', `sqrt', 
`strcmp', `strcpy', and `strlen'.

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


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