diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 6be2b7417..96a8b25fa 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -8,6 +8,8 @@ #include "gba/gba.h" #include "gba/io.h" +#include "util/arm-algo.h" + #ifdef NDEBUG #define VIDEO_CHECKS false #else diff --git a/src/platform/sdl/sw-sdl.c b/src/platform/sdl/sw-sdl.c index 78fcb78fb..411a5856b 100644 --- a/src/platform/sdl/sw-sdl.c +++ b/src/platform/sdl/sw-sdl.c @@ -6,11 +6,7 @@ #include "main.h" #include "gba/supervisor/thread.h" - -#if defined(__ARM_NEON) -void _neon2x(void* dest, void* src, int width, int height); -void _neon4x(void* dest, void* src, int width, int height); -#endif +#include "util/arm-algo.h" bool GBASDLInit(struct SDLSoftwareRenderer* renderer) { #if !SDL_VERSION_ATLEAST(2, 0, 0) diff --git a/src/util/arm-algo.h b/src/util/arm-algo.h new file mode 100644 index 000000000..1c603ab5b --- /dev/null +++ b/src/util/arm-algo.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2013-2015 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef ARM_ALGO_H +#define ARM_ALGO_H + +#ifdef __arm__ +void _to16Bit(uint16_t* dest, uint32_t* src, size_t words); + +#if defined(__ARM_NEON) +void _neon2x(void* dest, void* src, int width, int height); +void _neon4x(void* dest, void* src, int width, int height); +#endif +#endif + +#endif \ No newline at end of file