History

compiler: detect neon with msvc/arm64 tools

lieff committed 5 years ago

Commit 0d0c4521 parent 5aeee941 file · +3 −3Browse files

Unified · Split

minimp3.h+3−3
@@ -86,7 +86,7 @@ int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_s · 85 unmodified lines
86 86
87#if !defined(MINIMP3_NO_SIMD)87#if !defined(MINIMP3_NO_SIMD)
88 88
89#if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(_M_ARM64) || defined(__x86_64__) || defined(__aarch64__))89#if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64))
90/* x64 always have SSE2, arm64 always have neon, no need for generic code */90/* x64 always have SSE2, arm64 always have neon, no need for generic code */
91#define MINIMP3_ONLY_SIMD91#define MINIMP3_ONLY_SIMD
92#endif /* SIMD checks... */92#endif /* SIMD checks... */
@@ -161,7 +161,7 @@ end: · 68 unmodified lines
161 return g_have_simd - 1;161 return g_have_simd - 1;
162#endif /* MINIMP3_ONLY_SIMD */162#endif /* MINIMP3_ONLY_SIMD */
163}163}
164#elif defined(__ARM_NEON) || defined(__aarch64__)164#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)
165#include <arm_neon.h>165#include <arm_neon.h>
166#define HAVE_SSE 0166#define HAVE_SSE 0
167#define HAVE_SIMD 1167#define HAVE_SIMD 1
@@ -191,7 +191,7 @@ static int have_simd() · 23 unmodified lines
191#define HAVE_SIMD 0191#define HAVE_SIMD 0
192#endif /* !defined(MINIMP3_NO_SIMD) */192#endif /* !defined(MINIMP3_NO_SIMD) */
193 193
194#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__)194#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64)
195#define HAVE_ARMV6 1195#define HAVE_ARMV6 1
196static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a)196static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a)
197{197{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t