commit a8944f36ec3774e4a349ef504d43b86ba653178a
parent 32c18e82cac92d91d04ba007fb08054360232f7f
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date: Mon, 27 Dec 2021 13:38:44 +0100
remove aarch64-specific logic, it has been moved to its own branch, "aarch64"
Diffstat:
3 files changed, 1 insertion(+), 43 deletions(-)
diff --git a/build.sh b/build.sh
@@ -38,7 +38,6 @@ MSYS_NT*|MINGW*) # MSYS2 on Windows
else
UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)"
fi
- sed -i -e '/^#pragma weak /d' src/devices/ppu.c
;;
Darwin) # macOS
CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
@@ -57,14 +56,11 @@ then
else
CFLAGS="${CFLAGS} -DNDEBUG -Os -g0 -s"
CORE='src/uxn-fast.c'
- ARCH=`${CC} -dumpmachine 2> /dev/null || echo nope`
- ARCH=${ARCH%%-*}
- EXTRA=`find src -name *_${ARCH}.c 2> /dev/null || true`
fi
echo "Building.."
${CC} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
-${CC} ${CFLAGS} ${CORE} src/devices/file.c src/devices/mouse.c src/devices/ppu.c src/devices/apu.c src/uxnemu.c ${EXTRA} ${UXNEMU_LDFLAGS} -o bin/uxnemu
+${CC} ${CFLAGS} ${CORE} src/devices/file.c src/devices/mouse.c src/devices/ppu.c src/devices/apu.c src/uxnemu.c ${UXNEMU_LDFLAGS} -o bin/uxnemu
${CC} ${CFLAGS} ${CORE} src/devices/file.c src/uxncli.c -o bin/uxncli
if [ -d "$HOME/bin" ]
diff --git a/src/devices/ppu.c b/src/devices/ppu.c
@@ -77,7 +77,6 @@ ppu_clear(Ppu *p, Layer *layer)
layer->changed = 1;
}
-#pragma weak ppu_redraw
void
ppu_redraw(Ppu *p, Uint32 *screen)
{
diff --git a/src/devices/ppu_aarch64.c b/src/devices/ppu_aarch64.c
@@ -1,37 +0,0 @@
-#ifdef __aarch64__
-#include <arm_neon.h>
-#include "ppu.h"
-
-void
-ppu_redraw(Ppu *p, Uint32 *screen)
-{
- uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette);
- Uint8 *fg = p->fg.pixels;
- Uint8 *bg = p->bg.pixels;
- int i;
-
- p->fg.changed = p->bg.changed = 0;
-
-#ifdef __has_builtin
-#if __has_builtin(__builtin_assume)
- __builtin_assume(p->width > 0 && p->height > 0);
-#endif
-#endif
-
- for(i = 0; i < (p->width * p->height & ~15); i += 16, fg += 16, bg += 16, screen += 16) {
- uint8x16_t fg8 = vld1q_u8(fg);
- uint8x16_t bg8 = vld1q_u8(bg);
- uint8x16_t px8 = vbslq_u8(vceqzq_u8(fg8), bg8, fg8);
- uint8x16x4_t px = {
- vqtbl1q_u8(pal.val[0], px8),
- vqtbl1q_u8(pal.val[1], px8),
- vqtbl1q_u8(pal.val[2], px8),
- vdupq_n_u8(0xff),
- };
- vst4q_u8((uint8_t*)screen, px);
- }
-
- for(; i < p->width * p->height; i++)
- screen[i] = p->palette[*fg ? *fg : *bg];
-}
-#endif