[cfe-dev] Can't build ASAN tests on i586 without SSE2
Kostya Serebryany
kcc at google.com
Wed Dec 4 02:40:40 PST 2013
Does the following work for you?
Index: asan/tests/asan_test.cc
===================================================================
--- asan/tests/asan_test.cc (revision 196207)
+++ asan/tests/asan_test.cc (working copy)
@@ -669,7 +671,8 @@
PTHREAD_JOIN(t, 0);
}
-#if defined(__i386__) || defined(__x86_64__)
+#if (defined(__i386__) || defined(__x86_64__)) && not defined(__i586__)
+#include <emmintrin.h>
TEST(AddressSanitizer, Store128Test) {
char *a = Ident((char*)malloc(Ident(12)));
char *p = a;
Index: asan/tests/asan_test_utils.h
===================================================================
--- asan/tests/asan_test_utils.h (revision 196207)
+++ asan/tests/asan_test_utils.h (working copy)
@@ -41,10 +41,6 @@
#include <unistd.h>
#endif
-#if defined(__i386__) || defined(__x86_64__)
-#include <emmintrin.h>
-#endif
-
#ifndef __APPLE__
#include <malloc.h>
#endif
On Wed, Dec 4, 2013 at 1:53 PM, İsmail Dönmez <ismail at donmez.ws> wrote:
> On Wed, Dec 4, 2013 at 11:49 AM, Kostya Serebryany <kcc at google.com> wrote:
>
>>
>>
>>
>>
>>
>> On Wed, Dec 4, 2013 at 1:42 PM, İsmail Dönmez <ismail at donmez.ws> wrote:
>>
>>> Hi,
>>>
>>>
>>> On Mon, Dec 2, 2013 at 3:31 PM, Kostya Serebryany <kcc at google.com>wrote:
>>>
>>>> This is strange, #include <emmintrin.h> has been there for ages and
>>>> SSE2 is pretty old.
>>>> Maybe you are using some minimalistic version of vm?
>>>>
>>>
>>> SSE2 support is disabled on purpose. i586 architecture does not have
>>> SSE(2) support. Can we somehow make it optional in the asan tests please?
>>>
>>
>> How to we understand at compile time that SSE2 is not supported?
>> Does i586 define some symbol like __i386__ or some such?
>>
>>
> At least on openSUSE it does:
>
> [~]> gcc -m32 -dM -E - < /dev/null|grep -i i586
> #define __i586 1
> #define __i586__ 1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131204/2e16713b/attachment.html>
More information about the cfe-dev
mailing list