Fixup details for non-x86 simd compat, fix CI linux cross-compile
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
6658153ed8
commit
a8a5cea9fb
16 changed files with 165 additions and 182 deletions
|
@ -1,26 +1,19 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD)
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_SSE2_NATIVE
|
||||
# include_next <emmintrin.h>
|
||||
#else
|
||||
# include "mmintrin.h"
|
||||
# include "xmmintrin.h"
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "simde/x86/sse.h"
|
||||
# include "simde/x86/sse2.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
#endif
|
||||
|
|
|
@ -1,27 +1,20 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD)
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_SSE_NATIVE
|
||||
# include_next <immintrin.h>
|
||||
#else
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "../simde/simde/x86/sse.h"
|
||||
# include "../simde/simde/x86/sse2.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "mmintrin.h"
|
||||
# include "xmmintrin.h"
|
||||
# include "emmintrin.h"
|
||||
# include "pmmintrin.h"
|
||||
# include "tmmintrin.h"
|
||||
# include "smmintrin.h"
|
||||
#endif
|
||||
|
|
|
@ -1,28 +1,17 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOSIMD)
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_MMX_NATIVE
|
||||
# include_next <mmintrin.h>
|
||||
#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD)
|
||||
# include <wasm_simd128.h>
|
||||
#else
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "../simde/simde/x86/mmx.h"
|
||||
# include "simde/x86/mmx.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
#endif
|
||||
|
|
|
@ -1,51 +1,20 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD)
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_SSE3_NATIVE
|
||||
# include_next <pmmintrin.h>
|
||||
# if defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD)
|
||||
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||
_mm_set1_pi16(short w)
|
||||
{
|
||||
return __extension__ (__m64){ static_cast<float>(w), static_cast<float>(w) };
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
# include "mmintrin.h"
|
||||
# include "xmmintrin.h"
|
||||
# include "emmintrin.h"
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "simde/x86/sse.h"
|
||||
# include "simde/x86/sse2.h"
|
||||
# include "simde/x86/sse3.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
/*
|
||||
#elif defined(__ARM_NEON)
|
||||
# include "../sse2neon/sse2neon.h"
|
||||
|
||||
static inline
|
||||
void __builtin_ia32_pause()
|
||||
{
|
||||
__asm__ __volatile__("isb\n");
|
||||
}
|
||||
|
||||
static inline
|
||||
__m64 _mm_set1_pi16(short w)
|
||||
{
|
||||
return vreinterpret_s64_s16(vdup_n_s16(w));
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
|
52
include/simd-compat/simd-compat.h
Normal file
52
include/simd-compat/simd-compat.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// native up to SSE3
|
||||
#if (defined(_M_X64) || defined(__amd64__) || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2)) && !defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD)
|
||||
# define SIMDE_X86_MMX_NATIVE
|
||||
# define SIMDE_X86_SSE_NATIVE
|
||||
# define SIMDE_X86_SSE2_NATIVE
|
||||
# define SIMDE_X86_SSE3_NATIVE
|
||||
#else
|
||||
# define SIMDE_X86_MMX_NO_NATIVE
|
||||
# define SIMDE_X86_SSE_NO_NATIVE
|
||||
# define SIMDE_X86_SSE2_NO_NATIVE
|
||||
# define SIMDE_X86_SSE3_NO_NATIVE
|
||||
#endif
|
||||
|
||||
// everything else is emulated
|
||||
#define SIMDE_X86_SSSE3_NO_NATIVE
|
||||
#define SIMDE_X86_SSE4_1_NO_NATIVE
|
||||
#define SIMDE_X86_SSE4_2_NO_NATIVE
|
||||
#define SIMDE_X86_XOP_NO_NATIVE
|
||||
#define SIMDE_X86_AVX_NO_NATIVE
|
||||
#define SIMDE_X86_AVX2_NO_NATIVE
|
||||
#define SIMDE_X86_FMA_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512F_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512BF16_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512BW_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512VL_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512DQ_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512CD_NO_NATIVE
|
||||
#define SIMDE_X86_AVX5124VNNIW_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512VNNI_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512VBMI2_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512VBMI_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512BITALG_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512VPOPCNTDQ_NO_NATIVE
|
||||
#define SIMDE_X86_AVX512VP2INTERSECT_NO_NATIVE
|
||||
#define SIMDE_X86_SVML_NO_NATIVE
|
||||
|
||||
// control wasm simd state
|
||||
#ifdef __EMSCRIPTEN__
|
||||
# ifdef CARDINAL_NOSIMD
|
||||
# define SIMDE_WASM_SIMD128_NO_NATIVE
|
||||
# else
|
||||
# define SIMDE_WASM_SIMD128_NATIVE
|
||||
# endif
|
||||
#endif
|
23
include/simd-compat/smmintrin.h
Normal file
23
include/simd-compat/smmintrin.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_SSE4_1_NATIVE
|
||||
# include_next <smmintrin.h>
|
||||
#else
|
||||
# include "mmintrin.h"
|
||||
# include "xmmintrin.h"
|
||||
# include "emmintrin.h"
|
||||
# include "pmmintrin.h"
|
||||
# include "tmmintrin.h"
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "simde/x86/sse4.1.h"
|
||||
# include "simde/x86/sse4.2.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
#endif
|
21
include/simd-compat/tmmintrin.h
Normal file
21
include/simd-compat/tmmintrin.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_SSSE3_NATIVE
|
||||
# include_next <tmmintrin.h>
|
||||
#else
|
||||
# include "mmintrin.h"
|
||||
# include "xmmintrin.h"
|
||||
# include "emmintrin.h"
|
||||
# include "pmmintrin.h"
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "simde/x86/ssse3.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
#endif
|
|
@ -1,26 +1,20 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD)
|
||||
#include "simd-compat.h"
|
||||
|
||||
#ifdef SIMDE_X86_SSE_NATIVE
|
||||
# include_next <xmmintrin.h>
|
||||
#else
|
||||
# include "mmintrin.h"
|
||||
# define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
# include "simde/x86/avx.h"
|
||||
# include "simde/x86/sse.h"
|
||||
# undef SIMDE_ENABLE_NATIVE_ALIASES
|
||||
// always use SSE2 mode, as seen in gcc
|
||||
# include "emmintrin.h"
|
||||
#endif
|
||||
|
|
|
@ -1,27 +1,14 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "mmintrin.h"
|
||||
#include "xmmintrin.h"
|
||||
#include "emmintrin.h"
|
||||
#include "immintrin.h"
|
||||
#include "pmmintrin.h"
|
||||
|
||||
#define SIMDE_ENABLE_NATIVE_ALIASES
|
||||
#include "simde/x86/ssse3.h"
|
||||
#include "simde/x86/sse4.1.h"
|
||||
#include "simde/x86/sse4.2.h"
|
||||
#include "tmmintrin.h"
|
||||
#include "smmintrin.h"
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* 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.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "simd/common.hpp"
|
||||
#include_next "simd/functions.hpp"
|
||||
#undef SIMDE_MM_FROUND_NO_EXC
|
||||
// #undef SIMDE_MM_FROUND_NO_EXC
|
||||
// #undef _MM_FROUND_NO_EXC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue