Experiment with Go intrinsics (NOT USABLE)
HTML Go C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

intrinsics

Experiment with Go intrinsics (NOT USABLE)

I have hacked together to programs that generate function signatures for all existing Intel x86 intrinsics, as well as ARM NEON intrinsics. When used they will not do anything, but they can be used to test the concept & compilation.

To get the generated code, use:

go get github.com/klauspost/intrinsics

Discussion

All intrinsics are separated into packages based on the CPUID features they require. This has the advantage that you can see your cpu requirements in your imports, and it gives reasonably sized packages.

All instruction that receives a pointer are skipped. Grep sources for '// Skipped:' to find these.

Instructions that have an immediate parameter, or returns a value in a parameter pointer are marked with a "FIXME:".

I generate a rather crude stub assembler for each function that loads each parameter from the stack and writes a return value, but no "operation" code is executed. However for basic instructions it will actually work if you uncomment the "proposed" instruction.

GoDoc

links

Copyright 2015 Klaus Post.

Released under MIT license. See LICENCE for more information.