diff --git a/include/simd-compat/emmintrin.h b/include/simd-compat/emmintrin.h new file mode 100644 index 0000000..f844860 --- /dev/null +++ b/include/simd-compat/emmintrin.h @@ -0,0 +1,25 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +#pragma once + +#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +# include_next +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/sse.h" +#endif diff --git a/include/simd-compat/immintrin.h b/include/simd-compat/immintrin.h new file mode 100644 index 0000000..5400c92 --- /dev/null +++ b/include/simd-compat/immintrin.h @@ -0,0 +1,26 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +#pragma once + +#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +# include_next +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/sse.h" +# include "../simde/simde/x86/sse2.h" +#endif diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 1f7da29..33ec1c4 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -43,8 +43,8 @@ #elif defined(__EMSCRIPTEN__) # include_next -static inline -__m64 _mm_set1_pi16(short w) +static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) +_mm_set1_pi16(short w) { return __extension__ (__m64){ static_cast(w), static_cast(w) }; } diff --git a/include/simd-compat/xmmintrin.h b/include/simd-compat/xmmintrin.h new file mode 100644 index 0000000..5ee268f --- /dev/null +++ b/include/simd-compat/xmmintrin.h @@ -0,0 +1,25 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +#pragma once + +#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +# include_next +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/avx.h" +#endif