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
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.
- another example. Assembler equivalent
- inline example, assembler equivalent
- x86 intrinsics godoc
- ARM NEON intrisics godoc
- intrinsic data source
Copyright 2015 Klaus Post.
Released under MIT license. See LICENCE for more information.