www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - LDC Intrinsics

reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
What kinds of intrinsics are explicitly available to the 
developer when compiling with LDC?

And are there any docs?
Nov 10
parent Nicholas Wilson <iamthewilsonator hotmail.com> writes:
On Friday, 10 November 2017 at 09:33:17 UTC, Nordlöw wrote:
 What kinds of intrinsics are explicitly available to the 
 developer when compiling with LDC?

 And are there any docs?
there are some pragmas for bitop stuff. https://github.com/ldc-developers/ldc/blob/master/gen/pragma.cpp#L59 there are target agnostic intrinsics https://github.com/ldc-developers/druntime/blob/ldc/src/ldc/intrinsics.di Additionally any function from https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Intrinsics.td#L252 or from any of the files included at the bottom of that file https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Intrinsics.td#L968 may be used in a ``` pragma(LDC_intrinsic, "llvm.foo") void llvm_foo(); ``` declaration, provided you are targeting the appropriate hardware.
Nov 10