More wasm details, basics mostly work now
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
034515190c
commit
5370e2ad6e
10 changed files with 103 additions and 49 deletions
27
include/simd-compat/mmintrin.h
Normal file
27
include/simd-compat/mmintrin.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2022 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
# include_next <mmintrin.h>
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
# include <wasm_simd128.h>
|
||||
// # include_next <pmmintrin.h>
|
||||
#else
|
||||
# include "../sse2neon/sse2neon.h"
|
||||
#endif
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
|
||||
* Copyright (C) 2021-2022 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
|
||||
|
@ -17,8 +17,28 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
# include_next <pmmintrin.h>
|
||||
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
# include_next <pmmintrin.h>
|
||||
|
||||
// NOTE these have been verified to be unused (included for ValleyAudio builds)
|
||||
// static inline
|
||||
// __m64 _mm_and_si64(__m64 a, __m64 b) { return a; }
|
||||
//
|
||||
// static inline
|
||||
// __m64 _mm_andnot_si64(__m64 a, __m64 b) { return a; }
|
||||
//
|
||||
// static inline
|
||||
// __m64 _mm_or_si64(__m64 a, __m64 b) { return a; }
|
||||
|
||||
static inline
|
||||
__m64 _mm_set1_pi16(short w)
|
||||
{
|
||||
return __extension__ (__m64){ static_cast<float>(w), static_cast<float>(w) };
|
||||
}
|
||||
|
||||
#else
|
||||
# include "../sse2neon/sse2neon.h"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue