This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implementing intrinsics in GCC


On 07/09/2010 07:18 PM, Joe Vee wrote:
> 
> 
> 
> Can somebody give me any pointers about implementing intrinsic
> functions for a new processor (functions that expand to a single
> assembly instruction) in GCC?  What are the steps involved and is
> there any documentation on how to do this?

There's a ton of examples: just have a look at the way things like
expand_sync_lock_test_and_set are handled, for instance.  Have a look
at builtins.c.

But you can trivially do the job with an inline asm in a header file
in almost all cases, so I don't really understand why you want to
submit to the pain of defining a new intrinsic.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]