TurkeyMan/phobos — pull request #3 by jerro (2012-10-25 18:54:44+00:00)
Title: Started to work on LDC support

This adds LDC support to most of the functions in std.simd. Support for integral types in maskGreater and similar is still missing for LDC. It can currently only be implemented using LDC's inline assembly expressions. I'll try to get support for inline LLVM IR into LDC - if they accept it, I'll implement those functions using LLVM IR, otherwise I'll just use inline assembly expressions.

I added `pure`, `nothrow` and `@safe` attributes to `ldc.gccbuiltins_x86`, so most of `std.simd` compiles with `pure: @safe: nothrow:` on top with LDC. Those attributes prevent most of the functions in `std.simd` from compiling with GDC, though.

You can use my code [here](https://github.com/jerro/std.simd-tests) to test std.simd. The `test.d` file currently tests about 1100 functions instances from `std.simd`, 188 of them currently fail to compile with the latest LDC built with LLVM 3.2. For many of those I am unsure whether they should compile or not. The tests for the ones that do compile all pass. You can use `sizes.d` to get a rough idea about the efficiency of generated code (see which functions are likely to be most inefficient etc). It lists the mangled names of all the function instances from `std.simd` that compiled succesfully in `test.d` and their sizes. Both scripts currently only work on Linux.