delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/08/21/14:03:17

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Re: speed questions and other questions
To: rivat AT matups DOT matups DOT fr
Date: Fri, 21 Aug 92 10:23:05 PDT
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Mailer: Elm [revision: 66.25]

> 2/ do you know how to make inline functions:
> bit_scan_forward and bit_scan_reverse using the assembly
> instructions of the 386/486.
> (the problem is to make them inline...)

I believe GCC lets you declare that a function is an inline function
like this:

inline int my_func()
{
}

Of course, this function must be in the same file as the functions
that call it, so gcc can put it inline.  I believe GCC also lets you
embed assembly language in your C program by using
asm("your_assembly").  So combining these two features might give you
what you want.
--
				Eric Backus
				ericb%hplsla AT hplabs DOT hp DOT com
				(206) 335-2495

- Raw text -


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