Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2013 11:35:49 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        toolchain@FreeBSD.org
Subject:   temp file turd left behind in odd case...
Message-ID:  <20130115193549.GB1410@funkthat.com>

index | next in thread | raw e-mail

If you try to compile the following file:
#include <wmmintrin.h>

__m128i
bar(__m128i a, __m128i b)
{
        return _mm_aesenc_si128(a, b);
}

w/ the command:
clang -D__AES__ -c intrintest.c

You'll get the error:
fatal error: error in backend: Cannot select: intrinsic %llvm.x86.aesni.aesenc

and a intrintest.o-XXXXXXXX temp file left behind from the failed compile...

Yes, the correct way to enable the AES instructions is with the -maes
option, but I didn't know that at the time...  Looks like clang doesn't
fully clean up in this case...

I tried this on MacOSX's clang, but the smmintrin.h header prevents me
from compiling w/ the error:
In file included from /usr/bin/../lib/clang/2.1/include/wmmintrin.h:31:
/usr/bin/../lib/clang/2.1/include/smmintrin.h:28:2: error: #error "SSE4.1
      instruction set not enabled"
#error "SSE4.1 instruction set not enabled"

It'd be nice if -maes and related SSE enabling options were documented
in the man page... :)

P.S. Not on the list, so CC me if necessary.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130115193549.GB1410>