Fwd: gcc and xgetbv

Vincent Habchi vince at macports.org
Fri Jan 25 07:31:26 PST 2013


On 25 janv. 2013, at 14:50, Michael Dickens <michaelld at macports.org> wrote:

> Maybe the answer is still found in this thread from a couple years back?
> 
> <
> http://lists.macosforge.org/pipermail/macports-dev/2011-October/016335.html
>> 
> 
> On Oct 3, 2011, at 3:50 PM, vincent habchi <vince at macports.org> wrote:
>> Ok, finally I figured out a way to compile AVX instructions. But it is somewhat crooked. The old ‘as’ assembler in /usr/bin/as must be discarded and replaced by this script, that uses the clang assembler:

Well, that was written before I did extensive testing. It turned out that the GCC compiler generates assembly files (.s) using its own dialect; Clang abides by the Intel official assembly syntax and both are partly incompatible. So there is no real way out this conundrum: using Clang as an assembler for GCC .s file will not work for anything else that the simplest of simple C files.

To wrap up: abandon AVX with gcc-mp-… compilers, and don’t think about __asm__ () with GNU dialect assembly for Clang compiling…

Vincent


More information about the macports-dev mailing list