Firstly, thanks! I was looking into wrapping libquadmath, but luckily decided to search beforehand.
I think I may have figured out a solution to your register passing woes, which should allow getting rid of the C shim. Instead of using a bitstype you can instead pass a Tuple of VecElements, which can fool the compiler into thinking you're using SIMD vectors (see http://docs.julialang.org/en/stable/stdlib/simd-types/).
Firstly, thanks! I was looking into wrapping libquadmath, but luckily decided to search beforehand.
I think I may have figured out a solution to your register passing woes, which should allow getting rid of the C shim. Instead of using a
bitstype
you can instead pass aTuple
ofVecElement
s, which can fool the compiler into thinking you're using SIMD vectors (see http://docs.julialang.org/en/stable/stdlib/simd-types/).As a quick demo:
gives:
p.s. Please consider registering the package in METADATA: it is really useful!