Util: Add header for ARM util functions
Jeffrey Pfau jeffrey@endrift.com
Sun, 22 Feb 2015 01:46:50 -0800
3 files changed,
21 insertions(+),
5 deletions(-)
M
src/gba/renderers/video-software.c
→
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
M
src/platform/sdl/sw-sdl.c
→
src/platform/sdl/sw-sdl.c
@@ -6,11 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#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)
A
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