[LLVMdev] Adding custom operation intrinsic for ASIP architectures.

Chris Lattner sabre at nondot.org
Wed Aug 1 22:07:00 PDT 2007


On Wed, 1 Aug 2007, [UTF-8] Mikael Lepist? wrote:
>> def MOVNTPSmr : PSI<0x2B, MRMDestMem, (outs), (ins i128mem:$dst, 
>> VR128:$src),
>> "movntps {$src, $dst|$dst, $src}",
>> [(int_x86_sse_movnt_ps addr:$dst, VR128:$src)]>;
>>
>> There is corresponding code in llvm-gcc to tell GCC how to handle this 
>> builtin. Is this what you're looking for?
>>
>Yes this is more or less, what we are looking for, except we need 
>variable arguments for out intrinsic. I assume that it can be achieved 
>by using llvm_vararg_ty as a argument type?

Sure, that can be done.  What sort of operations require variable 
arguments?  It might be better implemented with pattern matching in the 
code generator than as an intrinsic.

> Is there need to make changes to llvm-gcc for supporting new GCCBuiltin 
> types that I define or are all of them automatically converted to 
> intrinsics on gcc side?

No, unfortunately you also have to use the GCC builtin mechanism to teach 
gcc about them.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list