Skip to content

#include <mmintrin.h> breaks compilation on Windows ARM #718

@GregSlazinski

Description

@GregSlazinski

Trying to compile on Windows ARM (UWP), I get the error:
zstd_decompress.c:

#if defined(_MSC_VER)
#  include <mmintrin.h>   /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
#  define ZSTD_PREFETCH(ptr)   _mm_prefetch((const char*)ptr, _MM_HINT_T0)

1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\mmintrin.h(21): fatal error C1189: #error: This header is specific to X86 and X64 targets

You can't use mmintrin.h on ARM

A quick workaround is to use:

#if defined(_MSC_VER) && !defined _M_ARM && !defined _M_ARM64
#  include <mmintrin.h>   /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions