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
8686
8787 #if !defined(MINIMP3_NO_SIMD)
8888
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))
9090 /* x64 always have SSE2, arm64 always have neon, no need for generic code */
9191 #define MINIMP3_ONLY_SIMD
9292 #endif /* SIMD checks... */
@@ -161,7 +161,7 @@ end: · 68 unmodified lines
161161 return g_have_simd - 1;
162162 #endif /* MINIMP3_ONLY_SIMD */
163163 }
164−#elif defined(__ARM_NEON) || defined(__aarch64__)
164+#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)
165165 #include <arm_neon.h>
166166 #define HAVE_SSE 0
167167 #define HAVE_SIMD 1
@@ -191,7 +191,7 @@ static int have_simd() · 23 unmodified lines
191191 #define HAVE_SIMD 0
192192 #endif /* !defined(MINIMP3_NO_SIMD) */
193193
194−#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__)
194+#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64)
195195 #define HAVE_ARMV6 1
196196 static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a)
197197 {

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